Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following files:

metaumlfile.mp:

input metauml;
beginfig(1);
    Class.Benutzer("Benutzer")
           () 
           ("+üben(): void");

    drawObjects(Benutzer);
endfig;
end

latexfile.tex:

\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc} % this is needed for german umlauts
\usepackage[ngerman]{babel} % this is needed for german umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout

% The following is needed in order to make the code compatible
% with both latex/dvips and pdflatex.
\ifx\pdftexversion\undefined
\usepackage[dvips]{graphicx}
\else
\usepackage[pdftex]{graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
\fi

\begin{document}
\includegraphics{metaumlfile.1}
\end{document}

Makefile:

make:
    mpost metaumlfile.mp
    pdflatex latexfile.tex -output-format=pdf
    pdflatex latexfile.tex -output-format=pdf
    make clean

clean:
    rm -rf  $(TARGET) *.class *.html *.log *.aux *.out *.glo *.glg *.gls *.ist *.xdy *.1 *.toc

(I hope this still works. I have a much larger file and tried to generate a minimal example. My large file compiles when I call make.)

In metaumlfile.mp is a special character called "umlaut". What do I have to change to get it displayed correctly in my PDF file? (I can use umlauts in my latexfile.tex.)

share|improve this question

1 Answer 1

up vote 5 down vote accepted

It's clearly an encoding problem; MetaUML doesn't really understand TeX input and doesn't like UTF-8 at all.

If you save the .mp file as Latin-1 you have a chance that the special characters are correctly rendered, as Latin-1 and the font used by MetaUML share many slots (the ü is among them).

Here's the result from the MetaUML file encoded as Latin-1:

enter image description here

share|improve this answer
    
I've saved it as "Western (ISO-8859-15)". It worked. Is this the same encoding as Latin-1? –  moose May 4 '12 at 4:18
    
Is there any possibility to include something like this: fileformat.info/info/unicode/char/25b2/index.htm ? –  moose May 4 '12 at 5:25
    
@moose I'm afraid not. :( –  egreg May 4 '12 at 8:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.