# Test of the weird printing rules for the `gsym` argument to `Ga`.

## Constructed without the galgebra printer enabled


```python
from galgebra.ga import Ga
from sympy import symbols, init_printing
from IPython.display import display
init_printing(use_latex='mathjax')
```


```python
coords = symbols('u v', real=True)
f = Ga('e*u|v', gsym='f')
g = Ga('e*u|v', gsym='g')
fc = Ga('e*u|v', coords=coords, gsym='f')
gc = Ga('e*u|v', coords=coords, gsym='g')
```

Printed with the default printer. Note that sympy shows determinants with $|M|$.


```python
display(f.e_sq)
display(g.e_sq)
display(fc.e_sq)
display(gc.e_sq)
```


$\displaystyle - \left|{f}\right|$



$\displaystyle - \left|{g}\right|$



$\displaystyle - \left|{f{\left(u,v \right)}}\right|$



$\displaystyle - \left|{g{\left(u,v \right)}}\right|$


Printed within an Mv. Note that galgebra's default printer shows determinants with $\det (M)$.


```python
display(f.mv(f.e_sq))
display(g.mv(g.e_sq))
display(fc.mv(fc.e_sq))
display(gc.mv(gc.e_sq))
```


\begin{equation*} - \det\left ( f\right ) \end{equation*}



\begin{equation*} - \det\left ( g\right ) \end{equation*}



\begin{equation*} - \det\left ( f {\left (u,v \right )}\right ) \end{equation*}



\begin{equation*} - \det\left ( g {\left (u,v \right )}\right ) \end{equation*}


## Constructed with the printer enabled


```python
from galgebra.printer import Format
Format()
```


```python
coords = symbols('u v', real=True)
fp = Ga('e*u|v', gsym='f')
gp = Ga('e*u|v', gsym='g')
fcp = Ga('e*u|v', coords=coords, gsym='f')
gcp = Ga('e*u|v', coords=coords, gsym='g')
```

Printed with the non-galgebra printer.


```python
display(fp.e_sq)
display(gp.e_sq)
display(fcp.e_sq)
display(gcp.e_sq)
```


$\displaystyle - \left|{f}\right|$



$\displaystyle - \left|{g}\right|$



$\displaystyle - \left|{f{\left(u,v \right)}}\right|$



$\displaystyle - \left|{g{\left(u,v \right)}}\right|$


Printed within an Mv - now also consistent. Note that the galgebra `Format` does not show function arguments in its default setting.


```python
display(fp.mv(fp.e_sq))
display(gp.mv(gp.e_sq))
display(fcp.mv(fcp.e_sq))
display(gcp.mv(gcp.e_sq))
```


\begin{equation*} - \det\left ( f\right ) \end{equation*}



\begin{equation*} - \det\left ( g\right ) \end{equation*}



\begin{equation*} - \det\left ( f \right ) \end{equation*}



\begin{equation*} - \det\left ( g \right ) \end{equation*}


968c5c6b86b9c4210abb1b3b610806522498e2db
ipynb
Jupyter Notebook
examples/ipython/gsym-printing.ipynb
waldyrious/galgebra
b5eb070340434d030dd737a5656fbf709538b0b1
BSD-3-Clause
examples/ipython/gsym-printing.ipynb
waldyrious/galgebra
b5eb070340434d030dd737a5656fbf709538b0b1
BSD-3-Clause
examples/ipython/gsym-printing.ipynb
waldyrious/galgebra
b5eb070340434d030dd737a5656fbf709538b0b1
BSD-3-Clause
Qwen/Qwen-72B
1. YES
2. YES