Latex -> HTML hyperref in equation bug
augustin-chevallier opened this issue · 5 comments
Explain the problem.
Latex:
\documentclass{article}
\usepackage[hidelinks]{hyperref}
\begin{document}
\section{test}
\label{test}
\end{document}
isn't correctly parsed. The result should be a link inside the mathematical equation. Instead, Pandoc output a webpage showing
\hyperref[test]K
Pandoc version?
Pandoc 2.16.2 on Windows.
I didn't even know hyperref could be used inside math.
In any event, moving this to texmath which does the math parsing.
Probably the best we could do is ignore the link.
Ok! Should I open another issue in texmath?
I moved the issue to texmath and already closed it (hyperref now ignored; you don't get a link but it won't stop the rest of the translation).
@jgm I don't know if this is the place to say this, but it seems like supporting hyperlinks in math could be a very powerful feature. See dlmf for a nice use case, with tooltips as well! On top of this one could build symbol glossaries, that are linked directly to the symbol. This is already done if one loads the hyperref package along with the glossaries package. Additionally, mathml supports tooltips and links as well (c.f. mathml-actions), so it would make sense to be able to translate.
If you want you can create an issue in jgm/texmath requesting support of hyperlinks.
It would be quite an involved change, though. We'd need to change the basic types and all the readers and writers. And we'd need to collect information about how the hyperlinks are represented in tex, mathml, ooxml.