Latin l with TMathText and pdf issue

Dear Root users and experts,
I am facing an issue with latin l( \ell of TMathText) in pdf. When I look at the pdf file alone generated by my script, I can see my the latin l. Then I put this plot on an overleaf document and the display shows me the latin l. Then I download the document pdf and the latin l disappears… What is happening ??
Best regards, David Jamin.

TMathText does not render in PDF files. It works with PostScript.

OK. I have tried to make the output of my macro to make a eps. Here I see the latin l.
Then I convert epstopdf and here I see the latin l in my pdf file. But in the end I have the exact same issue as described above when I go in latex document.
How can I have in the end this plot into a pdf file (from latex or overleaf) with the latin l visible?

When generating the PS file try:

canvas->Print("example.eps","EmbedFonts");

It seems not to help, now I see #ell in the display.

It works for me.

I have the following macro

{
   TLatex *   tex = new TLatex(0.5,0.5,"\\ell");
   tex->SetTextSize(0.5);
   tex->Draw();
   gPad->Print("ell.eps")
}

which generates the attached file ell.eps . I include this eps file like in the following
.tex file (ell.tex).

\documentclass{article}
\usepackage{xcolor}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\pagecolor{yellow!30}
\begin{center}
\includegraphics[scale=0.5 ]{ell.eps}
\end{center}
Image included as a eps file showing "ell".
\end{document}

Running pidflatex on it it gives me a pdf file which shows the “ell”.

$ pdflatex ell.tex


ell.pdf (26.6 KB)

Many thanks for the example. I have used your macro to get the eps file and then I pushed it in my overleaf example. This is the screen-shot


and then if I get the pdf file of the project I have an empty figure … See attached pdf.
Standalone___David.pdf (50.8 KB)
So it looks like an overleaf issue.

I just got a try with your ell.tex and the generated eps figure. My output pdf of pdflatex is not displaying the latin l.
ell.pdf (17.6 KB)
I am not clear about what is happening but I am not able to reproduce what you explain above.

In the elog I found that the unicode of the latin l is problematic :
glyph `afii61289’ undefined
a fix found on internet is to set this in the beginning of the document :
\pdfinclusioncopyfonts=1
and now it works.
Sorry for the troubles.

1 Like