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'm trying to create an UML diagram using TikZ and pgf-umlcd, unfortunately I seem to have some kind of special character problem and was not able to figure out how to escape them right, an example would be:

\begin{tikzpicture}
    \begin{package}{Test}
        \begin{interface}[text width=7cm]{TestInterface}{0,0}
            \operation{testOperation(a : Map<String, Integer>>) : Boolean}
        \end{interface}
    \end{package}
\end{tikzpicture}

Unfortunately the greater than and less than characters are not printed in a PDF file like they should be instead some "character mess" is printed. What's wrong?

share|improve this question
add comment

1 Answer

Just add \usepackage[T1]{fontenc} for direct support of the < and > character. To avoid a >> ligature, you youd insert {}:

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{pgf-umlcd}
\begin{document}
\begin{tikzpicture}
    \begin{package}{Test}
        \begin{interface}[text width=7cm]{TestInterface}{0,0}
            \operation{testOperation(a : Map<String, Integer>{}>) : Boolean}
        \end{interface}
    \end{package}
\end{tikzpicture}
\end{document}
share|improve this answer
add comment

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.