Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore2597 #2615

Merged
merged 6 commits into from Jul 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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