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

Dollar math in markdown cells is incorrectly rendered #590

Open
melissawm opened this issue Apr 8, 2024 · 2 comments
Open

Dollar math in markdown cells is incorrectly rendered #590

melissawm opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@melissawm
Copy link

Describe the bug

context
I am using MyST-NB to write some of the SciPy documentation pages in Markdown and execute them as notebooks.

When I use the {math} role for displaying math, everything works as expected. Using the dollarmath myst extension, however, results in \( syntax showing in the displayed html file, instead of the dollar signs. The generated .ipynb file correctly displays dollar signs for math.

I have experimented with

nb_render_markdown_format = "myst"
render_markdown_format = "myst"

but it doesn't change anything for this case.

expectation
I expected math expressions to be correctly rendered as math in the html output.

bug
But instead I see the following output: (note, for example, \(F^{-1}\))
Screenshot_20240408_180200

As I mentioned, the generated notebook is correct:
Screenshot_20240408_180226

problem
This is a problem because I'd like the notebooks to be downloadable, and having dollar sign syntax instead of the {math} role syntax is more user-friendly in that case.

Reproduce the bug

  1. Write a jupytext markdown file with dollar math expressions
  2. Include it in a sphinx documentation set up with the myst_nb extension enabled
  3. Build the documentation site and look at the outputs.

I know this is not the best reproducible set up but I can point to a branch where I have this set up: scipy/scipy#20303

And the corresponding output: https://output.circle-artifacts.com/output/job/f515f0f8-09d2-495c-a5bc-782826ff51e8/artifacts/0/html/tutorial/stats/sampling.html

List your environment

  docutils                       0.20.1          py311h38be061_3      conda-forge
  jupytext                       1.16.1          pyhd8ed1ab_0         conda-forge
  myst-nb                        1.0.0           pyhd8ed1ab_0         conda-forge
  myst-parser                    2.0.0           pyhd8ed1ab_0         conda-forge
  nbclient                       0.10.0          pyhd8ed1ab_0         conda-forge
  nbconvert-core                 7.16.3          pyhd8ed1ab_0         conda-forge
  nbformat                       5.10.4          pyhd8ed1ab_0         conda-forge
  sphinx                         7.2.6           pyhd8ed1ab_0         conda-forge
Full environment
List of packages in environment: "/home/melissa/micromamba/envs/scipy-dev"

  Name                           Version         Build                Channel    
───────────────────────────────────────────────────────────────────────────────────
  _libgcc_mutex                  0.1             conda_forge          conda-forge
  _openmp_mutex                  4.5             2_gnu                conda-forge
  accessible-pygments            0.0.4           pyhd8ed1ab_0         conda-forge
  alabaster                      0.7.16          pyhd8ed1ab_0         conda-forge
  alsa-lib                       1.2.11          hd590300_1           conda-forge
  anyio                          4.3.0           pyhd8ed1ab_0         conda-forge
  argon2-cffi                    23.1.0          pyhd8ed1ab_0         conda-forge
  argon2-cffi-bindings           21.2.0          py311h459d7ec_4      conda-forge
  array-api-strict               1.1.1           pyhd8ed1ab_0         conda-forge
  arrow                          1.3.0           pyhd8ed1ab_0         conda-forge
  asttokens                      2.4.1           pyhd8ed1ab_0         conda-forge
  asv                            0.6.3           py311hb755f60_0      conda-forge
  asv_runner                     0.2.1           pyhd8ed1ab_0         conda-forge
  attr                           2.5.1           h166bdaf_1           conda-forge
  attrs                          23.2.0          pyh71513ae_0         conda-forge
  babel                          2.14.0          pyhd8ed1ab_0         conda-forge
  backports.zoneinfo             0.2.1           py311h38be061_8      conda-forge
  beautifulsoup4                 4.12.3          pyha770c72_0         conda-forge
  beniget                        0.4.1           pyhd8ed1ab_0         conda-forge
  binutils                       2.40            hdd6e379_0           conda-forge
  binutils_impl_linux-64         2.40            hf600244_0           conda-forge
  binutils_linux-64              2.40            hdade7a5_3           conda-forge
  bleach                         6.1.0           pyhd8ed1ab_0         conda-forge
  brotli                         1.1.0           hd590300_1           conda-forge
  brotli-bin                     1.1.0           hd590300_1           conda-forge
  brotli-python                  1.1.0           py311hb755f60_1      conda-forge
  bzip2                          1.0.8           hd590300_5           conda-forge
  c-compiler                     1.7.0           hd590300_0           conda-forge
  ca-certificates                2024.2.2        hbcca054_0           conda-forge
  cached-property                1.5.2           hd8ed1ab_1           conda-forge
  cached_property                1.5.2           pyha770c72_1         conda-forge
  cairo                          1.18.0          h3faef2a_0           conda-forge
  certifi                        2024.2.2        pyhd8ed1ab_0         conda-forge
  cffi                           1.16.0          py311hb3a22ac_0      conda-forge
  charset-normalizer             3.3.2           pyhd8ed1ab_0         conda-forge
  click                          8.1.7           unix_pyh707e725_0    conda-forge
  cloudpickle                    3.0.0           pyhd8ed1ab_0         conda-forge
  colorama                       0.4.6           pyhd8ed1ab_0         conda-forge
  colorlog                       6.8.2           py311h38be061_0      conda-forge
  comm                           0.2.2           pyhd8ed1ab_0         conda-forge
  compilers                      1.7.0           ha770c72_0           conda-forge
  contourpy                      1.2.0           py311h9547e67_0      conda-forge
  coverage                       7.4.4           py311h459d7ec_0      conda-forge
  cxx-compiler                   1.7.0           h00ab1b0_0           conda-forge
  cycler                         0.12.1          pyhd8ed1ab_0         conda-forge
  cython                         3.0.10          py311hb755f60_0      conda-forge
  cython-lint                    0.16.0          pyhd8ed1ab_0         conda-forge
  dbus                           1.13.6          h5008d03_3           conda-forge
  debugpy                        1.8.1           py311hb755f60_0      conda-forge
  decorator                      5.1.1           pyhd8ed1ab_0         conda-forge
  defusedxml                     0.7.1           pyhd8ed1ab_0         conda-forge
  distlib                        0.3.8           pyhd8ed1ab_0         conda-forge
  docutils                       0.20.1          py311h38be061_3      conda-forge
  doit                           0.36.0          pyhd8ed1ab_0         conda-forge
  entrypoints                    0.4             pyhd8ed1ab_0         conda-forge
  exceptiongroup                 1.2.0           pyhd8ed1ab_2         conda-forge
  execnet                        2.0.2           pyhd8ed1ab_0         conda-forge
  executing                      2.0.1           pyhd8ed1ab_0         conda-forge
  expat                          2.6.2           h59595ed_0           conda-forge
  filelock                       3.13.3          pyhd8ed1ab_0         conda-forge
  font-ttf-dejavu-sans-mono      2.37            hab24e00_0           conda-forge
  font-ttf-inconsolata           3.000           h77eed37_0           conda-forge
  font-ttf-source-code-pro       2.038           h77eed37_0           conda-forge
  font-ttf-ubuntu                0.83            h77eed37_1           conda-forge
  fontconfig                     2.14.2          h14ed4e7_0           conda-forge
  fonts-conda-ecosystem          1               0                    conda-forge
  fonts-conda-forge              1               0                    conda-forge
  fonttools                      4.50.0          py311h459d7ec_0      conda-forge
  fortran-compiler               1.7.0           heb67821_0           conda-forge
  fqdn                           1.5.1           pyhd8ed1ab_0         conda-forge
  freetype                       2.12.1          h267a509_2           conda-forge
  gast                           0.5.4           pyhd8ed1ab_0         conda-forge
  gcc                            12.3.0          h95e488c_3           conda-forge
  gcc_impl_linux-64              12.3.0          he2b93b0_5           conda-forge
  gcc_linux-64                   12.3.0          h6477408_3           conda-forge
  gettext                        0.21.1          h27087fc_0           conda-forge
  gfortran                       12.3.0          h7389182_3           conda-forge
  gfortran_impl_linux-64         12.3.0          hfcedea8_5           conda-forge
  gfortran_linux-64              12.3.0          h617cb40_3           conda-forge
  glib                           2.80.0          hf2295e7_1           conda-forge
  glib-tools                     2.80.0          hde27a5a_1           conda-forge
  gmp                            6.3.0           h59595ed_1           conda-forge
  gmpy2                          2.1.2           py311h6a5fa03_1      conda-forge
  graphite2                      1.3.13          h59595ed_1003        conda-forge
  greenlet                       3.0.3           py311hb755f60_0      conda-forge
  gst-plugins-base               1.22.9          hfa15dee_1           conda-forge
  gstreamer                      1.22.9          h98fc4e7_1           conda-forge
  gxx                            12.3.0          h95e488c_3           conda-forge
  gxx_impl_linux-64              12.3.0          he2b93b0_5           conda-forge
  gxx_linux-64                   12.3.0          h4a1b8e8_3           conda-forge
  harfbuzz                       8.3.0           h3d44ed6_0           conda-forge
  hypothesis                     6.100.0         pyha770c72_0         conda-forge
  icu                            73.2            h59595ed_0           conda-forge
  idna                           3.6             pyhd8ed1ab_0         conda-forge
  imagesize                      1.4.1           pyhd8ed1ab_0         conda-forge
  importlib-metadata             7.1.0           pyha770c72_0         conda-forge
  importlib_metadata             7.1.0           hd8ed1ab_0           conda-forge
  importlib_resources            6.4.0           pyhd8ed1ab_0         conda-forge
  iniconfig                      2.0.0           pyhd8ed1ab_0         conda-forge
  ipykernel                      6.29.3          pyhd33586a_0         conda-forge
  ipython                        8.22.2          pyh707e725_0         conda-forge
  isoduration                    20.11.0         pyhd8ed1ab_0         conda-forge
  jedi                           0.19.1          pyhd8ed1ab_0         conda-forge
  jinja2                         3.1.3           pyhd8ed1ab_0         conda-forge
  json5                          0.9.24          pyhd8ed1ab_0         conda-forge
  jsonpointer                    2.4             py311h38be061_3      conda-forge
  jsonschema                     4.21.1          pyhd8ed1ab_0         conda-forge
  jsonschema-specifications      2023.12.1       pyhd8ed1ab_0         conda-forge
  jsonschema-with-format-nongpl  4.21.1          pyhd8ed1ab_0         conda-forge
  jupyter-cache                  1.0.0           pyhd8ed1ab_0         conda-forge
  jupyter_client                 8.6.1           pyhd8ed1ab_0         conda-forge
  jupyter_core                   5.7.2           py311h38be061_0      conda-forge
  jupyter_events                 0.10.0          pyhd8ed1ab_0         conda-forge
  jupyter_server                 2.13.0          pyhd8ed1ab_0         conda-forge
  jupyter_server_terminals       0.5.3           pyhd8ed1ab_0         conda-forge
  jupyterlab_pygments            0.3.0           pyhd8ed1ab_1         conda-forge
  jupyterlab_server              2.25.4          pyhd8ed1ab_0         conda-forge
  jupyterlite-core               0.2.3           pyhd8ed1ab_0         conda-forge
  jupyterlite-sphinx             0.13.1          pyhd8ed1ab_0         conda-forge
  jupytext                       1.16.1          pyhd8ed1ab_0         conda-forge
  kernel-headers_linux-64        2.6.32          he073ed8_17          conda-forge
  keyutils                       1.6.1           h166bdaf_0           conda-forge
  kiwisolver                     1.4.5           py311h9547e67_1      conda-forge
  krb5                           1.21.2          h659d440_0           conda-forge
  lame                           3.100           h166bdaf_1003        conda-forge
  lcms2                          2.16            hb7c19ff_0           conda-forge
  ld_impl_linux-64               2.40            h41732ed_0           conda-forge
  lerc                           4.0.0           h27087fc_0           conda-forge
  libblas                        3.9.0           21_linux64_openblas  conda-forge
  libbrotlicommon                1.1.0           hd590300_1           conda-forge
  libbrotlidec                   1.1.0           hd590300_1           conda-forge
  libbrotlienc                   1.1.0           hd590300_1           conda-forge
  libcap                         2.69            h0f662aa_0           conda-forge
  libcblas                       3.9.0           21_linux64_openblas  conda-forge
  libclang-cpp15                 15.0.7          default_h127d8a8_5   conda-forge
  libclang13                     18.1.2          default_h5d6823c_1   conda-forge
  libcups                        2.3.3           h4637d8d_4           conda-forge
  libdeflate                     1.20            hd590300_0           conda-forge
  libedit                        3.1.20191231    he28a2e2_2           conda-forge
  libevent                       2.1.12          hf998b51_1           conda-forge
  libexpat                       2.6.2           h59595ed_0           conda-forge
  libffi                         3.4.2           h7f98852_5           conda-forge
  libflac                        1.4.3           h59595ed_0           conda-forge
  libgcc-devel_linux-64          12.3.0          h8bca6fd_105         conda-forge
  libgcc-ng                      13.2.0          h807b86a_5           conda-forge
  libgcrypt                      1.10.3          hd590300_0           conda-forge
  libgfortran-ng                 13.2.0          h69a702a_5           conda-forge
  libgfortran5                   13.2.0          ha4646dd_5           conda-forge
  libglib                        2.80.0          hf2295e7_1           conda-forge
  libgomp                        13.2.0          h807b86a_5           conda-forge
  libgpg-error                   1.48            h71f35ed_0           conda-forge
  libiconv                       1.17            hd590300_2           conda-forge
  libjpeg-turbo                  3.0.0           hd590300_1           conda-forge
  liblapack                      3.9.0           21_linux64_openblas  conda-forge
  libllvm15                      15.0.7          hb3ce162_4           conda-forge
  libllvm18                      18.1.2          h2448989_0           conda-forge
  libnsl                         2.0.1           hd590300_0           conda-forge
  libogg                         1.3.4           h7f98852_1           conda-forge
  libopenblas                    0.3.26          pthreads_h413a1c8_0  conda-forge
  libopus                        1.3.1           h7f98852_1           conda-forge
  libpng                         1.6.43          h2797004_0           conda-forge
  libpq                          16.2            h33b98f1_1           conda-forge
  libsanitizer                   12.3.0          h0f45ef3_5           conda-forge
  libsndfile                     1.2.2           hc60ed4a_1           conda-forge
  libsodium                      1.0.18          h36c2ea0_1           conda-forge
  libsqlite                      3.45.2          h2797004_0           conda-forge
  libstdcxx-devel_linux-64       12.3.0          h8bca6fd_105         conda-forge
  libstdcxx-ng                   13.2.0          h7e041cc_5           conda-forge
  libsystemd0                    255             h3516f8a_1           conda-forge
  libtiff                        4.6.0           h1dd3fc0_3           conda-forge
  libuuid                        2.38.1          h0b41bf4_0           conda-forge
  libvorbis                      1.3.7           h9c3ff4c_0           conda-forge
  libwebp-base                   1.3.2           hd590300_0           conda-forge
  libxcb                         1.15            h0b41bf4_0           conda-forge
  libxcrypt                      4.4.36          hd590300_1           conda-forge
  libxkbcommon                   1.7.0           h662e7e4_0           conda-forge
  libxml2                        2.12.6          h232c23b_1           conda-forge
  libzlib                        1.2.13          hd590300_5           conda-forge
  lz4-c                          1.9.4           hcb278e6_0           conda-forge
  markdown-it-py                 3.0.0           pyhd8ed1ab_0         conda-forge
  markupsafe                     2.1.5           py311h459d7ec_0      conda-forge
  matplotlib                     3.8.3           py311h38be061_0      conda-forge
  matplotlib-base                3.8.3           py311h54ef318_0      conda-forge
  matplotlib-inline              0.1.6           pyhd8ed1ab_0         conda-forge
  mdit-py-plugins                0.4.0           pyhd8ed1ab_0         conda-forge
  mdurl                          0.1.2           pyhd8ed1ab_0         conda-forge
  meson                          1.4.0           pyhd8ed1ab_0         conda-forge
  meson-python                   0.15.0          pyh0c530f3_0         conda-forge
  mistune                        3.0.2           pyhd8ed1ab_0         conda-forge
  mpc                            1.3.1           hfe3b2da_0           conda-forge
  mpfr                           4.2.1           h9458935_0           conda-forge
  mpg123                         1.32.4          h59595ed_0           conda-forge
  mpmath                         1.3.0           pyhd8ed1ab_0         conda-forge
  munkres                        1.1.4           pyh9f0ad1d_0         conda-forge
  mypy                           1.9.0           py311h459d7ec_0      conda-forge
  mypy_extensions                1.0.0           pyha770c72_0         conda-forge
  mysql-common                   8.3.0           hf1915f5_4           conda-forge
  mysql-libs                     8.3.0           hca2cd23_4           conda-forge
  myst-nb                        1.0.0           pyhd8ed1ab_0         conda-forge
  myst-parser                    2.0.0           pyhd8ed1ab_0         conda-forge
  nbclient                       0.10.0          pyhd8ed1ab_0         conda-forge
  nbconvert-core                 7.16.3          pyhd8ed1ab_0         conda-forge
  nbformat                       5.10.4          pyhd8ed1ab_0         conda-forge
  ncurses                        6.4.20240210    h59595ed_0           conda-forge
  nest-asyncio                   1.6.0           pyhd8ed1ab_0         conda-forge
  ninja                          1.11.1          h924138e_0           conda-forge
  nspr                           4.35            h27087fc_0           conda-forge
  nss                            3.98            h1d7d5a4_0           conda-forge
  numpy                          1.26.4          py311h64a7726_0      conda-forge
  numpydoc                       1.7.0           pyhd8ed1ab_0         conda-forge
  openblas                       0.3.26          pthreads_h7a3da1a_0  conda-forge
  openjpeg                       2.5.2           h488ebb8_0           conda-forge
  openssl                        3.2.1           hd590300_1           conda-forge
  overrides                      7.7.0           pyhd8ed1ab_0         conda-forge
  packaging                      24.0            pyhd8ed1ab_0         conda-forge
  pandocfilters                  1.5.0           pyhd8ed1ab_0         conda-forge
  parso                          0.8.3           pyhd8ed1ab_0         conda-forge
  pcre2                          10.43           hcad00b1_0           conda-forge
  pexpect                        4.9.0           pyhd8ed1ab_0         conda-forge
  pickleshare                    0.7.5           py_1003              conda-forge
  pillow                         10.3.0          py311h18e6fac_0      conda-forge
  pip                            24.0            pyhd8ed1ab_0         conda-forge
  pixman                         0.43.2          h59595ed_0           conda-forge
  pkg-config                     0.29.2          h36c2ea0_1008        conda-forge
  pkgutil-resolve-name           1.3.10          pyhd8ed1ab_1         conda-forge
  platformdirs                   4.2.0           pyhd8ed1ab_0         conda-forge
  pluggy                         1.4.0           pyhd8ed1ab_0         conda-forge
  ply                            3.11            py_1                 conda-forge
  pooch                          1.8.1           pyhd8ed1ab_0         conda-forge
  prometheus_client              0.20.0          pyhd8ed1ab_0         conda-forge
  prompt-toolkit                 3.0.42          pyha770c72_0         conda-forge
  psutil                         5.9.8           py311h459d7ec_0      conda-forge
  pthread-stubs                  0.4             h36c2ea0_1001        conda-forge
  ptyprocess                     0.7.0           pyhd3deb0d_0         conda-forge
  pulseaudio-client              17.0            hb77b528_0           conda-forge
  pure_eval                      0.2.2           pyhd8ed1ab_0         conda-forge
  pybind11                       2.12.0          py311h9547e67_0      conda-forge
  pybind11-global                2.12.0          py311h9547e67_0      conda-forge
  pycodestyle                    2.11.1          pyhd8ed1ab_0         conda-forge
  pycparser                      2.22            pyhd8ed1ab_0         conda-forge
  pydata-sphinx-theme            0.15.2          pyhd8ed1ab_0         conda-forge
  pydevtool                      0.3.0           pyhd8ed1ab_0         conda-forge
  pygments                       2.17.2          pyhd8ed1ab_0         conda-forge
  pympler                        1.0.1           pyhd8ed1ab_0         conda-forge
  pyparsing                      3.1.2           pyhd8ed1ab_0         conda-forge
  pyproject-metadata             0.7.1           pyhd8ed1ab_0         conda-forge
  pyqt                           5.15.9          py311hf0fb5b6_5      conda-forge
  pyqt5-sip                      12.12.2         py311hb755f60_5      conda-forge
  pysocks                        1.7.1           pyha2e5f31_6         conda-forge
  pytest                         8.1.1           pyhd8ed1ab_0         conda-forge
  pytest-cov                     5.0.0           pyhd8ed1ab_0         conda-forge
  pytest-timeout                 2.3.1           pyhd8ed1ab_0         conda-forge
  pytest-xdist                   3.5.0           pyhd8ed1ab_0         conda-forge
  python                         3.11.8          hab00c5b_0_cpython   conda-forge
  python-dateutil                2.9.0           pyhd8ed1ab_0         conda-forge
  python-fastjsonschema          2.19.1          pyhd8ed1ab_0         conda-forge
  python-json-logger             2.0.7           pyhd8ed1ab_0         conda-forge
  python_abi                     3.11            4_cp311              conda-forge
  pythran                        0.15.0          py311h92ebd52_1      conda-forge
  pytz                           2024.1          pyhd8ed1ab_0         conda-forge
  pyyaml                         6.0.1           py311h459d7ec_1      conda-forge
  pyzmq                          25.1.2          py311h34ded2d_0      conda-forge
  qt-main                        5.15.8          h112747c_20          conda-forge
  readline                       8.2             h8228510_1           conda-forge
  referencing                    0.34.0          pyhd8ed1ab_0         conda-forge
  requests                       2.31.0          pyhd8ed1ab_0         conda-forge
  rfc3339-validator              0.1.4           pyhd8ed1ab_0         conda-forge
  rfc3986-validator              0.1.1           pyh9f0ad1d_0         conda-forge
  rich                           13.7.1          pyhd8ed1ab_0         conda-forge
  rich-click                     1.7.4           pyhd8ed1ab_0         conda-forge
  rpds-py                        0.18.0          py311h46250e7_0      conda-forge
  ruff                           0.3.5           py311h7145743_0      conda-forge
  send2trash                     1.8.2           pyh41d4057_0         conda-forge
  setuptools                     67.1.0          pyhd8ed1ab_0         conda-forge
  sip                            6.7.12          py311hb755f60_0      conda-forge
  six                            1.16.0          pyh6c4a22f_0         conda-forge
  sniffio                        1.3.1           pyhd8ed1ab_0         conda-forge
  snowballstemmer                2.2.0           pyhd8ed1ab_0         conda-forge
  sortedcontainers               2.4.0           pyhd8ed1ab_0         conda-forge
  soupsieve                      2.5             pyhd8ed1ab_1         conda-forge
  sphinx                         7.2.6           pyhd8ed1ab_0         conda-forge
  sphinx-design                  0.5.0           pyhd8ed1ab_0         conda-forge
  sphinxcontrib-applehelp        1.0.8           pyhd8ed1ab_0         conda-forge
  sphinxcontrib-devhelp          1.0.6           pyhd8ed1ab_0         conda-forge
  sphinxcontrib-htmlhelp         2.0.5           pyhd8ed1ab_0         conda-forge
  sphinxcontrib-jsmath           1.0.1           pyhd8ed1ab_0         conda-forge
  sphinxcontrib-qthelp           1.0.7           pyhd8ed1ab_0         conda-forge
  sphinxcontrib-serializinghtml  1.1.10          pyhd8ed1ab_0         conda-forge
  sqlalchemy                     2.0.29          py311h459d7ec_0      conda-forge
  stack_data                     0.6.2           pyhd8ed1ab_0         conda-forge
  sysroot_linux-64               2.12            he073ed8_17          conda-forge
  tabulate                       0.9.0           pyhd8ed1ab_1         conda-forge
  terminado                      0.18.1          pyh0d859eb_0         conda-forge
  threadpoolctl                  3.4.0           pyhc1e730c_0         conda-forge
  tinycss2                       1.2.1           pyhd8ed1ab_0         conda-forge
  tk                             8.6.13          noxft_h4845f30_101   conda-forge
  tokenize-rt                    5.2.0           pyhd8ed1ab_1         conda-forge
  toml                           0.10.2          pyhd8ed1ab_0         conda-forge
  tomli                          2.0.1           pyhd8ed1ab_0         conda-forge
  tornado                        6.4             py311h459d7ec_0      conda-forge
  traitlets                      5.14.2          pyhd8ed1ab_0         conda-forge
  types-psutil                   5.9.5.6         pyhd8ed1ab_0         conda-forge
  types-python-dateutil          2.9.0.20240316  pyhd8ed1ab_0         conda-forge
  typing-extensions              4.10.0          hd8ed1ab_0           conda-forge
  typing_extensions              4.10.0          pyha770c72_0         conda-forge
  typing_utils                   0.1.0           pyhd8ed1ab_0         conda-forge
  tzdata                         2024a           h0c530f3_0           conda-forge
  uri-template                   1.3.0           pyhd8ed1ab_0         conda-forge
  urllib3                        2.2.1           pyhd8ed1ab_0         conda-forge
  virtualenv                     20.25.1         pyhd8ed1ab_0         conda-forge
  wcwidth                        0.2.13          pyhd8ed1ab_0         conda-forge
  webcolors                      1.13            pyhd8ed1ab_0         conda-forge
  webencodings                   0.5.1           pyhd8ed1ab_2         conda-forge
  websocket-client               1.7.0           pyhd8ed1ab_0         conda-forge
  wheel                          0.43.0          pyhd8ed1ab_1         conda-forge
  xcb-util                       0.4.0           hd590300_1           conda-forge
  xcb-util-image                 0.4.0           h8ee46fc_1           conda-forge
  xcb-util-keysyms               0.4.0           h8ee46fc_1           conda-forge
  xcb-util-renderutil            0.3.9           hd590300_1           conda-forge
  xcb-util-wm                    0.4.1           h8ee46fc_1           conda-forge
  xkeyboard-config               2.41            hd590300_0           conda-forge
  xorg-kbproto                   1.0.7           h7f98852_1002        conda-forge
  xorg-libice                    1.1.1           hd590300_0           conda-forge
  xorg-libsm                     1.2.4           h7391055_0           conda-forge
  xorg-libx11                    1.8.7           h8ee46fc_0           conda-forge
  xorg-libxau                    1.0.11          hd590300_0           conda-forge
  xorg-libxdmcp                  1.1.3           h7f98852_0           conda-forge
  xorg-libxext                   1.3.4           h0b41bf4_2           conda-forge
  xorg-libxrender                0.9.11          hd590300_0           conda-forge
  xorg-renderproto               0.11.1          h7f98852_1002        conda-forge
  xorg-xextproto                 7.3.0           h0b41bf4_1003        conda-forge
  xorg-xf86vidmodeproto          2.3.1           h7f98852_1002        conda-forge
  xorg-xproto                    7.0.31          h7f98852_1007        conda-forge
  xz                             5.2.6           h166bdaf_0           conda-forge
  yaml                           0.2.5           h7f98852_2           conda-forge
  zeromq                         4.3.5           h59595ed_1           conda-forge
  zipp                           3.17.0          pyhd8ed1ab_0         conda-forge
  zlib                           1.2.13          hd590300_5           conda-forge
  zstd                           1.5.5           hfc55251_0           conda-forge
@melissawm melissawm added the bug Something isn't working label Apr 8, 2024
@melissawm
Copy link
Author

I believe me and @agriyakhetarpal have pinpointed this to the MathJax distribution being hardcoded in MyST-NB. Since SciPy (the target project for these changes) uses a custom MathJax package, MyST-NB does not find it and can't render the math nodes.

Would it be acceptable to propose a feature to customize the MathJax distribution used by MyST-NB?

Thanks!

@agriyakhetarpal
Copy link

agriyakhetarpal commented May 6, 2024

It is to be noted that this issue, when a custom MathJax distribution is used, is fixed1 by adding the following line in conf.py:

myst_update_mathjax = False

I hope this is helpful towards isolating the cause of the bug and narrowing it down to a specific configuration value. We would be happy to make a contribution to MyST-NB by proposing this as a feature, as mentioned by @melissawm above.

xref: scipy/scipy#20518

Footnotes

  1. This is as noted in https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#mathjax-and-math-parsing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants