Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upW3C validator emits warnings for LaTeXML-generated HTML5 #1016
Comments
This comment has been minimized.
This comment has been minimized.
Interesting.... Actually, LaTeXML doesn't know what language it is (and not sure I want to build in language detection), unless you use babel. However, it apparently isn't copying that language to where html5 wants it. Have to look into that. For the second error, seems that should only appear for xhtml (or one of the other xml formats). baffled? And, for the 3rd error, it looks as if there's a gratuitous encoded newline added to the data. Not sure how it got there; I'll have to look into that too. |
This comment has been minimized.
This comment has been minimized.
I am looking more into the second error. It might be the result of an XSLT change I made, but I am not yet sure. I agree about the first item. I am not convinced that some kind of human-language statement in the TeX source or a heuristic would be a good general solution. Perhaps a command-line flag for latexmlpost? |
This comment has been minimized.
This comment has been minimized.
With respect to the second error, it seems the --destination argument affects the output. --destination=index.html.in includes the XML statement, but --destination=index.html does not. In either case, I use "latexmlpost --destination=XXX --stylesheet=/path/to/modified/LaTeXML-html5.xsl index.xml". I had expected the output document type would be wholly determined by the stylesheet and not partially by the destination filename. |
This comment has been minimized.
This comment has been minimized.
You'd think so, but the serialization to file also needs to know whether it's html or xml. If the destination extension were recognized (eg. plain .html) it would have generated html(5). Alternatively, you can use --format=html5. I fixed the 3rd bug. I hadn't read the base64 encoding manpage carefully enough: It linebreaks by default and I hadn't noticed. Should work right now. Thanks for the report! |
This comment has been minimized.
This comment has been minimized.
Even though I didn't want to guess/assume that documents are in english by default, I was bothered that when using babel with an initial/default language, it wasn't ending up declared on the document. And it turns out xml:lang was only being carried over into html at the top element. I've fixed both those problems as well, so the validator should be happy more often. Thanks for the report! |
I created an HTML5 document using LaTeXML. I then ran the document through W3C's validator (https://validator.w3.org/nu/), and received the following errors and warnings:
The following is odd because LaTeXML-html5.xsl contains 'omit-xml-declaration="yes"':
The following results from the down-arrow download link LaTeXML adds to lstlisting environments: