From 10f165e1582f474f6ff1c8a76a56b802e7c083e9 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Mon, 19 Oct 2020 08:30:39 +0200 Subject: [PATCH] Reference table in text --- chapters/annotations.tex | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/chapters/annotations.tex b/chapters/annotations.tex index a2dbc1e72..cc3c1912c 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -228,23 +228,11 @@ \subsubsection{Escape sequences}\label{text-markup-escape-sequences} \subsubsection{Variable Replacements}\label{variable-replacements} -In most places where text for display is defined the final value of a result -variable can be embedded by refering to the variable as -\lstinline!%{inertia1.w}!. This is similar to the \lstinline!Text! graphical primitive -in \cref{text}. - -In \lstinline!%{$\mathit{variable}$}!, text markup escape sequences don't apply inside the $\mathit{variable}$, which has the form of \lstinline[language=grammar]!component-reference! in the grammar (\cref{expressions1}). This means that a complete \lstinline[language=grammar]!component-reference! shall be scanned before looking for the terminating closing brace. - -\begin{example} -The variable replacement \lstinline!%{'%%'}! references the variable \lstinline!'%%'!, not the variable \lstinline!'%'!. -\end{example} - -\begin{example} -The variable replacement \lstinline!%{foo . '}bar{'}! makes a valid reference to the variable\linebreak[4] \lstinline!foo.'}bar{'!. -\end{example} +In the places listed in \cref{attributes-with-variable-replacements} where text for display is defined, the final value of a result variable can be embedded by refering to the variable as \lstinline!%{inertia1.w}!. This is similar to the \lstinline!Text! graphical primitive in \cref{text}. \begin{table}[H] \caption{Attributes that can use variable replacements.} +\label{attributes-with-variable-replacements} \begin{center} \begin{tabular}{l l} \hline @@ -260,6 +248,16 @@ \subsubsection{Variable Replacements}\label{variable-replacements} \end{center} \end{table} +In \lstinline!%{$\mathit{variable}$}!, text markup escape sequences don't apply inside the $\mathit{variable}$, which has the form of \lstinline[language=grammar]!component-reference! in the grammar (\cref{expressions1}). This means that a complete \lstinline[language=grammar]!component-reference! shall be scanned before looking for the terminating closing brace. + +\begin{example} +The variable replacement \lstinline!%{'%%'}! references the variable \lstinline!'%%'!, not the variable \lstinline!'%'!. +\end{example} + +\begin{example} +The variable replacement \lstinline!%{foo . '}bar{'}! makes a valid reference to the variable\linebreak[4] \lstinline!foo.'}bar{'!. +\end{example} + Note that expansion to the final value means that expansion is not restricted to parameters and constants, so that values to be shown in a caption can be determined during simulation.