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 struggling with pgf-umlsd. As you can see in the image the arrow does not "grow" with my text length, producing a very ugly layout:

enter image description here

My code:

\documentclass[a4paper]{article}

\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes, shadows, positioning, trees}
\usepackage[underline=false,rounded corners=false]{pgf-umlsd}

\begin{document}

  \begin{sequencediagram}
    \newthread{t}{Teilnehmer}{}
    \newinst{s}{Server}{}

    \begin{call}{t}{Anfrage}{s}{Parameter $P=e(K,K_{pub})$}
    \end{call}

  \end{sequencediagram}
\end{document}

I tried using a box with \begin{call}{t}{Anfrage}{s}{\makebox[10em]{Parameter $P=e(K,K_{pub})$}} but this doesn't change the result, no matter if I put it to the top or bottom arrow. Is there a possibility to fix this?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can move the \newinst with an optional argument: \newinst[3]{s}{Server} (see the documentation, example 1.1.4; unfortunately, the documentation is not very "talkative" and does explain almost exclusively by example; the source pgf-umlsd.sty might be helpful: all commands are listed with a full usage example).

\documentclass[a4paper]{article} 
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes, shadows, positioning, trees}
\usepackage[underline=false,rounded corners=false]{pgf-umlsd}

\begin{document}

  \begin{sequencediagram}
    \newthread{t}{Teilnehmer}
    \newinst[3]{s}{Server}

    \begin{call}{t}{Anfrage}{s}{Parameter $P=e(K,K_{pub})$}
    \end{call}

  \end{sequencediagram}
\end{document}

enter image description here

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.