Skip to content
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

Move from LaTeXML's particularities to more standard HTML/CSS source #32

Closed
fred-wang opened this issue Feb 9, 2019 · 19 comments
Closed
Assignees
Labels
MathML Core Issues affecting the MathML Core specification

Comments

@fred-wang
Copy link

Initially, the MathML in HTML5 implementation note was generated from LaTeXML. If we are now directly storing XML/HTML page, I think we don't really need to bother with all LaTeXML's special features (e.g. to emulate LaTeX) like special CSS stylesheets and span with custom ltx classes, rel navigation,

and , etc Actually I'm not familiar with this, but taking one step further I think we want to align HTML/CSS source with other W3C specs (MathML 4, CSS, HTML 5 etc).

@davidcarlisle Do you think you would be able to do that?

@davidcarlisle
Copy link
Collaborator

@fred-wang yes the current sketch was just a more or less exact copy of your latexml output as it was a quick sketch just to restyle in w3c format and merge in the schema, and done without asking you but "borrowing" your words so I kept changes to a minimum.

Of course many newer w3c specs use an html/javascript build toolchain eg respec but many are still xslt based (notably mathml/xml/xslt/xquery etc. I think I'd rather keep MathML4 as an XML/xslt based build (although the group should decide that) and if we do It might be best to keep this spec as an xslt based build to make it easier to copy or cross reference sections between the two.

so initially, if you are happy to drop the latex authoring, at least I'd suggest that we clean up the html source of this spec removing any latex remnants but keep the xml "source" being basically html rather than moving it to the xmlspec markup in mathml (the mathml sources would be easier for others to edit if I moved them to use an html based xml markup, which could be considered)

I'll make a first pass at cleanup...

@fred-wang
Copy link
Author

@fred-wang yes the current sketch was just a more or less exact copy of your latexml output as it was a quick sketch just to restyle in w3c format and merge in the schema, and done without asking you but "borrowing" your words so I kept changes to a minimum.

Yes, I think we should clean up things and have a final format decided before starting to do more edits.

Of course many newer w3c specs use an html/javascript build toolchain eg respec but many are still xslt based (notably mathml/xml/xslt/xquery etc. I think I'd rather keep MathML4 as an XML/xslt based build (although the group should decide that) and if we do It might be best to keep this spec as an xslt based build to make it easier to copy or cross reference sections between the two.

I don't really have preference but I guess it makes sense to be consistent with what we do for MathML 4.

so initially, if you are happy to drop the latex authoring, at least I'd suggest that we clean up the html source of this spec removing any latex remnants but keep the xml "source" being basically html rather than moving it to the xmlspec markup in mathml (the mathml sources would be easier for others to edit if I moved them to use an html based xml markup, which could be considered)

I'm not sure I understand all of this, but yes basically using HTML-based source sounds good to me.

I'll make a first pass at cleanup...

Thank you

@fred-wang
Copy link
Author

fred-wang commented Feb 9, 2019

Some quick comments:

  • I'm not really attached to the "data:text/plain;base64" tab for code snippets, I think using "pre" like in the MathML 4 spec is probably better.
  • I'd also like that we decide a convention/format for the name or id of headers, sections etc so that we have more or less stable links we can share (e.g. for spec reference in WPT tests).
  • I'm also happy if the bibliography uses the same style/format as https://mathml-refresh.github.io/mathml/appendixh.html

@davidcarlisle
Copy link
Collaborator

davidcarlisle commented Feb 9, 2019 via email

@fred-wang
Copy link
Author

@davidcarlisle For the record, the original source are located at https://gitlab.com/mathml/MathMLinHTML5/tree/master/source

Do you think you could extract the Tikz figures into independent TeX files and automate generation of images? I think it should be possible to convert the PDF output to SVG using e.g. inkscape.

@davidcarlisle
Copy link
Collaborator

I'll see what I can do (there is also some experimental direct output to svg from tikz that I could try) Probably not before the weekend

@fred-wang
Copy link
Author

@davidcarlisle Thanks. I think after my last commit, SVG formulas are the only places where MathML is still used.

@davidcarlisle
Copy link
Collaborator

davidcarlisle commented Feb 21, 2019 via email

@fred-wang
Copy link
Author

@davidcarlisle can you sign in to GitLab with you github account?

@davidcarlisle
Copy link
Collaborator

davidcarlisle commented Feb 21, 2019 via email

@fred-wang
Copy link
Author

@davidcarlisle can you try again?

@davidcarlisle
Copy link
Collaborator

davidcarlisle commented Feb 21, 2019 via email

@davidcarlisle davidcarlisle transferred this issue from w3c/mathml-core Feb 22, 2019
@davidcarlisle davidcarlisle added the MathML Core Issues affecting the MathML Core specification label Feb 22, 2019
@davidcarlisle davidcarlisle self-assigned this Feb 22, 2019
@davidcarlisle
Copy link
Collaborator

tex files for all the svg are checked in to mathml-core/src/figures a script to convert them is checked in to the same place (not integrated to travis yet) but should run in any reasonably current text installation, just requires latex and dvisvgm. A test file including all teh svg is

https://mathml-refresh.github.io/mathml-core/src/figures/svgtest.html

Not yet integrated into the core spec, need to review the generated svg.

@davidcarlisle
Copy link
Collaborator

The core spec now uses the svg files generated by svg.

Currently these are generated via dvisvgm --font-format=woff so they have WOFF versions of the the TeX fonts embedded. This is a bit inefficient as each file includes the fonts, and also may not really be necessary, it may be sufficient to simply use the document default fonts for the purposes. They are Ok for now, but leaving this comment as a marker for future possible cleanup

@fred-wang
Copy link
Author

@davidcarlisle Thanks. I think in some figures we use simple math (\frac, \sqrt). I guess in some cases we can just use plain text as in the rest of the spec. At least the square root does not render well for me on figure 19.

@davidcarlisle
Copy link
Collaborator

@fred-wang does it look OK to you in
https://mathml-refresh.github.io/mathml-core/src/figures/svgtest.html
? (it does for me)
that's the same svg but referenced by <img> rather than inlined into the html.
which means that there is an error in my code to do the inlining, or as I half suspected there are artefacts coming from inconsistent font subsetting.

Either way this should be fixable without needing to change the tex sources. I'll experiment....

@physikerwelt
Copy link
Member

this is work in progress as discussed in the telco on 2019-02-25

@davidcarlisle
Copy link
Collaborator

css font class selectors like text.f0 were interfering when all svg inlined. Fixed I hope by

w3c/mathml-core@09b6d10

@fred-wang
Copy link
Author

I believe we no longer have LaTeXML stuff after my recent commits.

@fred-wang fred-wang removed the need specification update Issues requiring specification changes label Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MathML Core Issues affecting the MathML Core specification
Projects
None yet
Development

No branches or pull requests

3 participants