summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/msc/refman.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/msc/refman.tex')
-rw-r--r--Master/texmf-dist/doc/latex/msc/refman.tex169
1 files changed, 22 insertions, 147 deletions
diff --git a/Master/texmf-dist/doc/latex/msc/refman.tex b/Master/texmf-dist/doc/latex/msc/refman.tex
index a4c416a4b6c..84d60381633 100644
--- a/Master/texmf-dist/doc/latex/msc/refman.tex
+++ b/Master/texmf-dist/doc/latex/msc/refman.tex
@@ -1,9 +1,7 @@
% file: refman.tex
-% Copyright 2002 V. Bos and S. Mauw
+% Copyright 2008 V. Bos, T. van Deursen, and S. Mauw
% This file is part of the MSC Macro Package.
%
-% RCS version: $Id: refman.tex,v 1.7 2002/07/01 10:38:59 vbos Exp $
-%
\documentclass[a4paper]{article}
\usepackage{a4wide}
@@ -98,21 +96,19 @@
}
\author{
- \begin{tabular}{cc}
- Victor Bos & Sjouke Mauw\\
- \footnotesize Turku Centre for Computer Science &
- \footnotesize Eindhoven University of Technology \\ [-0.8ex]
- \footnotesize Software Construction Laboratory &
- \footnotesize Department of Mathematics and Computing Science \\ [-0.8ex]
- \footnotesize Lemmink\"aisenkatu 14 &
- \footnotesize P.O.\ Box 513 \\ [-0.8ex]
- \footnotesize FIN--20520 Turku &
- \footnotesize NL--5600 MB Eindhoven \\ [-0.8ex]
- \footnotesize Finland &
- \footnotesize The Netherlands \\
- \footnotesize \texttt{vbos@abo.fi} &
- \footnotesize \texttt{sjouke@win.tue.nl}
- \end{tabular}
+ \begin{tabular}{c}
+ \begin{tabular}{ccc}
+ Victor Bos &
+ Ton van Deursen &
+ Sjouke Mauw \\
+ &
+ \scriptsize Universit\'e du Luxembourg &
+ \scriptsize Universit\'e du Luxembourg \\[-0.8ex]
+ \scriptsize \texttt{vbos@abo.fi} &
+ \scriptsize \texttt{ton.vandeursen@uni.lu} &
+ \scriptsize \texttt{sjouke.mauw@uni.lu}
+ \end{tabular}\\
+ \end{tabular}
}
\date{\small Version \mscversion, last update \today\\
@@ -616,11 +612,12 @@ define the upper right corner of the \MSCdoc.
\begin{defs}
-\item[\cmd{action}\{\emph{txt}\}\{\emph{nm}\}] Draws an \emph{action}
+\item[\cmd{action(*)}\{\emph{txt}\}\{\emph{nm}\}] Draws an \emph{action}
symbol on the instance with nickname \emph{nm}. The parameter \emph{txt}
defines the name of the action. The size of the action symbol is
controlled by the \verb|\actionheight| and \verb|\actionwidth|
-lengths.
+lengths. The starred version adjusts the height and width of the
+action symbol to the size of the contents.
\item[\cmd{arrow}\cmdarg{nm0}\opt{\coordargs{xpos${}_1$}{ypos${}_1$}$\ldots$\coordargs{xpos${}_n$}{ypos${}_n$}}\cmdarg{nm1}]
Draws an arrow in an \HMSC{} diagram. The arrow starts at the symbol
@@ -633,7 +630,7 @@ is a list of intermediate points the arrow should pass through.
bar width of instance \emph{nm} to \emph{wd}. The parameter \emph{wd}
should be a valid \LaTeX{} length.
-\item[\cmd{comment}\opt{\emph{pos}}\{\emph{txt}\}\{\emph{nm}\}] Puts a
+\item[\cmd{msccomment}\opt{\emph{pos}}\{\emph{txt}\}\{\emph{nm}\}] Puts a
comment at instance \emph{nm}. The parameter \emph{txt} is the
comment. The optional parameter \emph{pos} defines the horizontal
position of the comment relative to instance \emph{nm}. Valid
@@ -645,14 +642,15 @@ the instance axis. If \emph{pos} is a length, the comment will be put
comment to the left and a positive \emph{pos} puts it to the right of
the instance axis.
-\item[\cmd{condition}\{\emph{txt}\}\{\emph{instancelist}\}] Draws a
+\item[\cmd{condition(*)}\{\emph{txt}\}\{\emph{instancelist}\}] Draws a
\emph{condition} symbol on the instances occurring in
\emph{instancelist}. The parameter \emph{txt} defines the text to be
placed in the \emph{condition} symbol. The parameter
\emph{instancelist} is a comma separated list of instance
nicknames. Note that there should be no white space between the commas
and the nicknames; only if a nickname contains white space is a white
-space allowed in \emph{instancelist}.
+space allowed in \emph{instancelist}. The starred version adjusts the
+height and width of the condition symbol to the size of the contents.
\item[\cmd{coregionend}\{\emph{nm}\}] Ends the co-region on the instance
\emph{nm}. This command is obsolete (see \verb|\regionend|).
@@ -837,7 +835,7 @@ is~1.
\item[\cmd{measureend(*)}\opt{\emph{pos}}\{\emph{txt}\}\{\emph{nm}\}\{\emph{gate}\}]
-Puts a \emph{measure end} symbol at instance \emph{nm}.The starred
+Puts a \emph{measure end} symbol at instance \emph{nm}. The starred
version puts the triangular measure symbol outside the measure; the
unstarred version puts the triangular measure symbol inside the
measure. The \emph{txt} parameter defines the label of the
@@ -1542,129 +1540,6 @@ is given below.
\end{verbatim}
}
-
-\paragraph{Automatic resizing of actions}
-
-Consider the \MSC{} of Figure~\ref{fig:small:action}. The source code
-for this diagram is:
-{
-\small
-\begin{verbatim}
-\begin{msc}{small action}
-\declinst{i}{$i$}{}
-\declinst{j}{$j$}{}
-\action{\parbox{1cm}{\centering Do it now}}{i}
-\nextlevel[2]
-\end{msc}
-\end{verbatim}
-}
-
-\begin{figure}[htb]
-\begin{center}
-\begin{msc}{small action}
-\declinst{i}{$i$}{}
-\declinst{j}{$j$}{}
-\action{\parbox{1cm}{\centering Do it now}}{i}
-\nextlevel[2]
-\end{msc}
-\end{center}
-
-\caption{Small action symbol}
-\label{fig:small:action}
-\end{figure}
-
-It is clear that the action symbol is too small for the action
-label. The normal solution to this problem would be to change the
-values of \cmd{actionwidth} and \cmd{actionheight} such that the
-\cmd{parbox} containing the action label fits in the frame of the
-action symbol.
-
-Instead of computing these lengths and adding the necessary
-\cmd{setlength} commands manually, it would be nice to have a macro
-that computes and adjusts the lengths as required. The \cmd{Action} macro
-defined below does just that.
-{
-\small
-\begin{verbatim}
-\newsavebox{\labelbox}
-\newlength{\oldwd}
-\newlength{\oldht}
-\newcommand{\Action}[2]{%
- \setlength{\oldwd}{\actionwidth}%
- \setlength{\oldht}{\actionheight}%
- \savebox{\labelbox}{#1}%
- \setlength{\actionwidth}{\wd\labelbox + 2\labeldist}%
- \setlength{\actionheight}{\ht\labelbox + \dp\labelbox + 2\labeldist}%
- \action{\usebox{\labelbox}}{#2}%
- \setlength{\actionwidth}{\oldwd}%
- \setlength{\actionheight}{\oldht}%
-}
-\end{verbatim}
-} Note that we define a box (\cmd{labelbox}) and two lengths
-(\cmd{oldwd} and \cmd{oldht}) as scratch variables. Furthermore,
-before changing the width and height of action symbols, the old values
-are saved in \cmd{oldwd} and \cmd{oldht}, respectively. The new width
-and height of action symbols accomodate for white space around the
-action label by using the \mscpack{} length \cmd{labeldist}. After
-changing the lengths, the action is drawn using the normal
-\cmd{action} command. Finally, the old values of \cmd{actionwidth} and
-\cmd{actionheight} are restored.
-
-
-\newsavebox{\labelbox}
-\newlength{\oldwd}
-\newlength{\oldht}
-\newcommand{\Action}[2]{%
- \setlength{\oldwd}{\actionwidth}%
- \setlength{\oldht}{\actionheight}%
- \savebox{\labelbox}{#1}%
- \setlength{\actionwidth}{\wd\labelbox + 2\labeldist}%
- \setlength{\actionheight}{\ht\labelbox + \dp\labelbox + 2\labeldist}%
- \action{\usebox{\labelbox}}{#2}%
- \setlength{\actionwidth}{\oldwd}%
- \setlength{\actionheight}{\oldht}%
-}
-
-Figure~\ref{fig:resizing:action} shows the effect of automatic
-resizing action symbols. Instance~$i$ has automically resizing
-action. The actions of instance~$j$ are normal actions that show the
-new \cmd{Action} command changes the size of one action symbol
-only. The source of this diagram is given below.
-
-\begin{figure}[htb]
-\begin{center}
-\begin{msc}{small action}
-\declinst{i}{$i$}{}
-\declinst{j}{$j$}{}
-\action{A}{j}
-\Action{\parbox{1cm}{\centering Do it now}}{i}
-\nextlevel[2]
-\action{B}{j}
-\nextlevel[2]
-\end{msc}
-\end{center}
-
-\caption{Automatic resizing action symbol}
-\label{fig:resizing:action}
-\end{figure}
-
-
-{
-\small
-\begin{verbatim}
-\begin{msc}{small action}
-\declinst{i}{$i$}{}
-\declinst{j}{$j$}{}
-\action{A}{j}
-\Action{\parbox{1cm}{\centering Do it now}}{i}
-\nextlevel[2]
-\action{B}{j}
-\nextlevel[2]
-\end{msc}
-\end{verbatim}
-}
-
-
\bibliographystyle{plain}
\bibliography{biblio}