Skip to content

Commit

Permalink
Minor white-space styling in listings
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Aug 26, 2021
1 parent 3c1c226 commit 55ceb96
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ \subsection{terminate}\label{terminate}
The intention of \lstinline!terminate! is to give more complex stopping criteria than a fixed point in time:
\begin{lstlisting}[language=modelica]
model ThrowingBall
Real x(start=0);
Real y(start=1);
Real x(start = 0);
Real y(start = 1);
equation
der(x) = $\ldots$;
der(y) = $\ldots$;
Expand Down
2 changes: 1 addition & 1 deletion chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
record ThermodynamicState "Thermodynamic state"
SpecificEnthalpy h "Specific enthalpy";
AbsolutePressure p "Pressure";
Integer phase(min=1, max=2, start=1);
Integer phase(min = 1, max = 2, start = 1);
end ThermodynamicState;

record ThermoDynamicState_der "Derivative"
Expand Down
10 changes: 5 additions & 5 deletions chapters/scoping.tex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ \section{Enclosing Classes}\label{enclosing-classes}
class C1 $\ldots$ end C1;
class C2 $\ldots$ end C2;
class C3
Real x=3;
Real x = 3;
C1 y;
class C4
Real z;
Expand Down Expand Up @@ -312,13 +312,13 @@ \section{Simultaneous Inner/Outer Declarations}\label{simultaneous-inner-outer-d
\begin{lstlisting}[language=modelica]
model ConditionalIntegrator "Simple differential equation if isEnabled"
outer Boolean isEnabled;
Real x(start=1);
Real x(start = 1);
equation
der(x)=if isEnabled then -x else 0;
der(x) = if isEnabled then -x else 0;
end ConditionalIntegrator;

model SubSystem "subsystem that 'enable' its conditional integrators"
Boolean enableMe = time<=1;
Boolean enableMe = time <= 1;
// Set inner isEnabled to outer isEnabled and enableMe
inner outer Boolean isEnabled = isEnabled and enableMe;
ConditionalIntegrator conditionalIntegrator;
Expand All @@ -327,7 +327,7 @@ \section{Simultaneous Inner/Outer Declarations}\label{simultaneous-inner-outer-d

model System
SubSystem subSystem;
inner Boolean isEnabled = time>=0.5;
inner Boolean isEnabled = time >= 0.5;
// subSystem.conditionalIntegrator.isEnabled will be
// 'isEnabled and subSystem.enableMe'
end System;
Expand Down

0 comments on commit 55ceb96

Please sign in to comment.