-
Notifications
You must be signed in to change notification settings - Fork 26
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
Should move from raw HTML to MathJax for embedded math #479
Comments
Put in as low priority, as the current HTML is ok. |
@danscime can you check that all of the examples use MathJax as the default? If so, then close this issue. |
That doesn't mean it uses it, unfortunately! We added that to all examples very early, as it is relatively harmless to do so. You have to look both inside the html file to find some latex, and look in the example's configuration settings to make sure it uses the MathJax option. |
I did a search through the files. No use in any files for And for the config settings, the .css files did not have anything resembling or mentioning Latex or MathJax. |
Right, so this is not fixed at all. I guess it will make sense to do this after the current pass on indenting is done. Re-assigning. |
As a test (on Tiny). Changing one equation to use Latex symbols: Changes from 9d537ce |
The second version of the table definitely looks nicer than the first. Great! |
Adding displayed equations. Before (Using original without any MathJax): After adding Changes from 3213be8 |
I like the fonts for the second example better, but the left justification (from the first example) looks better than the centre justification in the second (in my opinion). How hard would it be to left justify the second case? (This is a minor request; I wouldn't want to block progress for such a simple formatting suggestion.) |
It isn't a big deal, but one looks in-line in tex with |
You're right, source code for the Tex displays the Units part inline and equation part as displayed. I feel like the end goal would be to use whatever prints the math in Tex to be used for HTML, so the HTML would follow whatever Tex does in terms of which parts are inline vs. displayed. So I think I should base the HTML off of the Tex for now. And then once automated, we can change the formatting if we decide to. |
Sounds like a good plan. 😄 |
Tiny stable fully updated via c95cdf0 |
As of 76418b9, I believe I have made all necessary changes on my beginMathJax branch in order to have expressions and units display as embedded Latex. These cause significant changes to the HTML files. So I will go through the stable changes. @smiths @JacquesCarette what should be the workflow? |
See my comments on the commits on that branch. But that won't actually affect the HTML files themselves. Yes, you'll have to go through them carefully. Start with the smaller ones - if there's something weird, it's likely pervasive and will already show up there. You can also turn on MathJax example-by-example (right?), so that these can be incorporated into stable incrementally. |
@JacquesCarette currently, the way it is set up, it affects all examples. If in the future, we want to have the ability to switch, then I could look into it. But if the end goal is to only have MathJax (which it seems like it should be), then it may not be worth looking into. In this case, there will be a big PR with many merges to master. So far I am almost done Projectile and have not noticed anything unexpected. |
I had asked Devi to have an option for that, which he did implement, to funnel that option around. |
@JacquesCarette I am not sure where this is. I have changed the actual functions in HTML/Print.hs. I would probably need to keep the original functions and create new functions with mathJax abilities, and then this option would choose which functions to use I suppose. |
It was in a branch of his. It might have gotten deleted, I'm not sure. I don't think there's a need for copying anything. Yes, the original functions will need to be kept, and then the option would choose which ones to call. |
@JacquesCarette I will look to try to find something he may have created. |
Currently, I have updated Projectile HTML. Mathjax right now is only being used for:
These changes can be found in this compare. |
We might eventually want to have fractions in mathjax too - but otherwise, this looks good. |
Fractions are being implemented in mathjax. Did you mean something else?
… On Aug 9, 2019, at 9:28 AM, Jacques Carette ***@***.***> wrote:
We might eventually want to have fractions in mathjax too - but otherwise, this looks good.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I saw some fractions in HTML. Maybe just for units? Which I think is fine. |
Oh yes, that’s exactly it
… On Aug 9, 2019, at 9:58 AM, Jacques Carette ***@***.***> wrote:
I saw some fractions in HTML. Maybe just for units? Which I think is fine.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
We need to figure out how to "properly" embed latex in html. My guess is that the easiest way to do that is to always use |
@danscime, I did a bit of googling on this. Can you define new commands for |
@smiths that seems to work! I will begin to implement. |
Note that the proper macros should be \newcommand{\lt}{\ensuremath <}
\newcommand{\gt}{\ensuremath >} |
And |
I note that the mathjax documentation http://docs.mathjax.org/en/latest/tex.html says we should use Further down that same page, it has advice regarding < and > . |
I will make these changes. |
See #478 for most of the discussion on this topic.
The text was updated successfully, but these errors were encountered: