Use Fira Math for matplotlib math rendering via custom fontset#599
Merged
Conversation
Agent-Logs-Url: https://github.com/gdsfactory/quantum-rf-pdk/sessions/3e36acd3-22e4-4a4e-95c1-baa21832a388 Co-authored-by: nikosavola <7860886+nikosavola@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
nikosavola
May 12, 2026 11:13
View session
Contributor
Reviewer's GuideSwitches Sphinx math rendering from KaTeX to MathJax with a custom MathJax config to use the Fira Math font and ensure math inside MyST-generated mathjax_ignore sections is still processed, and wires Fira Math into both CI and local doc font installation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Agent-Logs-Url: https://github.com/gdsfactory/quantum-rf-pdk/sessions/2b57e37b-5ab8-48bd-965b-b6fa74c6dc1f Co-authored-by: nikosavola <7860886+nikosavola@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gdsfactory/quantum-rf-pdk/sessions/26526596-b3dc-4fd3-96d1-52bd3cdd62e4 Co-authored-by: nikosavola <7860886+nikosavola@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The Fira Math download URL is duplicated in both the GitHub Actions workflow and the Makefile; consider centralizing this versioned URL in a single place (or deriving one from the other) to avoid drift on future upgrades.
- Since
mathjax4_configfully overwrites the earlierwindow.MathJaxassignment, consider explicitly mirroring any other Sphinx defaults you rely on (beyondprocessHtmlClass) or adding a brief comment noting that additional MathJax options must be kept in sync with Sphinx’ defaults if they change.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Fira Math download URL is duplicated in both the GitHub Actions workflow and the Makefile; consider centralizing this versioned URL in a single place (or deriving one from the other) to avoid drift on future upgrades.
- Since `mathjax4_config` fully overwrites the earlier `window.MathJax` assignment, consider explicitly mirroring any other Sphinx defaults you rely on (beyond `processHtmlClass`) or adding a brief comment noting that additional MathJax options must be kept in sync with Sphinx’ defaults if they change.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mathjax4_configoverwrites Sphinx's defaultwindow.MathJax = {options: {processHtmlClass: ...}}needed for math insidemathjax_ignoresectionsprocessHtmlClassinmathjax4_configso the overwrite still contains the required settingwindow.MathJaxassignmentSummary by Sourcery
Switch documentation math rendering to MathJax with Fira Math and ensure math is correctly processed in Sphinx HTML output.
Enhancements:
Build:
CI:
Chores: