|
From: Harald H. <h.h...@tu...> - 2005-02-13 21:16:05
|
On Sun, 13 Feb 2005, Hans-Bernhard Broeker wrote:
> Harald Harders wrote:
>
> > The format in the 'set terminal epslatex header' command line does not
> > have anything to do with the contents of the epslatex_header variable.
>
> The format may not, but the contents will. So, looking at this from a
> little closer (after having updated my CVS working copy), I see the
> following: you need conv_text() to un-do the effect of having used
> quote_str() to fill epslatex_header, which interpreted backslash
> sequences into actual newlines for you (by calling parse_esc()).
>
> But meanwhile, the text you're trying to put into term_options (with the
> quotes still in their original format) is still available in its
> original form, right where quote_str() found it, so you could just copy
> the string argument directly from gp_input_line[] to term_options[].
Then I ask myself why isn't that done in that way for all options that
contain strings. Thas has been a question to me for a long time: If I type
in
set title '\hello'
why is it saved as
set title "\\hello"
? I would prefer to preserve the quotation marks and the original format
in all cases. Then, the parsing of the strings would be moved to the
position where they are used. I am aware that this is a big change but I
think it will improve consistency.
> And while we're at it: I have serious usability reservations about the
> 'header' option. It's barely usable for your example prefixing two
> simple \usepackage lines --- this really should be a header taken from a
> file, instead.
I don't agree. It is useful to be able to make some local header additions
in a gnuplot script. If you have multiple gnuplot files that all need
different headers an external header file would be impractical. Of course,
for more complex headers, an external file is useful (which already is
possible, see below).
> At least it should be allowed to keep it in a separate file.
It is already: If gnuplot.cfg is in the LaTeX path it is loaded. This may
be in the current working directory or somewhere in $TEXMF.
> Or to use this option multiple times, to generate multiple header
> lines.
This could be an option. But I think the current approach is easier to
handle. Otherwise, we would need additional commands to remove all header
information etc. as it is done with Postscript fontfile.
I have uploaded a patch that uses the original syntax including the
quotation marks for the 'show terminal' and 'save' commands:
#1121971, "Avoid usage of conv_text() in post.trm".
As the name indicates, this avoids to use conv_text() in post.trm.
I really think it was a good idea to handle all kinds of strings in a
similar way.
Regards
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|