1

I'm using the MSC package to draw a sequence chart. I only need one instance, with ingoing and outgoing (lost and found) messages. I've set up a working example suing the LaTeX compiler.

http://texdoc.net/texmf-dist/doc/latex/msc/manual.pdfhttp://texdoc.net/texmf-dist/doc/latex/msc/manual.pdf

\documentclass{article}
\usepackage{msc}
\begin{document}
\begin{msc}{test}
\declinst{a}{}{$A$}
\found{label}{}{a}
\end{msc}
\end{document}

which gives this result

enter image description here

The label i need is quite long and complicated, so I need to make the distance between the circle and the arrow longer, so there's place. I've looked at the documentation, and tried inserting various values at the pos, labelpos and placement optionals, but without any luck.

How can I make the label longer?

2 Answers 2

0

After some time, a few hours actually, I finally figured out how to do it!

\documentclass{article}
\usepackage{msc}
\begin{document}
\begin{msc}{test}
 \drawframe = 
\declinst{a}{}{$A$}
\selfmesswidth = 5cm

%First outgoing
\lostsymbolradius = 0px
\lost[1]{label}{}{a}
\nextlevel
\nextlevel

%First receiving
\lostsymbolradius = 0px
\found[1]{label2}{}{a}
\nextlevel
\nextlevel

%Second outgoing
\lostsymbolradius = 0px
\lost[1]{label3}{}{a}

\end{msc}

\end{document}
0

With the setting \setlength{<some parameter>}{<length>}, you can change the default settings as you wish. Here, I changed the \selfmesswidth parameter:

\documentclass{article}
\usepackage{msc}
\begin{document}
\begin{msc}{test}
\setlength{\selfmesswidth}{3cm}
\setlength{\envinstdist}{3.5cm} % According to the above one
\declinst{a}{}{$A$}
\found{Very long label}{}{a}
\end{msc}
\end{document}

enter image description here

Note that the distance between environments and nearest instance line should be adjusted accordingly as I did in \setlength{\envinstdist}{3.5cm}.

1
  • 1
    What is the difference between \setlength{\selfmesswidth}{3cm} and \selfmesswidth = 5cm ? :)
    – Andersnk
    May 11, 2015 at 16:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .