Skip to article content

You may define desired static exports in page or project frontmatter. In the export object, you may specify a filename, format, and/or template, as well as the article(s) you wish to include in your export. You may also provide any additional options required by your template in the export object.

Types of documents you can export

Below are supported export types and links to documentation for further reading:

Table 1:Frontmatter Export Formats

Export typeLearn more
pdfScientific PDFs
texScientific PDFs
typstScientific PDFs
JATSWorking with JATS
Microsoft WordMicrosoft Word

Building Exports

After defining exports in your frontmatter, you may build them with the myst build command, by default this only builds the site. You can configure the CLI command in a number of ways:

myst build --all
Build all exports in the project
myst build --pdf --docx
Build pdf (LaTeX or Typst) exports and docx in the project
myst build my-paper.md
Build all exports in a specific page
myst build my-paper.md --pdf
Build all pdf exports in a specific page

Export Configuration

The following table shows the available properties for each export. You must define at least one of format, output, or template for MyST to be able to perform your output. You may also specify a string instead of a full export object; this string will be inferred to be either the export format or the output filename. The table below is from Exports.

Frontmatter export definitions

fielddescription
ida string - a local identifier that can be used to reference the export
formatone of pdf (built with LaTeX\LaTeX or Typst, depending on the template), tex (raw LaTeX\LaTeX files), pdf+tex (both PDF and raw LaTeX\LaTeX files) typst (raw Typst files and built PDF file), docx, md, jats, or meca
templatea string - name of an existing MyST template or a local path to a template folder. Templates are only available for pdf, tex, typst, and docx formats.
outputa string - export output filename with a valid extension or destination folder
zipa boolean - if true, zip the output - only applies for multi-file exports tex, pdf+tex and typst.
articlesa list of strings - path(s) to articles to include in your export - this is required for exports defined in project frontmatter; for page frontmatter, the default article will be the page itself. Not all exports currently support multiple articles.
toca string - path to jupyterbook _toc.yml file - may be used as an alternative to listing articles
sub_articlesa list of strings - path(s) to sub-articles for jats export
MyST MarkdownMyST Markdown
Community-driven tools for the future of technical communication and publication