-
Notifications
You must be signed in to change notification settings - Fork 4
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
extensions for XML/HTML executables #21
Comments
hmm I will leave this open for others to comment but my initial reaction is that I'm not keen on this idea. The suggested list of More importantly it seems to be encouraging what is (almost always) an antipattern. before latex2e, documents would regularly go
but 2e introduced a standard So in almost all cases That said, it's not that clear a case, latexml especially could be viewed as a tex implementation and have an \iflatexml` test that is automatically set as true/false if latexml is or is not being used. convertors that first run a standard tex engine and then process the result fit far less easily into the existing design of iftex. But I can see that there are use cases so I wouldn't rule this out comments welcome..... |
Like @davidcarlisle I think that we shouldn't ask or encourage authors to use tests like A different question is the target output format. There is enough difference between producing a PDF and producing html/xml that I can imagine that a document level test like |
Interesting. I usually find it useful to clarify the control scope of different participants, when we encounter very different perspectives. The question we can answer in this issue is whether My premise is that such conditional checks exist today, but they are system-specific and do not follow any streamlined organization. Variants are:
So, in aggregate, the usual evolutionary chaos. Btw, I entirely sympathize with how difficult the reliance on these checks is - LaTeXML is currently playing pretend with Edit: added plastex and latex2html mechanisms |
Hopefully the LaTeX socket mechanism will help with much of this. |
Motivation: A recent issue in the arXiv HTML experiment (arXiv/html_feedback#258) requested some additional support for
\pdfliteral
for LaTeXML (CC-ing @brucemiller for the discussion).While we can add some support for PDF-specific emulation on our end, I remembered that on occasion it is much more convenient for authors to create macros that target specific executables, so that a more structural alternative to
\pdfliteral
could be prescribed for LaTeXML use.Next, I remembered that
iftex.sty
has provided some automatic support for the mainline executables. Intuitively, iftex would also be a natural home for a collection of new conditionals (all set to false) which can then be used by the many converters to structured formats. As a first suggestion:\ifhtml
- intended as true in all structured markup converters(It's not always the actual output format, but it is an easy to remember mnemonic)
The idea being that iftex itself wouldn't try to auto-detect whether any of the structured markup converters is running, it will only offer the macro dialect for authors to use. Each structured markup converter would then have to implement support that sets
\ifhtml
to true, as well as its own dedicated conditional.Currently, latexml provides such an
\iflatexml
conditional via itslatexml.sty
package, bundled with the latexml distribution. But this kind of mechanism would be nice to streamline, so that authors can easily switch between converters.If there have been discussions in this direction and there were good reasons not to streamline this kind of support, of course feel free to close the issue.
The text was updated successfully, but these errors were encountered: