Skip to content

Commit

Permalink
Merge pull request modelica#2567 from modelica/cleanup/font-markup
Browse files Browse the repository at this point in the history
Clean up use of non-semantical macros for font selection
  • Loading branch information
HansOlsson committed Jun 18, 2020
2 parents bd3fbc7 + 601c5fd commit 59d768b
Show file tree
Hide file tree
Showing 26 changed files with 1,408 additions and 1,617 deletions.
52 changes: 24 additions & 28 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ \section{Annotations for Code Generation}\doublelabel{annotations-for-code-gener
the output should generate an event when it changes.
\end{nonnormative}
\\ \hline

\end{longtable}
\begin{lstlisting}[language=grammar]
smoothOrder-annotation:
Expand All @@ -240,7 +239,7 @@ \section{Annotations for Code Generation}\doublelabel{annotations-for-code-gener
\begin{nonnormative}
This means that the function is at least C\textsuperscript{smoothOrder}. \lstinline!smoothOrder = 1! means that
the function can be differentiated at least once in order that all output arguments are still continuous, provided
the input arguments are continuous. If a tool needs the derivative of a function, e.g. for index reduction or to
the input arguments are continuous. If a tool needs the derivative of a function, e.g.\ for index reduction or to
compute an analytic Jacobian, the function can be differentiated analytically at least \lstinline!smoothOrder! times.
\end{nonnormative}

Expand Down Expand Up @@ -341,7 +340,7 @@ \section{Annotations for Graphical Objects}\doublelabel{annotations-for-graphica
\end{nonnormative}

These Icon, Diagram, and Documentation annotations are only allowed
directly in classes (e.g. not on components or connections). The allowed
directly in classes (e.g.\ not on components or connections). The allowed
annotations for a short class definition is the union of the allowed
annotations in classes and on extends-clauses.

Expand Down Expand Up @@ -395,7 +394,7 @@ \subsubsection{Coordinate Systems}\doublelabel{coordinate-systems}
application may use a different default value of \lstinline!initialScale!.

The attribute \lstinline!grid! specifies the spacing between grid points which can
be used by tools for alignment of points in the coordinate system, e.g. ``snap-to-grid''.
be used by tools for alignment of points in the coordinate system, e.g.\ ``snap-to-grid''.
Its use and default value is tool-dependent.

\begin{lstlisting}[language=modelica]
Expand All @@ -412,7 +411,7 @@ \subsubsection{Coordinate Systems}\doublelabel{coordinate-systems}
\begin{lstlisting}[language=modelica]
CoordinateSystem(extent = {{-10, -10}, {10, 10}});
\end{lstlisting}
i.e. a coordinate system with width 20 units and height 20 units.
i.e.\ a coordinate system with width 20 units and height 20 units.
\end{example}

The coordinate systems for the icon and diagram layers are by default
Expand Down Expand Up @@ -666,7 +665,7 @@ \subsection{Connections}\doublelabel{connections1}
connection line. It has the following definition (\emph{it is not equal
to the Text-primitive as part of graphics -- the differences are marked as bold lines}):
% NOTE: Technically just the names - not the entire lines are marked in bold
\begin{lstlisting}[language=modelica,escapechar=!,emph={horizontalAlignment,string,index}, emphstyle=\textbf]
\begin{lstlisting}[language=modelica]
record Text
extends GraphicItem;
extends FilledShape;
Expand Down Expand Up @@ -862,7 +861,7 @@ \subsubsection{Text}\doublelabel{text}
\item
\%\% replaced by \%
\item
\%name replaced by the name of the component (i.e. the identifier for
\%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).
Expand Down Expand Up @@ -1129,7 +1128,7 @@ \section{Annotations for the Graphical User Interface}\doublelabel{annotations-f
definition of "structurally inconsistent" see the article:
\href{http://epubs.siam.org/doi/abs/10.1137/0909014}{Pantelides C.C.:
The Consistent Initialization of Differential-Algebraic Systems, SIAM
J. Sci. and Stat. Comput. Volume 9, Issue 2, pp. 213--231 (March
J.\ Sci.\ and Stat.\ Comput.\ Volume 9, Issue 2, pp. 213--231 (March
1988)}}. A "default connection" is constructed by instantiating the
respective \lstinline!model! or \lstinline!block! and for every input \lstinline!u! providing an equation
\lstinline!0=f(u)!, and for every (potential,flow) pair of the form \lstinline!(v,i)!, providing
Expand Down Expand Up @@ -1539,7 +1538,7 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}
corresponding to the old version.

\begin{nonnormative}
Whenever possible tools should preserve the original style of the model, e.g. use of imports.
Whenever possible tools should preserve the original style of the model, e.g.\ use of imports.
\end{nonnormative}

These functions can be called with literal strings or array of strings
Expand All @@ -1550,7 +1549,7 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}
conversions of base-classes will require multiple conversion-calls; this
ensures that the conversion is independent of the new library structure.
The class-name used as argument to \lstinline!convertElement! and \lstinline!convertModifiers!
is similarly the old name of the class, i.e. the name before it is
is similarly the old name of the class, i.e.\ the name before it is
possibly converted by \lstinline!convertClass!.

\begin{nonnormative}
Expand Down Expand Up @@ -1588,7 +1587,7 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}

The old element should be of a \lstinline!Boolean!, \lstinline!Integer!, \lstinline!String!, or enumeration
type and the match is based on the literal value of the modifier.
For string elements the value argument to \lstinline!convertClassIf! shall be up-quoted, e.g. \lstinline!"\"My String\""!,
For string elements the value argument to \lstinline!convertClassIf! shall be up-quoted, e.g.\ \lstinline!"\"My String\""!,
and for enumeration literals only the enumeration literal part of the old value matters, e.g., \lstinline!red!
for \lstinline!"Colors.red"!.

Expand Down Expand Up @@ -1689,7 +1688,7 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}
connector \lstinline!B! is connected, there will be a parameter for enabling connector \lstinline!B!, and the conversion ensures that
each component of model \lstinline!A! will have this parameter set accordingly.

In case a parameter is simply renamed it is preferable to use \lstinline!convertElement!, since that also handles e.g. binding equations
In case a parameter is simply renamed it is preferable to use \lstinline!convertElement!, since that also handles e.g.\ binding equations
using the parameter.
\end{nonnormative}

Expand Down Expand Up @@ -1852,7 +1851,7 @@ \subsection{Version Date and Build Information}\doublelabel{version-date-and-bui
\end{nonnormative}
\item
\lstinline!revisionId! is a tool specific revision identifier
possibly generated by a source code management system (e.g. Subversion
possibly generated by a source code management system (e.g.\ Subversion
or CVS). This information allows to exactly identify the library
source code in the source code management system.
\end{itemize}
Expand Down Expand Up @@ -1892,32 +1891,29 @@ \section{Annotations for Access Control to Protect Intellectual Property}\double
different encryption formats.
\end{nonnormative}

\textbf{Definitions:}
Definitions:
\begin{longtable}[]{|p{2.5cm}|p{12cm}|}
\hline
\tablehead{Term} & \tablehead{Description}\\ \hline
\endhead
\textbf{Protection} & Define what parts of a class are visible.\\
\firstuse{Protection} & Define what parts of a class are visible.\\
\hline
\textbf{Obfuscation} & Changing a Modelica class or generated code so that it is difficult to inspect by a user
(e.g. by automatically renaming variables to non-meaningful names).\\
\firstuse{Obfuscation} & Changing a Modelica class or generated code so that it is difficult to inspect by a user
(e.g.\ by automatically renaming variables to non-meaningful names).\\
\hline
\textbf{Encryption} & Encoding of a model or a package in a form so that
\firstuse{Encryption} & Encoding of a model or a package in a form so that
the modeler cannot inspect any content of a class without an appropriate
key. An encrypted package that has the \lstinline!Protection! annotation is
read-only; the way to modify it is to generate a new encrypted version.\\
\hline
\textbf{Licensing} & Restrict the use of an encrypted package for particular users for a specified period of time.\\
\firstuse{Licensing} & Restrict the use of an encrypted package for particular users for a specified period of time.\\
\hline

\end{longtable}

In this section annotations are defined for protection and
licensing. Obfuscation and encryption are not standardized.
protection and licensing are both defined inside the
\lstinline!Protection! annotation:
\begin{lstlisting}[language=modelica]
annotation(Protection(...));
In this section annotations are defined for protection and licensing. Obfuscation and encryption are not standardized.
Protection and licensing are both defined inside the \lstinline!Protection! annotation:
\begin{lstlisting}[language=modelica,mathescape=true]
annotation(Protection($\ldots$));
\end{lstlisting}

\subsection{Protection of Classes}\doublelabel{protection-of-classes}
Expand Down Expand Up @@ -1969,7 +1965,7 @@ \subsection{Protection of Classes}\doublelabel{protection-of-classes}
the class, or part of the class, can be copied.
\item
\lstinline!Access.packageText!\\
Same as \lstinline!Access.diagram! (note: \textbf{not} including all rights of
Same as \lstinline!Access.diagram! (note: \emph{not} including all rights of
\lstinline!Access.nonPackageDuplicate!) and additionally the whole class
definition can be accessed (but that text cannot be copied, i.e., you can see but not copy the source code).
\item
Expand Down Expand Up @@ -2090,7 +2086,7 @@ \subsection{Licensing}\doublelabel{licensing}

record License
String licensee ="" "Optional string to show information about the licensee";
String id[:] "Unique machine identifications, e.g. MAC addresses";
String id[:] "Unique machine identifications, e.g.\ MAC addresses";
String features[:] =fill("", 0) "Activated library license features";
String startDate ="" "Optional start date in UTCformat YYYY-MM-DD";
String expirationDate="" "Optional expiration date in UTCformat YYYY-MM-DD";
Expand Down
Loading

0 comments on commit 59d768b

Please sign in to comment.