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

Rendering markdown before mathjax can lead to wrong outcome #3111

Closed
AndreaBarbasso opened this issue Jun 11, 2024 · 1 comment · Fixed by #3112
Closed

Rendering markdown before mathjax can lead to wrong outcome #3111

AndreaBarbasso opened this issue Jun 11, 2024 · 1 comment · Fixed by #3112
Assignees
Labels
bug component: Item (Archived) Item display or editing
Milestone

Comments

@AndreaBarbasso
Copy link
Contributor

AndreaBarbasso commented Jun 11, 2024

Describe the bug
Since we are now rendering markdown templates before LaTeX formulas, any math formula that includes characters usually found on markdown templating could lead to a wrong output.

To Reproduce
Try to use any string that contains LaTeX formulas including markdown syntax in any place where the markdown is rendered. For example, the following text is not rendered correctly because of underscores inside it:
...measurements in (EDT-TTF-CONH$_2$)$_2^{+}$[BABCO$^{-}$] (EDT-BCO) confirmed the absence...

Expected behavior
Both formulas and markdown should be rendered correctly. Since LaTeX line delimiters are "rarer" than markdown delimiters, it's best to render LaTeX with mathjax first, and markdown right after that.

Related work
PR: #3112

@AndreaBarbasso AndreaBarbasso added bug needs triage New issue needs triage and/or scheduling labels Jun 11, 2024
@tdonohue tdonohue added component: Item (Archived) Item display or editing and removed needs triage New issue needs triage and/or scheduling labels Jun 11, 2024
@mwoodiupui
Copy link
Member

The MathJax documentation has some suggestions on combining markup languages.

kshepherd added a commit that referenced this issue Jul 25, 2024
[#3111] fix markdown rendering applying before mathjax rendering
kshepherd added a commit that referenced this issue Jul 25, 2024
[Port dspace-8_x] [#3111] fix markdown rendering applying before mathjax rendering
@tdonohue tdonohue added this to the 8.1 milestone Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: Item (Archived) Item display or editing
Projects
Development

Successfully merging a pull request may close this issue.

3 participants