Skip to content

Commit

Permalink
Merge pull request #41 from DARPA-ASKEM/latex-style-updates
Browse files Browse the repository at this point in the history
LaTeX style updates
  • Loading branch information
mecrouch authored Jan 15, 2025
2 parents 31f27db + d1329c3 commit 0dfadb4
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions docs/modeling/create-model-from-equations.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,33 @@ The Create model from equations operator works with LaTeX equations. Before it c
---

- Avoid the use of:
- Parentheses.
- Capital sigma (`Σ`) and pi (`Π`) notations for summation and product.
- Non-ASCII characters.
- Homoglyphs (characters that look similar but have different meanings).
- To indicate multiplication, use ` * ` between scalar quantities.
- To indicate multiplication, use ` * `.

- #### Superscripts and subscripts
*Recommended*: `"b * S(t) * I(t)`
*Not recommended*: `b S(t) I(t)`

- Rewrite expressions with negative exponents as explicit fractions.

*Recommended*: `"\\frac{{1}}{{N}}`
*Not recommended*: `N^{{-1}}`

- #### Parentheses

---

- To denote **indices**, use LaTeX subscripts `_` instead of superscripts and LaTeX superscripts `^`.
- Use **LaTeX subscripts** `_` instead of Unicode subscripts. Wrap all characters in the subscript in curly brackets `{...}`.
- When grouping algebraic expressions, don't use square brackets `[ ]`, curly braces `{ }`, or angle brackets `< >`. Use parentheses `( )` if needed.
- Expand time-dependent algebraic expressions grouped by parentheses according to the distributivity property of multiplication.

*Recommended*: `a * S(t) * I(t) + b * S(t) * D(t) + c * A(t) * S(t)`
*Not recommended*: `S(t) * (a * I(t) + b * D(t) + c * A(t))`

- Don't expand constant algebraic expressions grouped by parentheses.

*Recommended*: `a * b * (1 - c)`
*Not recommended*: `a ∗ b ∗ 1 − a ∗ b ∗c`

- #### Variable and symbol usage

Expand All @@ -166,6 +181,13 @@ The Create model from equations operator works with LaTeX equations. Before it c
- **Replace any variant form of Greek letters** (`\varepsilon`) with their main form (`\epsilon`) when representing a parameter or variable.
- Don't separate equations by punctuation (commas, periods, or semicolons).

- #### Superscripts and subscripts

---

- To denote **indices**, use LaTeX subscripts `_` instead of superscripts and LaTeX superscripts `^`.
- Use **LaTeX subscripts** `_` instead of Unicode subscripts. Wrap all characters in the subscript in curly brackets `{...}`.

</div>

## Create the model
Expand Down

0 comments on commit 0dfadb4

Please sign in to comment.