You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to assign a custom class to hyperlink via [test](target){.myattr}. This works for HTML (<a class="myattr ..." href="target">text</a> appears in the page) but there is nothing in LaTeX (the source says \sphinxhref{target}{text} without any mention of myattr).
Using custom role (myrole in the MWE below; for regular text, not hyperlink) does appear in both HTML and LaTeX (as \DUrole{myrole}{text}).
index.md
```{role} myrole
```
# Test page
* This is a [test link with the myattr](https://example.com){.myattr}.
* This is a {myrole}`test text with myrole`.
Inline attribute behaves the same as custom role and is exported to both HTML and LaTeX (thus producing something like \DUrole{myrole}{\sphinxhref{target}{text}})
To Reproduce
index.md and conf.py above are minimal example which exhibits the behavior; run sphixn-build to get the outputs:
sphinx-build -M html . _build
sphinx-build -M latex . _build
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
What version of
myst-parser
are you using?2.0.0
What version dependencies are you using?
Sphinx 7.2.5, docutils 0.19
What operating system are you using?
Linux
Describe the Bug
I am trying to assign a custom class to hyperlink via
[test](target){.myattr}
. This works for HTML (<a class="myattr ..." href="target">text</a>
appears in the page) but there is nothing in LaTeX (the source says\sphinxhref{target}{text}
without any mention ofmyattr
).Using custom role (
myrole
in the MWE below; for regular text, not hyperlink) does appear in both HTML and LaTeX (as\DUrole{myrole}{text}
).index.md
conf.py
Expected Behavior
Inline attribute behaves the same as custom role and is exported to both HTML and LaTeX (thus producing something like
\DUrole{myrole}{\sphinxhref{target}{text}}
)To Reproduce
index.md
andconf.py
above are minimal example which exhibits the behavior; runsphixn-build
to get the outputs:The text was updated successfully, but these errors were encountered: