3

I have a problem using eps images in LaTeX. Briefly, I have a plot from MATLAB were a label on an axis is "€". I insert this image in my tex file, then, when I compile, on the pdf the "€" disappear. Is it a problem of MATLAB images or EPS can't handle "€" symbol? Or maybe another reason?

2
  • 1
    The euro sign is stored as text in your eps. then when adding it to your document there is most certainly an encoding clash and the symbol can not be rendered. For more precise help, it would be ideal to have a minimal code example containing especially you encoding and font related packages and ideally we would have the image or a sample image as well
    – Martin H
    Commented Nov 28, 2013 at 14:51
  • Are you using latex or pdflatex to compile your document? Commented Nov 28, 2013 at 16:24

1 Answer 1

3

It's a Matlab problem, mixing up encodings, and it doesn't have anything to do with LaTeX.

Matlab supports Unicode internally, including displaying Unicode symbols in plots, but as far as I can tell you cannot generate eps files containing them.

In particular, the UTF-8 code of a symbol is written by Matlab as an octal escape sequence to the eps, for "€" e.g.

\342\202\254

At least on my Linux system, the € doesn't just disappear, but in an eps previewer like Okular it shows up as "â ¬". This indicates that the three codes are interpreted separately, as ISO-8859-1 codes.

I don't know enough about PostScript to tell you whether it is even possible to use Unicode / UTF-8 in an eps file (and therefore laziness on part of TMW) or not. Since you are using LaTeX, a workaround would be to use psfrag which allows you to include LaTeX code within an eps file and then get it replaced by a rendered version upon inclusion in LaTeX. For the € symbol, you can use e.g. the \euro command provided by the eurosym package.

1
  • 1
    Thanks a lot for your answer. In the end, I "solved" the problem avoiding to write the euro symbol.
    – user41851
    Commented Dec 12, 2013 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .