summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorCurtis Decker <82775864+MyrtleTurtle22@users.noreply.github.com>2023-11-02 05:47:21 -0400
committerGitHub <noreply@github.com>2023-11-02 10:47:21 +0100
commit1d7b363aa4e8e2454f8f319ae4c17a2f728ca39e (patch)
treebd9f37010d39b93f0e9265cd287a4c5c10d22b19 /docs/reference
parent0f274f8edbbb93d65cb11713f4bdf912b3286800 (diff)
Improved math alignment documentation (#2505)
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/categories.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/reference/categories.yml b/docs/reference/categories.yml
index 1a4cfb92..a90d9e7c 100644
--- a/docs/reference/categories.yml
+++ b/docs/reference/categories.yml
@@ -51,6 +51,26 @@ math: |
&= (n(n+1)) / 2 $
```
+ When formulas include multiple _alignment points_ ('&'), this creates blocks
+ of "right aligned/left aligned" columns and positions them by equally dividing
+ the blank space remaining between the blocks. So, in the example
+ below, in "a &= b", the "a" is in a right aligned column while "=b" is left aligned.
+ In "a &= b & text", text is in a right aligned column, but in the next line, "a &= b && text",
+ text is in a left aligned column because "&&" is two alignment points in a row, equivalent to
+ "& <no code here> &". "& &" and "&&" behave exactly the same way, and adding additional alignment
+ points simply alternates between right aligned/left aligned. The additional lines in the example
+ below demonstrate this point.
+
+ ```example
+ $ a &= b \
+ a &= b & "text" \
+ a &= b && "text" \
+ (3x + y) / 7 &= 9 && "given" \
+ 3x + y &= 63 & "multiply by 7" \
+ 3x &= 63 - y && "subtract y" \
+ x &= 21 - y/3 & "divide by 3" \ $
+ ```
+
Math mode supports special function calls without the hash prefix. In these
"math calls", the argument list works a little differently than in code: