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 type | Learn more |
---|---|
pdf | Scientific PDFs |
tex | Scientific PDFs |
typst | Scientific PDFs |
JATS | Working with JATS |
Microsoft Word | Microsoft Word |
CITATION.cff | Exporting CITATION.cff |
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 anddocx
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.
Table 4:Frontmatter export definitions
field | description |
---|---|
id | a string - a local identifier that can be used to reference the export |
format | one of pdf (built with or Typst, depending on the template), tex (raw files), pdf+tex (both PDF and raw files) typst (raw Typst files and built PDF file), docx , md , jats , or meca |
template | a 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. |
output | a string - export output filename with a valid extension or destination folder |
zip | a boolean - if true , zip the output - only applies for multi-file exports tex , pdf+tex and typst . |
articles | a 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. |
toc | a string - path to jupyterbook _toc.yml file - may be used as an alternative to listing articles |
sub_articles | a list of strings - path(s) to sub-articles for jats export |
Split your document across multiple content files¶
When writing longer documents like manuscripts, it’s common to write your document in multiple parts and then stitch them together into a single narrative.
You can accomplish this in MyST with the {include}
directive.
See The {include}
directive for more information.