-
Notifications
You must be signed in to change notification settings - Fork 122
Add Latexify extension #668
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
Conversation
Are these functions (
Here are my thoughts, but keep in mind that I’m not really familiar with Latexify and UnitfulLatexify: To me, it looks like the reason for having the Another question to consider: When this is merged and released, and users of UnitfulLatexify upgrade Unitful without making changes to their code, it will load both UnitfulLatexify and this extension (I think). Will that lead to problems? I haven’t tried it yet, but I think we should make sure that upgrading Unitful does not break the code of existing UnitfulLatexify users. Footnotes
|
|
Thank you for the comments.
This, but that is a user facing interface. I would not be surprised if few to no people ever used them though. Users going from UnitfulLatexify to LatexifyUnitfulExtension will have to either change
That's not a half bad idea. It could even supersede the entire
Yes, this is going to take a bit of thinking. When we merged |
|
As a user, I have actually been using the |
@gustaphe Other than this upgrade warning/API considerations, is there anything complicated that needs to happen to this PR? Is it just a straightforward move of the current version of UnitfulLatexify into an extension here, now that the SiUnitxFormatter is in place? If so I could try to take a stab. |
|
The only other thing I can think of is there are a couple of deprecations in UnitfulLatexify (you can search for |
|
This was superseded by #795. |
#665
This is not quite done yet. Because of how extensions work I had to break two things from UnitfulLatexify.
latexslashlabel(s, u)it'slatexify(s, u; labelformat=:slash). This is a better interface anyway, I've been meaning to change it since the start but didn't want to break it. As far as I can tell I can't export those functions from the extension in a meaningful way, so maybe this is just the time. I don't think those functions are very common anyway.u"One". UnitfulLatexify hadu"one"as a non-fragile version ofNoUnits, so you could have numbers that are recognizably unitful but with units of1. AFAICT, I cannot currently register units in an extension (I tried a couple of things, but nothing quite stuck), so I needed to register this unit in Unitful. But because Unitful importsBase.oneI needed to change the spelling. Perhaps the right way is to fix registering units in an extension (more people might need that), but I don't know where to start.