|
From: Hans-Bernhard B. <br...@ph...> - 2005-02-13 19:28:57
|
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[]. I.e. you don't really need conv_text() --- you only need strcpy(), but from a different source than the already munged epslatex_header. 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. At least it should be allowed to keep it in a separate file. Or to use this option multiple times, to generate multiple header lines. > The point is that conv_text() is used by routines that take strings from > options of commands of the command line, for example, 'set title'. What > conv_text() does is to take input strings that may be written between > single quotes '...' or between double quotes "..." and map them to a > unique format that corresponds to that in double quotes "...". Actually, it does only the second half of that job: turning non-printable back into printable syntax. The other (first) half is done by argument input functions (in set.c, unset.c, ...), which indirectly all use util.c:parse_esc() to parse backslash-escape sequences into actual newlines, tabs and whatnot. |