For Programmers: Free Programming Magazines  


Home > Archive > Matlab > December 2005 > Latex in Multiline









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Latex in Multiline
latex in multiline

2005-12-06, 7:12 pm

does anyone know how to use latex strings in multiline?

seems very simple, but neither the multiline text or multiline title
work when the interpreter is set to latex.

(

str1(1)={xyz};
str1(2)={abc}
text(5,2,'string',str1)

or

title([{line1;line2}])
)

without latex, everything works fine. but as soon as u have latex
interpreter, the second line vanishes.

is there a way to do that , other than using different text box for
each line and manually entering the position.
us

2005-12-06, 7:12 pm

latex in multiline:
<SNIP latex problem...

it works as advertised - how does your input look like?

clf;
str(1)={'$\sum(xyz)$'};
str(2)={'$\lim{aabbcc}$'};
str(3)={'$\pi^5$'};
text(.1,.1,str,'interpreter','latex');

us
champak

2005-12-06, 10:02 pm

Thanks,
but i copied and pasted ur code directly in matlab and
again all i see is str(1).
i wonder if iit is bcos i am using a different version. I have
student version of matlab 7.

us wrote:
>
>
> latex in multiline:
> <SNIP latex problem...
>
> it works as advertised - how does your input look like?
>
> clf;
> str(1)={'$\sum(xyz)$'};
> str(2)={'$\lim{aabbcc}$'};
> str(3)={'$\pi^5$'};
> text(.1,.1,str,'interpreter','latex');
>
> us

fishdude

2005-12-07, 8:02 am

latex in multiline wrote:

> does anyone know how to use latex strings in multiline?
>
> seems very simple, but neither the multiline text or multiline title
> work when the interpreter is set to latex.
>
> (
>
> str1(1)={xyz};
> str1(2)={abc}
> text(5,2,'string',str1)
>
> or
>
> title([{line1;line2}])
> )
>
> without latex, everything works fine. but as soon as u have latex
> interpreter, the second line vanishes.
>
> is there a way to do that , other than using different text box for
> each line and manually entering the position.


have you tried, exporting it to eps?
i have spent a lot of time, having the same problem 'till i found out that
the strings are just not shown in the figure but exported to eps.
i found reports where win-users don't have this problem, but unix-users (as
i am) do.
this might be the reason in your case too.
if you want to export those tex-strings anyway, then don't bother and go
ahead, everthing will be fine in eps.

<°)>><


champak

2005-12-07, 7:10 pm

Thanks for the tip,
I will try that...

anyways, i am a win user and i certainly have that problem.

champak wrote:[color=darkred]
>
>
> Thanks,
> but i copied and pasted ur code directly in matlab and
> again all i see is str(1).
> i wonder if iit is bcos i am using a different version. I have
> student version of matlab 7.
>
> us wrote:
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com