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 a 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 output usePolar == false
, assign cosine and sine to output Extends 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.SIunits.Time tStart "Start time"
<pre>
and </pre>
.<code>
and </code>
.<pre> <b>connector</b> Frame ... <b>flow</b> SI.Force f[Woehrnschimmel1998] <b>annotation</b>(unassignedMessage="..."); <b>end</b> Frame; </pre>
appears as
connector Frame ... flow SI.Force f[Woehrnschimmel1998] annotation(unassignedMessage="..."); end Frame;
<pre> <b>parameter</b> Modelica.SIunits.Conductance G=1 "Conductance"; </pre>
appears as
parameter Modelica.SIunits.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.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/UsersGuide/Conventions/Images/Blocks/Examples/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/UsersGuide/Conventions/Images/Blocks/Examples/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/UsersGuide/Conventions/Images/Blocks/Examples/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.AsynchronousInductionMachines.AIM_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).
Lists have to be placed outside of paragraphs to be HTML compliant.
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 sensorless rotor temperature estimation can be found in <a href="modelica://Modelica.UsersGuide.Conventions.UsersGuide.References">[Gao2008]</a.> </p>
appears as
More details about sensorless rotor temperature estimation can be found in [Gao2008].
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 <b>
and </b>
. 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"><b>Tab 2: </b>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 Tue Apr 05 09:36:09 2016.