pygae / galgebra

Symbolic Geometric Algebra/Calculus package for SymPy :crystal_ball:
https://galgebra.rtfd.io/
BSD 3-Clause "New" or "Revised" License
230 stars 62 forks source link

LaTeX macro \prm doesn't work; correction suggested #445

Open Greg1950 opened 4 years ago

Greg1950 commented 4 years ago

Alan Bromborsky sent me a new module for GAlgebra, gprinter.py. Possibly Bromborsky has already passed the new module on to the PyGAE group, but as of this writing it has not yet been included in the galgebra-master.zip file one downloads from [(https://github.com/pygae/galgebra)]. I have written to Bromborsky separately to inform him of the minor issue described below.

gprinter.py defines a string ip_cmds, which in turn defines a LaTeX macro \prm by

$$\newcommand{\prm}[1]{{#1}}$$ .

This command does nothing to its single argument. I believe the correct definition should read

$$\newcommand{\prm}[1]{{#1}'}$$

or

$$\newcommand{\prm}[1]{{#1}^\prime}$$ .

The point of the macro is to affix a superscripted prime mark on the right side of the macro's argument. For example, $\prm{(fg)}$ upon typesetting should appear as (fg)' .

It should be mentioned that the macro in question also appears in the string ip_cmds that appears in printer.py, where it is written as I've suggested.

Greg Grunberg g.s.grunberg@gmail.com

eric-wieser commented 4 years ago

The one in printer.py was correct since at least fab9012af52b2c9cee378ea0f923394dd3383d0b.

I think this is unique to the gprinter.py file. We've in contact with Alan, and gave that file a preliminary review outside of GitHub in which we found a few bugs. It's unlikely to make it into master for at least another few weeks, and we're considering making it a separate package to galgebra as at this point it functions almost independently.