` elements to sphinx admonition nodes, see the [HTML admonition syntax](syntax/html-admonition) for details
+- "html_image": Convert HTML `
![]()
` elements to sphinx image nodes, see the [image syntax](syntax/images) for details
+- "linkify": automatically identify "bare" web URLs and add hyperlinks
+- "replacements": automatically convert some common typographic texts
+- "smartquotes": automatically convert standard quotations to their opening/closing variants
+- "substitution": substitute keys, see the [substitutions syntax](syntax/substitutions) for details
+- "tasklist": add check-boxes to the start of list items, see the [tasklist syntax](syntax/tasklists) for details
+
+Math specific, when `"dollarmath"` activated, see the [Math syntax](syntax/math) for more details:
+
+`````{list-table}
+:header-rows: 1
+
+* - Option
+ - Default
+ - Description
+* - `myst_dmath_double_inline`
+ - `False`
+ - Allow display math (i.e. `$$`) within an inline context
+* - `myst_dmath_allow_labels`
+ - `True`
+ - Parse `$$...$$ (label)` syntax
+* - `myst_dmath_allow_space`
+ - `True`
+ - If False then inline math will only be parsed if there are no initial/final spaces,
+ e.g. `$a$` but not `$ a$` or `$a $`
+* - `myst_dmath_allow_digits`
+ - `True`
+ - If False then inline math will only be parsed if there are no initial/final digits,
+ e.g. `$a$` but not `1$a$` or `$a$2` (this is useful for using `$` as currency)
+* - `myst_amsmath_enable`
+ - `False`
+ - Enable direct parsing of [amsmath LaTeX environments](https://ctan.org/pkg/amsmath)
+* - `myst_update_mathjax`
+ - `True`
+ - If using [sphinx.ext.mathjax](https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax) (the default) then `mathjax_config` will be updated,
+ to ignore `$` delimiters and LaTeX environments, which should instead be handled by
+ `myst_dmath_enable` and `myst_amsmath_enable` respectively.
+`````
+
+## Disable markdown syntax for the parser
+
+If you'd like to either enable or disable custom markdown syntax, use `myst_disable_syntax`.
+Anything in this list will no longer be parsed by the MyST parser.
+
+For example, to disable the `emphasis` in-line syntax, use this configuration:
+
+```python
+myst_disable_syntax = ["emphasis"]
+```
+
+emphasis syntax will now be disabled. For example, the following will be rendered
+*without* any italics:
+
+```md
+*emphasis is now disabled*
+```
+
+For a list of all the syntax elements you can disable, see the [markdown-it parser guide](markdown_it:using).
diff --git a/docs/sphinx/roles-and-directives.md b/docs/sphinx/roles-and-directives.md
new file mode 100644
index 00000000..63c86a31
--- /dev/null
+++ b/docs/sphinx/roles-and-directives.md
@@ -0,0 +1,23 @@
+# Special roles and directives
+
+This section contains information about special roles and directives that come bundled with the MyST Parser Sphinx extension.
+
+## Insert the date and reading time
+
+```{versionadded} 0.14.0
+The `sub-ref` role and word counting.
+```
+
+You may insert the "last updated" date and estimated reading time into your document via substitution definitions, which can be accessed *via* the `sub-ref` role.
+
+For example:
+
+```markdown
+> {sub-ref}`today` | {sub-ref}`wordcount-words` words | {sub-ref}`wordcount-minutes` min read
+```
+
+> {sub-ref}`today` | {sub-ref}`wordcount-words` words | {sub-ref}`wordcount-minutes` min read
+
+`today` is replaced by either the date on which the document is parsed, with the format set by [`today_fmt`](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-today_fmt), or the `today` variable if set in the configuration file.
+
+The reading speed is computed using the `myst_words_per_minute` configuration (see the [Sphinx configuration options](sphinx/config-options)).
diff --git a/docs/using/snippets/include-md.md b/docs/sphinx/snippets/include-md.md
similarity index 100%
rename from docs/using/snippets/include-md.md
rename to docs/sphinx/snippets/include-md.md
diff --git a/docs/using/snippets/include-rst.rst b/docs/sphinx/snippets/include-rst.rst
similarity index 100%
rename from docs/using/snippets/include-rst.rst
rename to docs/sphinx/snippets/include-rst.rst
diff --git a/docs/using/howto.md b/docs/sphinx/use.md
similarity index 73%
rename from docs/using/howto.md
rename to docs/sphinx/use.md
index 7c69fe09..3612940c 100644
--- a/docs/using/howto.md
+++ b/docs/sphinx/use.md
@@ -1,6 +1,10 @@
-# How-To Guides
+# Sphinx extension usage guide
-This page describes several common uses of MyST parser and how to accomplish them.
+These sections describe some common scenarios and use-cases for writing MyST with Sphinx.
+
+:::{seealso}
+For an introduction to using MyST with Sphinx, see [](intro.md).
+:::
(howto/include-rst)=
## Include rST files into a Markdown file
@@ -28,6 +32,10 @@ To include rST, we must first "wrap" the directive in the [eval-rst directive](s
.. include:: snippets/include-rst.rst
```
+## Use MyST in Jupyter Notebooks
+
+The [MyST-NB](https://myst-nb.readthedocs.io) tool provides a Sphinx extension for parsing **Jupyter Notebooks written with MyST Markdown**. It includes features like automatically executing notebooks during documentation builds, storing notebook cell outputs in order to insert them elsewhere in your documentation, and more. See the [MyST-NB documentation](https://myst-nb.readthedocs.io) for more information.
+
(howto/include-readme)=
## Include a file from outside the docs folder (like README.md)
@@ -108,32 +116,6 @@ This expects docstrings to be written in reStructuredText.
We hope to support Markdown in the future, see [GitHub issue #228](https://github.com/executablebooks/MyST-Parser/issues/228).
```
-## Show backticks inside raw markdown blocks
-
-If you'd like to show backticks inside of your markdown, you can do so by nesting them
-in backticks of a greater length. Markdown will treat the outer-most backticks as the
-edges of the "raw" block and everything inside will show up. For example:
-
-``` `` `hi` `` ``` will be rendered as: `` `hi` ``
-
-and
-
-`````
-````
-```
-hi
-```
-````
-`````
-
-will be rendered as:
-
-````
-```
-hi
-```
-````
-
(howto/autosectionlabel)=
## Automatically create targets for section headers
@@ -197,3 +179,38 @@ Add to your `conf.py`:
```python
suppress_warnings = ["myst.header"]
```
+
+
+## Sphinx-specific page front matter
+
+Sphinx intercepts front matter and stores them within the global environment
+(as discussed [in the deflists documentation](https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html)).
+There are certain front-matter keys (or their translations) that are also recognised specifically by docutils and parsed to inline Markdown:
+
+- `author`
+- `authors`
+- `organization`
+- `address`
+- `contact`
+- `version`
+- `revision`
+- `status`
+- `date`
+- `copyright`
+- `dedication`
+- `abstract`
+
+A classic use-case is to specify 'orphan' documents, that are not specified in any toctrees.
+For example, inserting the following syntax at the top of a page will cause Sphinx to treat it as an orphan page:
+
+```md
+---
+orphan: true
+---
+
+This is an orphan document, not specified in any toctrees.
+```
+
+## Migrate pre-existing rST into MyST
+
+If you've already got some reStructuredText files that you'd like to convert into MyST Markdown, try the [`rst-to-myst`](https://github.com/executablebooks/rst-to-myst) tool, which allows you to convert single rST files to MyST markdown documents.
diff --git a/docs/using/img/fun-fish.png b/docs/syntax/img/fun-fish.png
similarity index 100%
rename from docs/using/img/fun-fish.png
rename to docs/syntax/img/fun-fish.png
diff --git a/docs/using/syntax-optional.md b/docs/syntax/optional.md
similarity index 78%
rename from docs/using/syntax-optional.md
rename to docs/syntax/optional.md
index 5621ae8b..f450363e 100644
--- a/docs/using/syntax-optional.md
+++ b/docs/syntax/optional.md
@@ -19,7 +19,7 @@ substitutions:
# Optional MyST Syntaxes
MyST-Parser is highly configurable, utilising the inherent "plugability" of the [markdown-it-py](markdown_it:index) parser.
-The following syntaxes are optional (disabled by default) and can be enabled *via* the sphinx `conf.py` (see also [](intro/config-options)).
+The following syntaxes are optional (disabled by default) and can be enabled *via* the sphinx `conf.py` (see also [](sphinx/config-options)).
Their goal is generally to add more *Markdown friendly* syntaxes; often enabling and rendering [markdown-it-py plugins](markdown_it:md/plugins) that extend the [CommonMark specification](https://commonmark.org/).
To enable all the syntaxes explained below:
@@ -74,6 +74,170 @@ text | converted
(syntax/linkify)=
+
+(syntax/math)=
+## Math shortcuts
+
+Math is parsed by adding to the `myst_enable_extensions` list option, in the sphinx `conf.py` [configuration file](https://www.sphinx-doc.org/en/master/usage/configuration.html) one or both of:
+
+- `"dollarmath"` (added by default) for parsing of dollar `$` and `$$` encapsulated math.
+- `"amsmath"` (off by default) for direct parsing of [amsmath LaTeX environments](https://ctan.org/pkg/amsmath).
+
+These options enable their respective Markdown parser plugins, as detailed in the [markdown-it plugin guide](markdown_it:md/plugins).
+
+:::{important}
+`myst_dmath_enable=True` and `myst_amsmath_enable=True` are deprecated, and replaced by `myst_enable_extensions = ["dollarmath", "amsmath"]`
+:::
+
+### Dollar delimited math
+
+Enabling dollar math will parse the following syntax:
+
+- Inline math: `$...$`
+- Display (block) math: `$$...$$`
+
+Additionally if `myst_dmath_allow_labels=True` is set (the default):
+
+- Display (block) math with equation label: `$$...$$ (1)`
+
+For example, `$x_{hey}=it+is^{math}$` renders as $x_{hey}=it+is^{math}$.
+This is equivalent to writing:
+
+```md
+{math}`x_{hey}=it+is^{math}`
+```
+
+:::{admonition} Escaping Dollars
+:class: tip
+
+Math can be escaped (negated) by adding a `\` before the first symbol, e.g. `\$a$` renders as \$a\$.
+Escaping can also be used inside math, e.g. `$a=\$3$` renders as $a=\$3$.
+
+Conversely `\\` will negate the escaping, so `\\$a$` renders as \\$a$.
+:::
+
+Block-level math can be specified with `$$` signs that wrap the math block you'd like to parse.
+For example:
+
+```latex
+$$
+ \begin{eqnarray}
+ y & = & ax^2 + bx + c \\
+ f(x) & = & x^2 + 2xy + y^2
+ \end{eqnarray}
+$$
+```
+
+becomes
+
+$$
+ \begin{eqnarray}
+ y & = & ax^2 + bx + c \\
+ f(x) & = & x^2 + 2xy + y^2
+ \end{eqnarray}
+$$
+
+This is equivalent to the following directive:
+
+````md
+```{math}
+ \begin{eqnarray}
+ y & = & ax^2 + bx + c \\
+ f(x) & = & x^2 + 2xy + y^2
+ \end{eqnarray}
+```
+````
+
+You can also add labels to block equations:
+
+```latex
+$$
+e = mc^2
+$$ (eqn:best)
+
+This is the best equation {eq}`eqn:best`
+```
+
+$$
+e = mc^2
+$$ (eqn:best)
+
+This is the best equation {eq}`eqn:best`
+
+There are a few other options available to control dollar math parsing:
+
+`myst_dmath_allow_space=False`, will cause inline math to only be parsed if there are no initial / final spaces, e.g. `$a$` but not `$ a$` or `$a $`.
+
+`myst_dmath_allow_digits=False`, will cause inline math to only be parsed if there are no initial / final digits, e.g. `$a$` but not `1$a$` or `$a$2`.
+
+These options can both be useful if you also wish to use `$` as a unit of currency.
+
+```{versionadded} 0.14.0
+`myst_dmath_double_inline` option
+```
+
+To allow display math (i.e. `$$`) within an inline context, set `myst_dmath_double_inline = True` (`False` by default).
+This allows for example:
+
+```latex
+Hence, for $\alpha \in (0, 1)$,
+$$
+ \mathbb P (\alpha \bar{X} \ge \mu) \le \alpha;
+$$
+i.e., $[\alpha \bar{X}, \infty)$ is a lower 1-sided $1-\alpha$ confidence bound for $\mu$.
+```
+
+Hence, for $\alpha \in (0, 1)$,
+$$
+ \mathbb P (\alpha \bar{X} \ge \mu) \le \alpha;
+$$
+i.e., $[\alpha \bar{X}, \infty)$ is a lower 1-sided $1-\alpha$ confidence bound for $\mu$.
+
+### Math in other block elements
+
+Math will also work when nested in other block elements, like lists or quotes:
+
+```md
+- A list
+- $$ a = 1 $$
+
+> A block quote
+> $$ a = 1 $$
+```
+
+- A list
+- $$ a = 1 $$
+
+> A block quote
+> $$ a = 1 $$
+
+### Direct LaTeX Math
+
+Want to use [amsmath](https://ctan.org/pkg/amsmath) LaTeX directly, with no dollars?
+See [the extended syntax option](syntax/amsmath).
+
+(syntax/mathjax)=
+### Mathjax and math parsing
+
+When building HTML using the [sphinx.ext.mathjax](https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax) extension (enabled by default),
+Myst-Parser injects the `tex2jax_ignore` (MathJax v2) and `mathjax_ignore` (MathJax v3) classes in to the top-level section of each MyST document, and adds the following default MathJax configuration:
+
+MathJax version 2 (see [the tex2jax preprocessor](https://docs.mathjax.org/en/v2.7-latest/options/preprocessors/tex2jax.html#configure-tex2jax):
+
+```javascript
+MathJax.Hub.Config({"tex2jax": {"processClass": "tex2jax_process|mathjax_process|math"}})
+```
+
+MathJax version 3 (see [the document options](https://docs.mathjax.org/en/latest/options/document.html?highlight=ignoreHtmlClass#the-configuration-block)):
+
+```javascript
+window.MathJax = {"options": {"processHtmlClass": "tex2jax_process|mathjax_process|math"}}
+```
+
+This ensurea that MathJax processes only math, identified by the `dollarmath` and `amsmath` extensions, or specified in `math` directives.
+
+To change this behaviour, set a custom regex, for identifying HTML classes to process, like `myst_mathjax_classes="math|myclass"`, or set `update_mathjax=False` to inhibit this override and process all HTML elements.
+
## Linkify
Adding `"linkify"` to `myst_enable_extensions` (in the sphinx `conf.py` [configuration file](https://www.sphinx-doc.org/en/master/usage/configuration.html)) will automatically identify "bare" web URLs and add hyperlinks:
@@ -316,7 +480,7 @@ To change the slug function, set `myst_heading_slug_func` in your `conf.py` to a
You can inspect the links that will be created using the command-line tool:
```console
-$ myst-anchors -l 2 docs/using/syntax-optional.md
+$ myst-anchors -l 2 docs/syntax/optional.md
diff --git a/docs/syntax/reference.md b/docs/syntax/reference.md
new file mode 100644
index 00000000..c3264a23
--- /dev/null
+++ b/docs/syntax/reference.md
@@ -0,0 +1,264 @@
+# MyST Syntax Reference
+
+This page serves as a reference for the syntax that makes of MyST Markdown.
+
+:::{seealso}
+For more description and explanation of MyST syntax, see the [syntax guide](syntax.md).
+:::
+
+## Block (Multi-line) Tokens
+
+Block tokens span multiple lines of content. They are broken down into two sections:
+
+- {ref}`extended-block-tokens` contains *extra* tokens that are not in CommonMark.
+- {ref}`commonmark-block-tokens` contains CommonMark tokens that also work, for reference.
+
+In addition to these summaries of block-level syntax, see {ref}`extra-markdown-syntax`.
+
+:::{note}
+Because MyST markdown was inspired by functionality that exists in reStructuredText,
+we have shown equivalent rST syntax for many MyST markdown features below.
+:::
+
+(extended-block-tokens)=
+### Extended block tokens
+
+`````{list-table}
+:header-rows: 1
+:widths: 10 20 20
+
+* - Token
+ - Description
+ - Example
+* - FrontMatter
+ - A YAML block at the start of the document enclosed by `---`
+ - ```yaml
+ ---
+ key: value
+ ---
+ ```
+* - Directives
+ - enclosed in 3 or more backticks followed by the directive name wrapped
+ in curly brackets `{}`. See {ref}`syntax/directives` for more details.
+ - ````md
+ ```{directive}
+ :option: value
+
+ content
+ ```
+ ````
+* - Math
+ - `$$` (default) or `\[`...`\]` characters wrapping multi-line math, or even direct [amsmath](https://ctan.org/pkg/amsmath) LaTeX equations (optional).
+ See {ref}`syntax/math` for more information.
+ - ```latex
+ $$
+ a=1
+ $$
+ ```
+* - Table
+ - Standard markdown table style, with pipe separation.
+ - ```md
+ | a | b |
+ | :--- | ---: |
+ | c | d |
+ ```
+* - LineComment
+ - A commented line. See {ref}`syntax/comments` for more information.
+ - ```latex
+ % this is a comment
+ ```
+* - BlockBreak
+ - Define blocks of text. See {ref}`syntax/blockbreaks` for more information.
+ - ```md
+ +++ {"meta": "data"}
+ ```
+* - Footnote
+ - A definition for a referencing footnote, that is placed at the bottom of the document.
+ See {ref}`syntax/footnotes` for more details.
+ - ```md
+ [^ref]: Some footnote text
+ ```
+* - Admonitions (optional)
+ - An alternative approach for admonition style directives only, which has the benefit of allowing the content to be rendered in standard markdown editors.
+ See [admonition directives](syntax/admonitions) for more details.
+ - ````md
+ :::{note}
+ *content*
+ :::
+ ````
+`````
+
+(commonmark-block-tokens)=
+### CommonMark tokens
+
+`````{list-table}
+:header-rows: 1
+:widths: 10 20 20
+
+* - Token
+ - Description
+ - Example
+* - HTMLBlock
+ - Any valid HTML (rendered in HTML output only)
+ - ```html
+
some text
+ ```
+* - BlockCode
+ - indented text (4 spaces or a tab)
+ - ```md
+ included as literal *text*
+ ```
+* - Heading
+ - Level 1-6 headings, denoted by number of `#`
+ - ```md
+ ### Heading level 3
+ ```
+* - SetextHeading
+ - Underlined header (using multiple `=` or `-`)
+ - ```md
+ Header
+ ======
+ ```
+* - Quote
+ - quoted text
+ - ```md
+ > this is a quote
+ ```
+* - CodeFence
+ - enclosed in 3 or more backticks with an optional language name
+ - ````md
+ ```python
+ print('this is python')
+ ```
+ ````
+* - ThematicBreak
+ - Creates a horizontal line in the output
+ - ```md
+ ---
+ ```
+* - List
+ - bullet points or enumerated.
+ - ```md
+ - item
+ - nested item
+ 1. numbered item
+ ```
+* - LinkDefinition
+ - A substitution for an inline link, which can have a reference target (no spaces), and an optional title (in `"`)
+ - ```md
+ [key]: https://www.google.com "a title"
+ ```
+* - Paragraph
+ - General inline text
+ - ```md
+ any *text*
+ ```
+`````
+
+## Span (Inline) Tokens
+
+Span (or inline) tokens are defined on a single line of content. They are broken down into two
+sections below:
+
+- {ref}`extended-span-tokens` contains *extra* tokens that are not in CommonMark.
+- {ref}`commonmark-span-tokens` contains CommonMark tokens that also work, for reference.
+
+In addition to these summaries of inline syntax, see {ref}`extra-markdown-syntax`.
+
+(extended-span-tokens)=
+### Extended inline tokens
+
+`````{list-table}
+:header-rows: 1
+:widths: 10 20 20
+
+* - Token
+ - Description
+ - Example
+* - Role
+ - See {ref}`syntax/roles` for more
+ information.
+ - ```md
+ {rolename}`interpreted text`
+ ```
+* - Target
+ - Precedes element to target, e.g. header. See
+ {ref}`syntax/targets` for more information.
+ - ```md
+ (target)=
+ ```
+* - Math
+ - `$` (default) or `\(`...`\)` enclosed math. See
+ {ref}`syntax/math` for more information.
+ - ```latex
+ $a=1$ or $$a=1$$
+ ```
+* - FootReference
+ - Reference a footnote. See {ref}`syntax/footnotes` for more details.
+ - ```md
+ [^abc]
+ ```
+`````
+
+(commonmark-span-tokens)=
+### CommonMark inline tokens
+
+`````{list-table}
+:header-rows: 1
+:widths: 10 20 20
+
+* - Token
+ - Description
+ - Example
+* - HTMLSpan
+ - Any valid HTML (rendered in HTML output only)
+ - ```html
+
some text
+ ```
+* - EscapeSequence
+ - Escaped symbols (to avoid them being interpreted as other syntax elements)
+ - ```md
+ \*
+ ```
+* - AutoLink
+ - Link that is shown in final output
+ - ```md
+
+ ```
+* - InlineCode
+ - Literal text
+ - ```md
+ `a=1`
+ ```
+* - LineBreak
+ - Soft or hard (ends with spaces or backslash)
+ - ```md
+ A hard break\
+ ```
+* - Image
+ - Link to an image.
+ You can also use HTML syntax, to include image size etc, [see here](syntax/images) for details
+ - ```md
+ 
+ ```
+* - Link
+ - Reference `LinkDefinitions`
+ - ```md
+ [text](target "title") or [text][key]
+ ```
+* - Strong
+ - Bold text
+ - ```md
+ **strong**
+ ```
+* - Emphasis
+ - Italic text
+ - ```md
+ *emphasis*
+ ```
+* - RawText
+ - Any text
+ - ```md
+ any text
+ ```
+`````
diff --git a/docs/using/syntax.md b/docs/syntax/syntax.md
similarity index 57%
rename from docs/using/syntax.md
rename to docs/syntax/syntax.md
index 34c0e791..0f25c14f 100644
--- a/docs/using/syntax.md
+++ b/docs/syntax/syntax.md
@@ -17,7 +17,8 @@ Below is a summary of the syntax 'tokens' parsed,
and further details of a few major extensions from the CommonMark flavor of markdown.
:::{seealso}
-For an introduction to writing Directives and Roles with MyST markdown, see {ref}`intro/writing`.
+- For an introduction to writing Directives and Roles with MyST markdown, see {ref}`intro/writing`.
+- Check out the [MyST-Markdown VS Code extension](https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight), for MyST extended syntax highlighting.
:::
MyST builds on the tokens defined by markdown-it, to extend the syntax
@@ -25,263 +26,6 @@ described in the [CommonMark Spec](https://spec.commonmark.org/0.29/), which the
% TODO link to markdown-it documentation
-## Block Tokens Summary
-
-Block tokens span multiple lines of content. They are broken down into two sections:
-
-- {ref}`extended-block-tokens` contains *extra* tokens that are not in CommonMark.
-- {ref}`commonmark-block-tokens` contains CommonMark tokens that also work, for reference.
-
-In addition to these summaries of block-level syntax, see {ref}`extra-markdown-syntax`.
-
-:::{note}
-Because MyST markdown was inspired by functionality that exists in reStructuredText,
-we have shown equivalent rST syntax for many MyST markdown features below.
-:::
-
-(extended-block-tokens)=
-### Extended block tokens
-
-`````{list-table}
-:header-rows: 1
-:widths: 10 20 20
-
-* - Token
- - Description
- - Example
-* - FrontMatter
- - A YAML block at the start of the document enclosed by `---`
- - ```yaml
- ---
- key: value
- ---
- ```
-* - Directives
- - enclosed in 3 or more backticks followed by the directive name wrapped
- in curly brackets `{}`. See {ref}`syntax/directives` for more details.
- - ````md
- ```{directive}
- :option: value
-
- content
- ```
- ````
-* - Math
- - `$$` (default) or `\[`...`\]` characters wrapping multi-line math, or even direct [amsmath](https://ctan.org/pkg/amsmath) LaTeX equations (optional).
- See {ref}`syntax/math` for more information.
- - ```latex
- $$
- a=1
- $$
- ```
-* - Table
- - Standard markdown table style, with pipe separation.
- - ```md
- | a | b |
- | :--- | ---: |
- | c | d |
- ```
-* - LineComment
- - A commented line. See {ref}`syntax/comments` for more information.
- - ```latex
- % this is a comment
- ```
-* - BlockBreak
- - Define blocks of text. See {ref}`syntax/blockbreaks` for more information.
- - ```md
- +++ {"meta": "data"}
- ```
-* - Footnote
- - A definition for a referencing footnote, that is placed at the bottom of the document.
- See {ref}`syntax/footnotes` for more details.
- - ```md
- [^ref]: Some footnote text
- ```
-* - Admonitions (optional)
- - An alternative approach for admonition style directives only, which has the benefit of allowing the content to be rendered in standard markdown editors.
- See [admonition directives](syntax/admonitions) for more details.
- - ````md
- :::{note}
- *content*
- :::
- ````
-`````
-
-(commonmark-block-tokens)=
-### CommonMark tokens
-
-`````{list-table}
-:header-rows: 1
-:widths: 10 20 20
-
-* - Token
- - Description
- - Example
-* - HTMLBlock
- - Any valid HTML (rendered in HTML output only)
- - ```html
- some text
- ```
-* - BlockCode
- - indented text (4 spaces or a tab)
- - ```md
- included as literal *text*
- ```
-* - Heading
- - Level 1-6 headings, denoted by number of `#`
- - ```md
- ### Heading level 3
- ```
-* - SetextHeading
- - Underlined header (using multiple `=` or `-`)
- - ```md
- Header
- ======
- ```
-* - Quote
- - quoted text
- - ```md
- > this is a quote
- ```
-* - CodeFence
- - enclosed in 3 or more backticks with an optional language name
- - ````md
- ```python
- print('this is python')
- ```
- ````
-* - ThematicBreak
- - Creates a horizontal line in the output
- - ```md
- ---
- ```
-* - List
- - bullet points or enumerated.
- - ```md
- - item
- - nested item
- 1. numbered item
- ```
-* - LinkDefinition
- - A substitution for an inline link, which can have a reference target (no spaces), and an optional title (in `"`)
- - ```md
- [key]: https://www.google.com "a title"
- ```
-* - Paragraph
- - General inline text
- - ```md
- any *text*
- ```
-`````
-
-## Span (Inline) Tokens Summary
-
-Span (or inline) tokens are defined on a single line of content. They are broken down into two
-sections below:
-
-- {ref}`extended-span-tokens` contains *extra* tokens that are not in CommonMark.
-- {ref}`commonmark-span-tokens` contains CommonMark tokens that also work, for reference.
-
-In addition to these summaries of inline syntax, see {ref}`extra-markdown-syntax`.
-
-(extended-span-tokens)=
-### Extended inline tokens
-
-`````{list-table}
-:header-rows: 1
-:widths: 10 20 20
-
-* - Token
- - Description
- - Example
-* - Role
- - See {ref}`syntax/roles` for more
- information.
- - ```md
- {rolename}`interpreted text`
- ```
-* - Target
- - Precedes element to target, e.g. header. See
- {ref}`syntax/targets` for more information.
- - ```md
- (target)=
- ```
-* - Math
- - `$` (default) or `\(`...`\)` enclosed math. See
- {ref}`syntax/math` for more information.
- - ```latex
- $a=1$ or $$a=1$$
- ```
-* - FootReference
- - Reference a footnote. See {ref}`syntax/footnotes` for more details.
- - ```md
- [^abc]
- ```
-`````
-
-(commonmark-span-tokens)=
-### CommonMark inline tokens
-
-`````{list-table}
-:header-rows: 1
-:widths: 10 20 20
-
-* - Token
- - Description
- - Example
-* - HTMLSpan
- - Any valid HTML (rendered in HTML output only)
- - ```html
- some text
- ```
-* - EscapeSequence
- - Escaped symbols (to avoid them being interpreted as other syntax elements)
- - ```md
- \*
- ```
-* - AutoLink
- - Link that is shown in final output
- - ```md
-
- ```
-* - InlineCode
- - Literal text
- - ```md
- `a=1`
- ```
-* - LineBreak
- - Soft or hard (ends with spaces or backslash)
- - ```md
- A hard break\
- ```
-* - Image
- - Link to an image.
- You can also use HTML syntax, to include image size etc, [see here](syntax/images) for details
- - ```md
- 
- ```
-* - Link
- - Reference `LinkDefinitions`
- - ```md
- [text](target "title") or [text][key]
- ```
-* - Strong
- - Bold text
- - ```md
- **strong**
- ```
-* - Emphasis
- - Italic text
- - ```md
- *emphasis*
- ```
-* - RawText
- - Any text
- - ```md
- any text
- ```
-`````
-
(syntax/directives)=
## Directives - a block-level extension point
@@ -540,7 +284,7 @@ This text is **standard** _Markdown_
## Roles - an in-line extension point
Roles are similar to directives - they allow you to define arbitrary new
-functionality in Sphinx, but they are used *in-line*. To define an in-line
+functionality, but they are used *in-line*. To define an in-line
role, use the following form:
````{list-table}
@@ -608,27 +352,6 @@ How roles parse this content depends on the author that created the role.
(syntax/roles/special)=
-### Special roles
-
-```{versionadded} 0.14.0
-The `sub-ref` role and word counting.
-```
-
-For all MyST documents, the date and word-count are made available by substitution definitions,
-which can be accessed *via* the `sub-ref` role.
-
-For example:
-
-```markdown
-> {sub-ref}`today` | {sub-ref}`wordcount-words` words | {sub-ref}`wordcount-minutes` min read
-```
-
-> {sub-ref}`today` | {sub-ref}`wordcount-words` words | {sub-ref}`wordcount-minutes` min read
-
-`today` is replaced by either the date on which the document is parsed, with the format set by [`today_fmt`](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-today_fmt), or the `today` variable if set in the configuration file.
-
-The reading speed is computed using the `myst_words_per_minute` configuration (see the [Sphinx configuration options](intro/config-options)).
-
(extra-markdown-syntax)=
## Extra markdown syntax
@@ -665,190 +388,13 @@ header-rows: 1
- `.. _mytarget:`
````
-(syntax/math)=
-
-## Math shortcuts
-
-Math is parsed by adding to the `myst_enable_extensions` list option, in the sphinx `conf.py` [configuration file](https://www.sphinx-doc.org/en/master/usage/configuration.html) one or both of:
-
-- `"dollarmath"` (added by default) for parsing of dollar `$` and `$$` encapsulated math.
-- `"amsmath"` (off by default) for direct parsing of [amsmath LaTeX environments](https://ctan.org/pkg/amsmath).
-
-These options enable their respective Markdown parser plugins, as detailed in the [markdown-it plugin guide](markdown_it:md/plugins).
-
-:::{important}
-`myst_dmath_enable=True` and `myst_amsmath_enable=True` are deprecated, and replaced by `myst_enable_extensions = ["dollarmath", "amsmath"]`
-:::
-
-### Dollar delimited math
-
-Enabling dollar math will parse the following syntax:
-
-- Inline math: `$...$`
-- Display (block) math: `$$...$$`
-
-Additionally if `myst_dmath_allow_labels=True` is set (the default):
-
-- Display (block) math with equation label: `$$...$$ (1)`
-
-For example, `$x_{hey}=it+is^{math}$` renders as $x_{hey}=it+is^{math}$.
-This is equivalent to writing:
-
-```md
-{math}`x_{hey}=it+is^{math}`
-```
-
-:::{admonition} Escaping Dollars
-:class: tip
-
-Math can be escaped (negated) by adding a `\` before the first symbol, e.g. `\$a$` renders as \$a\$.
-Escaping can also be used inside math, e.g. `$a=\$3$` renders as $a=\$3$.
-
-Conversely `\\` will negate the escaping, so `\\$a$` renders as \\$a$.
-:::
-
-Block-level math can be specified with `$$` signs that wrap the math block you'd like to parse.
-For example:
-
-```latex
-$$
- \begin{eqnarray}
- y & = & ax^2 + bx + c \\
- f(x) & = & x^2 + 2xy + y^2
- \end{eqnarray}
-$$
-```
-
-becomes
-
-$$
- \begin{eqnarray}
- y & = & ax^2 + bx + c \\
- f(x) & = & x^2 + 2xy + y^2
- \end{eqnarray}
-$$
-
-This is equivalent to the following directive:
-
-````md
-```{math}
- \begin{eqnarray}
- y & = & ax^2 + bx + c \\
- f(x) & = & x^2 + 2xy + y^2
- \end{eqnarray}
-```
-````
-
-You can also add labels to block equations:
-
-```latex
-$$
-e = mc^2
-$$ (eqn:best)
-
-This is the best equation {eq}`eqn:best`
-```
-
-$$
-e = mc^2
-$$ (eqn:best)
-
-This is the best equation {eq}`eqn:best`
-
-There are a few other options available to control dollar math parsing:
-
-`myst_dmath_allow_space=False`, will cause inline math to only be parsed if there are no initial / final spaces, e.g. `$a$` but not `$ a$` or `$a $`.
-
-`myst_dmath_allow_digits=False`, will cause inline math to only be parsed if there are no initial / final digits, e.g. `$a$` but not `1$a$` or `$a$2`.
-
-These options can both be useful if you also wish to use `$` as a unit of currency.
-
-```{versionadded} 0.14.0
-`myst_dmath_double_inline` option
-```
-
-To allow display math (i.e. `$$`) within an inline context, set `myst_dmath_double_inline = True` (`False` by default).
-This allows for example:
-
-```latex
-Hence, for $\alpha \in (0, 1)$,
-$$
- \mathbb P (\alpha \bar{X} \ge \mu) \le \alpha;
-$$
-i.e., $[\alpha \bar{X}, \infty)$ is a lower 1-sided $1-\alpha$ confidence bound for $\mu$.
-```
-
-Hence, for $\alpha \in (0, 1)$,
-$$
- \mathbb P (\alpha \bar{X} \ge \mu) \le \alpha;
-$$
-i.e., $[\alpha \bar{X}, \infty)$ is a lower 1-sided $1-\alpha$ confidence bound for $\mu$.
-
-### Math in other block elements
-
-Math will also work when nested in other block elements, like lists or quotes:
-
-```md
-- A list
-- $$ a = 1 $$
-
-> A block quote
-> $$ a = 1 $$
-```
-
-- A list
-- $$ a = 1 $$
-
-> A block quote
-> $$ a = 1 $$
-
-### Direct LaTeX Math
-
-Want to use [amsmath](https://ctan.org/pkg/amsmath) LaTeX directly, with no dollars?
-See [the extended syntax option](syntax/amsmath).
-
-(syntax/mathjax)=
-### Mathjax and math parsing
-
-When building HTML using the [sphinx.ext.mathjax](https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax) extension (enabled by default),
-Myst-Parser injects the `tex2jax_ignore` (MathJax v2) and `mathjax_ignore` (MathJax v3) classes in to the top-level section of each MyST document, and adds the following default MathJax configuration:
-
-MathJax version 2 (see [the tex2jax preprocessor](https://docs.mathjax.org/en/v2.7-latest/options/preprocessors/tex2jax.html#configure-tex2jax):
-
-```javascript
-MathJax.Hub.Config({"tex2jax": {"processClass": "tex2jax_process|mathjax_process|math"}})
-```
-
-MathJax version 3 (see [the document options](https://docs.mathjax.org/en/latest/options/document.html?highlight=ignoreHtmlClass#the-configuration-block)):
-
-```javascript
-window.MathJax = {"options": {"processHtmlClass": "tex2jax_process|mathjax_process|math"}}
-```
-
-This ensurea that MathJax processes only math, identified by the `dollarmath` and `amsmath` extensions, or specified in `math` directives.
-
-To change this behaviour, set a custom regex, for identifying HTML classes to process, like `myst_mathjax_classes="math|myclass"`, or set `update_mathjax=False` to inhibit this override and process all HTML elements.
-
(syntax/frontmatter)=
## Front Matter
This is a YAML block at the start of the document, as used for example in
[jekyll](https://jekyllrb.com/docs/front-matter/).
-Sphinx intercepts these data and stores them within the global environment
-(as discussed [here](https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html)).
-The following keys, or their translation (dependent on the set language), are also recognised specifically by docutils and parsed to inline Markdown: author, authors, organization, address, contact, version, revision, status, date, copyright, dedication, abstract.
-A classic use-case is to specify 'orphan' documents, that are not specified in any toctrees.
-For example, inserting the following syntax at the top of a page will cause Sphinx to treat it as an orphan page:
-
-```md
----
-orphan: true
----
-
-This is an orphan document, not specified in any toctrees.
-```
:::{seealso}
Top-matter is also used for the [substitution syntax extension](syntax/substitutions),
@@ -1020,10 +566,10 @@ is equivalent to using the [any inline role](https://www.sphinx-doc.org/en/maste
{any}`my text `
```
-but can also accept "nested" syntax (like bold text) and will recognise document paths that include extensions (e.g. `using/syntax` or `using/syntax.md`)
+but can also accept "nested" syntax (like bold text) and will recognise document paths that include extensions (e.g. `syntax/syntax` or `syntax/syntax.md`)
Using the same example, see this ref: [](syntax/targets), here is a reference back to the top of
-this page: [my text with **nested** $\alpha$ syntax](example_syntax), and here is a reference to another page (`[](intro.md)`): [](intro.md).
+this page: [my text with **nested** $\alpha$ syntax](example_syntax), and here is a reference to another page (`[](../sphinx/intro.md)`): [](../sphinx/intro.md).
```{note}
If you wish to have the target's title inserted into your text, you can
@@ -1123,3 +669,33 @@ This is because, in the current implementation, they may not be available to ref
By default, a transition line (with a `footnotes` class) will be placed before any footnotes.
This can be turned off by adding `myst_footnote_transition = False` to the config file.
+
+
+## Code blocks
+
+
+### Show backticks inside raw markdown blocks
+
+If you'd like to show backticks inside of your markdown, you can do so by nesting them
+in backticks of a greater length. Markdown will treat the outer-most backticks as the
+edges of the "raw" block and everything inside will show up. For example:
+
+``` `` `hi` `` ``` will be rendered as: `` `hi` ``
+
+and
+
+`````
+````
+```
+hi
+```
+````
+`````
+
+will be rendered as:
+
+````
+```
+hi
+```
+````
diff --git a/docs/using/faq.md b/docs/using/faq.md
deleted file mode 100644
index 3966c29d..00000000
--- a/docs/using/faq.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Frequently Asked Questions
-
-This page covers some frequently-asked questions about the MyST markdown language,
-as well as the MyST parser for Sphinx. If you're just getting started, see {doc}`intro`.
-
-## What is the relationship between MyST, reStructuredText, and Sphinx?
-
-MyST markdown provides a markdown equivalent of the reStructuredText syntax,
-meaning that you can do anything in MyST that you can do with reStructuredText.
-
-Sphinx has its own internal document model, and by default it knows how to convert
-reStructuredText into that document model (with an rST parser). The MyST markdown language
-defines markdown syntax that has all of the functionality that Sphinx provides (most
-notable, directives, roles, and labels). The MyST parser is a Sphinx extension that can
-parse this flavor of markdown into Sphinx's internal document model. Once a document
-has been parsed into Sphinx, it behaves the same way regardless of whether it has
-been written in rST or MyST markdown.
-
-```
-myst markdown (.md) ------> myst parser ---+
- |
- +-->Sphinx document (docutils)
- |
-reStructuredText (.rst) --> rst parser ----+
-```
-
-For example, here's how you'd write a `toctree` directive in MyST markdown:
-
-````
-```{toctree}
-My page name
-page2
-```
-````
-
-and here's the same in rST:
-
-```
-.. toctree::
-
- My page name
- page2
-```
-
-They will both behave the same in Sphinx.
-
-## What markup language should I use inside directives?
-
-If you need to parse content *inside* of another block of content (for example, the
-content inside a **note directive**), note that the MyST parser will be used for this
-nested parsing as well.
-
-## Why doesn't my role/directive recognize markdown link syntax?
-
-There are some roles/directives that _hard-code_ syntax into
-their behavior. For example, many roles allow you to supply titles for links like so:
-`` {role}`My title ` ``. While this looks like reStructuredText, the role may
-be explicitly expecting the `My title ` structure, and so MyST will behave the same way.
-
-## How fast is the `myst-parser`?
-
-MyST-Parser uses the fastest, __*CommonMark compliant*__, parser written in Python!
-
-See the [markdown-it-py performance documentation](markdown_it:md/performance).
diff --git a/docs/using/intro.md b/docs/using/intro.md
deleted file mode 100644
index a6ba732c..00000000
--- a/docs/using/intro.md
+++ /dev/null
@@ -1,328 +0,0 @@
-(intro/get-started)=
-# Getting Started
-
-This page describes how to get started with the MyST parser, with a focus on enabling
-it in the Sphinx documentation engine.
-
-## Installation
-
-[![PyPI][pypi-badge]][pypi-link]
-[![Conda][conda-badge]][conda-link]
-
-Installing the MyST parser provides access to two tools:
-
-* A MyST-to-docutils parser and renderer.
-* A Sphinx parser that utilizes the above tool in building your documentation.
-
-To install the MyST parser, run the following in a
-[Conda environment](https://docs.conda.io) (recommended):
-
-```bash
-conda install -c conda-forge myst-parser
-```
-
-or
-
-```bash
-pip install myst-parser
-```
-
-[pypi-badge]: https://img.shields.io/pypi/v/myst-parser.svg
-[pypi-link]: https://pypi.org/project/myst-parser
-[conda-badge]: https://anaconda.org/conda-forge/myst-parser/badges/version.svg
-[conda-link]: https://anaconda.org/conda-forge/myst-parser
-
-(parse-with-sphinx)=
-## Enable MyST in Sphinx
-
-Sphinx is a documentation generator for building a website or book from multiple source documents and assets. To get started with Sphinx, see their [Quickstart Guide](https://www.sphinx-doc.org/en/master/usage/quickstart.html).
-
-To use the MyST parser in Sphinx, simply add: `extensions = ["myst_parser"]` to your `conf.py` and all documents with the `.md` extension will be parsed as MyST.
-
-Naturally this site is generated with Sphinx and MyST!
-
-:::{admonition} You can use both MyST and reStructuredText
-:class: tip
-
-Activating the MyST parser will simply *enable* parsing markdown files with MyST, and the rST parser that ships with Sphinx by default will still work the same way.
-You can have combinations of both markdown and rST files in your documentation, and Sphinx will choose the right parser based on each file's extension.
-Sphinx features like cross-references will work just fine between the pages.
-
-You can even inject raw rST into Markdown files! (see [this explanation](syntax/directives/parsing))
-:::
-
-:::{admonition} Want to add Jupyter Notebooks to your documentation?
-:class: seealso
-
-See also [MyST-NB](https://myst-nb.readthedocs.io), our complimentary parser and execution engine,
-for ipynb and text-based notebooks.
-:::
-
-## How does MyST parser relate to Sphinx?
-
-The Sphinx documentation engine supports a number of different input types. By default,
-Sphinx reads **reStructuredText** (`.rst`) files. Sphinx uses a **parser** to parse input files
-into its own internal document model (which is provided by a core Python project,
-[docutils](https://docutils.sourceforge.io/)).
-
-Developers can *extend Sphinx* to support other kinds of input files. Any content file
-can be read into the Sphinx document structure, provided that somebody writes a
-**parser** for that file. Once a content file has been parsed into Sphinx, it behaves
-nearly the same way as any other content file, regardless of the language in which it
-was written.
-
-The MyST-parser is a Sphinx parser for the MyST markdown language. When you use it,
-Sphinx will know how to parse content files that contain MyST markdown (by default,
-Sphinx will assume any files ending in `.md` are written in MyST markdown).
-
-:::{note}
-Sphinx will still be able to parse files written in `.rst`. Activating this parser
-simply adds another parser, and Sphinx will still be able to use its default parser
-for `.rst` files.
-:::
-
-(intro/writing)=
-## Writing MyST in Sphinx
-
-Once you've enabled the `myst-parser` in Sphinx, it will be able to parse your MyST
-markdown documents. This means that you can use the `.md` extension for your pages,
-and write MyST markdown in these pages.
-
-:::{note}
-MyST markdown is a mixture of two flavors of markdown:
-
-It supports all the syntax of **[CommonMark Markdown](https://commonmark.org/)** at its
-base. This is a community standard flavor of markdown used across many projects.
-
-In addition, it includes **several extensions to CommonMark**
-(often described as [MyST Markdown syntax](syntax)). These add extra syntax features
-designed to work with the Sphinx ecosystem (and inspired by reStructuredText)
-:::
-
-:::{tip}
-If you want to parse your files as only **strict** CommonMark (no extensions), then you can set the `conf.py` option `myst_commonmark_only=True`.
-:::
-
-The following sections cover a few core syntax patterns in MyST markdown, you can
-find a more exhaustive list in {doc}`syntax`.
-
-### Block-level directives with MyST markdown
-
-The most important functionality available with MyST markdown is writing **directives**.
-Directives are kind-of like functions that are designed for writing content. Sphinx
-and reStructuredText use directives extensively. Here's how a directive looks in
-MyST markdown:
-
-````{margin} Alternative options syntax
-If you've got a lot of options for your directive, or have a value that is really
-long (e.g., that spans multiple lines), then you can also wrap your options in
-`---` lines and write them as YAML. For example:
-
-```yaml
----
-key1: val1
-key2: |
- val line 1
- val line 2
----
-```
-````
-
-````
-```{directivename}
-:optionname:
-
-
-```
-````
-
-````{admonition} MyST vs. rST
-:class: warning
-For those who are familiar with reStructuredText, here is the equivalent in rST:
-
-```rst
-.. directivename:
- :optionname:
-
-
-```
-
-Note that almost all documentation in the Sphinx ecosystem is written with
-reStructuredText (MyST is only a few months old).
-That means you'll likely see examples that have rST structure. You can modify any rST to work with MyST. Use this page, and [the syntax page](./syntax.md) to help guide you.
-````
-
-As seen above, there are four main parts to consider when writing directives.
-
-* **the directive name** is kind of like the function name. Different names trigger
- different functionality. They are wrapped in `{}` brackets.
-* **directive arguments** come just after the directive name. They can be used
- to trigger behavior in the directive.
-* **directive options** come just after the first line of the directive. They also
- control behavior of the directive.
-* **directive content** is markdown that you put inside the directive. The directive
- often displays the content in a special way.
-
-For example, here's an **`admonition`** directive:
-
-````
-```{admonition} Here's my title
-:class: warning
-
-Here's my admonition content
-```
-````
-
-As you can see, we've used each of the four pieces described above to configure this
-directive. Here's how it looks when rendered:
-
-```{admonition} Here's my title
-:class: warning
-
-Here's my admonition content
-```
-
-For more information about using directives with MyST, see {ref}`syntax/directives`.
-
-### In-line roles with MyST Markdown
-
-Roles are another core Sphinx tool. They behave similarly to directives, but are given
-in-line with text instead of in a separate block. They have the following form:
-
-```md
-{rolename}`role content`
-```
-
-For those who are familiar with reStructuredText, here is the equivalent in rST:
-
-```rst
-:rolename:`role content`
-```
-
-As you can see, roles are a bit more simple than directives, though some roles allow
-for more complex syntax inside their content area. For example, the `ref` role is used
-to make references to other sections of your documentation, and allows you to specify
-the displayed text as well as the reference itself within the role:
-
-```md
-{ref}`My displayed text `
-```
-
-For example, the following reference role: `` {ref}`Check out this reference ` ``
-will be rendered as {ref}`Check out this reference `.
-
-For more information about roles, see {ref}`syntax/roles`.
-
-:::{tip}
-Check out the [MyST-Markdown VS Code extension](https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight),
-for MyST extended syntax highlighting.
-:::
-
-(intro/config-options)=
-# Sphinx configuration options
-
-You can control the behaviour of the MyST parser in Sphinx by modifying your `conf.py` file.
-To do so, use the keywords beginning `myst_`.
-
-`````{list-table}
-:header-rows: 1
-
-* - Option
- - Default
- - Description
-* - `myst_commonmark_only`
- - `False`
- - If `True` convert text as strict CommonMark (all options below are then ignored). Note that strict CommonMark is unable to parse any directives, including the `toctree` directive, thus limiting MyST parser to single-page documentations. Use in conjunction with [sphinx-external-toc](https://github.com/executablebooks/sphinx-external-toc) Sphinx extension to counter this limitation.
-* - `myst_disable_syntax`
- - ()
- - List of markdown syntax elements to disable, see the [markdown-it parser guide](markdown_it:using).
-* - `myst_enable_extensions`
- - `["dollarmath"]`
- - Enable Markdown extensions, [see here](syntax-optional) for details.
-* - `myst_url_schemes`
- - `("http", "https", "mailto", "ftp")`
- - [URI schemes](https://en.wikipedia.org/wiki/List_of_URI_schemes) that will be recognised as external URLs in `[](scheme:loc)` syntax, or set `None` to recognise all.
- Other links will be resolved as internal cross-references.
-* - `myst_heading_anchors`
- - `None`
- - Enable auto-generated heading anchors, up to a maximum level, [see here](syntax/header-anchors) for details.
-* - `myst_heading_slug_func`
- - `None`
- - Use the specified function to auto-generate heading anchors, [see here](syntax/header-anchors) for details.
-* - `myst_substitutions`
- - `{}`
- - A mapping of keys to substitutions, used globally for all MyST documents when the "substitution" extension is enabled.
-* - `myst_html_meta`
- - `{}`
- - A mapping of keys to HTML metadata, used globally for all MyST documents. See [](syntax/html_meta).
-* - `myst_footnote_transition`
- - `True`
- - Place a transition before any footnotes.
-* - `myst_words_per_minute`
- - `200`
- - Reading speed used to calculate `` {sub-ref}`wordcount-minutes` ``
-`````
-
-List of extensions:
-
-- "amsmath": enable direct parsing of [amsmath](https://ctan.org/pkg/amsmath) LaTeX equations
-- "colon_fence": Enable code fences using `:::` delimiters, [see here](syntax/colon_fence) for details
-- "deflist"
-- "dollarmath": Enable parsing of dollar `$` and `$$` encapsulated math
-- "html_admonition": Convert `` elements to sphinx admonition nodes, see the [HTML admonition syntax](syntax/html-admonition) for details
-- "html_image": Convert HTML `
![]()
` elements to sphinx image nodes, see the [image syntax](syntax/images) for details
-- "linkify": automatically identify "bare" web URLs and add hyperlinks
-- "replacements": automatically convert some common typographic texts
-- "smartquotes": automatically convert standard quotations to their opening/closing variants
-- "substitution": substitute keys, see the [substitutions syntax](syntax/substitutions) for details
-- "tasklist": add check-boxes to the start of list items, see the [tasklist syntax](syntax/tasklists) for details
-
-Math specific, when `"dollarmath"` activated, see the [Math syntax](syntax/math) for more details:
-
-`````{list-table}
-:header-rows: 1
-
-* - Option
- - Default
- - Description
-* - `myst_dmath_double_inline`
- - `False`
- - Allow display math (i.e. `$$`) within an inline context
-* - `myst_dmath_allow_labels`
- - `True`
- - Parse `$$...$$ (label)` syntax
-* - `myst_dmath_allow_space`
- - `True`
- - If False then inline math will only be parsed if there are no initial/final spaces,
- e.g. `$a$` but not `$ a$` or `$a $`
-* - `myst_dmath_allow_digits`
- - `True`
- - If False then inline math will only be parsed if there are no initial/final digits,
- e.g. `$a$` but not `1$a$` or `$a$2` (this is useful for using `$` as currency)
-* - `myst_update_mathjax`
- - `True`
- - If using [sphinx.ext.mathjax](https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax) (the default) then `mathjax_config` will be updated to only process specific HTML classes.
-* - `myst_mathjax_classes`
- - `"tex2jax_process|mathjax_process|math"`
- - A regex for the HTML classes that MathJax will process
-`````
-
-## Disable markdown syntax for the parser
-
-If you'd like to either enable or disable custom markdown syntax, use `myst_disable_syntax`.
-Anything in this list will no longer be parsed by the MyST parser.
-
-For example, to disable the `emphasis` in-line syntax, use this configuration:
-
-```python
-myst_disable_syntax = ["emphasis"]
-```
-
-emphasis syntax will now be disabled. For example, the following will be rendered
-*without* any italics:
-
-```md
-*emphasis is now disabled*
-```
-
-For a list of all the syntax elements you can disable, see the [markdown-it parser guide](markdown_it:using).
diff --git a/example-include.md b/example-include.md
index dd535173..4d23ee51 100644
--- a/example-include.md
+++ b/example-include.md
@@ -1,2 +1,2 @@
-[Used in how-to](docs/using/howto.md)
+[Used in how-to](docs/sphinx/use.md)

diff --git a/myst_parser/mocking.py b/myst_parser/mocking.py
index 0ae0bb27..e4889661 100644
--- a/myst_parser/mocking.py
+++ b/myst_parser/mocking.py
@@ -267,7 +267,7 @@ def __getattr__(self, name: str):
msg = (
f"{cls} has not yet implemented attribute '{name}'. "
"You can parse RST directly via the `{eval-rst}` directive: "
- "https://myst-parser.readthedocs.io/en/latest/using/syntax.html#how-directives-parse-content" # noqa: E501
+ "https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#how-directives-parse-content" # noqa: E501
)
else:
# The requested `name` is not a docutils Body element
diff --git a/setup.cfg b/setup.cfg
index e0d0ed74..9e4850dd 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -63,6 +63,8 @@ rtd =
sphinx-book-theme~=0.1.0
sphinx-panels~=0.5.2
sphinxcontrib-bibtex~=2.1
+ sphinxext-rediraffe~=0.2
+ sphinxcontrib.mermaid~=0.6.3
sphinxext-opengraph~=0.4.2
# left in for back-compatability
sphinx =