# How to set the width of a message sequence chart (msc)

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
• @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

• 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).

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

! Undefined control sequence.
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
`