Skip to content

Commit

Permalink
Customize 'description' environment so that \item style can replace d…
Browse files Browse the repository at this point in the history
…irect use of \textbf
  • Loading branch information
henrikt-ma committed Jun 3, 2020
1 parent 35874f6 commit 7d466da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
14 changes: 5 additions & 9 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r
not present for Modelica functions. To define the restrictions, the
following term is defined:
\begin{description}
\item{\textbf{Component expression}:}
\par
\item[Component expression:]
A Component Reference which is an Expression, i.e. does not refer to
models or blocks with equations. It is an instance of a (a) base type,
(b) derived type, (c) record, (d) an array of such an instance (a-c),
Expand All @@ -296,16 +295,14 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r

% This should ideally be a set of definitions instead
\begin{description}
\item{The input argument is a \textbf{component expression}:}
\par
\item[The input argument is a \emph{component expression}:]
The meaning is that the input argument when calling the operator must
be a \emph{component expression}.
\begin{nonnormative}
The reason for this restriction is that the start value of the input argument is returned before the first tick of the clock of the input argument and this is not
possible for a general expression.
\end{nonnormative}
\begin{example}
\end{example}
\begin{lstlisting}[language=modelica]
Real u1;
Real u2[4];
Expand All @@ -319,8 +316,8 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r
y5 = previous(2*u); // error (general expression, no Component Expression)
y6 = previous(R); // error (component, no Component Expression)
\end{lstlisting}
\item{The input argument is a \textbf{parameter expression}:}
\par
\end{example}
\item[The input argument is a \emph{parameter expression}:]
The meaning is that the input argument when calling the operator must
have parameter variability, that is the argument must depend directly
or indirectly only on parameters, constants or literals, see
Expand All @@ -338,8 +335,7 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r
y3 = subSample(u, factor=3*u); // error (general expression)
\end{lstlisting}
\end{example}
\item{The input argument is an \textbf{expression}:}
\par
\item[The input argument is an \emph{expression}:]
There is no restriction on the input argument when calling the
operator. This notation is used to emphasis when a standard function
call is used (is an \emph{expression}), instead of restricting the input
Expand Down
9 changes: 9 additions & 0 deletions preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
\usepackage{longtable}
\usepackage{multirow} % for multirow entries in tables
\usepackage{listings}
\usepackage{enumitem}
\usepackage{color}
\usepackage[table]{xcolor}
%\def\doublelabel#1{\label{#1}\hypertarget{#1}{}}
Expand Down Expand Up @@ -289,6 +290,14 @@
\def\paragraphautorefname{section}
\def\subparagraphautorefname{section}

% Make all description lists break the line after each key.
\setlist[description]{
style=nextline,
labelwidth=0pt,
leftmargin=15pt,
itemindent=\dimexpr-5pt-\labelsep\relax,
}

\title{
\ifpdf
\begin{center}
Expand Down

0 comments on commit 7d466da

Please sign in to comment.