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 was compiling the following code which uses the tikz-uml package.

\documentclass{article}
%\usepackage{pgf}
%\usepackage{tikz}
\usepackage{tikz-uml}

\begin{document}
\begin{tikzpicture}
    \begin{umlseqdiag}
        \umlobject{a}
        \begin{umlcall}{a}{a}
            \begin{umlcall}{a}{a}           % line 11
            \end{umlcall}                   % line 12
        \end{umlcall}
    \end{umlseqdiag}
\end{tikzpicture}
\end{document}

It compiles on one machine without any problems. However, on another one, it gives an error. Both machines use Windows 7 64-bit, MikTeX 2.9 64-bit. Error message:

! Extra \or.
\ifthenelse #1->\toks@ {#1}\TE@repl \or
                                        \TE@or \TE@repl \and \TE@and \TE@rep...
l.12            \end{umlcall}
I'm ignoring this; it doesn't match any \if.

Anyone knows the reason for it and how to resolve it? I know it's due to an umlcall environment inside another one. It's actually enough to uncomment lines 11 and 12 to make the error disappear, but the result is not the same obiously.

The problem doesn't depend on including PGF or TikZ packages, nor on defining inputenc or fontenc. It doesn't depend on the fact that the a object calls itself neither.

EDIT 1: I was mistaken, the code that I tested and that worked on other machine was actually a bit different (precisely: everything inside the tikzpicture environment was a part of a bigger file).

The solution is to add \usepackage[language]{babel} in the preamble. But why does the documentation not say anything about it...?

EDIT 2: The wanted result is:

tikz-uml nested self-umlcall

share|improve this question
    
About tags: I wanted to add [tikz-uml] tag, but it doesn't exist and I can't do this on my own. –  Curdeius Feb 16 '12 at 14:27
    
You need to include a diagram of what you expect your code to produce. As it is, it looks like everything is referring to the same object, i.e. the nested umlcall is probably a mistake. –  qubyte Feb 16 '12 at 15:15
    
Please read the question carefully, a nested umlcall is NOT a mistake. The same error appears when there are two umlobjects. –  Curdeius Feb 16 '12 at 17:38
    
@Curdeius: Please include the diagram. I'd be interested to see what the successful compilation yields. In addition, we need version numbers on the tikz-uml package that you are using for each machine, since a difference would be one probable cause of success on one machine and not the other. –  qubyte Feb 16 '12 at 18:45
2  
You can include images as usual and remove the preceding ! from the image link. Users with edit privileges will correct this. Regardless, we'd like to keep answers separate from questions, so you should write a separate answer instead of editing your answer into the question. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation. –  Werner Feb 16 '12 at 22:43
show 4 more comments

1 Answer

up vote 3 down vote accepted

The solution is to use the babel package with the language of your choice, i.e. add one line to the preamble:

\usepackage[english]{babel}

Of course, you can change english to use different language.

The documentation of the tikz-uml package says nothing about this issue, nothing like "required packages" is mentioned there.

share|improve this answer
2  
Actually, this is mentioned on the home page. "For still unknown reasons, TikZ-UML works fine if you have already included the babel package with the language of your choice." ensta-paristech.fr/~kielbasi/tikzuml/… –  iX3 Feb 21 '13 at 20:59
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.