1

I want to draw a message sequence chart (msc) with latex. The problem is now that the message is too long to fit on the arrow, so how can I set the width of a message sequence chart? Below the lines of the msc

\documentclass[12pt,a4paper]{article}

\usepackage{msc}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}

\begin{msc}{Title}
\declinst{alice}{}{Alice}
\declinst{bob}{}{Bob}
\mess{$x, \{|s|\}_{h(k(A,B))}$}{alice}{bob}
\end{msc}

\end{document}

It does compile well. Thank you for an answer.

  • Your code does not compile (I added \usepackage{msc} and a document class). – Dr. Manuel Kuehner May 2 '17 at 19:01
  • Well I just omitted this part. I have that too. – Dr3w Br1ck13 May 2 '17 at 19:03
  • 1
    @Dr3wBr1ck13: It's advised to provide us with enough information to replicate your problem. Otherwise, we're shooting in the dark most of the time. – Werner May 2 '17 at 19:04
  • Please add a complete code example and not just a part. In addition, the manual (ctan.org/pkg/msc, refman.pdf) lists the User definable lengths in chapter 5. – Dr. Manuel Kuehner May 2 '17 at 19:04
  • The code is still not compilable. Please provide a code that one can copy and paste without further modifications. At least I wasn't able to complete the code by myself (I tried, since you a new here). – Dr. Manuel Kuehner May 2 '17 at 19:21
1
  • The files related to the msc package are located on CTAN: https://www.ctan.org/pkg/msc.
  • Among them, there is the ref­er­ence man­ual (refman.pdf) and the user manual (manual.pdf).
  • The ref­er­ence man­ual lists the User definable lengths in chapter 5.
  • The user manual list the Style parameters in chapter 7.
  • Here you can find the relevant lengths that you can change using \setlength (in your case \setlength{\instdist}{3.0cm} as you state in one of your comments).

manual.pdf


Strangely, I (still) cannot compile the MWE that you provide.

! Undefined control sequence.
<recently read> \c@lor@to@ps 

l.10 \declinst{alice}{}{Alice}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

enter image description here

  • Oh I see. I think I had to switch to the XeLaTeX engine. – Dr3w Br1ck13 May 2 '17 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.