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

Latex -> HTML hyperref in equation bug #186

Closed
augustin-chevallier opened this issue Jan 11, 2022 · 5 comments
Closed

Latex -> HTML hyperref in equation bug #186

augustin-chevallier opened this issue Jan 11, 2022 · 5 comments

Comments

@augustin-chevallier
Copy link

Explain the problem.
Latex:
\documentclass{article}
\usepackage[hidelinks]{hyperref}
\begin{document}

\section{test}
\label{test}

$\hyperref[test]{K}$
\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.

@jgm
Copy link
Owner

jgm commented Jan 11, 2022

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.

@jgm jgm transferred this issue from jgm/pandoc Jan 11, 2022
@jgm jgm closed this as completed in 0d8dc3e Jan 11, 2022
@augustin-chevallier
Copy link
Author

Ok! Should I open another issue in texmath?

@jgm
Copy link
Owner

jgm commented Jan 11, 2022

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).

@lcnbr
Copy link

lcnbr commented Sep 13, 2022

@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.

@jgm
Copy link
Owner

jgm commented Sep 14, 2022

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.

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

No branches or pull requests

3 participants