Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge the new printer by abrombo #39

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/LaTeX/curvi_linear_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ def derivatives_in_spherical_coordinates():
A = sp3d.mv('A','vector',f=True)
B = sp3d.mv('B','bivector',f=True)

print('#Derivatives in Spherical Coordinates')

print('f =',f)
print('A =',A)
print('B =',B)
Expand Down Expand Up @@ -69,6 +71,8 @@ def derivatives_in_elliptic_cylindrical_coordinates():
A = elip3d.mv('A','vector',f=True)
B = elip3d.mv('B','bivector',f=True)

print('#Derivatives in Elliptic Cylindrical Coordinates')

print('f =',f)
print('A =',A)
print('B =',B)
Expand All @@ -92,6 +96,8 @@ def derivatives_in_prolate_spheroidal_coordinates():
A = ps3d.mv('A','vector',f=True)
B = ps3d.mv('B','bivector',f=True)

print('#Derivatives in Prolate Spheroidal Coordinates')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind making a new PR with just the changes to this file (and the notebook changes entailed)? I remember being confused by the output without these dividers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to do that even later tonight (need a full dev environment back home)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do this any time soon, just might be nice to pick up at some point.

print('f =',f)
print('A =',A)
print('B =',B)
Expand Down
134 changes: 65 additions & 69 deletions examples/ipython/LaTeX.ipynb

Large diffs are not rendered by default.

165 changes: 85 additions & 80 deletions examples/ipython/Old Format.ipynb

Large diffs are not rendered by default.

77 changes: 75 additions & 2 deletions examples/ipython/Smith Sphere.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,80 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/latex": [
"$$ \n",
"\\DeclareMathOperator{\\Tr}{Tr}\n",
"\\DeclareMathOperator{\\Adj}{Adj}\n",
"\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
"\\newcommand{\\lp}{\\left (}\n",
"\\newcommand{\\rp}{\\right )}\n",
"\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
"\\newcommand{\\half}{\\frac{1}{2}}\n",
"\\newcommand{\\llt}{\\left <}\n",
"\\newcommand{\\rgt}{\\right >}\n",
"\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
"\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
"\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n",
"\\newcommand{\\lbrc}{\\left \\{}\n",
"\\newcommand{\\rbrc}{\\right \\}}\n",
"\\newcommand{\\W}{\\wedge}\n",
"\\newcommand{\\prm}[1]{{#1}'}\n",
"\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
"\\newcommand{\\R}{\\dagger}\n",
"\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
"\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n",
"\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n",
"\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
"\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n",
"\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n",
"\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n",
"\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n",
"\\newcommand{\\lc}{\\rfloor}\n",
"\\newcommand{\\rc}{\\lfloor}\n",
"\\newcommand{\\T}[1]{\\text{#1}}\n",
"\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n",
"\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n",
"\\newcommand{\\ldot}{\\lfloor}\n",
"\\newcommand{\\rdot}{\\rfloor}\n",
"\n",
"%MacDonald LaTeX macros\n",
"\n",
"\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n",
"\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n",
"\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n",
"\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n",
"\n",
"\\newcommand {\\RE} {\\mathbb{R}}\n",
"\\newcommand {\\GA} {\\mathbb{G}}\n",
"\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n",
"\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n",
"\\newcommand {\\cross} {\\mathbin{\\times}}\n",
"\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n",
"\\renewcommand {\\iff} {\\Leftrightarrow}\n",
"\\renewcommand {\\impliedby}{\\Leftarrow}\n",
"\\renewcommand {\\implies} {\\Rightarrow}\n",
"\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n",
"\\newcommand {\\perpm} {*} % Dual of multivector\n",
"\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n",
"\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n",
"\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n",
"\\newcommand {\\ds} {\\displaystyle}\n",
"\\newcommand {\\os} {\\overset}\n",
"\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n",
"\\newcommand {\\latex} {\\LaTeX}\n",
" $$"
],
"text/plain": [
"<IPython.core.display.Latex object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from galgebra import ga\n",
"from galgebra.ga import Ga\n",
Expand Down Expand Up @@ -385,7 +458,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
77 changes: 75 additions & 2 deletions examples/ipython/colored_christoffel_symbols.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,80 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/latex": [
"$$ \n",
"\\DeclareMathOperator{\\Tr}{Tr}\n",
"\\DeclareMathOperator{\\Adj}{Adj}\n",
"\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
"\\newcommand{\\lp}{\\left (}\n",
"\\newcommand{\\rp}{\\right )}\n",
"\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
"\\newcommand{\\half}{\\frac{1}{2}}\n",
"\\newcommand{\\llt}{\\left <}\n",
"\\newcommand{\\rgt}{\\right >}\n",
"\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
"\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
"\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n",
"\\newcommand{\\lbrc}{\\left \\{}\n",
"\\newcommand{\\rbrc}{\\right \\}}\n",
"\\newcommand{\\W}{\\wedge}\n",
"\\newcommand{\\prm}[1]{{#1}'}\n",
"\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
"\\newcommand{\\R}{\\dagger}\n",
"\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
"\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n",
"\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n",
"\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
"\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n",
"\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n",
"\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n",
"\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n",
"\\newcommand{\\lc}{\\rfloor}\n",
"\\newcommand{\\rc}{\\lfloor}\n",
"\\newcommand{\\T}[1]{\\text{#1}}\n",
"\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n",
"\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n",
"\\newcommand{\\ldot}{\\lfloor}\n",
"\\newcommand{\\rdot}{\\rfloor}\n",
"\n",
"%MacDonald LaTeX macros\n",
"\n",
"\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n",
"\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n",
"\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n",
"\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n",
"\n",
"\\newcommand {\\RE} {\\mathbb{R}}\n",
"\\newcommand {\\GA} {\\mathbb{G}}\n",
"\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n",
"\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n",
"\\newcommand {\\cross} {\\mathbin{\\times}}\n",
"\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n",
"\\renewcommand {\\iff} {\\Leftrightarrow}\n",
"\\renewcommand {\\impliedby}{\\Leftarrow}\n",
"\\renewcommand {\\implies} {\\Rightarrow}\n",
"\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n",
"\\newcommand {\\perpm} {*} % Dual of multivector\n",
"\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n",
"\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n",
"\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n",
"\\newcommand {\\ds} {\\displaystyle}\n",
"\\newcommand {\\os} {\\overset}\n",
"\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n",
"\\newcommand {\\latex} {\\LaTeX}\n",
" $$"
],
"text/plain": [
"<IPython.core.display.Latex object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from __future__ import print_function\n",
"import sys\n",
Expand Down Expand Up @@ -642,7 +715,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
Loading