diff --git a/docs/quickstart.md b/docs/quickstart.md index b274ba1c..a8296d92 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -25,6 +25,9 @@ extensions = [ By default, MyST-NB will now parse both markdown (`.md`) and notebooks (`.ipynb`). +If you used the `myst_parser` extension already, remove it from the extension list to avoid conflict — it is imported by `myst_nb` automatically; all its options, such as `myst_enable_extension`, will be processed. + + ```{button-ref} authoring/intro :ref-type: myst :color: primary diff --git a/docs/render/hiding.md b/docs/render/hiding.md index 4a8597f6..cd2e46a8 100644 --- a/docs/render/hiding.md +++ b/docs/render/hiding.md @@ -109,6 +109,21 @@ print("hallo world") print("hallo world") ``` +### LaTeX output + +Hiding cells in LaTeX output does nothing, unless further tweaks on the LaTeX side are in place. + +Cell tags are helpfully propagated to the LaTeX source (e.g. `hide-cell` tag will wrap the cell inside the `\begin{sphinxuseclass}{tag_hide-cell}…\end{sphinxuseclass}`), but those classes, by default, do nothing. Adjust LaTeX preamble (in `conf.py`, editing `latex_elements` option and its `preamble` field) by adding e.g. + +```{code-cell} latex + +\NewDocumentEnvironment{HIDDEN}{+b}{}{} % defines a new environment HIDDEN which ignores its contents (no output) +\newenvironment{sphinxclasstag_hide-cell}{\begin{HIDDEN}}{\end{HIDDEN}} % this will be used by \begin{sphinxuseclass}{tag_hide-cell}…\end{sphinxuseclass} +``` + +to completely hide all cells with the `hide-cell` tag. + + (use/hiding/markdown)= ## Hide markdown cells