Skip to content

Fix erroneous nesting of equation structures in pymc_overview notebook#8299

Open
gordonkoehn wants to merge 1 commit into
pymc-devs:mainfrom
gordonkoehn:fix/pymc-overview-latex-nesting
Open

Fix erroneous nesting of equation structures in pymc_overview notebook#8299
gordonkoehn wants to merge 1 commit into
pymc-devs:mainfrom
gordonkoehn:fix/pymc-overview-latex-nesting

Conversation

@gordonkoehn

@gordonkoehn gordonkoehn commented May 16, 2026

Copy link
Copy Markdown

Summary

  • Removes $$ delimiters wrapping \begin{align*}...\end{align*} in the reparameterization section of the "Introductory Overview of PyMC" notebook
  • Sphinx converts $$...\begin{align*}...\end{align*}...$$ into \[\begin{split}\begin{align*}...\end{align*}\end{split}\] — triple-nesting display math environments, which MathJax 4 rejects as "Erroneous nesting of equation structures"
  • Using \begin{align*} without $$ avoids the extra wrapping and renders correctly

Rendering issue

The equation after "Finally, to allow the NUTS sampler to sample the β_i more efficiently, we will re-parameterize it as follows:" shows an error on the live docs.

Before (broken — live PyMC docs)

before

After (fixed — local MathJax 4 verification)

after

Test plan

  • Reproduced the error locally using MathJax 4 with the Sphinx-generated HTML
  • Verified the fix renders the align block correctly

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 16, 2026 18:27
@welcome

welcome Bot commented May 16, 2026

Copy link
Copy Markdown

Thank You Banner]
💖 Thanks for opening this pull request! 💖 The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the PyMC overview notebook’s explanation of a NUTS-friendly reparameterization by adjusting the LaTeX formatting around an align* block.

Changes:

  • Removed the surrounding $$ ... $$ display-math delimiters around a LaTeX align* environment in a markdown cell.
Comments suppressed due to low confidence (1)

docs/source/learn/core_notebooks/pymc_overview.ipynb:1

  • The align* environment must be in math mode to render correctly (e.g., via MathJax in notebooks / myst-nb). Removing the surrounding $$ ... $$ likely makes the equation render as plain text or fail to render. Please wrap this block in display-math delimiters again (either $$ ... $$ or \\[ ... \\]).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Remove `$$` delimiters wrapping `\begin{align*}...\end{align*}` block
in the reparameterization section. The `align*` environment is already
a display math environment, so the extra `$$` causes MathJax to report
"Erroneous nesting of equation structures" instead of rendering the
equation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gordonkoehn gordonkoehn force-pushed the fix/pymc-overview-latex-nesting branch from 82f31e3 to 86f8cbb Compare May 16, 2026 18:33
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 pymc | 🛠️ Build #32719526 | 📁 Comparing 86f8cbb against latest (a65e8b6)

  🔍 Preview build  

3 files changed
± glossary.html
± contributing/jupyter_style.html
± learn/core_notebooks/pymc_overview.html

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.

2 participants