From 5efc44798a24868942d541f6752d27725b43f3ad Mon Sep 17 00:00:00 2001 From: utensil Date: Sat, 30 Mar 2024 18:53:38 +0800 Subject: [PATCH 1/4] Replace SVGs of LaTeX to just LaTeX --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b910a86..4aa99876 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,18 @@ Features Overloaded Python operators for basic GA operations: -![](https://raw.githubusercontent.com/pygae/galgebra/master/doc/images/basic_op.svg?sanitize=true) +$$ +\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 \cdot B &= \texttt{A|B} \\ + A \rfloor B &= \texttt{AB} \\ + A/B &= \texttt{A/B} \\ +\end{aligned}\end{split} +$$ ### Geometric Calculus @@ -59,7 +70,35 @@ Overloaded Python operators for basic GA operations: The various derivatives of a multivector function is accomplished by multiplying the gradient operator vector with the function: -![](https://raw.githubusercontent.com/pygae/galgebra/master/doc/images/grad.svg?sanitize=true) ![](https://raw.githubusercontent.com/pygae/galgebra/master/doc/images/grad_cmp.svg?sanitize=true) +$$ +\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 \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} +$$ + +$$ +\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 \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: From f34412e46b66809276af81b9c81d7a25fdcc0274 Mon Sep 17 00:00:00 2001 From: Utensil Date: Sat, 30 Mar 2024 19:12:41 +0800 Subject: [PATCH 2/4] 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/). From 9c8facc9254d3ebd071b14f48a829b561f70902b Mon Sep 17 00:00:00 2001 From: utensil Date: Sat, 30 Mar 2024 19:13:12 +0800 Subject: [PATCH 3/4] Switch to use sphinx_mdinclude --- doc/conf.py | 4 +--- doc/getting-started.rst | 2 -- doc/index.rst | 1 - doc/readthedocs-pip-requirements.txt | 1 + 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 9721de6c..8d2b8e78 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -54,9 +54,7 @@ 'releases', 'sphinxcontrib.bibtex', 'sphinx_rtd_theme', - - # local extensions - 'md_include', + 'sphinx_mdinclude' ] # This is not actually used as we have a template overload to render this with diff --git a/doc/getting-started.rst b/doc/getting-started.rst index e2960dfb..97d49585 100644 --- a/doc/getting-started.rst +++ b/doc/getting-started.rst @@ -1,3 +1 @@ .. mdinclude:: ../README.md - :start-after: - :end-before: diff --git a/doc/index.rst b/doc/index.rst index 21fa0289..7b1043c6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,5 +1,4 @@ .. mdinclude:: ../README.md - :end-before: