Skip to content

[ENH] Use MathJax for math expressions (closes #2186)#2445

Open
duplicatenode wants to merge 4 commits into
bids-standard:masterfrom
duplicatenode:enh-mathjax-support
Open

[ENH] Use MathJax for math expressions (closes #2186)#2445
duplicatenode wants to merge 4 commits into
bids-standard:masterfrom
duplicatenode:enh-mathjax-support

Conversation

@duplicatenode

Copy link
Copy Markdown

Changes

  • Added the pymdownx.arithmatex extension to mkdocs.yml to support math syntax
  • Added MathJax JS files (config + CDN script) to extra_javascript in mkdocs.yml
  • Converted HTML-based math notation (<sub>/<sup>) to LaTeX math syntax in:
    • src/appendices/units.md
    • src/appendices/file-collections.md
    • src/modality-specific-files/magnetic-resonance-imaging-data.md

Testing

Verified rendering locally using mkdocs serve. Math expressions (B0, B1+/-, powers of ten) now render as proper formatted math instead of raw HTML tags.

I was not able to set up the full Pandoc/LaTeX toolchain locally to verify the PDF build, but $...$ syntax is natively supported by Pandoc, so it should convert cleanly. Happy to address any CI failures related to the PDF build if they come up.

Closes #2186

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.07%. Comparing base (4235ae7) to head (f19ca14).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2445   +/-   ##
=======================================
  Coverage   83.07%   83.07%           
=======================================
  Files          22       22           
  Lines        1696     1696           
=======================================
  Hits         1409     1409           
  Misses        287      287           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@duplicatenode

Copy link
Copy Markdown
Author

Hi maintainers, this PR has all checks passing now. Could someone take a look and review when you have a chance? Thanks!

Comment on lines +34 to +47

{{ MACROS___make_filename_template(
"raw",
datatypes=["anat"],
suffixes=[
"VFA",
"IRT1",
"MP2RAGE",
"MESE",
"MEGRE",
"MTR",
"MTS",
"MPM",
])
"raw",
datatypes=["anat"],
suffixes=[
"VFA",
"IRT1",
"MP2RAGE",
"MESE",
"MEGRE",
"MTR",
"MTS",
"MPM",
])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert unrelated changes like these.

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

Successfully merging this pull request may close these issues.

Idea: Use MathJax for expressions

2 participants