GFM Options

GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown that is currently supported for user content on and GitHub Enterprise. To learn about GFM see

See the GFM format user guide for more details on creating GFM output with Quarto.

format: gfm

Title & Author


Document title


Document date


Author or authors of the document


Order for document when included in a website automatic sidebar menu.

Format Options


Method use to render math in HTML output (plain, webtex, gladtex, mathml, mathjax, katex).

See the Pandoc documentation on Math Rendering in HTML for additional details.


Specify a prefix to be added to all identifiers and internal links in HTML and DocBook output, and to footnote numbers in Markdown and Haddock output. This is useful for preventing duplicate identifiers when generating fragments to be included in other pages.


Enable and disable extensions for markdown output (e.g. “+emoji”)


Specify whether to use atx (#-prefixed) or setext (underlined) headings for level 1 and 2 headings (atx or setext).


Preserve the original YAML front matter in rendered markdown


A semver version range describing the supported quarto versions for this document or project.


  • >= 1.1.0: Require at least quarto version 1.1
  • 1.*: Require any quarto versions whose major version number is 1

The mode to use when previewing this document. To disable any special previewing features, pass raw as the preview-mode.

Table of Contents


Include an automatically generated table of contents (or, in the case of latex, context, docx, odt, opendocument, rst, or ms, an instruction to create one) in the output document. This option has no effect if standalone is false.

Note that if you are producing a PDF via ms, the table of contents will appear at the beginning of the document, before the title. If you would prefer it to be at the end of the document, use the option pdf-engine-opt: --no-toc-relocation.


Specify the number of section levels to include in the table of contents. The default is 3



Number section headings rendered output. By default, sections are not numbered. Sections with class .unnumbered will never be numbered, even if number-sections is specified.


Offset for section headings in output (offsets are 0 by default) The first number is added to the section number for top-level headings, the second for second-level headings, and so on. So, for example, if you want the first top-level heading in your document to be numbered “6”, specify number-offset: 5. If your document starts with a level-2 heading which you want to be numbered “1.5”, specify number-offset: [1,4]. Implies number-sections


Shift heading levels by a positive or negative integer. For example, with shift-heading-level-by: -1, level 2 headings become level 1 headings, and level 3 headings become level 2 headings. Headings cannot have a level less than 1, so a heading that would be shifted below level 1 becomes a regular paragraph. Exception: with a shift of -N, a level-N heading at the beginning of the document replaces the metadata title.



Properties of the grid system used to layout Quarto HTML pages.



The style to use when displaying code annotations. Set this value to false to hide code annotations.


Execution options should be specified within the execute key. For example:

  echo: false
  warning: false

Evaluate code cells (if false just echos the code into output).

  • true (default): evaluate code cell
  • false: don’t evaluate code cell
  • [...]: A list of positive or negative line numbers to selectively include or exclude lines (explicit inclusion/excusion of lines is available only when using the knitr engine)

Include cell source code in rendered output.

  • true (default): include source code in output
  • false: do not include source code in output
  • fenced: in addition to echoing, include the cell delimiter as part of the output.
  • [...]: A list of positive or negative line numbers to selectively include or exclude lines (explicit inclusion/excusion of lines is available only when using the knitr engine)

Include the results of executing the code in the output. Possible values:

  • true: Include results.
  • false: Do not include results.
  • asis: Treat output as raw markdown with no enclosing containers.

Include warnings in rendered output.


Include errors in the output (note that this implies that errors executing code will not halt processing of the document).


Catch all for preventing any output (code or results) from being included in output.


Cache results of computations (using the knitr cache for R documents, and Jupyter Cache for Jupyter documents).

Note that cache invalidation is triggered by changes in chunk source code (or other cache attributes you’ve defined).

  • true: Cache results
  • false: Do not cache results
  • refresh: Force a refresh of the cache even if has not been otherwise invalidated.

Control the re-use of previous computational output when rendering.

  • true: Never recompute previously generated computational output during a global project render
  • false (default): Recompute previously generated computational output
  • auto: Re-compute previously generated computational output only in case their source file changes



Default width for figures generated by Matplotlib or R graphics.

Note that with the Jupyter engine, this option has no effect when provided at the cell level; it can only be provided with document or project metadata.


Default height for figures generated by Matplotlib or R graphics.

Note that with the Jupyter engine, this option has no effect when provided at the cell level; it can only be provided with document or project metadata.


Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf)


Default DPI for figures generated by Matplotlib or R graphics.

Note that with the Jupyter engine, this option has no effect when provided at the cell level; it can only be provided with document or project metadata.


The aspect ratio of the plot, i.e., the ratio of height/width. When fig-asp is specified, the height of a plot (the option fig-height) is calculated from fig-width * fig-asp.

The fig-asp option is only available within the knitr engine.



Apply explicit table column widths for markdown grid tables and pipe tables that are more than columns characters wide (72 by default).

Some formats (e.g. HTML) do an excellent job automatically sizing table columns and so don’t benefit much from column width specifications. Other formats (e.g. LaTeX) require table column sizes in order to correctly flow longer cell content (this is a major reason why tables > 72 columns wide are assigned explicit widths by Pandoc).

This can be specified as:

  • auto: Apply markdown table column widths except when there is a hyperlink in the table (which tends to throw off automatic calculation of column widths based on the markdown text width of cells). (auto is the default for HTML output formats)

  • true: Always apply markdown table widths (true is the default for all non-HTML formats)

  • false: Never apply markdown table widths.

  • An array of numbers (e.g. [40, 30, 30]): Array of explicit width percentages.


Method used to print tables in Knitr engine documents:

  • default: Use the default S3 method for the data frame.
  • kable: Markdown table using the knitr::kable() function.
  • tibble: Plain text table using the tibble package.
  • paged: HTML table with paging for row and column overflow.

The default printing method is kable.



Document bibliography (BibTeX or CSL). May be a single file or a list of files


Citation Style Language file to use for formatting references.


Turn on built-in citation processing. To use this feature, you will need to have a document containing citations and a source of bibliographic data: either an external bibliography file or a list of references in the document’s YAML metadata. You can optionally also include a csl citation style file.


JSON file containing abbreviations of journals that should be used in formatted bibliographies when form="short" is specified. The format of the file can be illustrated with an example:

{ "default": {
    "container-title": {
      "Lloyd's Law Reports": "Lloyd's Rep",
      "Estates Gazette": "EG",
      "Scots Law Times": "SLT"



Specify location for footnotes. Also controls the location of references, if reference-links is set.

  • block: Place at end of current top-level block
  • section: Place at end of current section
  • margin: Place at the margin
  • document: Place at end of document



Citation information for the document itself specified as CSL YAML in the document front matter.

For more on supported options, see Citation Metadata.



Identifies the main language of the document using IETF language tags (following the BCP 47 standard), such as en or en-GB. The Language subtag lookup tool can look up or verify these tags.

This affects most formats, and controls hyphenation in PDF output when using LaTeX (through babel and polyglossia) or ConTeXt.


YAML file containing custom language translations


The base script direction for the document (rtl or ltr).

For bidirectional documents, native pandoc spans and divs with the dir attribute can be used to override the base direction in some output formats. This may not always be necessary if the final renderer (e.g. the browser, when generating HTML) supports the [Unicode Bidirectional Algorithm].

When using LaTeX for bidirectional documents, only the xelatex engine is fully supported (use --pdf-engine=xelatex).



Include contents at the beginning of the document body (e.g. after the <body> tag in HTML, or the \begin{document} command in LaTeX).

A string value or an object with key “file” indicates a filename whose contents are to be included

An object with key “text” indicates textual content to be included


Include content at the end of the document body immediately after the markdown content. While it will be included before the closing </body> tag in HTML and the \end{document} command in LaTeX, this option refers to the end of the markdown content.

A string value or an object with key “file” indicates a filename whose contents are to be included

An object with key “text” indicates textual content to be included


Include contents at the end of the header. This can be used, for example, to include special CSS or JavaScript in HTML documents.

A string value or an object with key “file” indicates a filename whose contents are to be included

An object with key “text” indicates textual content to be included


Read metadata from the supplied YAML (or JSON) files. This option can be used with every input format, but string scalars in the YAML file will always be parsed as Markdown. Generally, the input will be handled the same as in YAML metadata blocks. Values in files specified later in the list will be preferred over those specified earlier. Metadata values specified inside the document, or by using -M, overwrite values specified with this option.



Format to read from. Extensions can be individually enabled or disabled by appending +EXTENSION or -EXTENSION to the format name (e.g. markdown+emoji).


Output file to write to


Extension to use for generated output file


Use the specified file as a custom template for the generated document.


Include the specified files as partials accessible to the template for the generated content.


Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment)


Specify executables or Lua scripts to be used as a filter transforming the pandoc AST after the input is parsed and before the output is written.


Specify Lua scripts that implement shortcode handlers


Keep the markdown file generated by executing code


Keep the notebook file generated from executing code.


Filters to pre-process ipynb files before rendering to markdown


Extract images and other media contained in or linked from the source document to the path DIR, creating it if necessary, and adjust the images references in the document so they point to the extracted files. Media are downloaded, read from the file system, or extracted from a binary container (e.g. docx), as needed. The original file paths are used if they are relative paths not containing … Otherwise filenames are constructed from the SHA1 hash of the contents.


List of paths to search for images and other resources.


Specify a default extension to use when image paths/URLs have no extension. This allows you to use the same source for formats that require different kinds of images. Currently this option only affects the Markdown and LaTeX readers.


Specifies a custom abbreviations file, with abbreviations one to a line. This list is used when reading Markdown input: strings found in this list will be followed by a nonbreaking space, and the period will not produce sentence-ending space in formats like LaTeX. The strings may not contain spaces.


Specify the default dpi (dots per inch) value for conversion from pixels to inch/ centimeters and vice versa. (Technically, the correct term would be ppi: pixels per inch.) The default is 96. When images contain information about dpi internally, the encoded value is used instead of the default specified by this option.

Text Output


Determine how text is wrapped in the output (the source code, not the rendered version).

  • auto (default): Pandoc will attempt to wrap lines to the column width specified by columns (default 72).
  • none: Pandoc will not wrap lines at all.
  • preserve: Pandoc will attempt to preserve the wrapping from the source document. Where there are nonsemantic newlines in the source, there will be nonsemantic newlines in the output as well.

Specify length of lines in characters. This affects text wrapping in generated source code (see wrap). It also affects calculation of column widths for plain text tables.


Specify the number of spaces per tab (default is 4). Note that tabs within normal textual input are always converted to spaces. Tabs within code are also converted, however this can be disabled with preserve-tabs: false.


Preserve tabs within code instead of converting them to spaces. (By default, pandoc converts tabs to spaces before parsing its input.) Note that this will only affect tabs in literal code spans and code blocks. Tabs in regular text are always treated as spaces.


Manually specify line endings:

  • crlf: Use Windows line endings
  • lf: Use macOS/Linux/UNIX line endings
  • native (default): Use line endings appropriate to the OS on which pandoc is being run).

Strip out HTML comments in the Markdown source, rather than passing them on to Markdown, Textile or HTML output as raw HTML. This does not apply to HTML comments inside raw HTML blocks when the markdown_in_html_blocks extension is not set.


Use only ASCII characters in output. Currently supported for XML and HTML formats (which use entities instead of UTF-8 when this option is selected), CommonMark, gfm, and Markdown (which use entities), roff ms (which use hexadecimal escapes), and to a limited degree LaTeX (which uses standard commands for accented characters when possible). roff man output uses ASCII by default.