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

rawhtml no longer working? #2148

Closed
teepeemm opened this issue Jul 9, 2023 · 3 comments · Fixed by #2160
Closed

rawhtml no longer working? #2148

teepeemm opened this issue Jul 9, 2023 · 3 comments · Fixed by #2160
Assignees
Milestone

Comments

@teepeemm
Copy link
Contributor

teepeemm commented Jul 9, 2023

I'm pretty sure that this

use strict;
use warnings;
use LaTeXML::Package;
DefConstructor('\makeiframe',
           '<ltx:rawhtml>'.
           '<xhtml:iframe src="https://math.nist.gov/~BMiller/LaTeXML/" />'.
           '</ltx:rawhtml>');
\documentclass{article}
\providecommand{\makeiframe}{make iframe}
\begin{document}
\makeiframe
\end{document}

used to work (for example, back when you helped me with #1007). But now I'm getting the xml <xhtml:iframe/> and losing any attributes. If I understood git bisect correctly, I think this started with #1960 2313ec53706e5ac3c6cb41147ffdd024fac20985 on 2022-10-20, and looking through the committed files, it does seem plausible. Can I adjust my function call in some way to make this work?

@dginev
Copy link
Collaborator

dginev commented Jul 19, 2023

I think this issue also overlaps today's request for "custom tags" from the mailing list by @davpoole .

ltx:rawhtml was always meant as a short-term stopgap solution until new HTML markup becomes supported by ltx: native constructs in the latexml XML schema and post-processing, and I hope we can resolve any regressions before the next release. Mostly raising attention for David's sake (and making a note here that we may want to advertise rawhtml more in the Customization chapter of the manual)

@teepeemm
Copy link
Contributor Author

Custom tags (especially a div.class) also shows up in #1835.

I'm not sure that I understand the thinking behind aiming to phase out ltx:rawhtml. That would seem to mean that we would have a way to render any valid html. But that would require covering the entire html spec, at which point, it would be much easier to keep ltx:rawhtml and leave it up to the user to only provide valid html. Actually, it's probably even better to change that to ltx:rawxml, and require that the enclosed xml have a registered namespace.

@brucemiller
Copy link
Owner

Thanks for the nice debugging; the git bisect pointed exactly to the changes what caused the problem and I was able to easily fix it. (patch coming up...)

There's no intention of rawhtml going away, although it ought not be overused, in particular not in #1835, imho. Nor is there an intention to reencode all html. It is useful in a pinch, however. An ltx:rawxml would be a slightly different beast, I think. You'd still need to supply the XSLT that transform it into html or other formats, so might as well figure how to modify the schema to include it in the right places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants