Skip to content

Commit

Permalink
Merge pull request modelica#3073 from HansOlsson/ShorterSectionNames
Browse files Browse the repository at this point in the history
Make first part of section name matter
  • Loading branch information
HansOlsson committed Jan 25, 2022
2 parents f60e25c + a5ca7d9 commit a7b2980
Show file tree
Hide file tree
Showing 17 changed files with 99 additions and 99 deletions.
38 changes: 19 additions & 19 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ \section{Vendor-Specific Annotations}\label{vendor-specific-annotations}
vendor-specific annotations.
\end{example}

\section{Annotations for Documentation}\label{annotations-for-documentation}
\section{Documentation}\label{annotations-for-documentation}\label{documentation}

The \fmtannotationindex{Documentation} annotation has the following contents, where the \lstinline!info! and \lstinline!revisions! annotations are described in \cref{annotation-info-revisions}, and the \lstinline!figures! annotation is described in \cref{annotations-for-figures}:
\begin{lstlisting}[language=modelica]
Expand Down Expand Up @@ -72,7 +72,7 @@ \subsection{Class Description and Revision History}\label{annotation-info-revisi
<a href="modelica://MultiBody.Joints.Revolute#info">Revolute</a>
\end{lstlisting}

\subsection{Annotations for Figures}\label{annotations-for-figures}
\subsection{Figures}\label{annotations-for-figures}\label{figures}

Inside the \lstinline!Documentation! annotation, each element of the \lstinline!figures! annotation array has the following content:
\begin{lstlisting}[language=modelica]
Expand Down Expand Up @@ -207,7 +207,7 @@ \subsubsection{Plot Curves}\label{plot-curves}
Providing the empty string as \lstinline!legend! means that the curve shall be omitted from the plot legend.
Variable replacements, as described in \cref{variable-replacements}, can be used in \lstinline!legend!.

\subsubsection{Escape sequences}\label{text-markup-escape-sequences}
\subsubsection{Escape Sequences}\label{text-markup-escape-sequences}

In an attribute inside a figure where the variable replacements of \cref{variable-replacements} or the text markup of \cref{text-markup-in-captions} can be used, the following use of \firstuse[text markup escape sequence]{text markup escape sequences}\index{escape sequence!text markup} applies.
These escape sequences are applied after the application of other markup, and is not applied at all inside some of the other markup, see details for the respective markup.
Expand Down Expand Up @@ -343,7 +343,7 @@ \subsubsection{Text Markup in Captions}\label{text-markup-in-captions}
In a similar way, vendor-specific markup can be used to prototype a link for future inclusion in the link markup (either by extending the meaning of Modelica URIs, or by introducing another pseudo-scheme similar to \lstinline!variable:!). This is an example where the vendor-specific markup could make use of the $\mathit{text}$ (for link text) together with the vendor-specific $\mathit{data}$ (describing the actual link).
\end{example}

\section{Annotations for Symbolic Processing}\label{annotations-for-symbolic-processing}
\section{Symbolic Processing}\label{annotations-for-symbolic-processing}\label{symbolic-processing}

The annotation listed below, in addition to annotations described in \crefrange{derivatives-and-inverses-of-functions}{function-inlining-and-event-generation}, can influence the symbolic processing.
\begin{center}
Expand Down Expand Up @@ -378,7 +378,7 @@ \section{Annotations for Symbolic Processing}\label{annotations-for-symbolic-pro
\end{annotationdefinition}


\section{Annotations for Simulations}\label{annotations-for-simulations}
\section{Simulations}\label{annotations-for-simulations}\label{simulations}

The annotations listed below define how models can be checked, translated, and simulated.
\begin{center}
Expand Down Expand Up @@ -447,7 +447,7 @@ \section{Annotations for Simulations}\label{annotations-for-simulations}
\end{annotationdefinition}


\section{Annotation for Single Use of Class}\label{annotation-for-single-use-of-class}
\section{Single Use of Class}\label{annotation-for-single-use-of-class}\label{single-use-of-class}

For state machines it is useful to have single instances of local classes.
This can be done using:
Expand All @@ -459,7 +459,7 @@ \section{Annotation for Single Use of Class}\label{annotation-for-single-use-of-
The intent is to remove the class when the component is removed and to prevent duplication of the component.


\section{Annotations for Graphical Objects}\label{annotations-for-graphical-objects}
\section{Graphical Objects}\label{annotations-for-graphical-objects}\label{graphical-objects}

A graphical representation of a class consists of two abstraction
layers, icon layer and diagram layer showing graphical objects,
Expand Down Expand Up @@ -721,7 +721,7 @@ \subsection{Component Instance}\label{component-instance}
icon layer. Non-connector components are only shown in the diagram
layer.

\subsection{Extends-clause}\label{extends-clause}
\subsection{Extends-Clause}\label{extends-clause}

Each \lstinline!extends!-clause (and short class definition, as stated in \cref{annotations-for-graphical-objects}) may have layer specific annotations which describe the rendering of the base class' icon and diagram layers in the derived class.

Expand Down Expand Up @@ -818,7 +818,7 @@ \subsection{Connections}\label{connections1}
Using a height of zero, such as \lstinline!extent = [-6, 3; -6, 3]! is deprecated, but gives similar result.
\end{example}

\subsection{Graphical primitives}\label{graphical-primitives}
\subsection{Graphical Primitives}\label{graphical-primitives}

This section describes the graphical primitives that can be used to
define the graphical objects in an annotation.
Expand Down Expand Up @@ -1039,11 +1039,11 @@ \subsection{Variable Graphics and Schematic Animation}\label{variable-graphics-a
\end{lstlisting}
\end{example}

\subsection{User input}\label{user-input}
\subsection{User Input}\label{user-input}

It is possible to interactively modify variables during a simulation. The variables may either be parameters, discrete-time variables or states. New numeric values can be given, a mouse click can change a \lstinline!Boolean! variable or a mouse movement can change a \lstinline!Real! variable. Input fields may be associated with a \lstinline!GraphicItem! or a component as an array named \lstinline!interaction!. The \lstinline!interaction! array may occur as an attribute of a graphic primitive, an attribute of a component annotation or as an attribute of the layer annotation of a class.

\subsubsection{Mouse input}\label{mouse-input}
\subsubsection{Mouse Input}\label{mouse-input}

A \lstinline!Boolean! variable can be changed when the cursor is held over a graphical item or component and the selection button is pressed if the interaction annotation contains \fmtannotationindex{OnMouseDownSetBoolean}:
\begin{lstlisting}[language=modelica]
Expand Down Expand Up @@ -1100,7 +1100,7 @@ \subsubsection{Mouse input}\label{mouse-input}
end OnMouseMoveYSetReal;
\end{lstlisting}

\subsubsection{Edit input}\label{edit-input}
\subsubsection{Edit Input}\label{edit-input}

The \fmtannotationindex{OnMouseDownEditInteger} interaction object presents an input field when the graphical item or component is clicked on.
The field shows the actual value of the variable and allows changing the value.
Expand Down Expand Up @@ -1128,7 +1128,7 @@ \subsubsection{Edit input}\label{edit-input}
end OnMouseDownEditString;
\end{lstlisting}

\section{Annotations for the Graphical User Interface}\label{annotations-for-the-graphical-user-interface}
\section{Graphical User Interface}\label{annotations-for-the-graphical-user-interface}\label{graphical-user-interface}

This section describes the annotations that are used to define properties of the graphical user interface.

Expand Down Expand Up @@ -1492,7 +1492,7 @@ \subsection{Connector Sizing}\label{connector-sizing}
\end{lstlisting}
\end{nonnormative}

\section{Annotations for Version Handling}\label{annotations-for-version-handling}
\section{Versions}\label{annotations-for-version-handling}\label{versions}

A top-level package or model can specify the version of top-level
classes it uses, its own version number, and if possible how to convert
Expand Down Expand Up @@ -1579,7 +1579,7 @@ \subsection{Version Handling}\label{version-handling}
required when upgrading.
\end{example}

\subsubsection{Conversion rules}\label{conversion-rules}
\subsubsection{Conversion Rules}\label{conversion-rules}

% Using mbox to avoid having line starting with ","
There are a number of functions: \lstinline!convertClass!, \lstinline!convertClassIf!,
Expand Down Expand Up @@ -1808,7 +1808,7 @@ \subsubsection{Conversion rules}\label{conversion-rules}
This is useful if there is no possibility to convert a specific parameter (or other element), especially if it rarely modified. If the parameter had no impact on the model it can be removed using \lstinline!convertModifiers!, see \cref{convertmodifiers}.
\end{nonnormative}

\subsection{Mapping of Versions to File System}\label{mapping-of-versions-to-file-system}
\subsection{Versions in the File System}\label{mapping-of-versions-to-file-system}\label{versions-in-the-File-System}

A top-level class, \lstinline!IDENT!, with version \lstinline!VERSION-NUMBER! can be stored in
one of the following ways in a directory given in the \lstinline!MODELICAPATH!:
Expand Down Expand Up @@ -1910,7 +1910,7 @@ \subsection{Version Date and Build Information}\label{version-date-and-build-inf
It is recommended that tools do not automatically store \lstinline!versionBuild! and \lstinline!dateModified! in the \lstinline!uses! annotation.
\end{nonnormative}

\section{Annotations for Access Control to Protect Intellectual Property}\label{annotations-for-access-control-to-protect-intellectual-property}
\section{Access Control to Protect Intellectual Property}\label{annotations-for-access-control-to-protect-intellectual-property}\label{access-control-to-protect-intellectual-property}

This section presents annotations to define the protection and the
licensing of packages. The goal is to unify basic mechanisms to control
Expand Down Expand Up @@ -2173,11 +2173,11 @@ \subsection{Licensing}\label{licensing}
\end{example}


\section{Annotations for Functions}\label{annotations-for-functions}
\section{Functions}\label{annotations-for-functions}

See \crefnameref{derivatives-and-inverses-of-functions}, \crefnameref{function-inlining-and-event-generation}, and \crefnameref{annotations-for-external-libraries-and-include-files}.


\section{Annotation Choices for Modifications and Redeclarations}\label{annotation-choices-for-modifications-and-redeclarations}
\section{Choices for Modifications and Redeclarations}\label{annotation-choices-for-modifications-and-redeclarations}\label{choices-for-modifications-and-redeclarations}

See \crefnameref{annotation-choices-for-suggested-redeclarations-and-modifications}.
26 changes: 13 additions & 13 deletions chapters/arrays.tex
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ \section{Array Declarations}\label{array-declarations}
For efficiency reasons, these implicit \lstinline!assert!-statements may be optionally suppressed.
\end{nonnormative}

\subsection{Array Dimension Lower and Upper Index Bounds}\label{array-dimension-lower-and-upper-index-bounds}
\subsection{Lower and Upper Index Bounds}\label{array-dimension-lower-and-upper-index-bounds}\label{lower-and-upper-index-bounds}

The lower and upper index bounds for a dimension of an array indexed by \lstinline!Integer!, \lstinline!Boolean!, or \lstinline!enumeration! values are as follows:
\begin{itemize}
Expand Down Expand Up @@ -247,7 +247,7 @@ \section{Built-in Array Functions}\label{built-in-array-functions}
\end{lstlisting}
\end{nonnormative}

\subsection{Array Dimension and Size Functions}\label{array-dimension-and-size-functions}
\subsection{Dimension and Size Functions}\label{array-dimension-and-size-functions}\label{dimension-and-size-functions}

The functions listed below operate on the array dimensions of the type of an expression:
\begin{center}
Expand Down Expand Up @@ -741,7 +741,7 @@ \section{Vector, Matrix and Array Constructors}\label{vector-matrix-and-array-co
\end{lstlisting}
\end{example}

\subsection{Array Constructor with Iterators}\label{array-constructor-with-iterators}
\subsection{Constructor with Iterators}\label{array-constructor-with-iterators}\label{constructor-with-iterators}

An expression:
\begin{lstlisting}[language=grammar]
Expand All @@ -768,7 +768,7 @@ \subsection{Array Constructor with Iterators}\label{array-constructor-with-itera
For deduction of ranges, see
\cref{implicit-iteration-ranges}; and for using types as range see \cref{types-as-iteration-ranges}.

\subsubsection{Array Constructor with One Iterator}\label{array-constructor-with-one-iterator}
\subsubsection{Constructor with One Iterator}\label{array-constructor-with-one-iterator}\label{constructor-with-one-iterator}

If only one iterator is used, the result is a vector constructed by
evaluating expression for each value of the loop-variable and forming an
Expand All @@ -787,7 +787,7 @@ \subsubsection{Array Constructor with One Iterator}\label{array-constructor-with
\end{lstlisting}
\end{example}

\subsubsection{Array Constructor with Several Iterators}\label{array-constructor-with-several-iterators}
\subsubsection{Constructor with Several Iterators}\label{array-constructor-with-several-iterators}\label{constructor-with-several-iterators}

The notation with several iterators is a shorthand notation for nested
array constructors. The notation can be expanded into the usual form by
Expand All @@ -801,7 +801,7 @@ \subsubsection{Array Constructor with Several Iterators}\label{array-constructor
\end{lstlisting}
\end{example}

\subsection{Array Concatenation}\label{array-concatenation}
\subsection{Concatenation}\label{array-concatenation}\label{concatenation}

The function \lstinline!cat($k$, A, B, C, $\ldots$)! concatenates arrays
\lstinline!A!, \lstinline!B!, \lstinline!C!, \ldots along
Expand Down Expand Up @@ -849,7 +849,7 @@ \subsection{Array Concatenation}\label{array-concatenation}
where $1 \leq i_{j} \leq$ \lstinline!size(R,$j$)! for $1 \leq j \leq n$.


\subsubsection{Array Concatenation along First and Second Dimensions}\label{array-concatenation-along-first-and-second-dimensions}
\subsubsection{Concatenation along First and Second Dimensions}\label{array-concatenation-along-first-and-second-dimensions}\label{concatenation-along-first-and-second-dimensions}

For convenience, a special syntax is supported for the concatenation along the first and second dimensions:
\begin{itemize}
Expand Down Expand Up @@ -943,7 +943,7 @@ \subsection{Vector Construction}\label{vector-construction}
\end{lstlisting}
\end{example}

\section{Array Indexing}\label{array-indexing}
\section{Indexing}\label{array-indexing}\label{indexing}

The array indexing operator \lstinline!$\mathit{name}$[$\ldots$]! is used to access array elements for retrieval of their values or for updating these values.
An indexing operation is subject to upper and lower array dimension index bounds (\cref{array-dimension-lower-and-upper-index-bounds}).
Expand Down Expand Up @@ -1079,7 +1079,7 @@ \subsection{Equality and Assignment}\label{equality-and-assignment}
\end{center}
\end{table}

\subsection{Array Element-wise Addition, Subtraction, and String Concatenation}\label{array-element-wise-addition-subtraction-and-string-concatenation}
\subsection{Element-wise Addition, Subtraction, and String Concatenation}\label{array-element-wise-addition-subtraction-and-string-concatenation}\label{element-wise-addition-subtraction-and-string-concatenation}

Addition \lstinline!a + b! and subtraction \lstinline!a - b! of numeric scalars, vectors, matrices,
and arrays is defined element-wise and require \lstinline!size(a) = size(b)! and a
Expand Down Expand Up @@ -1147,7 +1147,7 @@ \subsection{Array Element-wise Addition, Subtraction, and String Concatenation}\
\end{center}
\end{table}

\subsection{Array Element-wise Multiplication}\label{array-element-wise-multiplication}
\subsection{Element-wise Multiplication}\label{array-element-wise-multiplication}\label{element-wise-multiplication}

Scalar multiplication \lstinline!s * a! or \lstinline!a * s! with numeric scalar s and numeric
scalar, vector, matrix or array \lstinline!a! is defined element-wise:
Expand Down Expand Up @@ -1190,7 +1190,7 @@ \subsection{Array Element-wise Multiplication}\label{array-element-wise-multipli
\end{center}
\end{table}

\subsection{Matrix and Vector Multiplication of Numeric Arrays}\label{matrix-and-vector-multiplication-of-numeric-arrays}
\subsection{Multiplication of Matrices and Vectors}\label{matrix-and-vector-multiplication-of-numeric-arrays}\label{multiplication-of-matrices-and-vectors}

Multiplication \lstinline!a * b! of numeric vectors and matrices is defined only for the following combinations:
\begin{table}[H]
Expand Down Expand Up @@ -1245,7 +1245,7 @@ \subsection{Division of Scalars or Numeric Arrays by Numeric Scalars}\label{divi
\end{center}
\end{table}

\subsection{Array Element-wise Division}\label{array-element-wise-division}
\subsection{Element-wise Division}\label{array-element-wise-division}\label{element-wise-division}

Element-wise division \lstinline!a ./ b! of numeric scalars, vectors, matrices or arrays \lstinline!a! and \lstinline!b! requires a numeric type class for \lstinline!a! and \lstinline!b!
and either \lstinline!size(a) = size(b)! or scalar \lstinline!a! or scalar \lstinline!b!. The result is always of \lstinline!Real! type. In order to get integer division with truncation,
Expand Down Expand Up @@ -1315,7 +1315,7 @@ \subsection{Exponentiation of Scalars of Numeric Elements}\label{exponentiation-
literals solves the problem.
\end{example}

\subsection{Scalar Exponentiation of Square Matrices of Numeric Elements}\label{scalar-exponentiation-of-square-matrices-of-numeric-elements}
\subsection{Scalar Exponentiation of Matrices}\label{scalar-exponentiation-of-square-matrices-of-numeric-elements}\label{scalar-exponentiation-of-matrices}

Exponentiation \lstinline!a ^ s! is defined if \lstinline!a! is a square numeric matrix and \lstinline!s! is a scalar as a subtype of \lstinline!Integer!
with $\text{\lstinline!s!} \geq 0$. The exponentiation is done by repeated multiplication, e.g.:
Expand Down
Loading

0 comments on commit a7b2980

Please sign in to comment.