DP Notes
Handling Equations
We obtain an inline math expression using the math directive as \(y = f(x)\). If we define math as the default role, then we do not need to precede each math directive with “:math:”. A math expression can be defined once at the top of the document (as for \(\hat{\mathbf{n}}_\mathbf{c}\)), and then placed within bars in a paragraph or table. Such a math expression cannot be used within an equation. The standard way to do this in TeX is to define the expression as a command, and then use this command in the equation; we have not worked out how to do this within the Sphinx system.
The following equation contains commonly used symbols to denote scalar and vector quantities:
The mathbf-command operates on letters, numbers and upper-case Greek letters. The pmb-command (Poor Man’s Bold) operates on lower-case Greek letters, and to make them non-italic we must insert their UTF-8 encoding. The hat- and dot-commands typically operate on a single character.
A typical left-aligned equation using a “with” expression is given here:
A typical equation that contains “(2D model: expr)”:
Case Statement
The following equation demonstrates how to create a case statement with TeX (using the cases construct) and with LaTeX (using the array construct). Note the use of hfill to get right-alignment of the first column with the cases construct. The column alignment for the array construct is specified by the arguments after the begin-array term. For the array construct, the dot following the right term gives us no right delimiter.
Handling Commands and Other Things
We can refer to an equation using the eq-directive as in Eq. (5) is given above. We can refer to an equation in another document with the ref-directive as in this equation. We can refer to a command with the cmd-directive as in: model calm
does a neat thing. We can refer to a FISH function with the func-directive as in the FISH function measure.list
does a cool thing. We can refer to the command without linking to the command description using the lcmd-directive as in model calm. We can refer to the FISH function or variable without linking to the function or variable descriptions using the sym-directive as in measure.list and myVar.
We can refer to an integer argument with the int-directive, and the argument value with the lint-directive as in this command takes an integer argument i that may have a value of 3. The same convention applies to other types as well, such as bool, int, flt, vec, etc. For example, a vector argument v may take the value of f, and a string argument s may take the value of fred.
We can insert a flagged remark into the text using the directives flag, flag2 and flag3. The flag-directive adds the remark in red text. The flag2-directive marks a block of text, it is not marked in the output document. The flag3-directive adds a comment for internal review, it does not appear in the output document.
We can refer to a marked location in another document using the ref-directive. (1) Material Modeling Support For PFC puts in the link and the name of that section. (2) mat sup puts in the link and the word “mat sup”.
Was this helpful? ... | PFC 6.0 © 2019, Itasca | Updated: Nov 19, 2021 |