jupyter-book / jupyter-book

Create beautiful, publication-quality books and documents from computational content.
http://jupyterbook.org
BSD 3-Clause "New" or "Revised" License
3.86k stars 661 forks source link

Adding parse.myst_enable_extensions to _config.yml breaks callouts #2068

Open ryanlovett opened 1 year ago

ryanlovett commented 1 year ago

Describe the bug

context I added parse.myst_enable_extensions.substitution to _config.yml while fiddling with #2067 and that caused callout styling to break. I swapped substitution with html_image and then foo but it did not help.

expectation I expected callouts to be unaffected by enabling myst extensions.

bug But instead the callouts were not rendered:

Screenshot 2023-10-10 at 5 16 08 PM

Before enabling extensions: Screenshot 2023-10-10 at 5 15 18 PM

$ jupyter-book build .
Running Jupyter-Book v0.15.1
Source Folder: /Users/rylo/proj/courses/stat999-jupyter-book
Config Path: /Users/rylo/proj/courses/stat999-jupyter-book/_config.yml
Output Path: /Users/rylo/proj/courses/stat999-jupyter-book/_build/html
Running Sphinx v5.0.2
loading pickled environment... done
myst v0.18.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['html_image', 'substitution'], disable_syntax=[], all_links_external=False, url_schemes=['mailto', 'http', 'https'], ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=None, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')
myst-nb v0.17.2: NbParserConfig(custom_formats={}, metadata_key='mystnb', cell_metadata_key='mystnb', kernel_rgx_aliases={}, execution_mode='force', execution_cache_path='', execution_excludepatterns=[], execution_timeout=30, execution_in_temp=False, execution_allow_errors=False, execution_raise_on_error=False, execution_show_tb=False, merge_streams=False, render_plugin='default', remove_code_source=False, remove_code_outputs=False, code_prompt_show='Show code cell {type}', code_prompt_hide='Hide code cell {type}', number_source_lines=False, output_stderr='show', render_text_lexer='myst-ansi', render_error_lexer='ipythontb', render_image_options={}, render_figure_options={}, render_markdown_format='commonmark', output_folder='build', append_css=True, metadata_to_fm=False)
Using jupyter-cache at: /Users/rylo/proj/courses/stat999-jupyter-book/_build/.jupyter_cache
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
updating environment: [config changed ('myst_enable_extensions')] 4 added, 0 changed, 0 removed
reading sources... [100%] syllabus
looking for now-outdated files... none found
pickling environment... done
checking consistency... /Users/rylo/proj/courses/stat999-jupyter-book/about.md: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] syllabus
/Users/rylo/proj/courses/stat999-jupyter-book/index.md:53: WARNING: 'myst' reference target not found: link
/Users/rylo/proj/courses/stat999-jupyter-book/index.md:54: WARNING: 'myst' reference target not found: link2
/Users/rylo/proj/courses/stat999-jupyter-book/syllabus.md:9: WARNING: 'myst' reference target not found: #about-data-100
/Users/rylo/proj/courses/stat999-jupyter-book/syllabus.md:10: WARNING: 'myst' reference target not found: #goals
/Users/rylo/proj/courses/stat999-jupyter-book/syllabus.md:11: WARNING: 'myst' reference target not found: #prerequisites
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 6 warnings.

The HTML pages are in _build/html.

===============================================================================

Finished generating HTML for book.
Your book's HTML pages are here:
    _build/html/
You can look at your book by opening this file in a browser:
    _build/html/index.html
Or paste this line directly into your browser bar:
    file:///Users/rylo/proj/courses/stat999-jupyter-book/_build/html/index.html

===============================================================================

problem This is a problem for people doing because .

Reproduce the bug

  1. Add this to _config.yml (can substitute any extensions)
    parse:
    myst_enable_extensions:
    - html_image
    - substitution
  2. Rebuild book
  3. See callout styling vanish

List your environment

Jupyter Book      : 0.15.1
External ToC      : 0.3.1
MyST-Parser       : 0.18.1
MyST-NB           : 0.17.2
Sphinx Book Theme : 1.0.1
Jupyter-Cache     : 0.6.1
NbClient          : 0.7.2

macOS 13.6, python 3.11.0

ryanlovett commented 1 year ago

I tried using admonition with the explicit class without success:

:::{admonition} Welcome
:class: tip
:name: welcome
Welcome to Week 8 of Data 100!
:::
ryanlovett commented 1 year ago

I was exploring jupyter-book for a course website project, but I've since pivoted to exploring myst. So I'll keep this open in case it is impacting others, but it isn't a high priority issue for me.