-
Notifications
You must be signed in to change notification settings - Fork 79
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
hyperref in HTML5 produces invalid internal links #316
Comments
christianp
added a commit
to christianp/plastex
that referenced
this issue
Mar 12, 2024
fixes plastex#316 It looks like the template for \hyperref in the HTML5 renderer was for the \hyperref{URL}{category}{name}{text} version, but only the \hyperref[ref]{text} version was implemented. This commit changes the template to use the `idref` property if it's present, which is true for the square bracket version which links to a ref.
christianp
added a commit
to christianp/plastex
that referenced
this issue
Sep 25, 2024
fixes plastex#316 It looks like the template for \hyperref in the HTML5 renderer was for the \hyperref{URL}{category}{name}{text} version, but only the \hyperref[ref]{text} version was implemented. This commit changes the template to use the `idref` property if it's present, which is true for the square bracket version which links to a ref.
christianp
added a commit
to christianp/plastex
that referenced
this issue
Sep 25, 2024
fixes plastex#316 It looks like the template for \hyperref in the HTML5 renderer was for the \hyperref{URL}{category}{name}{text} version, but only the \hyperref[ref]{text} version was implemented. This commit changes the template to use the `idref` property if it's present, which is true for the square bracket version which links to a ref.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am hitting a bug where the HTML5 renderer render
\hyperref[label]{text}
incorrectly (producing#.
anchor):plastex/plasTeX/Renderers/HTML5/hyperref.jinja2s
Lines 18 to 19 in aa5de5c
This is trivially reproducible with
I get something functional if I copy the definition of ref from
plastex/plasTeX/Renderers/HTML5/Crossref.jinja2s
Lines 1 to 2 in 02610ee
just replacing
{{obj.idref.label.ref}}
with{{ obj }}
. Please apply that after reviewing, I am not much sure if this is correct.(As a note, I found out that
\label
is always bound to the last section heading (unlike in LaTeX, where it can be positioned anywhere), and that\hypertarget
does not suffer from that... Just saying, perhaps this observation is useful for someone later.)The text was updated successfully, but these errors were encountered: