|
From: Harald H. <h.h...@tu...> - 2005-02-13 21:16:06
|
On Sun, 13 Feb 2005, Ethan Merritt wrote:
> > Have a look at this example:
> >
> > set terminal epslatex standalone color \
> > header "\\usepackage[T1]{fontenc}\n\\usepackage{mathpmnt}" \
> > 'default' 12
>
> Yuck. Guaranteed to scare away novice users, like me.
It scares away non-LaTeX users as you appear to be. But LaTeX users will
understand the syntax. What is difficult using this syntax? You
do understand
set title "first line\nsecond line"
What is that different with the header "..." line?
> Do you really expect people to type that gibberish in the 'set term'
> command? Surely this belongs in an auxilliary file,
There is also the possibility of using 'gnuplot.cfg' which automatically
is loaded when available. When working with the epslatex terminal I have
noticed that this is impractical in some cases. For example if you want
different headers in different files.
Thus:
- gnuplot.cfg is useful for common settings for different plot of the same
project.
- The header option is useful for local settings that shall only appear
for the current plot.
I think using another auxilliary file for local settings in impractical.
You always have to handle two files then. Or you have to use a really
strange syntax like:
set print 'localplot.cfg'
print '\usepackage[T1]{fontenc}'
print '\usepackage{mathpmnt}'
unset print
set terminal epslatex headerfile 'localplot.cfg'
I don't like this syntax.
> or should
> be constructed by the driver itself from more user-friendly
> commands on the order of
> set termoption packages (mathpmnt, times, ...)
That scares away any LaTeX user. How do you want to add optional
parameters of the \usepackage commands? Or how do you want other useful
LaTeX commands like '\newcommand\fracab{\frac{a}{b}}'? It is not possible.
This kind of syntax would constrain LaTeX users.
> And what is that font encoding business? Is it fighting against
> the "set encoding" command?
Original TeX only knew about 7bit fonts with at least 128 characters.
\usepackage[T1]{fontenc} switches to 8bit encoded fonts with 256
characters (for example, real umlauts). It does not have to do anything
about the inputencoding. In LaTeX the input encoding is handled by
\usepackage[latin1]{inputenc}, for example. The input encoding command is
already handled by Gnuplot when using the standalone option. In 'input'
mode (which produces a LaTeX file that is meant to be \input-ed into
another LaTeX file), a comment line is written that tells the user which
input encoding has been used for the gnuplot file.
Your question has raised an idea: It is also possible for plots that are
embedded using \input to change the encoding locally, by using
\inputencoding{...}. I have uploaded a patch that uses this possibility:
#1121972 "Improve input encoding in epslatex terminal".
In addition, this patch adds the missing koi8-u encoding.
Regards
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|