From f34412e46b66809276af81b9c81d7a25fdcc0274 Mon Sep 17 00:00:00 2001 From: Utensil Date: Sat, 30 Mar 2024 19:12:41 +0800 Subject: [PATCH] Use math code blocks instead --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 4aa99876..f266699b 100644 --- a/README.md +++ b/README.md @@ -48,18 +48,18 @@ Features Overloaded Python operators for basic GA operations: -$$ +```math \begin{split}\begin{aligned} A+B &= \texttt{A+B} \\ A-B &= \texttt{A-B} \\ AB &= \texttt{A*B} \\ - A \wedge B &= \texttt{A \\^{} B} \\ + A \wedge B &= \texttt{A \^{} B} \\ A \cdot B &= \texttt{A|B} \\ A \rfloor B &= \texttt{AB} \\ A/B &= \texttt{A/B} \\ \end{aligned}\end{split} -$$ +``` ### Geometric Calculus @@ -70,12 +70,12 @@ $$ The various derivatives of a multivector function is accomplished by multiplying the gradient operator vector with the function: -$$ +```math \begin{aligned} - \nabla F &= \texttt{grad\*F} \\ - F \bar{\nabla} &= \texttt{F\*rgrad} \\ - \nabla {\wedge}F &= \texttt{grad \\^{} F} \\ - F {\wedge}\bar{\nabla} &= \texttt{F \\^{} rgrad} \\ + \nabla F &= \texttt{grad*F} \\ + F \bar{\nabla} &= \texttt{F*rgrad} \\ + \nabla {\wedge}F &= \texttt{grad \^{} F} \\ + F {\wedge}\bar{\nabla} &= \texttt{F \^{} rgrad} \\ \nabla \cdot F &= \texttt{grad|F} \\ F \cdot \bar{\nabla} &= \texttt{F|rgrad} \\ \nabla \rfloor F &= \texttt{gradF} \\ F \lfloor \bar{\nabla} &= \texttt{F>rgrad} \end{aligned} -$$ +``` -$$ +```math \begin{aligned} - F \nabla &= \texttt{F\*grad} \\ - \bar{\nabla} F &= \texttt{rgrad\*F} \\ - F {\wedge}\nabla &= \texttt{F \\^{} grad} \\ - \bar{\nabla} {\wedge}F &= \texttt{rgrad \\^{} F} \\ + F \nabla &= \texttt{F*grad} \\ + \bar{\nabla} F &= \texttt{rgrad*F} \\ + F {\wedge}\nabla &= \texttt{F \^{} grad} \\ + \bar{\nabla} {\wedge}F &= \texttt{rgrad \^{} F} \\ F \cdot \nabla &= \texttt{F|grad} \\ \bar{\nabla}\cdot F &= \texttt{rgrad|F} \\ F \rfloor \nabla &= \texttt{Fgrad} \\ \bar{\nabla} \lfloor F &= \texttt{rgrad>F} \end{aligned} -$$ +``` Tip: an example for getting `grad` and `rgrad` of a 3-d Euclidean geometric algebra in rectangular coordinates: @@ -145,7 +145,9 @@ M.grade(3).Fmt(3,r'\langle \mathbf{M} \rangle _3') You will see: -![](https://raw.githubusercontent.com/pygae/galgebra/master/doc/images/st4_M3.svg?sanitize=true) +```math +\begin{aligned} \langle \mathbf{M} \rangle _3 =& M^{txy} \boldsymbol{e}_{t}\wedge \boldsymbol{e}_{x}\wedge \boldsymbol{e}_{y} \\ & + M^{txz} \boldsymbol{e}_{t}\wedge \boldsymbol{e}_{x}\wedge \boldsymbol{e}_{z} \\ & + M^{tyz} \boldsymbol{e}_{t}\wedge \boldsymbol{e}_{y}\wedge \boldsymbol{e}_{z} \\ & + M^{xyz} \boldsymbol{e}_{x}\wedge \boldsymbol{e}_{y}\wedge \boldsymbol{e}_{z} \end{aligned} +``` You may also check out more examples [here](https://github.com/pygae/galgebra/blob/master/examples/).