-
Notifications
You must be signed in to change notification settings - Fork 10
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
Various LaTeX-->HTML/SVG support features #1262
Conversation
1. Convert selected LaTeX text to a preview file 2. Preview the file 3. Convert whole file using m2svg 4. View the converted file
HTML autogen blindly changes `&` to `&`, etc. That is not wanted inside LaTeX markup. Similarly for super/subscripts and angle brackets
Instead of writing an HTML that requires MathJax to interpret it, write an HTML that m2svg can convert (as it will later for the whole file). It creates the preview in a subdir `latexpreviewselect` of the project folder. LaTeX conversion errors appear in `errors.err`
Convert LaTeX `\PageSep{nnn}` markup to GG-compatible page separator, and calculate labels to match `nnn` values. Clear any existing labels first. Also move LaTeX menu to File menu to hide it away.
Inside LaTeX blocks, we don't want indented lines to be marked up with spans & margins. Also, warn user if errors file from `m2svg` contains messages.
DP user has been requesting/trialling these features in the work they have been doing. Regular PPers will not use them at all. I thought it would be good to get them into the system, rather than hanging around in a test version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like m2svg
is a nodejs package and I'm assuming we want to leave (the optional) installation of that up to the user rather than try to package that with all its dependencies. Do we need to include anything about that in INSTALL.md
?
Thanks, Casey - I don't think we need to mention it in INSTALL.md at this point (since it probably affects either 1 or 2 users, both of whom already have m2svg installed of course) but it's something to bear in mind if HTML/SVG gets a sudden increase in popularity amongst PMs & PPers. Also, yes - I don't think we'll try to package m2svg. As well as the additional complication, I suspect it would be quite a large size increase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6. HTML autogen is a bit overenthusiastic, e.g. changing ampersands to HTML entity codes everywhere, which would break LaTeX code that contains ampersands. Add option to undo such changes.
I wondered about this one when I looked at the menu. Just confirming that it's non-selective; all such changes are reverted by using this button? I think it was the "some" that confused me, but I can't think of a better word.
Just a note that I looked over the code, but since you feel like it's been adequately tested, let's go with it. Let me know if you do need me to do testing on macOS, but if so, I'll probably need help in the testing.
Tools support conversion of existing LaTeX file (one taken from PG for reprocessing & reposting as an HTML/SVG project) or a project that has been through the rounds with HTML/SVG as the target format.
LaTeX Tools
submenu to the File menum2svg
tool