Skip to content

Commit

Permalink
Update LaTeX style guide to deal with brackets (#6069)
Browse files Browse the repository at this point in the history
  • Loading branch information
liunelson authored Jan 15, 2025
1 parent 734d3db commit 609a663
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/gollm/common/prompts/latex_style_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
3) All variables that have time "t" dependence should be written with an explicit "(t)" (for example, "X" should be written as "X(t)")
4) Rewrite superscripts and LaTeX superscripts "^" that denote indices to subscripts using LaTeX "_"
5) Replace any unicode subscripts with LaTeX subscripts using "_". Ensure that all characters used in the subscript are surrounded by a pair of curly brackets "{{...}}"
6) Avoid parentheses
7) Avoid capital sigma and pi notations for summation and product
8) Avoid non-ASCII characters when possible
9) Avoid using homoglyphs
10) Avoid words or multi-character names for variables and names. Use camel case to express multi-word or multi-character names
11) Use " * " to denote multiplication between scalar quantities
12) Replace any variant form of Greek letters to their main form when representing a variable or parameter; "\\varepsilon" -> "\\epsilon", "\\vartheta" -> "\\theta", "\\varpi" -> "\\pi", "\\varrho" -> "\\rho", "\\varsigma" -> "\\sigma", "\\varphi" -> "\\phi"
13) If equations are separated by punctuation (like comma, period, semicolon), do not include the punctuation in the LaTeX code.
14) Expand all algebraic expressions with parentheses according to distributivity property of multiplication (for example, "S(t) * (a * I(t) + b * D(t) + c * A(t))" -> "a * S(t) * I(t) + b * S(t) * D(t) + c * A(t) * S(t)")
6) Do not use square brackets "[ ]", curly braces "{ }", and angle brackets "< >" when grouping algebraic expressions; use parentheses "( )" when necessary
7) Expand time-dependent algebraic expressions grouped by parentheses according to distributivity property of multiplication (for example, "S(t) * (a * I(t) + b * D(t) + c * A(t))" -> "a * S(t) * I(t) + b * S(t) * D(t) + c * A(t) * S(t)")
8) Do not expand constant algebraic expressions grouped by parentheses; for example, "a * b * (1 - c)" should not be expanded since "a", "b", "c" are constants
9) Avoid capital sigma and pi notations for summation and product
10) Avoid non-ASCII characters when possible
11) Avoid using homoglyphs
12) Avoid words or multi-character names for variables and names. Use camel case to express multi-word or multi-character names
13) Use " * " to denote multiplication; for example, "b S(t) I(t)" -> "b * S(t) * I(t)"
14) Replace any variant form of Greek letters to their main form when representing a variable or parameter; "\\varepsilon" -> "\\epsilon", "\\vartheta" -> "\\theta", "\\varpi" -> "\\pi", "\\varrho" -> "\\rho", "\\varsigma" -> "\\sigma", "\\varphi" -> "\\phi"
15) If equations are separated by punctuation (like comma, period, semicolon), do not include the punctuation in the LaTeX code.
"""

0 comments on commit 609a663

Please sign in to comment.