sagetex
sagetex copied to clipboard
Make sagetex work together with siunitx
It would be nice if sagetex would work seamlessly with siunitx, for example \SI{\sage{3.5^2}}{kg m} or \num{\sage{3.5^2}} should work.
The problem is already described in TeX.sx: http://tex.stackexchange.com/questions/175745/using-sagetex-with-siunitx
The workaround with sagesilent
provided at the tex.SE link would perfectly without cocalc.
Is there any progress on this? Having to generate LaTeX code verbosely and inserting that is too much of a workaround, just to work with units. This feature is really in high demand.
I just don't know much about unit packages, for myself.
I feel like the problem is the execution chain. In R with Sweave and knitr, the computation and expansion is done before LaTeX is run, so any packages in the LaTeX document don't choke on unexpected inputs. That's why siunitx works there and doesn't with SageTeX.
If you feel like changing sagetex along these lines, please give it a try.