Eps local characters problem

I am using root 4.03/05 in CINT mode, compiled with qtroot.

Enabling qtroot caused proper display of local iso-8859-2 characters in root, in both menus etc. and TCanvas etc.

Everything works fine, except saving TCanvas to a file. Generated gif files are OK, but in eps I’ve got rubbish instead of local characters. Is there any way I could fix it?

Lech Wiktor Piotrowski

Can you tell on which kind of machine you are running ?
Can you send a little example showing the problem ?

[quote=“couet”]Can you tell on which kind of machine you are running ?
Can you send a little example showing the problem ?[/quote]

I am running it on linux fedora core 2. I attach a gif file, in which everything looks fine and eps with rubbish.

Code is simple - just TCanvas and SetTitle on X, Y axis and TCanvas. I can give any other information that are needed.
lapvsmag.eps.gz (70.5 KB)


Can you send the character strings you put in the X and Y titles? Or better send a small macro we can execute !!

Herea I attach a macro with input file. Just execute

.x graph.c(“input”)

from ROOT prompt.

However, I need to change fonts in root configuration file to iso-8859-2 (instread of default iso-8859-1) and enable qtroot to see proper polish characters.
macro.tar (795 Bytes)

your file is weird… it gives:

can you just send a small .C ? …

Strange, checked this tar here and works fine…

OK, I attach small.c, just execute .x small.c.

Hope it works and attaching do not convert anything into a wrong codepage…
small.c (941 Bytes)

your chararter string contains weird characters:

“Warto¶æ laplasjanu gwiazd w funkcji ich jasno¶ci katalogowej”,
…^^…^

use TLatex convention (see TLatex help)

[quote=“couet”]your chararter string contains weird characters:

“Warto¶æ laplasjanu gwiazd w funkcji ich jasno¶ci katalogowej”,
…^^…^

use TLatex convention (see TLatex help)[/quote]

But these are local, polish characters - that’s what I’m talking about. They display correctly in TCanvas, in saved gif file, but not in eps. The only way top omit this problem is to use TLatex?

TLatex is used to display the title texts just use TLatex conventions in the titles you produce

Could you help me a little more with this, since I haven’t used latex in root before?

Polish characters are input in latex in a following way (if not just using local codepage):

\c{a}
'n
{\l}
{.z}

etc. I am not sure how to use this convention in root? Things like #c{a} do not work :slight_smile:

not all LaTex characters are available in TLatex. Have a look to the TLatex class (on the root web site) to see the supported characters.

The only latex accents I found are

#dot #ddot #hat #check #acute #grave #tilde #slash

which are not nough for polish characters… Does it mean I cannot get proper polish charactes in root in eps files?

yes could be … French and German also are not fully supported. Send us the accent(s) you want (in LaTex) and we will had it in the “to-do list” of TLatex … TLatex in not a full tex processing engine as LaTex (you do not have cyrillic for instance). It is mainly oriented toward math and physics formulae.

Woudn’t it be easier to add proper codepage support for export to eps files?

Compiling latex (normal latex, not ROOT Tlatex) to ps file gives full national codepage support, so I guess it is possible and maybe very easy to do. You have it working (at least with qtroot) for TCanvas and import to format other than eps, so I guess it is partialy done already :slight_smile:

It it would have been that easy it would be already done… :frowning: the thing is that TTF and PS uses different encoding … they overlap on a large scale but for special character they don’t … LaTex works in a differents way. It has its own fonts (look at a PS file genertaed form latex it is very unlikely you will be able to see your text)

OK, so I send latex commands to generate ~polish characters:

\c{a} 'c \c{e} {\l} 'n 'o 's .z 'z
\c{A} 'C \c{E} {\l} 'N 'O 'S .Z 'Z

however, \c{a} \c{A} and \c{e} \c{E} generate bad polish characters - with “tail” in the midle of the letter, when it should be at it’s right side, and tail’s lower end shoud point right, not left (horizontal flip). But ofcourse every kind of support for polish characters would be great.

Lech Wiktor Piotrowski