TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

I redefined << and >> symbols not using \guillemotleft and \guillemotright, so that the new release of tikz-uml, coming soon, does not depend anymore on \usepackage[T1]{fontenc}

share|improve this answer

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.