|
From: Mojca M. <moj...@gm...> - 2009-06-28 01:00:45
|
I'm sorry,
I messed up a bit ... (too late hour).
You need to try what works inside \hbox{...}, not only equation is a
box. Gnuplot puts everything inside something equivalent to \hbox.
To start with, the following should work
'\vbox{\hbox{a}\hbox{b}}'
but I'm sure that there must be some more LaTeX-ish way to do the
same. Still you probably cannot avoid the need to create either \vbox
or multiline equation.
Any automatic conversions would do more harm than good. The only
solution to this would be not putting the contents to \hbox in the
first place, though that might bring other problems.
Mojca
On Sun, Jun 28, 2009 at 01:03, Miguel Rubio Roy wrote:
>> You may not have (two or more subsequent) line breaks inside equations in TeX.
>
> I've only tried one line break, not two and not subsequent:
>>> set label "a \n b" at 0,90
>>> set label 'a \\ b' at 0,70
>>> set label "a \\\\ b" at 0,60
>
> and anyway, I'd say these commands do not generate equations.
>
>>> How can I introduce a new line in math mode?
>>
>> If it was plain TeX it would be something like
>> '$\displaystyle{\matrix{a \cr b}}$'
>> but I think that LaTeX has \matrix redefined, so you need to check (I
>> have not been using LaTeX for ages), the syntax might be slightly
>> different.
>
> I haven't tried something like that but, I guess I would have to
> replace \cr with something like \\ which is not working, anyway.
>
>> Another option would be to use
>> '$a$ \\ $b$'
>> Again - I didn't check it, but just to get you the idea: you need to
>> split the math expressions into two and make a break *outside* of
>> equations. TeX cannot make a line break with "\\" inside equation.
>
> Some of my attempts weren't equations, and they weren't working, anyway:
>>> set label "a \n b" at 0,90
>>> set label 'a \\ b' at 0,70
>>> set label "a \\\\ b" at 0,60
>
>> But this is hardly related to gnuplot. Gnuplot will just output the
>> label text unaltered to LaTeX document. You need to use the strengths
>> and limitations of TeX/LaTeX when typesetting. It's best if you try to
>> figure out how to achieve the desired effect in usual LaTeX document
>> first and then just add the needed escape characters to generate the
>> label inside gnuplot.
>
> I agree. Compiling the following with pdflatex works fine (places "a"
> and "b" in different lines):
>
> \documentclass[english]{article}
> \usepackage[T1]{fontenc}
> \usepackage[latin9]{inputenc}
> \usepackage{babel}
> \begin{document}
> a \\ b
> \end{document}
>
>
> Thanks
>
> Miguel
>
|