Given the MWE below from Configure arrows in pgf-umlsd (compiled version on the link) :
\documentclass{article}
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{positioning, fit, calc, shapes, arrows}
\usepackage[underline=false]{pgf-umlsd}
\begin{document}
\begin{figure}[H]
\centering
\begin{sequencediagram}
\newinst{c}{Client}
\newinst[6]{s}{Server}
\mess[1]{c}{Longer label}{s}
\mess[1]{s}{label}{c}
\mess[1]{c}{label}{s}
\mess[1]{s}{Longer label}{c}
\end{sequencediagram}
\caption{Client-Server messaging}
\end{figure}
\end{document}
I would like to add some "processing contents" on the left of the left dotted vertical bar and on the right of the right dotted vertical bar. (If possible to add some \newline
inside of these "processing contents" also)
Text example "linearised"* :
Client Server
c^2 | --------------->| init
| | f=f(c^2)
g=g(f) | <---------------| f
g | --------------->| check if h=g
| <---------------| OK
*What I mean is that I still want to use the above tex form, which has a nice rendering.
The only thing I would like to add are information on both sides at every start and end of an arrow. I am looking for a simple solution if it is possible.
Thank you in advance for any help you may provide.
Best Answer
I found the definition of
\mess
in the style, and adapted it as\bloodymess
that has three additional arguments at the end. Mandatory arguments 4, 5, and 6 are now: the arrow direction (L
, orR
); the start note; and the end note. If the arrow direction is given as anything other thanL
orR
, the text will print out directly over the beginning or end of the arrow, respectively