I am drawing a msc diagram on Overleaf, but it keeps leaning to the right instead of being centered

I intend to save this diagram to an image file, for later use in another latex document where i cannot trivially draw it.

so it's essential i get it correctly drawn in the MWE

here's the code :

\usepackage[utf8]{inputenc} \documentclass{article} \usepackage{msc}



\setlength{\instdist}{4.3cm} \setlength{\envinstdist}{1.07\envinstdist} \declinst{d1}{L}{L\textsubscript{d1}} \declinst{pi}{lul}{pi} \declinst{d2}{LL}{LL\textsubscript{d2}}

\mess{1. lol $\rightarrow \textbf{LUL} $}{d1}{pi} \nextlevel[2] \mess{2. lul $\rightarrow \textbf{lol} $}{pi}{d2}



and here's the picture;

enter image description here

1 Answer 1


The diagram is too wide. The space it takes is well over 16cm, which is much more than a standard line width.

Reducing \instdist to 2.25cm makes the diagram fit in the standard line width. Your particular document might allow for more.




\mess{1. lol $\rightarrow \textbf{LUL} $}{d1}{pi}
\nextlevel[2]\mess{2. lul $\rightarrow \textbf{lol} $}{pi}{d2}


The showframe package is used just to show the page margins, remove it for your document.

enter image description here


You must log in to answer this question.

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