Skip to content

Commit

Permalink
Merge pull request #2615 from HansOlsson/Restore2597
Browse files Browse the repository at this point in the history
Restore2597
  • Loading branch information
HansOlsson committed Jul 13, 2020
2 parents f53b47e + 20d459d commit 1952496
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions chapters/annotations.tex
Expand Up @@ -835,10 +835,20 @@ \subsubsection{Text}\doublelabel{text}
outline). The contents inherited from \lstinline!FilledShape! is deprecated, but kept for compatibility reasons.

There are a number of common macros that can be used in the text, and
they should be replaced when displaying the text as follows:
they should be replaced when displaying the text as follows (in order such that the earliest ones have precedence,
and using the longest sequence of identifier characters - alphanumeric and underscore):

\begin{itemize}
\item
\%\emph{par} and \%\{\emph{par\}} replaced by the value of the parameter \lstinline!par!.
\%\% replaced by \%
\item
\%name replaced by the name of the component (i.e., the identifier for
it in the enclosing class).
\item
\%class replaced by the name of the class (only the last part of the hierarchical name).
\item
\%\emph{par} and \%\{\emph{par\}} replaced by the value of the
parameter \lstinline!par!.
If the value is numeric, tools shall display the value with \lstinline!displayUnit!, formatted according to bipm-specification.
E.g., for
\begin{lstlisting}[language=modelica]
Expand All @@ -851,17 +861,10 @@ \subsubsection{Text}\doublelabel{text}
\begin{example}
If \lstinline!par = "Modelica.Blocks.Types.Enumeration.Periodic"!, then \lstinline!%par! should be displayed as \emph{Periodic}.
\end{example}
The form \%\{\emph{par\}} allows component-references, and can be directly
The form \%\{\emph{par\}} allows component-references and is required for quoted identifiers, and can be directly
followed by a letter. Thus \lstinline!%{w}x%{h}! gives the value of \lstinline!w!
directly followed by \emph{x} and the value of \lstinline!h! -- and \lstinline!%wxh! gives the value of the
parameter \lstinline!wxh!. If the parameter does not exist it is an error.
\item
\%\% replaced by \%
\item
\%name replaced by the name of the component (i.e.\ the identifier for
it in in the enclosing class).
\item
\%class replaced by the name of the class (only the last part of the hierarchical name).
\end{itemize}

The style attribute \lstinline!fontSize! specifies the font size. If the \lstinline!fontSize!
Expand Down

0 comments on commit 1952496

Please sign in to comment.