[Scilab-users] LaTeX strings in scilab plot : \includegraphics & paperwidth

classic Classic list List threaded Threaded
3 messages Options
Antoine Monmayrant Antoine Monmayrant
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] LaTeX strings in scilab plot : \includegraphics & paperwidth

Hi all,


I've known and used for a long time the possibility of including LaTeX in scilab plots, like:

scf();
plot(1:10,1:10)
a=gca()
xt=a.x_ticks
nxt=xt;
nxt.labels(5)="$\lambda$";
a.x_ticks=nxt;

in order to get x ticks that read "1 2 3 4 λ 6 7 8 9 10".

I've just started to play with the ability to use "\includegraphics[]{}" in these LaTeX strings and this brings a question: what are \textwidth,\paperwidth,\textheight lengths set to?
I could not get "$\the\paperwidth$" to work, it produces an error :

scf();
plot(1:10,1:10)
a=gca()
xt=a.x_ticks
nxt=xt;
nxt.labels(5)="$\the\paperwidth$";
a.x_ticks=nxt;

    org.scilab.forge.jlatexmath.ParseException: Unknown symbol or command or predefined TeXFormula: 'the'

I suppose the "\the" construct is not supported by jlatexmath...

Any idea?


Cheers,


Antoine

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 Antoine Monmayrant LAAS - CNRS
 7 avenue du Colonel Roche
 BP 54200
 31031 TOULOUSE Cedex 4
 FRANCE

 Tel:+33 5 61 33 64 59
 
 email : [hidden email]
 permanent email : [hidden email]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Philippe Roux Philippe Roux
Reply | Threaded
Open this post in threaded view
|

Re: LaTeX strings in scilab plot : \includegraphics & paperwidth

Le 04/04/2019 à 13:10, Antoine Monmayrant a écrit :
>
>
> I suppose the "\the" construct is not supported by jlatexmath...

no it's not supported, LaTeX rendering is generated so that the result
correspond to a certain font_size, this property  can be set somewhere
in scilab handle hierarchy .

> Any idea?

you can change the font_size of all strings appearing in the current
axes by adding "a.font_size=..." at the end of your example.

scf();
plot(1:10,1:10)
a=gca()
xt=a.x_ticks
nxt=xt;
nxt.labels(5)="$\the\paperwidth$";
a.x_ticks=nxt;
a.font_size=5;// bigger!

Cheers,
Philippe

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: LaTeX strings in scilab plot : \includegraphics & paperwidth

Le 16/04/2019 à 16:02, philippe a écrit :
Le 04/04/2019 à 13:10, Antoine Monmayrant a écrit :
I suppose the "\the" construct is not supported by jlatexmath...
no it's not supported, LaTeX rendering is generated so that the result
correspond to a certain font_size, this property  can be set somewhere
in scilab handle hierarchy .
Any idea?
you can change the font_size of all strings appearing in the current
axes by adding "a.font_size=..." at the end of your example.

You may try this :



and also

\DeclareMathSizes{textSize}{mathTextSize}{scriptSize}{subscriptSize} 


Regards
Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users