|
From: Harald H. <h.h...@tu...> - 2005-02-14 23:27:24
|
On Mon, 14 Feb 2005 dan...@ie... wrote:
> > This can be done now using 'set terminal epslatex standalone'. You don't
> > have to handle an additional header file then, because gnuplot produces
> > everything you need. You even can omit the -E switch of dvips since the
> > generated header file preserves the correct BoundaryBox, when using
> > latex->dvips and when using epstopdf->pdflatex. There ist one difference:
> > The new syntax produces the BoundingBox that is given by the 'set size'
> > command while dvips -E cuts off all white space. If you, for example,
> > produce white space around your plot, using 'set size', it is kept in your
> > final postscript file.
>
> Funny because a month or so ago I had a conversation with Ethan and Hans
> about cropping *all* of the white space surrounding plots. (It's always
> easier to add than to take away.)
I did not want to say that it is an advantage that the white space is
preserved. It is just a difference. I also think it could be a good thing
to _optionally_ remove all white space around a plot.
> >> But I can't ever see myself using such a thing, unless you could
> >> convince me of some time savings.
> >
> > As mentioned above. Just try it. For example, if you want a standalone
> > plot with Times in 12pt size, use:
>
> I can imagine using such a feature. But the typing of the LaTeX code for
> the header is the issue:
>
> > set terminal epslatex standalone header '\usepackage{mathptmx}' '' 12
>
> What Ethan mentioned; just too cumbersome... unless one uses the syntax a
> lot.
I don't think so. A LaTeX user knows which packages and commands he needs
to reach a special output. He is used to use \usepackage commands.
> I wonder why one needs this. OK, the gnuplot.cfg could cover the
> special users. But since gnuplot is generating the code, why can't the
> terminal driver figure out all the packages that are needed? Maybe an
> option like
>
> set terminal epslatex standalone font "times"
>
> would result in
>
> \usepackage{times}
Then, a LaTeX user would have to learn that in using LaTeX, he has to use
\usepackage{mathptmx} to get Times-Roman as font while in epslatex, he has
to use 'font "times"'. (BTW: \usepackage{times} is obsolete.) Using the
header command, the LaTeX user can use the same syntax for the gnuplot
header and the normal LaTeX header.
And how do you want gnuplot to cover all possible font wishes?
times --> \usepackage{mathptmx}
minion --> \usepackage[T1]{fontenc}\usepackage{mathpmnt}
cmbright --> \usepackage{cmbright}
latinmodern --> \usepackage{lmodern}
... (thousands of more possibilities that don't follow simple rules)
Using the present 'header' syntax, everything is possible that LaTeX can
do. You can even define abbreviations. If you, for example, are making a
plot for fracture mechanics, you will have to use something like
$K_{\mathrm{Ic}}$. To shorten your code, you can do this:
set terminal epslatex header '\def\Kc{{\ensuremath K_{\mathrm{Ic}}}}'
set xlabel '\Kc'
Everybody who knows LaTeX immediately understands what these lines do.
The current code already supports to switch to fonts without the header
option. But this is a little bit low level:
set terminal epslatex 'phv,bx,it' 12
switches to Helvetica bold italics. The abbreviations are the LaTeX
internal names for the fonts.
Regards
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|