0

Maybe this is a rudimentary question, but I quickly skimmed through the msc (message sequencing charts) documentation and there's no mention of labeling the msc diagram itself.

I want to label an msc diagram in latex like we label figures in latex e.g \label[fig: fig1]

I just want to ask if there's something like \label[msc: mscdiag1]

cheers

1
  • 2
    Probably same as any other figure I suppose, e.g. \begin{figure} <msc diagram> \caption{…} \label{foo} \end{figure}. Commented Dec 27, 2021 at 9:50

1 Answer 1

1

The package manual refers to a diagram in Section 5 Quick Start. You can look at the source of the manual (manual.tex) on CTAN: https://www.ctan.org/tex-archive/macros/latex/contrib/msc. The source of the section (slightly shortened for readability) is as follows:

\section{Quick start}
\label{quickstart}
The \mscpack{} is easy to use.
Below is an example of the use of the package and
Figure~\ref{quick} shows the generated \MSC{}.

{\small
\begin{verbatim}
\documentclass{article}
\usepackage{msc}
\begin{document}
\begin{msc}{Example}
[...]
\end{msc}
\end{document}
\end{verbatim}
}

\begin{figure}[htb]
\begin{center}

\begin{msc}{Example}

\declinst{usr}{User}{}
\declinst{m1}{Machine 1}{control}
\declinst{m2}{Machine 2}{drill}
\declinst{m3}{Machine 3}{test}

\mess{startm1}{usr}{m1}
\nextlevel
\mess{startm2}{m1}{m2}
\nextlevel
\mess{continue}{m2}{m3}
\mess{log}{m1}{envleft}
\nextlevel
\mess{output}{m3}{usr}[2]
\nextlevel
\mess{free}{m1}{usr}
\nextlevel

\end{msc}

\end{center}
\caption{The generated \MSC{}}
\label{quick}
\end{figure}

So indeed as mentioned in a comment: a regular \label statement within a figure environment.

You must log in to answer this question.

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