MyST Markdown

website·Indexed 35 days ago

https://mystmd.org

A flavor of Markdown designed for technical and scientific documentation. The MyST stack includes a build process, parsing mechanisms, and an Abstract Syntax Tree (AST) used to render specialized components via directives and roles, such as admonitions, code-cells, and bibliographies. It supports plugins, custom themes, and exports to formats including LaTeX, Word, and Typst, with deployment options for GitHub and GitLab Pages.

Tokens
79.6K
Snippets
502
Records
693
Agent score
73%

What's inside MyST

  1. Overview of MyST Transforms plugins

    MyST Transforms provides a suite of plugins to manipulate and clean the Abstract Syntax Tree (AST) of a document before rendering. Key transformations include:

    • Admonitions: Adds headers (e.g., 'Note', 'Important') to callouts; can replace headers with the first bold paragraph.
    • Blocks: Prevents nested blocks within a document.
    • Blockquotes: Converts attributed blockquotes (single list items) into figures of kind: quote with the attribution as a caption.
    • Caption: Ensures figure captions are wrapped in paragraphs.
    • Code: Audits code blocks for language specifications, provides defaults, and normalizes kernel-like specifiers (e.g., IPython3) to python.
    • CodeBlock: Preserves captions and references for code blocks located inside figures.
    • Footnotes: Extracts footnote definitions into a reference object.
    • HTML: Parses and replaces the contents of HTML nodes.
    • HTML Ids: Generates valid HTML IDs for referenceable nodes (must start with a letter, no spaces or special characters).
    • Images: Automatically populates missing image alt text using the caption.
    • Keys: Assigns unique identifiers to nodes for rendering and tracking (non-persistent across builds).
    • Math: Uses KaTeX for rendering and generates math-related errors/warnings.
    • Math Label: Strips \label and simple equation environments from LaTeX and places them directly in the AST.
    • MyST Cleanup: Removes wrapper nodes like mystDirective and mystRole and lifts children nodes.
    • Targets: Propagates targets (e.g., (my-id)=) to the subsequent node and adds HTML-friendly identifiers to headings.
  2. Overview of MyST and CommonMark support

    MyST (Markedly Structured Text) is a superset of CommonMark Markdown, designed for creating publishable computational documents. It implements and extends mdast (Markdown Abstract Syntax Tree), which is part of the unifiedjs community, allowing for standardized exporting and transforming of content.
  3. Overview of MyST Widgets

    MyST Widgets allow the inclusion of self-contained JavaScript applets into MyST documents. They follow the anywidget specification, meaning widgets written for Jupyter anywidget are compatible with MyST sites. Each widget consists of a mandatory JavaScript module and an optional stylesheet. The widget's content is rendered into a Shadow DOM, isolating it from the rest of the page's HTML and CSS.
  4. Overview of MyST Markdown

    MyST Markdown (Markedly Structured Text) is a markup language that extends standard Markdown to support the creation of publication-quality documents, books, presentations, and websites. It is designed for scientific and technical communication, drawing inspiration from the Sphinx and reStructuredText (RST) ecosystems to enable rich content generation.
  5. Overview of MyST Markdown

    MyST is a superset of CommonMark designed for publication-quality technical and scientific documents. It is inspired by the Sphinx and reStructuredText (RST) ecosystems. It extends standard Markdown with 'directives' (block-level extensions) and 'roles' (inline extensions) to support complex elements like callout panels, tabs, figures, and citations.
  6. Overview of jtex

    jtex is a command line tool (CLI) used to render LaTeX documents from Jinja-style templates. It utilizes nunjucks (a JavaScript port of Jinja) as its template engine, featuring a modified environment and syntax specifically designed to be compatible with LaTeX markup. It is primarily used alongside myst and curvenote CLI tools to compile Markdown into LaTeX for templating.
  7. Overview of MyST Markdown Tools (`mystmd`)

    mystmd is a JavaScript-based parser and command-line tool designed for scientific communication. It parses MyST Markdown and Jupyter Notebooks into a standardized Abstract Syntax Tree (AST) following the MyST Spec. It can render this content into interactive React-based websites, PDFs (with templates for 400+ journals), LaTeX, Microsoft Word, and JATS XML.
  8. Overview of MyST goals and target audience

    MyST provides composable tools and standards for individuals communicating technical and computational narratives. It specifically addresses the gap between data exploration tools (like Jupyter Notebooks) and authoring/publishing tools, aiming to create a unified workflow for data scientists and the scholarly community. Key goals include reducing friction in re-using ideas/data, breaking the reliance on print-based formats (like PDF) in scholarly publishing, and integrating computation directly into scholarship to improve reproducibility.
  9. Overview of the MyST Specification

    MyST (Markedly Structured Text) is a specification designed for creating publication-quality, computational documents using Markdown. It is primarily used by JupyterBook to create educational textbooks and tutorials. The specification consists of three main components: a markup language, an abstract syntax tree (AST), and a suite of unit tests for implementation validation.
  10. Overview of MyST (Markedly Structured Text)

    MyST is a superset of CommonMark designed to create publication-quality documents. It incorporates extensibility from the Sphinx and ReStructured Text (RST) ecosystems, primarily introducing 'directives' for block-level extensions and 'roles' for inline extensions.
  11. Overview of MyST Markdown plugin types

    Plugins in MyST Markdown are executable code that modify the MyST AST during the build process. There are four primary types of plugins:

    • Directives: Block-level extension points (e.g., creating a :::{proof} block for numbered proofs).
    • Roles: Inline extension points (e.g., creating a {si} role for units like {si}4 kg per meter squared`).
    • Transforms: Modify the document source during rendering. These can be used to add metadata, transform links to DOIs, or aggregate information across multiple pages (e.g., a site-wide glossary).
    • Renderers (Planned): Add specific handlers for nodes when exporting to formats like HTML, React, Microsoft Word, or LaTeX.
  12. Overview of MyST Markdown and the MyST Ecosystem

    MyST (Markedly Structured Text) is a flavor of Markdown designed for scientific and technical writing. It extends standard Markdown to support features like extensions, roles, directives, and cross-references, allowing content to be parsed by a MyST Document Engine. It serves as a standard syntax across the MyST ecosystem and was originally created for Jupyter Book via the MyST Parser for Sphinx.