sagetex icon indicating copy to clipboard operation
sagetex copied to clipboard

Make sagetex work together with siunitx

Open student-sx opened this issue 8 years ago • 5 comments

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

student-sx avatar Apr 23 '16 13:04 student-sx

The workaround with sagesilent provided at the tex.SE link would perfectly without cocalc.

dimpase avatar Jan 10 '19 08:01 dimpase

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.

xelra avatar Oct 16 '19 19:10 xelra

I just don't know much about unit packages, for myself.

kcrisman avatar Oct 16 '19 19:10 kcrisman

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.

xelra avatar Oct 16 '19 19:10 xelra

If you feel like changing sagetex along these lines, please give it a try.

dimpase avatar Nov 13 '19 14:11 dimpase