The package uses the argument to umlsystm
also for forming node names, where accented characters are invalid.
You can patch it (and suggest the authors to do something similar) by storing also a “stringified” version of the argument to be used for node names.
It's easier using regexpatch
than xpatch
, because the second patch must be applied nine times.
Basically, each of the nine occurrences of \tikzumlSystemName-
and the single (\tikzumlSystemName)
should be replaced with \tikzumlSystemNameLabel-
or (\tikzumlSystemName)
; the definition of \tikzumlSystemNameLabel
is added at the start of the environment: it uses \detokenize
to get a string, as opposed to printable characters.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english,frenchb]{babel}
\usepackage{tikz}
\usepackage{tikz-uml}
\usepackage{regexpatch}
\makeatletter
\xpatchcmd{\umlsystem}
{\def\tikzumlSystemName}
{\edef\tikzumlSystemNameLabel{\detokenize{#2}}\def\tikzumlSystemName}
{}{}
\xpatchcmd*{\endumlsystem}
{\tikzumlSystemName-}
{\tikzumlSystemNameLabel-}
{}{}
\xpatchcmd*{\endumlsystem}
{(\tikzumlSystemName)}
{(\tikzumlSystemNameLabel)}
{}{}
\makeatother
\begin{document}
\begin{tikzpicture}
\begin{umlsystem}{{\'e}}
\umlusecase{{\'e}}
\end{umlsystem}
\end{tikzpicture}
\begin{tikzpicture}
\begin{umlsystem}{é}
\umlusecase{é}
\end{umlsystem}
\end{tikzpicture}
\end{document}
You can also use directly the accented characters, as shown in the second example. Here I used utf8
, but it works also with latin1
.
