Skip to content

Commit

Permalink
Consistent white-space when using 'derivative' annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Mar 3, 2021
1 parent aad77fe commit 4bb4a3b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions chapters/functions.tex
Expand Up @@ -1191,7 +1191,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
function f
input Real x;
output Real y;
annotation(derivative=fder);
annotation(derivative = fder);
external "C";
end f;
model M
Expand All @@ -1211,10 +1211,10 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
\begin{example}
Use of \lstinline!order! to specify a second order derivative:
\begin{lstlisting}[language=modelica]
function foo0 annotation(derivative=foo1);
function foo0 annotation(derivative = foo1);
end foo0;

function foo1 annotation(derivative(order=2)=foo2);
function foo1 annotation(derivative(order=2) = foo2);
end foo1;

function foo2 end foo2;
Expand Down Expand Up @@ -1266,7 +1266,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
input $\ldots$;
output Real y;
$\ldots$
annotation(derivative=foo1);
annotation(derivative = foo1);
end foo0;

function foo1
Expand All @@ -1278,7 +1278,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
$\ldots$
output Real der_y;
$\ldots$
annotation(derivative(order=2)=foo2);
annotation(derivative(order=2) = foo2);
end foo1;

function foo2
Expand Down Expand Up @@ -1332,7 +1332,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
output Density d "Density";
algorithm
$\ldots$
annotation(derivative=density_der);
annotation(derivative = density_der);
end density;

function density_der
Expand Down Expand Up @@ -1399,8 +1399,8 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
output Real z;
algorithm
$\ldots$
annotation(derivative(zeroDerivative=y, zeroDerivative=offset)= fDer,
derivative=fGeneralDer);
annotation(derivative(zeroDerivative=y, zeroDerivative=offset) = fDer,
derivative = fGeneralDer);
end f;

function fDer "Derivative of simple table lookup"
Expand Down Expand Up @@ -1477,7 +1477,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
output Real z;
algorithm
$\ldots$
annotation(derivative(noDerivative = y) = h);
annotation(derivative(noDerivative=y) = h);
end f;

function h
Expand Down

0 comments on commit 4bb4a3b

Please sign in to comment.