Configuration
Contents
Configuration#
MyST parsing can be configured at both the global and individual document level, with the most specific configuration taking precedence.
Global configuration#
Overriding the default configuration at the global level is achieved by specifying variables in the Sphinx conf.py
file.
All myst_parser
global configuration variables are prefixed with myst_
, e.g.
myst_enable_extensions = ["deflist"]
See also
Configuration in Docutils, in the Single Page Builds section.
Name |
Type |
Description |
---|---|---|
|
|
Use strict CommonMark parser (default: |
|
|
Use strict Github Flavoured Markdown parser (default: |
|
|
Enable syntax extensions (default: |
|
|
Disable Commonmark syntax elements (default: |
|
|
Parse all links as simple hyperlinks (default: |
|
|
URL scheme prefixes identified as external links (default: |
|
|
Sphinx domain names to search in for link references (default: |
|
|
Syntax highlight code blocks with pygments (default: |
|
|
Add line numbers to code blocks with these languages (default: |
|
|
Convert a |
|
|
Heading level depth to assign HTML anchors (default: |
|
|
Function for creating heading anchors (default: |
|
|
HTML meta tags (default: |
|
|
Place a transition before any footnotes (default: |
|
|
For reading speed calculations (default: |
Extensions#
Configuration specific to syntax extensions:
Name |
Type |
Description |
---|---|---|
|
|
substitutions: Substitutions mapping (default: |
|
|
substitutions: Substitution delimiters (default: |
|
|
linkify: Recognise URLs without schema prefixes (default: |
|
|
dollarmath: Parse |
|
|
dollarmath: Allow initial/final spaces in |
|
|
dollarmath: Allow initial/final digits |
|
|
dollarmath: Parse inline |
|
|
dollarmath: Update sphinx.ext.mathjax configuration to ignore |
|
|
dollarmath: MathJax classes to add to math HTML (default: |
Local configuration#
New in version 0.18.
The following configuration variables are available at the document level.
These can be set in the document front matter, under the myst
key, e.g.
---
myst:
enable_extensions: ["deflist"]
---
Name |
Type |
Description |
---|---|---|
|
|
Use strict CommonMark parser (default: |
|
|
Use strict Github Flavoured Markdown parser (default: |
|
|
Enable syntax extensions (default: |
|
|
Disable Commonmark syntax elements (default: |
|
|
Parse all links as simple hyperlinks (default: |
|
|
URL scheme prefixes identified as external links (default: |
|
|
Sphinx domain names to search in for link references (default: |
|
|
Syntax highlight code blocks with pygments (default: |
|
|
Add line numbers to code blocks with these languages (default: |
|
|
Convert a |
|
|
Heading level depth to assign HTML anchors (default: |
|
|
HTML meta tags (default: |
|
|
Place a transition before any footnotes (default: |
|
|
For reading speed calculations (default: |
Extensions#
Configuration specific to syntax extensions:
Name |
Type |
Description |
---|---|---|
|
|
substitutions: Substitutions mapping (default: |
|
|
substitutions: Substitution delimiters (default: |
|
|
linkify: Recognise URLs without schema prefixes (default: |
|
|
dollarmath: Parse |
|
|
dollarmath: Allow initial/final spaces in |
|
|
dollarmath: Allow initial/final digits |
|
|
dollarmath: Parse inline |
List of syntax extensions#
Full details in the Syntax Extensions section.
- amsmath
enable direct parsing of amsmath LaTeX equations
- colon_fence
Enable code fences using
:::
delimiters, see here for details- deflist
Enable definition lists, see here for details
- dollarmath
Enable parsing of dollar
$
and$$
encapsulated math- fieldlist
Enable field lists, see here for details
- html_admonition
Convert
<div class="admonition">
elements to sphinx admonition nodes, see the HTML admonition syntax for details- html_image
Convert HTML
<img>
elements to sphinx image nodes, see here 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
- strikethrough
Enable strikethrough syntax, see here for details
- substitution
Substitute keys, see here for details
- tasklist
Add check-boxes to the start of list items, see here for details