# TLatex vs. \ell

Ok, v5.34.03 and #mp doesn’t work with my pyROOT routine, but it DOES work now in regular root interface. I’ll recheck my routine. Thanks alot.

Good

Hi,

Is there an easy way to produce the \ell symbol in a TLegend entry? Reading this thread my impression is that one would have to leave a blank and manually position a TMathText over the blank, which is far from ideal. Is that the recommended way or is there a better solution?

Best,
Christian

just specify the text string using “\” as control, like: “this is an \ell”

Hi Olivier,

Thanks a lot, that works. For completeness, I note that one cannot mix the hash and double-backslash syntax in one entry label, so one has to replace all # with \ (otherwise the #'s are simply ignored). The attached file shows the output for only using the hash syntax (black), trying to use the mixed syntax (red) and using the double-backslash-only syntax (green). I also note that the symbols are a little different when using # and \.

Best,
Christian

Yes as explained here:

Hi,

Does root still hope to support #ell in TLatex? Or is toggling between TLatex and TMathText sufficient from the developers perspective? Or are users suggested to start migrating entirely to TMathText? Or something else?

Thanks!
Alex

No…

You do not need to toggle … it is automatic

dito

Dear experts,

Does anybody know of

• why using \ell (\ instead # in general) the text is disappeared in pdf file, i.e., if I save my file as pdf? Please see the first and second attachments for a pdf and png format of the same macro.

• why it makes all the text italic? I want to write
m_{{\ell} b{\nu}} (GeV)"

with “m” and “GeV” remains in roman text format. You can see in the png attachment that it is not the case.

Thanks for any help,
mumassTrue.pdf (18.8 KB)

\ell forces uses Mathtext which is an other TeX engine that Latex (see TLatex doc). #ell is not implemented in TLatex. TMathText is not implement for PDF.

Hi,
I’d like to reiterate on the question from ajafari:

• Is there a plan to make MathText work for PDF?
• How can we change the font of the text which used MathText (say a label of the axis)

Thanks,
Andrey

Yes there is plan. But the author of this code won’t do it. I have to implement it myself, but this code is quite complex and I had always more urgent things to do. That’s why it is not yet there. I have already improved the PS output. The files generated are now much smaller than the first implementation done by the author.

TMathText is “LaTeX like” so it uses the Latex Font and ignores the Font attribute set on TLatex.

Thanks for a quick reply, this clarifies it for me.
I could use .eps and convert to pdf via epspdf command, which seems to work.

One follow-up question:

• How do I do:

using TMathText?

I need to check splitline for TMathText
I have implemented it in the TeX output.

splitline in now implemented for TMathText in the root head. So:

leg.SetHeader('\\splitline{line 1}{line 2}')

will work.

With the version you have you can do:

leg.SetHeader('{line 1} \\atop {line 2}')