In this section the format UsersGuide of the HTML documentation are specified. The structure of the documentation is specified separately.
<p>
and terminate with </p>
.<br>
should be added within text paragraphs if possible.
Use separate paragraphs instead.<strong>
and </strong>
have to be used.<em>
and </em>
has to be used.Extends from Modelica.Icons.Information (Icon for general information packages).
Name | Description |
---|---|
Cases | Cases |
Code | Code |
Equations | Equations |
Figures | Figures |
Hyperlinks | Hyperlinks |
Lists | Lists |
References | References |
Tables | Tables |
In the Modelica documentation sometimes different cases have to be distinguished. If the case distinction refers to Modelica parameters or variables (Boolean expressions) the comparisons should be written in the style of Modelica code within <code>
and </code>
<p>If <code>useCage == true</code>, a damper cage is considered in the model...</p>
appears as
If useCage == true
, a damper cage is considered in the model...
For more complex case scenarios, an unordered list should be used. In this case only Modelica specific code segments and Boolean expressions.
<ul> <li> If <code>useCage == true</code>, a damper cage is considered in the model. Cage parameters must be specified in this case.</li> <li> If <code>useCage == false</code>, the damper cage is omitted.</li> </ul>
appears as
useCage == true
, a damper cage is considered in the model.
Cage parameters must be specified in this case.useCage == false
, the damper cage is omitted.In a more equation oriented case, additional equations or code segments can be added.
<ul> <li>if <code>usePolar == true</code>, assign magnitude and angle to output <br> <!-- insert graphical representation of equations --> y[i,1] = sqrt( a[i]^2 + b[i]^2 ) <br> y[i,2] = atan2( b[i], a[i] ) </li> <li>if <code>usePolar == false</code>, assign cosine and sine to output <br> <!-- insert graphical representation of equations --> y[i,1] = a[i] <br> y[i,2] = b[i] </li> </ul>
appears as
usePolar == true
, assign magnitude and angle to outputusePolar == false
, assign cosine and sine to outputExtends from Modelica.Icons.Information (Icon for general information packages).
Modelica code conventions of class and instance names, parameters and variables are specified separately. In this section it is summarized how to refer to Modelica code in the HTML documentation.
<code>
and </code>
should to be used, e.g.,parameter Modelica.Units.SI.Time tStart "Start time"
<blockquote><pre>
and </pre></blockquote>
tags.<code>
and </code>
.<blockquote><pre> <strong>connector</strong> Frame ... <strong>flow</strong> SI.Force f[3] <strong>annotation</strong>(unassignedMessage="..."); <strong>end</strong> Frame; </pre></blockquote>
appears as
connector Frame ... flow SI.Force f[3] annotation(unassignedMessage="..."); end Frame;
<blockquote><pre> <strong>parameter</strong> Modelica.Units.SI.Conductance G=1 "Conductance"; </pre></blockquote>
appears as
parameter Modelica.Units.SI.Conductance G=1 "Conductance";
Extends from Modelica.Icons.Information (Icon for general information packages).
In the context of HTML documentation equations should have a graphical representation in PNG format. For that purpose tool specific math typing capabilities can be used. Alternatively the LaTeX to HTML translator LaTeX2HTML, or the Online Equation Editor or codecogs can be used.
A typical equation, e.g., of a Fourier synthesis, could look like
or
In an alt
tag the original equation should be stored, e.g.,
<img src="modelica://Modelica/Resources/Images/UsersGuide/Conventions/Documentation/Format/Equations/sample.png" alt="y=a_1+a_2">
If one wants to refer to particular variables and parameters in the documentation text, either a
graphical representation (PNG file) or italic fonts for regular physical symbols and lower case
Greek letters
should be used. Full word variables and full word indices should be spelled within
<code>
and </code>
.
Vector and array indices should be typeset as subscripts using the
<sub>
and </sub>
tags.
Examples for such variables and parameters are:
φ, φref, v2, useDamperCage
.
For numbering equations a one row table with two columns should be used. The equation number should be placed in the right column:
<table border="0" cellspacing="10" cellpadding="2"> <tr> <td><img src="modelica://Modelica/Resources/Images/UsersGuide/Conventions/Documentation/Format/Equations/sample.png" alt="y=a_1+a_2"> </td> <td>(1)</td> </tr> </table>
appears as:
(1) |
Extends from Modelica.Icons.Information (Icon for general information packages).
Figures should in particular be included to examples to discuss the problems and results of the respective model. The library developers are yet encouraged to add figures to the documentation of other components to support the understanding of the users of the library.
src
and an alt
attribute defined to be HTML compliant.
The PNG
files should be placed in a folder which exactly represents the package structure.
This example shows how an illustration should be embedded in the Example PID_Controller of the Blocks package.
<img src="modelica://Modelica/Resources/Images/Blocks/PID_controller.png" alt="PID_controller.png">
This is a simple example of a technical figure with caption.
<table border="0" cellspacing="0" cellpadding="2"> <caption align="bottom">Caption starts with a capital letter</caption> <tr> <td> <img src="modelica://Modelica/Resources/Images/Blocks/PID_controller.png" alt="PID_controller.png"> </td> </tr> </table>
To refer to a certain figure, a figure number may be added. In such case the figure name (Fig.) including the figure enumeration (1,2,...) have to be displayed bold using <strong>
and </strong>
.
The figure name and enumeration should look like this: Fig. 1:
Figures have to be enumerated manually.
<table border="0" cellspacing="0" cellpadding="2"> <caption align="bottom"><strong>Fig. 2:</strong> Caption starts with a capital letter</caption> <tr> <td> <img src="modelica://Modelica/Resources/Images/Blocks/PID_controller.png" alt="PID_controller.png"> </td> </tr> </table>
Extends from Modelica.Icons.Information (Icon for general information packages).
<a href="...">
and </a>
should include the full main package name."modelica://..."
<a href="modelica://Modelica.Mechanics.MultiBody.UsersGuide.Tutorial.LoopStructures.PlanarLoops"> Modelica.Mechanics.MultiBody.UsersGuide.Tutorial.LoopStructures.PlanarLoops</a>
appears as
Modelica.Mechanics.MultiBody.UsersGuide.Tutorial.LoopStructures.PlanarLoops<p> The feeder cables are connected to an <a href="modelica://Modelica.Electrical.Machines.BasicMachines.InductionMachines.IM_SquirrelCage"> induction machine</a>. </p>
appears as
The feeder cables are connected to an induction machine.
Extends from Modelica.Icons.Information (Icon for general information packages).
This is a simple example of an enumerated (ordered) list
<ol> <li>item 1</li> <li>item 2</li> </ol>
appears as
This is a simple example of an unnumbered list.
<ul> <li>item 1</li> <li>item 2</li> </ul>
appears as
Extends from Modelica.Icons.Information (Icon for general information packages).
<p> More details about electric machine modeling can be found in [<a href="modelica://Modelica.UsersGuide.Conventions.UsersGuide.References">Gao2008</a>] and [<a href="modelica://Modelica.UsersGuide.Conventions.UsersGuide.References">Kral2018</a>, p. 149]. </p>
appears as
More details about electric machine modeling can be found in [Gao2008] and [Kral2018, p. 149].
Extends from Modelica.Icons.Information (Icon for general information packages).
<table>
and </table>
,
not with <pre>
and </pre>
.This is a simple example of a table.
<table border="1" cellspacing="0" cellpadding="2"> <caption align="bottom">Caption starts with a capital letter</caption> <tr> <th>Head 1</th> <th>Head 2</th> </tr> <tr> <td>Entry 1</td> <td>Entry 2</td> </tr> <tr> <td>Entry 3</td> <td>Entry 4</td> </tr> </table>
appears as
Head 1 | Head 2 |
---|---|
Entry 1 | Entry 2 |
Entry 3 | Entry 4 |
In this case of table captions, the table name (Tab.) including the table enumeration (1,2,...)
has to be displayed bold using <strong>
and </strong>
. The table name
and enumeration should look like this: Tab. 1: Tables have to be enumerated manually.
<table border="1" cellspacing="0" cellpadding="2"> <caption align="bottom"><strong>Tab 2:</strong> Caption starts with a capital letter</caption> <tr> <th>Head 1</th> <th>Head 2</th> </tr> <tr> <td>Entry 1</td> <td>Entry 2</td> </tr> <tr> <td>Entry 3</td> <td>Entry 4</td> </tr> </table>
appears as
Head 1 | Head 2 |
---|---|
Entry 1 | Entry 2 |
Entry 3 | Entry 4 |
Extends from Modelica.Icons.Information (Icon for general information packages).
Automatically generated Thu Oct 1 16:07:32 2020.