Quantcast

Inline Text

classic Classic list List threaded Threaded
2 messages Options
Dallan Hunt Dallan Hunt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Inline Text

Hello,

I am trying to display inline text as would be displayed in a script
(i.e., 4^2).  My understanding is to use the $ sign.  So for example
with the multi-symbol integral I have this:

String latex = "{\\scriptsize \\${\\int}}";

The odd thing is that this draws the correct inline symbol for the
integral, but it also draws the dollar sign beside it.  If I remove
the dollar sign so I have

String newLatex = "{\\scriptsize \\int}";

The display form of the integral is drawn.

What am I doing wrong so the dollar sign does not display in inline mode?

Thanks,
Dallan
Calixte DENIZET Calixte DENIZET
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Inline Text

On 09/07/2012 16:22, Dallan Hunt wrote:
> Hello,

Hi,

Try with scriptstyle command:

latex = "\\scriptstyle  \\int_a^b f(x)";

Or you could also use:
latex = "\\int_a^b f(x)";
TeXFormula formula = new TeXFormula(latex);
TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_SCRIPT, 20);

Is it what you want ?

Regards,

Calixte

> I am trying to display inline text as would be displayed in a script
> (i.e., 4^2).  My understanding is to use the $ sign.  So for example
> with the multi-symbol integral I have this:
>
> String latex = "{\\scriptsize \\${\\int}}";
>
> The odd thing is that this draws the correct inline symbol for the
> integral, but it also draws the dollar sign beside it.  If I remove
> the dollar sign so I have
>
> String newLatex = "{\\scriptsize \\int}";
>
> The display form of the integral is drawn.
>
> What am I doing wrong so the dollar sign does not display in inline mode?
>
> Thanks,
> Dallan

Loading...