page_content
stringlengths
0
33.5k
metadata
dict
The Groff (GNU troff) man page document formats consists of plain text mixed with formatting commands that produce ASCII/UTF8 for display at the terminal. Learn more about Groff at https://www.gnu.org/software/groff/groff.html. format: man Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options section The section number in man pages. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Formatting adjusting Adjusts text to the left, right, center, or both margins (l, r, c, or b). hyphenate Whether to hyphenate text at line breaks even in words that do not contain hyphens if it is necessary to do so to lay out words on a line without excessive spacing Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 footer The footer for man pages. header The header for man pages. metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/man.html", "source": "https://quarto.org/docs/reference/formats/man.html" }
FictionBook is an open XML-based e-book format. You can learn more about FictionBook at https://en.wikipedia.org/wiki/FictionBook. format: fb2 Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/fb2.html", "source": "https://quarto.org/docs/reference/formats/fb2.html" }
MS Word is the word processor included with Microsoft Office. Word uses the OpenXML document format, which you can learn more about at https://en.wikipedia.org/wiki/Office_Open_XML. See the MS Word format user guide for more details on creating MS Word output with Quarto. format: docx Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options reference-doc Use the specified file as a style reference in producing a docx, pptx, or odt file. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 toc-title The title used for the table of contents. Numbering number-sections 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. number-depth By default, all headings in your document create a numbered section. You customize numbering depth using the number-depth option. For example, to only number sections immediately below the chapter level, use this: number-depth: 1 number-offset 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-level-by 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. Layout page-width Target page width for output (used to compute columns widths for layout divs). Defaults to 6.5 inches, which corresponds to default letter page settings in docx and odt. grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. highlight-style Specifies the coloring style to be used in highlighted source code. Instead of a STYLE name, a JSON file with extension .theme may be supplied. This will be parsed as a KDE syntax highlighting theme and (if valid) used as the highlighting style. syntax-definitions KDE language syntax definition files (XML) indented-code-classes Specify classes to use for all indented code blocks Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-align Figure horizontal alignment (default, left, right, or center) fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } link-citations If true, citations will be hyperlinked to the corresponding bibliography entries (for author-date and numerical styles only). Defaults to false. link-bibliography If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks. (If an entry contains a DOI, PMCID, PMID, or URL, but none of these fields are rendered by the style, then the title, or in the absence of a title the whole entry, will be hyperlinked.) Defaults to true. notes-after-punctuation If true (the default for note styles), Quarto (via Pandoc) will put footnote references or superscripted numerical citations after following punctuation. For example, if the source contains blah blah (jones99?)., the result will look like blah blah.[^1], with the note moved after the period and the space collapsed. If false, the space will still be collapsed, but the footnote will not be moved after the punctuation. The option may also be used in numerical styles that use superscripts for citation numbers (but for these styles the default is not to move the citation). Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes metadata-files 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. Metadata subject The document subject description The document description. Some applications show this as Comments metadata. category The document category. Rendering from 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 Output file to write to output-ext Extension to use for generated output file standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/docx.html", "source": "https://quarto.org/docs/reference/formats/docx.html" }
HTML is a markup language used for structuring and presenting content on the web. To learn more about HTML see https://en.wikipedia.org/wiki/HTML5. See the HTML format user guide for more details on creating HTML output with Quarto. format: html Title & Author title Document title subtitle Identifies the subtitle of the document. date Document date date-modified Document date modified author Author or authors of the document abstract Summary of document abstract-title Title used to label document abstract doi Displays the document Digital Object Identifier in the header. order Order for document when included in a website automatic sidebar menu. Format Options theme Theme name, theme scss file, or a mix of both. minimal Disables the built in html features like theming, anchor sections, code block behavior, and more. css One or more CSS style sheets. anchor-sections Enables hover over a section title to see an anchor link. smooth-scroll Enables smooth scrolling within the page. html-math-method 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. section-divs Wrap sections in <section> tags and attach identifiers to the enclosing <section> rather than the heading itself. identifier-prefix 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. email-obfuscation Specify a method for obfuscating mailto: links in HTML documents. javascript: Obfuscate links using JavaScript. references: Obfuscate links by printing their letters as decimal or hexadecimal character references. none (default): Do not obfuscate links. html-q-tags Use <q> tags for quotes in HTML. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 toc-location Location for table of contents (body, left, or right (default)). toc-title The title used for the table of contents. toc-expand Specifies the depth of items in the table of contents that should be displayed as expanded in HTML output. Use true to expand all or false to collapse all. Numbering number-sections 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. number-depth By default, all headings in your document create a numbered section. You customize numbering depth using the number-depth option. For example, to only number sections immediately below the chapter level, use this: number-depth: 1 number-offset 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-level-by 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. Fonts mainfont For HTML output, sets the CSS font-family on the HTML element. For LaTeX output, the main font family for use with xelatex or lualatex. Takes the name of any system font, using the fontspec package. For ConTeXt output, the main font family. Use the name of any system font. See ConTeXt Fonts for more information. monofont For HTML output, sets the CSS font-family property on code elements. For PowerPoint output, sets the font used for code. For LaTeX output, the monospace font family for use with xelatex or lualatex: take the name of any system font, using the fontspec package. For ConTeXt output, the monspace font family. Use the name of any system font. See ConTeXt Fonts for more information. fontsize For HTML output, sets the base CSS font-size property. For LaTeX and ConTeXt output, sets the font size for the document body text. linestretch For HTML output sets the CSS line-height property on the html element, which is preferred to be unitless. For LaTeX output, adjusts line spacing using the setspace package, e.g. 1.25, 1.5. Colors fontcolor Sets the CSS color property. linkcolor For HTML output, sets the CSS color property on all links. For LaTeX output, The color used for internal links using color options allowed by xcolor, including the dvipsnames, svgnames, and x11names lists. For ConTeXt output, sets the color for both external links and links within the document. monobackgroundcolor Sets the CSS background-color property on code elements and adds extra padding. backgroundcolor Sets the CSS background-color property on the html element. Layout cap-location Where to place figure and table captions (top, bottom, or margin) fig-cap-location Where to place figure captions (top, bottom, or margin) tbl-cap-location Where to place table captions (top, bottom, or margin) classoption For LaTeX/PDF output, the options set for the document class. For HTML output using KaTeX, you can render display math equations flush left using classoption: fleqn page-layout The page layout to use for this document (article, full, or custom) grid Properties of the grid system used to layout Quarto HTML pages. appendix-style The layout of the appendix for this document (none, plain, or default). To completely disable any styling of the appendix, choose the appendix style none. For minimal styling, choose plain. appendix-cite-as Controls the formats which are provided in the citation section of the appendix. Use false to disable the display of the ‘cite as’ appendix. Pass one or more of display or bibtex to enable that format in ‘cite as’ appendix. title-block-style The layout of the title block for this document (none, plain, or default). To completely disable any styling of the title block, choose the style none. For minimal styling, choose plain. title-block-banner Applies a banner style treatment for the title block. You may specify one of the following values: true Will enable the banner style display and automatically select a background color based upon the theme. <css color value> If you provide a CSS color value, the banner will be enabled and the background color set to the provided CSS color. <path> If you provide the path to a file, the banner will be enabled and the background image will be set to the file path. See title-block-banner-color if you’d like to control the color of the title block banner text. title-block-banner-color Sets the color of text elements in a banner style title block. Use one of the following values: body | body-bg Will set the text color to the body text color or body background color, respectively. <css color value> If you provide a CSS color value, the text color will be set to the provided CSS color. title-block-categories Enables or disables the display of categories in the title block. max-width Adds a css max-width to the body Element. margin-left For HTML output, sets the margin-left property on the Body element. For LaTeX output, sets the left margin if geometry is not used (otherwise geometry overrides this value) For ConTeXt output, sets the left margin if layout is not used, otherwise layout overrides these. For wkhtmltopdf sets the left page margin. margin-right For HTML output, sets the margin-right property on the Body element. For LaTeX output, sets the right margin if geometry is not used (otherwise geometry overrides this value) For ConTeXt output, sets the right margin if layout is not used, otherwise layout overrides these. For wkhtmltopdf sets the right page margin. margin-top For HTML output, sets the margin-top property on the Body element. For LaTeX output, sets the top margin if geometry is not used (otherwise geometry overrides this value) For ConTeXt output, sets the top margin if layout is not used, otherwise layout overrides these. For wkhtmltopdf sets the top page margin. margin-bottom For HTML output, sets the margin-bottom property on the Body element. For LaTeX output, sets the bottom margin if geometry is not used (otherwise geometry overrides this value) For ConTeXt output, sets the bottom margin if layout is not used, otherwise layout overrides these. For wkhtmltopdf sets the bottom page margin. Code code-fold Collapse code into an HTML <details> tag so the user can display it on-demand. true: collapse code false (default): do not collapse code show: use the <details> tag, but show the expanded code initially. code-summary Summary text to use for code blocks collapsed using code-fold code-overflow Choose how to handle code overflow, when code lines are too wide for their container. One of: scroll wrap code-line-numbers Include line numbers in code block output (true or false). For revealjs output only, you can also specify a string to highlight specific lines (and/or animate between sets of highlighted lines). Sets of lines are denoted with commas: 3,4,5 1,10,12 Ranges can be denoted with dashes and combined with commas: 1-3,5 5-10,12,14 Finally, animation steps are separated by |: 1-3|1-3,5 first shows 1-3, then 1-3,5 |5|5-10,12 first shows no numbering, then 5, then lines 5-10 and 12 code-copy Enable a code copy icon for code blocks. true: Always show the icon false: Never show the icon hover (default): Show the icon when the mouse hovers over the code block code-link Enables hyper-linking of functions within code blocks to their online documentation. Code linking is currently implemented only for the knitr engine (via the downlit package). A limitation of downlit currently prevents code linking if code-line-numbers is also true. code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. code-tools Include a code tools menu (for hiding and showing code). Use true or false to enable or disable the standard code tools menu. Specify sub-properties source, toggle, and caption to customize the behavior and appearnce of code tools. code-block-border-left Specifies to apply a left border on code blocks. Provide a hex color to specify that the border is enabled as well as the color of the border.= code-block-bg Specifies to apply a background color on code blocks. Provide a hex color to specify that the background color is enabled as well as the color of the background. highlight-style Specifies the coloring style to be used in highlighted source code. Instead of a STYLE name, a JSON file with extension .theme may be supplied. This will be parsed as a KDE syntax highlighting theme and (if valid) used as the highlighting style. syntax-definitions KDE language syntax definition files (XML) indented-code-classes Specify classes to use for all indented code blocks Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-align Figure horizontal alignment (default, left, right, or center) fig-cap-location Where to place figure captions (top, bottom, or margin) fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. fig-responsive Whether to make images in this document responsive. Tables tbl-colwidths 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. tbl-cap-location Where to place table captions (top, bottom, or margin) df-print 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. Links link-external-icon Show a special icon next to links that leave the current site. link-external-newwindow Open external links in a new browser window or tab (rather than navigating the current tab). link-external-filter A regular expression that can be used to determine whether a link is an internal link. For example, the following will treat links that start with http://www.quarto.org as internal links (and others will be considered external): ^(?:http:|https:)\/\/www\.quarto\.org\/custom format-links Controls whether links to other rendered formats are displayed in HTML output. Pass false to disable the display of format lengths or pass a list of format names for which you’d like links to be shown. notebook-links Controls the display of links to notebooks that provided embedded content or are created from documents. Specify false to disable linking to source Notebooks. Specify inline to show links to source notebooks beneath the content they provide. Specify global to show a set of global links to source notebooks. notebook-view Configures the HTML viewer for notebooks that provide embedded content. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citations-hover Enables a hover popup for citation that shows the reference information. citation-location Where citation information should be displayed (document or margin) citeproc 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. citation-abbreviations 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" } } } Footnotes footnotes-hover Enables a hover popup for footnotes that shows the footnote contents. reference-location 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 citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 resources Path (or glob) to files to publish with this document. metadata-files 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. Metadata keywords List of keywords to be included in the document metadata. copyright The copyright for this document, if any. license The license for this document, if any. Creative Commons licenses CC BY, CC BY-SA, CC BY-ND, CC BY-NC will automatically generate a license link in the document appendix. Other license text will be placed in the appendix verbatim. pagetitle Sets the title metadata for the document title-prefix Specify STRING as a prefix at the beginning of the title that appears in the HTML header (but not in the title as it appears at the beginning of the body) description-meta Sets the description metadata for the document author-meta Sets the author metadata for the document date-meta Sets the date metadata for the document Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) embed-resources Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. The resulting file should be “self-contained,” in the sense that it needs no external files and no net access to be displayed properly by a browser. This option works only with HTML output formats, including html4, html5, html+lhs, html5+lhs, s5, slidy, slideous, dzslides, and revealjs. Scripts, images, and stylesheets at absolute URLs will be downloaded; those at relative URLs will be sought relative to the working directory (if the first source file is local) or relative to the base URL (if the first source file is remote). Elements with the attribute data-external="1" will be left alone; the documents they link to will not be incorporated in the document. Limitation: resources that are loaded dynamically through JavaScript cannot be incorporated; as a result, some advanced features (e.g. zoom or speaker notes) may not work in an offline “self-contained” reveal.js slide show. self-contained Produce a standalone HTML file with no external dependencies. Note that this option has been deprecated in favor of embed-resources. self-contained-math Embed math libraries (e.g. MathJax) within self-contained output. Note that math libraries are not embedded by default because they are quite large and often time consuming to download. filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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. Website search Setting this to false prevents this document from being included in searches. aliases URLs that alias this document, when included in a website. image The path to a preview image for this content. By default, Quarto will use the image value from the site: metadata. If you provide an image, you may also optionally provide an image-width and image-height to improve the appearance of your Twitter Card. If image is not provided, Quarto will automatically attempt to locate a preview image. image-height The height of the preview image for this document. image-width The width of the preview image for this document. image-alt The alt text for preview image on this page. Text Output strip-comments 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. ascii 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/html.html", "source": "https://quarto.org/docs/reference/formats/html.html" }
AsciiDoc is a text document format for writing documentation, articles, and books, ebooks, slideshows, web pages, man pages and blogs. You can learn more about AsciiDoc at https://asciidoc.org/. format: asciidoc format: asciidoctor Asciidoc vs Asciidoctor Format Pandoc includes support for both the asciidoc and asciidoctor formats. The asciidoc format produces older style syntax that is no longer typically used, while the asciidoctor format produces the more current markdown syntax that is part of the formal AsciiDoc specification. In Quarto, both asciidoc and asciidoctor are aliases for the asciidoctor format. Title & Author title Document title date Document date author Author or authors of the document abstract Summary of document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Metadata keywords List of keywords to be included in the document metadata. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/asciidoc.html", "source": "https://quarto.org/docs/reference/formats/asciidoc.html" }
Markua is a markdown variant used by Leanpub. You can learn more about Markua at https://leanpub.com/markua/read. format: markua Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options identifier-prefix 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. variant Enable and disable extensions for markdown output (e.g. “+emoji”) markdown-headings Specify whether to use atx (#-prefixed) or setext (underlined) headings for level 1 and 2 headings (atx or setext). keep-yaml Preserve the original YAML front matter in rendered markdown quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Footnotes reference-location 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 citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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-comments 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. ascii 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/markdown/markua.html", "source": "https://quarto.org/docs/reference/formats/markdown/markua.html" }
You can provide citation data for Quarto documents in the document front matter. The citation options are based upon the Citation Style Language (CSL) specification for items, but as YAML (rather than XML). --- citation: type: article-journal container-title: ACM Transactions on Embedded Computing Systems volume: 21 issue: 2 issued: 2022-03 issn: 1539-9087 doi: 10.1145/3514174 --- Citation abstract Abstract of the item (e.g. the abstract of a journal article) author The author(s) of the item. doi Digital Object Identifier (e.g. “10.1128/AEM.02591-07”) references Resources related to the procedural history of a legal case or legislation; Can also be used to refer to the procedural history of other items (e.g.  “Conference canceled” for a presentation accepted as a conference that was subsequently canceled; details of a retraction or correction notice) title The primary title of the item.
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/metadata/citation.html", "source": "https://quarto.org/docs/reference/metadata/citation.html" }
Date Parsing When you write a date for Quarto document, Quarto will attempt to parse a date string by trying a number of standard forms before ultimately attempting to infer the date format. Quarto will try dates formatted as follows, in the following order: MM/dd/yyyy MM-dd-yyyy MM/dd/yy MM-dd-yy yyyy-MM-dd dd MM yyyy MM dd, yyyy YYYY-MM-DDTHH:mm:ssZ In addition, you may also provide date keywords, which will provide a dynamic date. Keyword Date today The current local date, with the time portion set to 0. now The current local date and time. last-modified The last modified date and time of the input file containing the date. Date Formatting When specifying a date format in Quarto, there are two ways to represent the format that you’d like. Using a Date Style You can specify a simple date style which will be used to format the date. For example: --- date: 03/07/2005 date-format: long --- Valid styles and examples of the formatted output are as follows: Style Description Example full A full date that includes the weekday name Monday, March 7, 2005 long A long date that includes a wide month name March 7, 2005 medium A medium date Mar 7, 2005 short A short date with a numeric month 3/7/05 iso A short date in ISO format 2005-03-07 Using a Date Format You can also specify a date format string that will be used to format the date. For example: --- date: 03/07/2005 date-format: "MMM D, YYYY" The permissible values in this string include: Format String Output Description YY 18 Two-digit year YYYY 2018 Four-digit year M 1-12 The month, beginning at 1 MM 01-12 The month, 2-digits MMM Jan-Dec The abbreviated month name MMMM January-December The full month name D 1-31 The day of the month DD 01-31 The day of the month, 2-digits d 0-6 The day of the week, with Sunday as 0 dd Su-Sa The min name of the day of the week ddd Sun-Sat The short name of the day of the week dddd Sunday-Saturday The name of the day of the week H 0-23 The hour HH 00-23 The hour, 2-digits h 1-12 The hour, 12-hour clock hh 01-12 The hour, 12-hour clock, 2-digits m 0-59 The minute mm 00-59 The minute, 2-digits s 0-59 The second ss 00-59 The second, 2-digits SSS 000-999 The millisecond, 3-digits Z +05:00 The offset from UTC, ±HH:mm ZZ +0500 The offset from UTC, ±HHmm A AM PM a am pm Q 1-4 Quarter Do 1st 2nd … 31st Day of Month with ordinal k 1-24 The hour, beginning at 1 kk 01-24 The hour, 2-digits, beginning at 1 X 1360013296 Unix Timestamp in second x 1360013296123 Unix Timestamp in millisecond w 1 2 … 52 53 Week of year ( dependent WeekOfYear plugin ) ww 01 02 … 52 53 Week of year, 2-digits ( dependent WeekOfYear plugin ) W 1 2 … 52 53 ISO Week of year ( dependent IsoWeek plugin ) WW 01 02 … 52 53 ISO Week of year, 2-digits ( dependent IsoWeek plugin ) wo 1st 2nd … 52nd 53rd Week of year with ordinal ( dependent WeekOfYear plugin ) gggg 2017 Week Year ( dependent WeekYear plugin ) GGGG 2017 ISO Week Year ( dependent IsoWeek plugin ) z EST Abbreviated named offset ( dependent Timezone plugin ) zzz Eastern Standard Time Unabbreviated named offset ( dependent Timezoneplugin ) To escape characters, wrap them in square brackets (e.g. [MM]). Example formats and outputs include: Format Output MMM D, YYYY Mar 7, 2005 DD/MM/YYYY 07/03/2005 [YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z] YYYYescape 2005-03-07T00:00:00-05:00Z YYYY-MM-DDTHH:mm:ssZ 2005-03-07T00:00:00-05:00 dddd MMM D, YYYY Monday Mar 7, 2005
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/dates.html", "source": "https://quarto.org/docs/reference/dates.html" }
Overview Use the docx format to create MS Word output. For example: --- title: "My Document" format: docx: toc: true number-sections: true highlight-style: github --- This example highlights a few of the options available for MS Word output. This document covers these and other options in detail. See the Word format reference for a complete list of all available options. To learn about creating custom templates for use with the docx format, see the article on Word Templates. Table of Contents Use the toc option to include an automatically generated table of contents in the output document. Use the toc-depth option to specify the number of section levels to include in the table of contents. The default is 3 (which means that level-1, 2, and 3 headings will be listed in the contents). For example: toc: true toc-depth: 2 You can customize the title used for the table of contents using the toc-title option: toc-title: Contents If you want to exclude a heading from the table of contents, add both the .unnumbered and .unlisted classes to it: ### More Options {.unnumbered .unlisted} Section Numbering Use the number-sections option to number section headings in the output document. For example: number-sections: true Use the number-depth option to specify the deepest level of heading to add numbers to (by default all headings are numbered). For example: number-depth: 3 To exclude an individual heading from numbering, add the .unnumbered class to it: ### More Options {.unnumbered} Syntax Highlighting Pandoc will automatically highlight syntax in fenced code blocks that are marked with a language name. For example: ```python 1 + 1 ``` Pandoc can provide syntax highlighting for over 140 different languages (see the output of quarto pandoc --list-highlight-languages for a list of all of them). If you want to provide the appearance of a highlighted code block for a language not supported, just use default as the language name. You can specify the code highlighting style using highlight-style and specifying one of the supported themes. Supported themes include: arrow, pygments, tango, espresso, zenburn, kate, monochrome, breezedark, haddock, atom-one, ayu, breeze, dracula, github, gruvbox, monokai, nord, oblivion, printing, radical, solarized, and vim. For example: highlight-style: github Highlighting themes can provide either a single highlighting definition or two definitions, one optimized for a light colored background and another optimized for a dark color background. When available, Quarto will automatically select the appropriate style based upon the code chunk background color’s darkness. You may always opt to specify the full name (e.g. atom-one-dark) to bypass this automatic behavior. By default, code is highlighted using the arrow theme, which is optimized for accessibility. Here are examples of the arrow light and dark themes: LightDark Code Annotation You can add annotations to lines of code in code blocks and executable code cells. See Code Annotation for full details.
{ "lastmod": "2023-07-05T19:35:15.703Z", "loc": "https://quarto.org/docs/output-formats/ms-word.html", "source": "https://quarto.org/docs/output-formats/ms-word.html" }
Overview Docusaurus is a popular markdown documentation system. Pages in Docusaurus websites are typically written in plain markdown, so don’t have a straightforward way to automatically and reproducibly incorporate computational output. Using the Quarto docusaurus-md format, you can incorporate computational output (e.g. R or Python code that produces plots) into Docusaurus websites. This article explains how. It’s important to note that many of the Quarto features related to theming, page layout, and navigation are not applicable when you are using Quarto with Docusaurus. Docusaurus has its own theming system, syntax highlighting, table of contents, page layout, navigational menus, and full text search. You’ll use Quarto to execute code and generate markdown that is rendered within the Docusaurus HTML publishing framework rather than Quarto’s own. Workflow The basic concept of using Quarto with Docusaurus is that you take computational markdown documents (.qmd) or Jupyter notebooks (.ipynb) and use them to generate plain markdown files (.md) that are rendered to HTML by Docusaurus. index.qmd   quarto =>   index.md   docusaurus =>   index.html The quarto render and quarto preview commands are used to transform .qmd or .ipynb files to Docusaurus compatible markdown (.md). The computational files are located in the same place you would also locate ordinary markdown files (e.g. the blog directory). After rendering, a plain .md file is written right alongside the computational document. This markdown file is then processed by Docusaurus. Live Preview The quarto preview command will automatically recognize when it is run from a directory that contains a Docusaurus website: Terminal cd my-docusaurus-website quarto preview This will automatically run docusaurus start on your behalf to bring up a local preview server. In addition, it will monitor the filesystem for changes to .qmd and .ipynb inputs and automatically re-render them to Docusaurus compatible .md files when they change. Note that this also works for the integrated Render/Preview command within the Quarto VS Code Extension. Rendering If you are not previewing and want to render all of the Quarto documents (.qmd) and notebooks (.ipynb) in your site, call quarto render from the root directory of the site: Terminal cd my-docusaurus-website quarto render Typically you’ll want to do a quarto render at the site level before you build the site for publishing: Terminal quarto render && npm run build You can also render individual documents or notebooks: Terminal quarto render blog/2022-07-26/hello-quarto/index.qmd If you have computationally expensive documents you may want to consider using Quarto’s freeze feature to only re-execute code when your document source code changes. Note that if aren’t ever rendering at the project level and just have individual files that you want to render with Quarto, you should specify the docusaurus-md format as follows: --- title: "My Blog Post" format: docusaurus-md --- Configuration While Quarto works well within a Docusaurus site that has no _quarto.yml project config file, you can add one if you want to customize the default behavior, add a bibliography, etc. For example, here is what a simple customized _quarto.yml file might look like: _quarto.yml project: type: docusaurus format: docusaurus-md: code-fold: true execute: warning: false biliography: references.lib It’s important to note that if you do provide an explicit _quarto.yml file you need to explicitly specify the project type (type: docusaurus) as shown above. External Directory You might decide that you prefer to keep all of your Quarto documents and/or notebooks in their own directory, separate from the Docusaurus website. In this configuration you would mirror the directory structure of your site in the Quarto directory, and then set the output-dir in the project file to point to the Docusaurus directory. For example: _quarto.yml project: type: docusaurus output-dir: ../docusaurus-site Code Blocks Code blocks in Docusaurus are very similar to Quarto. One important thing to keep in mind is that the syntax highlighting theme comes from Docusaurus rather than Quarto. See the theming documentation for additional details. If you use the filename attribute in Quarto, it will automatically become the code block title in Docusaurus: ```{.python filename="hello.py"} 1 + 1 ``` Code folding is also automatically applied. So, for example the following executable code block: ```{python} #| code-fold: true 1 + 1 Is rendered as a collasable block in Docusaurus: Callouts & Tabsets Like Quarto, Docusaurus includes support for Callouts and Tabsets. When including these components in a document, you should use the Quarto standard markdown syntax, which will be automatically translated to the appropriate Docusaurus constructs. For example, here is a Quarto callout: ::: {.callout-important} Note the Quarto callout syntax is used here. ::: Which renders in Docusaurus as: Here is a Quarto tabset: ::: {.panel-tabset group="fruits"} ## Apple This is an apple 🍎 ## Orange This is an orange 🍊 ## Banana This is a banana 🍌 ::: Which renders in Docusaurus as: HTML and MDX Docusaurus websites use a flavor of markdown (MDX) that has some major differences from Pandoc (Quarto’s native markdown renderer), the biggest of which is that while Quarto allows embedding of HTML, MDX does not. Rather, MDX allows direct embedding of JavaScript code and React JSX components (which look like HTML but have some significant differences in behavior). Quarto’s support for Docusaurus accounts for these differences, and enables you to embed raw HTML as well as use MDX components and JavaScript when required. HTML Blocks Docusaurus websites don’t allow arbitrary HTML content. Rather, JSX is used to emit HTML tags. While these JSX tags look and act like HTML tags most of the time, there are some important caveats and constraints, most notably that the class attribute must be written as className, and style attributes need to be specified as JavaScript objects rather than CSS strings. If you need to include raw HTML that doesn’t conform to JSX, you should use a raw ```{=html} code block. For example: ```{=html} <p style="color: green;">Paragraph</p> ``` If you need to embed HTML code (e.g. a badge, video, or tweet) you should definitely use raw HTML blocks as shown above to avoid errors which will occur if JSX encounters tags it can’t parse. Note that HTML produced by computations (e.g. a Pandas data frame displayed in a notebook) often use raw HTML with class and/or style tags. This computational output is automatically included in a raw ```{=html} code block so that it renders correctly in Docusaurus. MDX Blocks You can also use MDX components and JavaScript within Quarto documents that target Docusaurus. To do this, enclose them in an ```{=mdx} raw code block. For example: ```{=mdx} export const Highlight = ({children, color}) => ( <span style={{ backgroundColor: color, borderRadius: '2px', color: '#fff', padding: '0.2rem', }}> {children} </span> ); <Highlight color="#25c2a0">Docusaurus GREEN</Highlight> and <Highlight color="#1877F2">Rams blue</Highlight> are my favorite colors. I can write **Markdown** alongside my _JSX_! ``` Which is rendered as follows: Note that ordinary markdown content can also be included in mdx blocks alonside JavaScript and React components. LaTeX Math By default, Quarto renders LaTeX math within Docusaurus projects using WebTeX, a service that creates PNG images for publishing on the web given TeX expressions as input. WebTeX works for any web page that can display images, and requires no special JavaScript or CSS. Any inline or display equations contained within your document will be converted to an image URL that requests a rendered version of the equation. For example, the following markdown: $x + 1$ Will be converted to: ![](https://latex.codecogs.com/svg.latex?x%20%2B%201) Which renders as: Dark Mode SVG is used as the default rendering method because it has the best overall appearance. However, if your docusaurus document is being rendered on a dark background, you may want to switch to PNG with a dark background specified. You can do this as follows: format: docusaurus: html-math-method: method: webtex url: https://latex.codecogs.com/png.image?%5Cbg_black&space; KaTeX It is possible to configure Docusaurus to use KaTeX for math rendering. See the Docusaurus documentation on using KaTeX to learn more about this option. Once you’ve confirmed that KaTeX is rendering equations correctly in your site, you should update your _quarto.yml file to specify that katex rather than webtex should be used for rendering equations: _quarto.yml format: docusaurus-md: html-math-method: katex
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/docusaurus.html", "source": "https://quarto.org/docs/output-formats/docusaurus.html" }
Overview Pandoc supports the use of a wide range of TeX distributions and PDF compilation engines including pdflatex, xelatex, lualatex, tectonic, and latexmk. While you can employ whatever toolchain you like for LaTeX compilation, we strongly recommend the use of TinyTeX, which is a distribution of TeX Live that provides a reasonably sized initial download (~100 MB) that includes the 200 or so most commonly used TeX packages for Pandoc documents. We also recommend the use of Quarto’s built in PDF compilation engine, which among other things performs automatic installation of any missing TeX packages. Installing TeX To install TinyTeX, use the following command: Terminal quarto install tinytex TinyTeX is not installed to the system PATH so will not affect other applications that use TeX. If you want to use TinyTeX with other applications, add the --update-path flag when installing (this will add TinyTex to the system path): Terminal quarto install tinytex --update-path If you already have another installation of TeX that you prefer to use with Quarto, add the latex-tinytex: false in your project or document front matter to prevent Quarto from using its internal version. If you prefer TeX Live, you can find instructions for installing it here: https://tug.org/texlive/. Note that Quarto’s automatic installation of missing TeX packages will work for TinyTeX and TeX Live, but not for other TeX distributions (as it relies on TeX Live’s tlmgr command). Managing TeX In addition to installing TinyTeX, you may also update or remove the installation of TinyTex. To see the currently installed version of TinyTex, use the command: Terminal quarto list tools which will provide a list of available tools, the installed versions, and the latest available version: [✓] Inspecting tools Tool Status Installed Latest chromium Not installed --- 869685 tinytex Up to date v2022.10 v2022.10 To update to the latest version, use the command: Terminal quarto update tinytex which will download and install the latest version of TinyTex (following the same behavior as described for installing TinyTex above). To remove TinyTex altogether, use the command: Terminal quarto uninstall tinytex Tip Each year in April, TeXlive updates their remote package repository to the new year’s version of TeX. When this happens, previous year installations of TeX will not be able to download and install packages from the remote repository. When this happens, you may see an error like: Your TexLive version is not updated enough to connect to the remote repository and download packages. Please update your installation of TexLive or TinyTex. When this happens, you can use quarto update tinytex to download and install an updated version of tinytex. Quarto PDF Engine Quarto’s built-in PDF compilation engine handles running LaTeX multiple times to resolve index and bibliography entries, and also performs automatic LaTeX package installation. This section describes customizing the built-in engine (see the Alternate PDF Engines section below for docs on using other engines). PDF Compilation The following options are available for customizing PDF compilation: Option Description latex-min-runs Number (minimum number of compilation passes) latex-max-runs Number (maximum number of compilation passes) latex-clean Boolean (clean intermediates after compilation, defaults to true) latex-output-dir String (output directory for intermediates and PDF) latex-makeindex String (program to use for makeindex) latex-makeindex-opts Array (options for makeindexprogram) Package Installation The following options are available for customizing automatic package installation: Option Description latex-auto-install Boolean (enable/disable automatic package installation) latex-tlmgr-opts Array (options for tlmgr) Alternate PDF Engines You can use the pdf-engine and pdf-engine-opts to control the PDF engine that Quarto uses to compile the LaTeX output into a PDF. For example: title: "My Document" pdf-engine: lualatex pdf-engine-opt: -outdir=out The above example will use the lualatex PDF engine rather than the default xelatex. Latexmk Quarto includes a built in Latexmk engine, which will run the pdf-engine more than once to generate your PDF (for example if you’re using cross references or a bibliography). In addition, this engine will detect and attempt to install missing packages, fonts, or commands if TeX Live is available. You can disable Quarto’s built in Latexmk engine by settng the latex-auto-mk option to false. For example: title: "My Document" latex-auto-mk: false
{ "lastmod": "2023-07-05T19:35:15.703Z", "loc": "https://quarto.org/docs/output-formats/pdf-engine.html", "source": "https://quarto.org/docs/output-formats/pdf-engine.html" }
Overview Pandoc supports a huge array of output formats, all of which can be used with Quarto. To use any Pandoc format just use the format option or the --to command line option. For example, here’s some YAML that specifies the use of the html format as well as a couple of format options: --- title: "My Document" format: html: toc: true code-fold: true --- Alternatively you can specify the use of a format on the command line: Terminal quarto render document.qmd --to html See below for a list of all output formats by type along with links to their reference documentation. Documents HTML HTML is a markup language used for structuring and presenting content on the web. PDF PDF is a file format for creating print-ready paged documents. MS Word MS Word is the word processor included with Microsoft Office. OpenOffice OpenDocument is an open standard file format for word processing documents. ePub ePub is an e-book file format that is supported by many e-readers. Presentations Revealjs Revealjs is an open source HTML presentation framework. PowerPoint PowerPoint is the presentation editing software included with Microsoft Office. Beamer Beamer is a LaTeX class for producing presentations and slides. Markdown GitHub GitHub Flavored Markdown (GFM) is the dialect of Markdown that is currently supported for user content on GitHub. CommonMark CommonMark is a strongly defined, highly compatible specification of Markdown. Hugo Hugo is an open-source static website generator. Docusaurus Docusaurus is an open-source markdown documentation system. Markua Markua is a markdown variant used by Leanpub. Wikis MediaWiki MediaWiki is the native document format of Wikipedia. DokuWiki DokuWiki is a simple to use and highly versatile open source wiki software that doesn’t require a database. ZimWiki Zim is a graphical text editor used to maintain a collection of wiki pages. Jira Wiki Jira Wiki is the native document format for the Jira issue tracking and project management system from Atlassian. XWiki XWiki is an open-source enterprise wiki system. More Formats JATS JATS (Journal Article Tag Suite) is an XML format for marking up and exchanging journal content. Jupyter Jupyter Notebooks combine software code, computational output, explanatory text and multimedia resources in a single document. ConTeXt ConTeXt is a system for typesetting documents based on TEX and METAPOST. RTF The Rich Text Format (RTF) is a file format for for cross-platform document interchange. reST reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. AsciiDoc AsciiDoc is a text document format for writing documentation, articles, and books, ebooks, slideshows, web pages, man pages and blogs. Org-Mode Org-Mode is an Emacs major mode for keeping notes, authoring documents, creating computational notebooks, and more. Muse Emacs Muse is an authoring and publishing environment for Emacs. GNU Texinfo Texinfo is the official documentation format of the GNU project. Groff Man Page The Groff (GNU troff) man page document formats consists of plain text mixed with formatting commands that produce ASCII/UTF8 for display at the terminal. Groff Manuscript The Groff (GNU troff) manuscript format consists of plain text mixed with formatting commands that produces PostScript, PDF, or HTML. Haddock markup Haddock is a tool for automatically generating documentation from annotated Haskell source code. OPML OPML (Outline Processor Markup Language) is an XML format for outlines. Textile Textile is a simple text markup language that makes it easy to structure content for blogs, wikis, and documentation. DocBook DocBook is an XML schema particularly well suited to books and papers about computer hardware and software. InDesign ICML is an XML representation of an Adobe InDesign document. TEI Simple TEI Simple aims to define a new highly-constrained and prescriptive subset of the Text Encoding Initiative (TEI) Guidelines suited to the representation of early modern and modern books. FictionBook FictionBook is an open XML-based e-book format.
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/all-formats.html", "source": "https://quarto.org/docs/output-formats/all-formats.html" }
As a part of Quarto, we’ve developed a simple single file format that describes declarations, variables, and rules that should be layered into Scss files when compiling them into css. The basic structure of a theme file is: A single text file that contains valid Scss Special comments are used to denote regions of functions, defaults, mixins, and rules (region decorators). At least one of these region decorators must be present in order for the theme file to be valid. More than one of each type of region decorator are permitted. If more than one of any type is present, all regions of a given type will be merged into a single block of that type in the order in which they are encountered in the file. When compiling, the sections will be layered according to type, functions first, then variables, then mixins, then rules. The directory that contains your theme file will be added to the load path, allowing @use or @import statements to be resolved using the same directory that contains the theme file. Here is an example file: /*-- scss:functions --*/ @function colorToRGB ($color) { @return "rgb(" + red($color) + ", " + green($color) + ", " + blue($color)+ ")"; } /*-- scss:defaults --*/ $h2-font-size: 1.6rem !default; $headings-font-weight: 500 !default; $body-color: $gray-700 !default; /*-- scss:rules --*/ h1, h2, h3, h4, h5, h6 { text-shadow: -1px -1px 0 rgba(0, 0, 0, .3); } Bootswatch Sass Theme Files We’ve merged Bootswatch themes for Bootstrap 5 into this single file theme format in our repo here: https://github.com/quarto-dev/quarto-cli/tree/main/src/resources/formats/html/bootstrap/themes From time to time, as the Bootswatch themes are updated, we will update these merged theme files. Bootstrap / Bootswatch Layering When using the Quarto HTML format, we allow the user to specify theme information in the document front matter (or project YAML). The theme information consists of a list of one or more of A valid built in Bootswatch theme name A theme file (valid as described above). For example the following would use the cosmo Bootswatch theme and provide customization using the custom.scss file: theme: - cosmo - custom.scss When compiling the CSS for a Quarto website or HTML page, we merge any user provided theme file(s) or Bootswatch themes with the Bootstrap Scss in the following layers: Uses Bootstrap Theme(s) /*-- scss:uses --*/ Functions Bootstrap Theme(s) /*-- scss:functions --*/ Variables Themes(s) /*-- scss:defaults --*/ Bootstrap Mixins Bootstrap Theme(s) /* -- scss:mixins --*/ Rules Bootstrap Theme(s) /*-- scss:rules --*/ We order the themes according to the order that they are specified in the YAML, maintaining the order for declarations and rules and reversing the order for variables (allowing the files specified later in the list to provide defaults variable values to the files specified earlier in the list). Layering of the example themes above would be as follows: Uses Bootstrap cosmo /*-- scss:uses --*/ custom.scss /*-- scss:uses --*/ Functions Bootstrap cosmo /*-- scss:functions --*/ custom.scss /*-- scss:functions --*/ Variables custom.scss /*-- scss:defaults --*/ cosmo /*-- scss:defaults --*/ Bootstrap Mixins Bootstrap cosmo /* -- scss:mixins --*/ custom.scss /* -- scss:mixins --*/ Rules Bootstrap cosmo /*-- scss:rules --*/ custom.scss /*-- scss:rules --*/
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/html-themes-more.html", "source": "https://quarto.org/docs/output-formats/html-themes-more.html" }
Overview Quarto provides a default layout for HTML pages that should work well for many documents. However, if the default layout isn’t working for your content, you can adjust it. On this page, learn about: The three high level layout options for your pages in Page Layout. How to adjust the width of the individual layout components (sidebar, body, margins, and gutter) to fit your content in Grid Customization. Page Layout By default Quarto HTML documents display content centered at a width optimized for readability (typically from 600px to 900px wide). While this is a sound default layout for traditional articles, for other types of pages (e.g. landing or index pages) you may want to use other layouts. The page-layout option can be use to control the layout used. For example: format: html: page-layout: full The various page-layout options are described below. Article page-layout: article Article layout provides a content area with a page based grid layout that provides margins, areas for sidebars, and a reading width optimized body region. The precise size of the document regions will vary slightly depending upon the sidebar (if present) and the presence or absence of margin or complex layout elements. To learn more, checkout the guide to Article Layout. Full page-layout: full Full layout uses the article grid system, but automatically expands the content area to use the sidebar and margin region if no content is placed within those regions. This is useful for layouts that don’t need to be constrained to reading width and that will benefit from additional horizontal space (e.g. landing or index pages) Custom page-layout: custom Custom layout provides a simple HTML content container with no default grid system, padding, or margins. The default HTML framing provided will look this this: <div class="page-layout-custom"> <!-- body content here --> </div> In websites, custom layouts do not include navigation sidebars but do include the site navbar and footer. CSS Grid If you are using page-layout: custom, you’ll likely want to utilize the Bootstrap CSS Grid layout system (which is available by default in Quarto documents) for creating more sophisticated layouts. For example, here’s a simple 2-column grid: ::: {.grid} ::: {.g-col-4} This column takes 1/3 of the page ::: ::: {.g-col-8} This column takes 2/3 of the page ::: ::: Bootstrap’s CSS Grid system includes facilities for responsiveness, wrapping, nesting, and fine grained customization of column behavior. Note that this isn’t the traditional Bootstrap grid used in older versions of Bootstrap – rather, it’s a brand new layout system introduced in Bootstrap 5.1 based on the CSS Grid standard. Quarto uses this newer system because it has more sophisticated layout capabilities akin to what LaTeX offers for print documents. See the Bootstrap CSS Grid documentation for additionals details. Grid Customization Quarto 1.3 Feature This feature is new in Quarto 1.3, which you can download at https://quarto.org/docs/download/ You can control the width of the layout components in HTML documents with YAML options and SCSS. For example, if long entries in a sidebar are being wrapped, it may make sense to increase the width of sidebar: Default Layout Wider Sidebar This change can be made by adding the grid option to the _quarto.yml file, increasing the sidebar-width from its default of 250px: _quarto.yml format: html: grid: sidebar-width: 350px There are four variables to control the four components of the layout: the sidebar, the body, the margin, and the gutters. The rest of this section describes these components, and their default values, as well as how to customize them either with YAML or SCSS variables. You can also find Additional Examples of customization in action. HTML Page Layout Quarto HTML documents are arranged in a structure composed of a sidebar on the left, the body of the document, the margin of the document on the right, and the space between these elements, known as gutters. This is illustrated below: The width of these four components is controlled by four variables. These variables, along with their default values are: Default values for the width of layout components Element Size sidebar-width 250px body-width 800px margin-width 250px gutter-width 1.5em The values of these variables don’t directly specify the display width of the corresponding component, instead they specify a maximum base value. The maximum values are scaled to create minimum values, and together they are used to compute the size and position of each component across different layout types (fixed vs. floating), responsive sizes (large screen vs. mobile size), and page contents (margin vs. no margin content). Customizing Component Widths You can control the component width variables using YAML or SCSS variables. To set these options in YAML, you may use the grid option : _quarto.yml format: html: grid: sidebar-width: 300px body-width: 900px margin-width: 300px gutter-width: 1.5rem Websites vs. Standalone HTML Pages Customizing the layout of pages that are part of a Quarto website with YAML should happen at the site level in _quarto.yml. For HTML documents that aren’t part of a website, these options could also be set in the YAML at the top of the document. Similarly, in a custom theme scss file, you may set variables like: // The left hand sidebar $grid-sidebar-width: 300px !default; // The main body $grid-body-width: 900px !default; // The right hand margin bar $grid-margin-width: 300px !default; // The gutter that appears between the above columns $grid-column-gutter-width: 1.5rem !default; sidebar-width, body-width, and margin-width should be specified in pixels (px) as the values will be used when computing other sizes. Requiring pixel sizing is a limitation of our approach to the Quarto’s layout, but also typically makes sense since the overall document width is usually tied to the browser size and responsive breakpoints rather than font size or other relative measures. gutter-width may be specified in pixels or other units such as em or rem which are responsive to the document font size. Additional Examples Increasing the margin width may make sense on a website that has many figures or tables in the margin. For example, this YAML increases the margin-width by 200px over the default value: format: html: grid: margin-width: 450px Default Layout Wider Margin The effect of changing margin-width without changing body-width is to increase the overall page width (there is less white space on the far left and right of the page). Alternatively, to keep the overall page width the same body-width can be decreased by the same amount as margin-width increased: format: html: grid: margin-width: 450px body-width: 600px Default Layout Wider Margin, Narrower Body
{ "lastmod": "2023-07-05T19:35:15.703Z", "loc": "https://quarto.org/docs/output-formats/page-layout.html", "source": "https://quarto.org/docs/output-formats/page-layout.html" }
Overview Use the pdf format to create PDF output. For example: --- title: "My document" format: pdf: toc: true number-sections: true colorlinks: true --- This example highlights a few of the options available for PDF output. This article covers these and other options in detail. See the PDF format reference for a complete list of all available options. If you want to produce raw LaTeX output (a .tex file) rather than a PDF, all of the options documented here are still available (see the LaTeX Output section below for additional details). Note Note that while we will focus here exclusively on the use LaTeX to create PDFs, Pandoc also has support for creating PDFs using ConTeXt, roff ms, or HTML (via wkhtmltopdf). See the Pandoc documentation on Creating a PDF for additional details. Prerequisites In order to create PDFs you will need to install a recent distribution of TeX. We recommend the use of TinyTeX (which is based on TexLive), which you can install with the following command: Terminal quarto install tinytex See the article on PDF Engines for details on using other TeX distributions and PDF compilation engines. Document Class Quarto uses KOMA Script document classes by default for PDF documents and books. KOMA-Script classes are drop-in replacements for the standard classes with an emphasis on typography and versatility. For PDF documents this results in the following Pandoc options set by default: format: pdf: documentclass: scrartcl papersize: letter You can set documentclass to the standard article, report or book classes, to the KOMA Script equivalents scrartcl, scrreprt, and scrbook respectively, or to any other class made available by LaTeX packages you have installed. Note Setting your documentclass to either book or scrbook will automatically handle many of the common needs for printing and binding PDFs into a physical book (i.e., chapters start on odd pages, alternating margin sizes, etc). See the Output Options section below for additional details on customizing LaTeX document options. Table of Contents Use the toc option to include an automatically generated table of contents in the output document. Use the toc-depth option to specify the number of section levels to include in the table of contents. The default is 3 (which means that level-1, 2, and 3 headings will be listed in the contents). For example: toc: true toc-depth: 2 You can customize the title used for the table of contents using the toc-title option: toc-title: Contents If you want to exclude a heading from the table of contents, add both the .unnumbered and .unlisted classes to it: ### More Options {.unnumbered .unlisted} Section Numbering Use the number-sections option to number section headings in the output document. For example: number-sections: true Use the number-depth option to specify the deepest level of heading to add numbers to (by default all headings are numbered). For example: number-depth: 3 To exclude an individual heading from numbering, add the .unnumbered class to it: ### More Options {.unnumbered} Syntax Highlighting Pandoc will automatically highlight syntax in fenced code blocks that are marked with a language name. For example: ```python 1 + 1 ``` Pandoc can provide syntax highlighting for over 140 different languages (see the output of quarto pandoc --list-highlight-languages for a list of all of them). If you want to provide the appearance of a highlighted code block for a language not supported, just use default as the language name. You can specify the code highlighting style using highlight-style and specifying one of the supported themes. Supported themes include: arrow, pygments, tango, espresso, zenburn, kate, monochrome, breezedark, haddock, atom-one, ayu, breeze, dracula, github, gruvbox, monokai, nord, oblivion, printing, radical, solarized, and vim. For example: highlight-style: github Highlighting themes can provide either a single highlighting definition or two definitions, one optimized for a light colored background and another optimized for a dark color background. When available, Quarto will automatically select the appropriate style based upon the code chunk background color’s darkness. You may always opt to specify the full name (e.g. atom-one-dark) to bypass this automatic behavior. By default, code is highlighted using the arrow theme, which is optimized for accessibility. Here are examples of the arrow light and dark themes: LightDark Code Annotation You can add annotations to lines of code in code blocks and executable code cells. See Code Annotation for full details. Output Options There are numerous options available for customizing PDF output, including: Specifying document classes and their options Including lists of figures and tables Using the geometry and hyperref packages Numerous options for customizing fonts and colors. For example, here we use a few of these options: --- title: "My Document" format: pdf: documentclass: report classoption: [twocolumn, landscape] lof: true lot: true geometry: - top=30mm - left=20mm - heightrounded fontfamily: libertinus colorlinks: true --- See the Pandoc documentation on metadata variables for LaTeX for documentation on all available options. Citations When creating PDFs, you can choose to use either the default Pandoc citation handling based on citeproc, or alternatively use natbib or BibLaTeX. This can be controlled using the cite-method option. For example: format: pdf: cite-method: biblatex The default is to use citeproc (Pandoc’s built in citation processor). See the main article on using Citations with Quarto for additional details on citation syntax, available bibliography formats, etc. Options When using natbib or biblatex you can specify the following additional options to affect how bibliographies are rendered: Option Description biblatexoptions List of options for biblatex natbiboptions List of options for natbib biblio-title Title for bibliography biblio-style Style for bibliography Raw LaTeX When creating a PDF document, Pandoc allows the use of raw LaTeX directives intermixed with markdown. For example: \begin{tabular}{|l|l|}\hline Age & Frequency \\ \hline 18--25 & 15 \\ 26--35 & 33 \\ 36--45 & 22 \\ \hline \end{tabular} Raw LaTeX commands will be preserved and passed unchanged to the LaTeX writer. Warning While it’s very convenient to use raw LaTeX, raw LaTeX is ignored when rendering to other formats like HTML and MS Word. If you plan on rendering to other formats then the example above would be better written using native markdown tables. In some cases raw LaTeX will require additional LaTeX packages. The LaTeX Includes section below describes how to include \usepackage commands for these packages in your document. LaTeX Includes If you want to include additional content in your document from another file, you can use the include-in-* options: Option Description include-in-header Include contents of file, verbatim, at the end of the header. This can be used, for example, to include special CSS or JavaScript in HTML documents or to inject commands into the LaTeX preamble. include-before-body Include contents of file, verbatim, at the beginning of the document body (e.g. after the <body> tag in HTML, or the \begin{document} command in LaTeX). This can be used to include navigation bars or banners in HTML documents. include-after-body Include contents of file, verbatim, at the end of the document body (before the </body> tag in HTML, or the \end{document} command in LaTeX). You can specify a single file or multiple files for each of these options directly, or use the file: subkey. To include raw content in the YAML header, use the text subkey. When using text:, add the | character after text: to indicate that the value is a multi-line string. If you omit file: or text:, Quarto assumes you are providing a file. For example: format: pdf: include-in-header: - text: | \usepackage{eplain} \usepackage{easy-todo} - file: packages.tex - macros.tex Any packages specified using includes that you don’t already have installed locally will be installed by Quarto during the rendering of the document. LaTeX Output If you want Quarto to produce a LaTeX file (.tex) rather than a PDF (for example, if you want to do your own processing of the PDF) there are two ways to accomplish this: Use the latex format rather than the pdf format. For example: format: latex: documentclass: report classoption: [twocolumn, landscape] lof: true lot: true Note that all of the PDF format options documented above will also work for the latex format. Use the pdf format along with the keep-tex option. For example: format: pdf: documentclass: report keep-tex: true This technique will produce a PDF file for preview, but will also create a .tex file alongside it that you can do subsequent processing on. Unicode Characters By default, Quarto uses the xelatex engine to produce PDFs from LaTeX. xelatex has native support for unicode characters, but it is possible some customization will be required in order to properly typeset specific unicode characters. In particular, it is important that you use a font that supports the characters that you using in your document. To identify fonts on your system that support specific language characters, you can use the following command: Terminal fc-list :lang=<lang> For example, to see a list of fonts that support Japanese characters, use: Terminal fc-list :lang=ja Select a font name from the list and use that as the document’s main font, like: --- title: Unicode test format: pdf mainfont: "Hiragino Sans GB" --- ## Test Document 青黑體簡體中文,ヒラギノ角
{ "lastmod": "2023-07-05T19:35:15.703Z", "loc": "https://quarto.org/docs/output-formats/pdf-basics.html", "source": "https://quarto.org/docs/output-formats/pdf-basics.html" }
Overview While markdown is the input format for Quarto, it can also in some cases be an output format (for example, if you have a website or CMS that accepts markdown as input and want to incorporate computations from Python or R). This article covers using Quarto to generate GitHub Flavored Markdown (GFM). You might want to do this in order to: Generate a GitHub README.md from a Jupyter notebook Create pages for a GitHub wiki that include computations (e.g. plot output). GFM Format Use the gfm format to create GitHub Flavored Markdown from Quarto. For example: --- title: "My Project" format: gfm --- See the GFM format reference for a complete list of all options available for GFM output. To create a README.md using Quarto, start with a notebook (.ipynb) or computational markdown file (.qmd) that has README as its file name stem, for example: README.qmd --- title: "My Project" format: gfm jupyter: python3 --- This is a GitHub README that has content dynamically generated from Python: ```{python} 1 + 1 ``` Render the README with: Terminal quarto render README.qmd Which will create README.md alongside your input file. Preview Mode When you quarto preview a GitHub Flavored Markdown document, by default an HTML preview that approximates the look of markdown rendered on GitHub is shown. If you’d prefer to see the raw generated markdown, use the preview-mode: raw option. For example: --- title: "My Project" format: gfm: preview-mode: raw --- WebTeX Math The gfm format renders LaTeX equations using standard dollar-delimited inline ($...$) and display ($$...$$) syntax. However, if the web environment you are publishing into doesn’t support dollar-delimited math, you can alternatively use WebTeX to display math. This is done by setting the Pandoc html-math-method to webtex. For example: format: gfm: html-math-method: webtex WebTeX works for any web page that can display images, and requires no special JavaScript or CSS. Any inline or display equations contained within your document will be converted to an image URL that requests a rendered version of the equation. For example, the following markdown: $x + 1$ Will be converted to: ![](https://latex.codecogs.com/svg.latex?x%20%2B%201) Which renders as: Dark Mode SVG is used as the default rendering method because it has the best overall appearance. However, if your gfm document is being rendered on a dark background, you may want to switch to PNG with a dark background specified. You can do this as follows: format: gfm: html-math-method: method: webtex url: https://latex.codecogs.com/png.image?%5Cbg_black&space; GitHub Wikis If you want to use Quarto to incorporate computations into a GitHub wiki start by cloning the wiki for local editing. Then, simply create a computational markdown file (.ipynb, .qmd) for each page in the wiki. You can render all of these files at once into their corresponding .md files using Quarto Projects. For example: Terminal quarto render You don’t even strictly need a Quarto project file to do this as quarto render will render all input files in a directory by default if there is no project file.
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/gfm.html", "source": "https://quarto.org/docs/output-formats/gfm.html" }
_ Find your operating system in the table below You can install Quarto for a single user on Linux by using the Quarto tarball and following the below set of steps. 1. Download the tarball Terminal wget https://github.com/quarto-dev/quarto-cli/releases/download/v^version^/quarto-^version^-linux-amd64.tar.gz 2. Extract Files Extract the contents of the tarball to the location where you typically install software (e.g. ~/opt). For example: Terminal mkdir ~/opt tar -C ~/opt -xvzf quarto-^version^-linux-amd64.tar.gz 3. Create a Symlink Create a symlink to bin/quarto in a folder that is in your path. If there is no such folder, you can create a folder such as ~/bin and place the symlink there. For example: For example: Terminal mkdir ~/bin ln -s ~/opt/quarto-^version^/bin/quarto ~/bin/quarto 4. Add Folder to Path Ensure that the folder where you created a symlink is in the path. For example: Terminal ( echo ""; echo 'export PATH=$PATH:~/bin\n' ; echo "" ) >> ~/.profile source ~/.profile 5. Check The Installation Use quarto check to confirm that the installation is successful: Terminal quarto check
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/download/tarball.html", "source": "https://quarto.org/docs/download/tarball.html" }
Current Release — vPre-release — vOlder Releases _ Find your operating system in the table below Release Notes _ Find your operating system in the table below Highlights Quarto 1.4 includes the following new features: Typst Format—Support for the typst output format. Typst is a new open-source markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use. Lua changes—Quarto v1.4 adds new features to writers of Lua filters. Release Notes Pages containing all installers for the most recent releases of older versions of Quarto are linked below. Title Date Url v1.2.475 Mar 22, 2023 https://github.com/quarto-dev/quarto-cli/releases/tag/v1.2.475 v1.1.189 Sep 4, 2022 https://github.com/quarto-dev/quarto-cli/releases/tag/v1.1.189 v1.0.38 Aug 4, 2022 https://github.com/quarto-dev/quarto-cli/releases/tag/v1.0.38 No matching items
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/download/index.html", "source": "https://quarto.org/docs/download/index.html" }
In some cases you may want to create content that only displays for a given output format (or only displays when not rendering to a format). You can accomplish this by creating divs with the .content-visible and .content-hidden classes. .content-visible To make content visible only for a given format, create a div (:::) with the .content-visible class. For example, here we mark content as only visible in HTML: ::: {.content-visible when-format="html"} Will only appear in HTML. ::: You can also mark content as visible for all formats except a specified format. For example: ::: {.content-visible unless-format="pdf"} Will not appear in PDF. ::: Then when-format and unless-format attributes match the current Pandoc output format with some additional intelligence to alias related formats (e.g. html, html4, and html5). Details are provided below in Format Matching .content-hidden To prevent content from being displayed when rendering to a given format, create a div (:::) with the .content-hidden class. For example, here we mark content as hidden in HTML: ::: {.content-hidden when-format="html"} Will not appear in HTML. ::: You can also mark content as hidden for all formats except a specified format. For example: ::: {.content-hidden unless-format="pdf"} Will only appear in PDF. ::: Format Matching Then when-format and unless-format clauses do some aliasing of related formats to make it more straightforward to target content. The following aliases are implemented: Alias Formats latex latex, pdf pdf latex, pdf epub epub* html html*, epub*, revealjs html:js html*, revealjs markdown markdown*, commonmark*, gfm, markua Note that the html:js alias indicates that the target format is capable of executing JavaScript (this maps to all HTML formats save for ePub).
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/conditional.html", "source": "https://quarto.org/docs/authoring/conditional.html" }
Overview HTML pages rendered with Quarto include a formatted appendix at the end of the article. The appendix includes sections for citations and footnotes in the document, as well the attribution information (if specified) for the document itself. A simple example document appendix looks like: To learn more about including document attribution information in the appendix, see Creating Citeable Articles. Custom Appendix Sections Sections of your document can be added to the Appendix that appears at the end of your article by adding the .appendix class to any header. For example: ## Acknowledgments {.appendix} I am grateful for the insightful comments offered by the anonymous peer reviewers at Books & Texts. The generosity and expertise of one and all have improved this study in innumerable ways and saved me from many errors; those that inevitably remain are entirely my own responsibility. Any sections marked with the .appendix class will be included at the front of the appendix in the order in which they appear in the document. A more complete example appendix including attribution and the above custom appendix section looks like: License If you include a license in the front matter or citation information for your document, a ‘Reuse’ section will automatically be added to the appendix. Read more about specifying a license in Front Matter. Here is an example of a complete appendix including all the fields with an Attribution-ShareAlike Creative Commons license. Appendix Style You can control how Quarto process the appendix of your document using the appendix-style option. There are three options available: default The default appendix treatment create a smaller font face and gathers the various sections into stylized groups at the end of the document. plain The plain treatment will do all the appendix processing (gathering and organizing the sections at the end of the document, creating sections like ‘Reuse’), but will not apply the default appendix styling. none none disables appendix processing altogether. Content will not be processed or organized and information like ‘Citation’ and ‘Reuse’ will not be included in the document.
{ "lastmod": "2023-07-05T19:35:15.135Z", "loc": "https://quarto.org/docs/authoring/appendices.html", "source": "https://quarto.org/docs/authoring/appendices.html" }
Reveal Presentation library(tidyverse) library(palmerpenguins) 1penguins |> 2 mutate( bill_ratio = bill_depth_mm / bill_length_mm, bill_area = bill_depth_mm * bill_length_mm ) 1 Take penguins, and then, 2 add new columns for the bill ratio and bill area.
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/code-annotation-example/revealjs.html", "source": "https://quarto.org/docs/authoring/code-annotation-example/revealjs.html" }
Overview You can embed videos in documents using the {{< video >}} shortcode. For example, here we embed a YouTube video: {{< video https://www.youtube.com/embed/wo9vZccmqwc >}} Videos can refer to video files (e.g. .mp4) or can be links to videos published on YouTube, Vimeo, or BrightCove. Here are some additional examples that demonstrate using various video sources and options: {{< video local-video.mp4 >}} {{< video https://www.youtube.com/embed/wo9vZccmqwc >}} {{< video https://vimeo.com/548291297 >}} {{< video https://youtu.be/wo9vZccmqwc width="400" height="300" >}} {{< video https://www.youtube.com/embed/wo9vZccmqwc title="What is the CERN?" start="116" aspect-ratio="21x9" >}} In HTML formats the video will be embedded within the document. For other formats, a simple link to the video will be rendered. Next, we’ll cover the various options available for video embedding. For additional details on using videos within Revealjs presentations (including how to create slides with full-screen video backgrounds), see the Revealjs section below. Video URL The video URL can specify either a path to a video file (e.g. a .mp4) alongside the document, a remote URL to a video file, or a URL to a video service (YouTube, Vimeo, or BrightCove). These are valid URLs for video files: {{< video local-video.mp4 >}} {{< video https://videos.example.com/video.mp4 >}} For video services, a variety of URL forms are supported. For example, the following video service URLs are all valid: {{< video https://youtu.be/wo9vZccmqwc >}} {{< video https://www.youtube.com/watch?v=wo9vZccmqwc >}} {{< video https://www.youtube.com/embed/wo9vZccmqwc >}} {{< video https://vimeo.com/548291297 >}} {{< video https://players.brightcove.net/1460825906/default_default/index.html?videoId=5988531335001 >}} Note that YouTube videos support both the URL that is available in the address bar when watching a video as well as the standard URLs used for linking and embedding. BrightCove videos are embedded using the standard iframe embed code. Options Aspect Ratio Videos are automatically rendered responsively using the full width of the document’s main text column. The aspect-ratio specifies how the height should vary with changes in width. For example: {{< video https://youtu.be/wo9vZccmqwc aspect-ratio="4x3" >}} Available aspect ratios include 1x1, 4x3, 16x9 (the default), and 21x9. Width and Height You can disable responsive sizing by providing explicit width and height attributes. For example: {{< video https://youtu.be/wo9vZccmqwc width="250" height="175" >}} This will produce a video that redners at the specified dimensions and is not responsive. Note that when no height or width are specified, videos will size responsively given the space available to them. Start Time For YouTube videos, you can specify a start option to indicate how many seconds into the video you want to start playing: {{< video https://youtu.be/wo9vZccmqwc start="10" >}} Frame Title The title option adds a title attribute to the video <iframe>: {{< video https://www.youtube.com/embed/wo9vZccmqwc title='What is the CERN?' >}} Revealjs You can include videos within Revealjs presentations in one of two ways: A video that appears within the contents of a slide. A video that occupies the entire background of a slide. Slide Content Here’s a video on a slide without a title: --- {{< video https://youtu.be/wo9vZccmqwc width="100%" height="100%" >}} Note that we set the width and height explicitly to 100% so that the video fills the slide. Here’s a video on a slide with a title. ## Video Slide {{< video https://youtu.be/wo9vZccmqwc width="100%" height="85%" >}} Note that we set the height to 85% to leave room for the title. Backgrounds For videos on slides without titles, you might prefer to have the video fill the entire background of the slide. You can do this using the background-video attribute. For example: ## {background-video="intro-cern.mp4"} ## {background-video="https://videos.example.com/intro-cern.mp4"} ## {background-video="https://youtu.be/wo9vZccmqwc?autoplay=1"} ## {background-video="https://vimeo.com/548291297"} Note that when using background-video for video files (as distinct from services like YouTube) you can specify a number of other attributes, including: Attribute Default Description background-video A single video source, or a comma separated list of video sources. background-video-loop false Flags if the video should play repeatedly. background-video-muted false Flags if the audio should be muted. background-size cover Use cover for full screen and some cropping or contain for letterboxing. background-opacity 1 Opacity of the background video on a 0-1 scale. 0 is transparent and 1 is fully opaque. For example: ## Slide Title {background-video="video.mp4" background-video-loop="true" background-video-muted="true"} This slides's background video will play in a loop with audio muted.
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/videos.html", "source": "https://quarto.org/docs/authoring/videos.html" }
Callouts are an excellent way to draw extra attention to certain concepts, or to more clearly indicate that certain content is supplemental or applicable to only some scenarios. Callout Types There are five different types of callouts available. note warning important tip caution The color and icon will be different depending upon the type that you select. Here are what the various types look like in HTML output: Note Note that there are five types of callouts, including: note, tip, warning, caution, and important. Warning Callouts provide a simple way to attract attention, for example, to this warning. This is Important Danger, callouts will really improve your writing. Tip With Title This is an example of a callout with a title. Expand To Learn About Collapse This is an example of a ‘collapsed’ caution callout that can be expanded by the user. You can use collapse="true" to collapse it by default or collapse="false" to make a collapsible callout that is expanded by default. Markdown Syntax Create callouts in markdown using the following syntax (note that the first markdown heading used within the callout is used as the callout heading): ::: {.callout-note} Note that there are five types of callouts, including: `note`, `warning`, `important`, `tip`, and `caution`. ::: ::: {.callout-tip} ## Tip with Title This is an example of a callout with a title. ::: ::: {.callout-caution collapse="true"} ## Expand To Learn About Collapse This is an example of a 'folded' caution callout that can be expanded by the user. You can use `collapse="true"` to collapse it by default or `collapse="false"` to make a collapsible callout that is expanded by default. ::: Note that above callout titles are defined by using a heading at the top of the callout. If you prefer, you can also specify the title using the title attribute. For example: ::: {.callout-tip title="Tip with Title"} This is a callout with a title. ::: Customizing Appearance Collapse You can create ‘folded’ callouts that can be expanded by the user by settings the collapse attribute on the callout. If you set collapse=true, the callout will be expandable, but will be collapsed by default. If you set collapse=false, the callout will be expanded, but will be expanded by default. Appearance Callouts have 3 different looks you can use. default The default appearance with colored header and an icon. simple A lighter weight appearance that doesn’t include a colored header background. minimal A minimal treatment that applies borders to the callout, but doesn’t include a header background color or icon. You can set the callout appearance either globally in the document (or project yaml): callout-appearance: simple or by setting the type attribute on the callout. For example ::: {.callout-note appearance="simple"} ## Pay Attention Using callouts is an effective way to highlight content that your reader give special consideration or attention. ::: which appears as: Pay Attention Using callouts is an effective way to highlight content that your reader give special consideration or attention. Icons In addition to controlling the appearance of the callout, you can also choose to directly suppress the icon by setting the global option in your document (or project) yaml: callout-icon: false or by setting an attribute directly on the callout: ::: {.callout-note icon=false} ## Pay Attention Using callouts is an effective way to highlight content that your reader give special consideration or attention. ::: Which will appear as: Pay Attention Using callouts is an effective way to highlight content that your reader give special consideration or attention. Format Support The following formats render callouts as illustrated above: HTML PDF MS Word EPUB revealjs Note that callout rendering for HTML is not available when you disable the standard HTML theme (e.g. if you specify the theme: none option). Also, some features are specific to document using Bootstrap, like collapsible callouts, and won’t work in other documents. When the target format doesn’t support callouts, they are rendered as a simple blockquote with the title in bold.
{ "lastmod": "2023-07-05T19:35:15.135Z", "loc": "https://quarto.org/docs/authoring/callouts.html", "source": "https://quarto.org/docs/authoring/callouts.html" }
Overview Scholarly articles require much more detail in their front matter than simply a title and an author. Quarto provides a rich set of YAML metadata keys to describe these details. On this page, you’ll learn how to specify authors and their affiliations, article summaries like an abstract and keywords, and how to include information on copyright, licensing and funding. This YAML header includes examples of all the top level keys discussed on this page: document.qmd --- title: "Toward a Unified Theory of High-Energy Metaphysics: Silly String Theory" date: 2008-02-29 author: - name: Josiah Carberry id: jc orcid: 0000-0002-1825-0097 email: [email protected] affiliation: - name: Brown University city: Providence state: RI url: www.brown.edu abstract: > The characteristic theme of the works of Stone is the bridge between culture and society. ... keywords: - Metaphysics - String Theory license: "CC BY" copyright: holder: Josiah Carberry year: 2008 citation: container-title: Journal of Psychoceramics volume: 1 issue: 1 doi: 10.5555/12345678 funding: "The author received no specific funding for this work." --- The documents produced by the above metadata for the HTML and JATS formats are shown below. JATSHTML Not all of the metadata keys are used in every format. For example, the HTML format does not display the keywords. However, the tags described on this page will generally be supported in journal article formats. Currently the JATS format makes use of the broadest set of metadata tags, so if you want to check how things render we recommend previewing with format: jats. Authors & Affiliations The simplest way to describe an author is with a string directly to the author key: --- author: Norah Jones --- However, the author key has a number of sub-keys that provide the additional detail required for scholarly articles. For instance, you can add an author’s affiliation by using the affiliation key. In the simplest form, an author along with their affiliation can be described by passing a string to each of name and affiliation: --- author: name: Norah Jones affiliation: Carnegie Mellon University --- You can read about the other keys you can provide to author and affiliation in the corresponding Author and Affiliation sections below. Both author and affiliation can take multiple elements to describe multiple authors, or authors with multiple affiliations. As an example, here is the YAML to describe a document with two authors, the first of which has two affiliations: --- author: - name: Norah Jones affiliation: - Carnegie Mellon University - University of Chicago - name: Josiah Carberry affiliation: Brown University --- Notice that each element of author and affiliation is prefaced by a - and indented appropriately. You can read more about shortcuts to avoid repetition when authors share affiliations in the Multiple Authors section below. Singular or Plural? Both of these keys can be specified using a singular (author and affiliation) or plural (authors and affiliations) form. Author Beyond name and affiliation, author can also take any of the following: Available keys to author email phone fax url string Contact details for the author. Converted to hyperlinks in many formats. orcid string Author’s Open Researcher and Contributor ID (ORCID), in the form 0000-0000-0000-0000. Creates a link to the author’s ORCID in many formats. note acknowledgements string Notes to attach to an author, such as contribution details; Author’s acknowledgements. roles string(s) Author’s roles. Read more in Author Roles below. corresponding equal-contributor deceased true/false Set this author as: the corresponding author; as having contributed equally with all other contributors; and/or deceased. id string An identifier to be used to refer to this author in other fields. See an example in Funding. An affiliations-url key can also be provided to author, and will be propagated to the url key of affiliation. As an example, a more complete description of an author might look like: --- author: - name: Josiah Carberry orcid: 0000-0002-1825-0097 url: https://en.wikipedia.org/wiki/Josiah_S._Carberry email: [email protected] corresponding: true --- Name Components Quarto will automatically parse the name key into its components. However, if this parsing is incorrect you can specify the components, given, family, dropping-particle, and non-dropping-particle directly, for example: --- author: - name: given: Charles family: Gaulle non-dropping-particle: de - name: given: Ludwig family: Beethoven dropping-particle: van --- Author Roles Use roles to describe an author’s contributions to the work. You can use free form text as a string: author: - name: Josiah Carberry roles: "Conceived and designed the study, analysed the results and wrote the manuscript." Or alternatively, make use of the Contributor Roles Taxonomy (CRediT). To use CRediT roles provide one of the 14 contributor roles, e.g.: author: - name: Josiah Carberry roles: conceptualization Or, an array of roles: author: - name: Josiah Carberry roles: [investigation, data curation] Or specify the role along with a degree of contribution: author: - name: Josiah Carberry roles: - investigation: lead - data curation: supporting Expand to see the 14 Contributor Roles CRediT contributor values available in roles Value Alias conceptualization data curation formal analysis analysis funding acquisition funding investigation methodology project administration resources software supervision validation visualization writing – review & editing writing writing – original draft editing Affiliation Like author, you can provide a string is directly to affiliation, as in: --- author: name: Norah Jones affiliation: Carnegie Mellon University --- Alternatively, you can provide the name explicitly to the name key, like: --- author: name: Norah Jones affiliation: name: Carnegie Mellon University --- In addition to name, affiliation can take any of the following: Available keys to affiliation department String address city region or state country postal-code String Affiliation’s location. Provide one of region or state, and any combination of the other keys. url String Affiliation’s website. Converted to a link in many formats. isni ringgold ror Numeric Numeric String Affiliation IDs: 16 digit International Standard Name Identifier (ISNI); 4-6 digit Ringgold ID; Research Organization Registry (ROR) ID, starting with https://ror.org/, followed by a 9 digit alphanumeric identifier. For example, a more complete affiliation for an author might look like: --- author: name: Josiah Carberry orcid: 0000-0002-1825-0097 url: https://en.wikipedia.org/wiki/Josiah_S._Carberry email: [email protected] corresponding: true affiliation: - name: Brown University department: Psychoceramics city: Providence state: RI country: US url: www.brown.edu ringgold: 6752 isni: 0000000419369094 --- Multiple Authors When there are multiple authors of a document, it is common that they share affiliations. To avoid repeating an affiliation’s details, you can describe an affiliation once, assign it an id, and then refer to the id in other fields. One approach is to assign an id to each affiliation where they are described within an author. For example, here we assign the author’s affiliations the ids cmu and chicago: --- author: - name: Norah Jones affiliation: - id: cmu name: Carnegie Mellon University - id: chicago name: University of Chicago --- Then, when adding additional authors, you can refer to affiliations using ref:: --- author: - name: Norah Jones affiliation: - id: cmu name: Carnegie Mellon University - id: chicago name: University of Chicago - name: John Hamm affiliation: - ref: cmu --- An alternative approach is to define affiliations at the top level, as opposed to within an author: --- author: - name: Norah Jones affiliation: - ref: cmu - ref: chicago - name: John Hamm affiliation: - ref: cmu affilation: - id: cmu name: Carnegie Mellon University - id: chicago name: University of Chicago --- This approach may be more convenient in cases where you also want to refer to affiliations in fields other than author, e.g. funding. Abstract You can add an abstract with the abstract key. Since abstracts are generally longer than a line, and may contain markdown, you’ll need to provide it using YAML’s literal block style. That is, place a | on the same line as abstract: and indent your raw abstract text by two spaces. For example: --- abstract: | This article evaluates novel approaches to do some really important things. --- Keywords Keywords can be added with keywords: --- keywords: - open-source - scientific publishing - reproducible research --- Copyright You can specify copyright in two ways. Either directly as a string to copyright: --- copyright: "Copyright Acme, Inc. 2021. All Rights Reserved" --- Which is equivalent to providing the same string to the statement sub-key: --- copyright: statement: "Copyright Acme, Inc. 2021. All Rights Reserved" --- Or, alternatively, by specifying a holder and year: --- copyright: holder: Acme, Inc year: 2021 --- When specifying year you can also use a range (year: 2021 - 2023) or an array (year: [2021, 2022, 2023]). License To specify a license, you can pass a string directly to license: --- license: "This work is dedicated to the Public Domain" --- This is equivalent to specifying the text sub-key directly: --- license: text: "This work is dedicated to the Public Domain" --- You can add additional details by providing the type and url sub-keys: --- license: text: > Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License type: open-access url: https://www.gnu.org/licenses/fdl-1.3-standalone.html --- If you are choosing a Creative Commons license you may simply pass an abbreviation: --- license: "CC BY" --- The available abbreviations are covered in the Creative Commons section below. Creative Commons The Creative Commons copyright licenses and tools forge a balance inside the traditional “all rights reserved” setting that copyright law creates. These tools give everyone from individual creators to large companies and institutions a simple, standardized way to grant copyright permissions to their creative work. Here are some of the common forms of Creative Commons content license: License Name Description CC BY Attribution This license lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered. CC BY-SA Attribution-ShareAlike This license lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to “copyleft” free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. CC BY-ND Attribution-NoDerivs This license allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you. CC BY-NC Attribution-NonCommercial This license lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don’t have to license their derivative works on the same terms. If you specify a Creative Commons license for your content, Quarto will automatically include the relevant link to the appropriate license. Citation The citation key allows you to specify additional metadata that is used to create a citation for the document. You can read more about this in Creating Citeable Articles. Funding The funding key can directly take a string: --- funding: "The author(s) received no specific funding for this work." --- This is equivalent to providing the statement sub-key directly: --- funding: statement: "The author(s) received no specific funding for this work." --- The funding key can also take the sub-keys source, recipient and investigator. Both recipient and investigator can take a string, or a reference to an author or affiliation using ref:. For example, this front matter adds funding where the investigator is specified using an author id: --- author: - name: Norah Jones id: nj funding: - source: "NIH (Grant #: 1-R01-MH99999-01A1)" investigator: - ref: nj ---
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/front-matter.html", "source": "https://quarto.org/docs/authoring/front-matter.html" }
Overview HTML pages rendered with Quarto include a formatted title block at the start of the article. The title block contains the title, subtitle, authors, date, doi, and abstract. A simple example title block looks like: The title block will automatically layout elements from the front matter of the document. If you’d like, you can control the behavior using title-block-style. There are three options available: default The default title-block treatment create a smaller font face and gathers the various title elements into stylized groups in the title block of the document. plain The plain treatment will do all the title element processing (gathering and organizing the elements), but will not apply the default title block styling. none none disables title block processing altogether. Content will not be processed or organized and the title block will be emitted verbatim from Pandoc. Title Banners In addition, if you’d like a more prominent title block, you can use title-block-banner to create a banner style title block. A banner style title block will position the title, subtitle, description, and categories in a banner above the article. For example: --- title-block-banner: true --- will render a title block like: Custom Backgrounds In this case, the color of the banner is automatically determined based upon the theme. However, you can control the banner background by providing either a CSS color (e.g. "#FFDDFF", or red) or the path to an image which will be used the background. For example, to use a banner image, you might write: --- title-block-banner: images/banner.jpeg --- which would render a banner title block like: When you provide an explicit background color or image, Quarto assumes that the color of the background will contrast with the body background color and automatically uses the body background color as the text color over the banner. Foreground Color You can specify the color the for the text of the banner as well, using title-block-banner-color and providing a CSS color (e.g. "#FFDDFF", or red) . Date Quarto includes the document’s date in the title block. In addition to writing a standard date, you may also use a few special keywords which will generate a date for you. today will provide the current date with the current time set to 0, now will provide the current date and time, and last-modified will provide the file modification date and time of the document itself. Formatting When your title block is output using the default or plain styles, Quarto will automatically format the date based upon the document locale (lang). You can control formatting by specifying a date-format in the document front matter. For example: --- title: Summarizing Output for Reproducible Documents date: 2018-05-04 date-format: short --- For more about date formats, see the Quarto date format reference. Metadata Labels The labels for the metadata included in the title block have default values that are properly localized, but you may want to provide your own labels for metadata. You can use the following to customize the labels: Option Label Styles author-title Authors plain, default affiliation-title Affiliations plain, default abstract-title Abstract plain, default, none description-title Description plain, default published-title Date Published plain, default doi-title DOI plain, default Custom Title Pages To learn more about providing a complete custom title block, see the documentation on template partials.
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/title-blocks.html", "source": "https://quarto.org/docs/authoring/title-blocks.html" }
You can make it easier for others to cite your work by providing additional metadata with the YAML front-matter of your article. Citations can be provided for both articles published to the web or for articles published in journals (with or without a DOI). Web Articles To provide a citation for an article published to the web, include author and date metadata as well as a citation url. For example: --- title: "Summarizing Output for Reproducible Documents" description: | A summary of the best practices for summarizing output of reproducible scientific documents. date: 5/4/2018 author: - name: Nora Jones url: https://example.com/norajones affiliation: Spacely Sprockets affiliation-url: https://example.com/spacelysprokets citation: url: https://example.com/summarizing-output bibliography: biblio.bib --- If you omit the citation url, Quarto will attempt to generate a citation url by using the site-url and the current page’s location. If you’d like to allow Quarto to generate the citation url, you can omit the citation url and simply enable citation output on the page. For example: --- title: "Summarizing Output for Reproducible Documents" description: | A summary of the best practices for summarizing output of reproducible scientific documents. date: 5/4/2018 author: - name: Nora Jones url: https://example.com/norajones affiliation: Spacely Sprockets affiliation-url: https://example.com/spacelysprokets citation: true bibliography: biblio.bib --- When this metadata is available, a citation appendix is automatically added to the article. The citation appendix will present both a copy-able bibtex representation of the document and a formatted representation of the citation (based upon the document’s CSL file, if specified). For example: By default both the bibtex and formatted representations are displayed. You can use the appendix-cite-as option to control this behavior: appendex-cite-as: false Do not include any citations in the appendix. appendix-cite-as: bibtex Show only the BibTeX version of the citation. appendix-cite-as: display Show only the display version of the citation. Journal Articles If your article is published within a Journal, you can add the following the additional fields to generate the appropriate citation entry: --- title: "Summarizing Output for Reproducible Documents" description: | A summary of the best practices for summarizing output of reproducible scientific documents. date: 5/4/2018 author: - name: Nora Jones url: https://example.com/norajones affiliation: Spacely Sprockets affiliation-url: https://example.com/spacelysprokets citation: type: article-journal container-title: "Journal of Data Science Software" doi: "10.23915/reprodocs.00010" url: https://example.com/summarizing-output bibliography: biblio.bib --- This is how the citation is presented in the appendix: Other Types of Documents The BibTeX and formatted attribution displayed in the document will be generated based upon the complete citation information that is present in the citation key, which is based upon the Citation Style Language (CSL) specification for items. You can learn more about the available options in the Citation Metadata Reference. Google Scholar Quarto documents can include metadata compatible with the format indexed by Google Scholar. This makes it easy for indexing engines (Google Scholar or otherwise) to extract not only a citation for your article but also information on other sources which you cited. To enable this use the google-scholar option: title: "Summarizing Output for Reproducible Documents" description: | A summary of the best practices for summarizing output of reproducible scientific documents. date: 5/4/2018 author: - name: Nora Jones url: https://example.com/norajones affiliation: Spacely Sprockets affiliation-url: https://example.com/spacelysprokets citation: type: article-journal container-title: "Journal of Data Science Software" doi: "10.23915/reprodocs.00010" url: https://example.com/summarizing-output bibliography: biblio.bib google-scholar: true For example, here is the Google Scholar metadata automatically included for a document created with the above metadata: <meta name="citation_title" content="Summarizing Output for Reproducible Documents"> <meta name="citation_author" content="Nora Jones"> <meta name="citation_online_date" content="2018-05-04"> <meta name="citation_fulltext_html_url" content="https://example.com/summarizing-output"> <meta name="citation_publication_date" content="2018-05-04"> <meta name="citation_journal_title" content="Journal of Data Science Software"> <meta name="citation_reference" content="citation_title=Donald knuth;,citation_fulltext_html_url=http://dx.doi.org/10.7551/mitpress/ 5485.003.0041;,citation_publication_date=1989;,citation_journal_title =undefined;"> In the addition to the citation metadata from this document described above, Quarto will automatically generate a citatation_reference entry for each of the entries included in the document’s bibliography. Citation Fields Quarto’s approach to emitting scholarly metadata is to take the standard CSL fields and make them into the corresponding Google Scholar / Zotero / Highwire metadata tags as appropriate. The following fields, when specified under the citation key of the document metadata, will generate scholarly meta tags in the rendered HTML document as described. These fields comprise the required Google Scholar fields as well as additional, optional fields that may also be included. Document Yaml Metadata Tag title Document title will be used if not provided. citation_title author One or more authors1. Document author will be used if not provided as a citation subkey. citation_author editor One or more editors2. citation_editor abstract Document abstract will be used if not provided. citation_abstract keyword3 Document keywords will be used if not provided. citation_keywords issued Document date will be used if not provided. citation_publication_date In addition, the issued date will be used to populate the following fields: citation_cover_date citation_year available-date Document date will be used if not provided. citation_online_date url url will be synthesized for current document if a site-url has been specified. citation_fulltext_html_url pdf-url citation_pdf_url language Document lang will be used if not provided. citation_language type A valid CSL type. See https://docs.citationstyles.org/en/stable/specification.html#appendix-iii-types. <none> doi Document doi will be used if not provided. citation_doi isbn citation_isbn issn citation_issn eissn citation_eissn pmid citation_pmid issue citation_issue volume citation_volume page Will be split on - to create appropriate page metadata. citation_firstpage citation_lastpage page-first citation_firstpage page-last citation_lastpage abstract-url citation_abstract_html_url container-title citation_journal_title For specific types, other meta tags will be produced: type: paper-conference citation_conference_title type: book citation_book_title type: chapter citation_inbook_title number citation_technical_report_number citation_technical_report_number will be created if the type is report. publisher citation_publisher For specific types, other meta tags will be produced: type: paper-conference citation_conference type: thesis citation_dissertation_institution type:report citation_technical_report_institution container-title-short citation_journal_abbrev collection-title citation_series_title For example, citation data for a published conference paper defined as such in the document front matter: title: A Published Conference Paper author: - name: Norah Jones affiliation: School of Hard Knocks orcid: 0000-0001-8715-9476 citation: type: paper-conference container-title: "Proceedings of the annual conference of the Society for Research" publisher: "Society for Research" issued: 2020/09/23 volume: 2 doi: "10.23915/reprodocs.00010" url: https://example.com/summarizing-output page-first: 46 page-last: 53 editor: - Don Draper - Nick Fury google-scholar: true provides HTML metadata like: <meta name="citation_title" content="A Published Conference Paper"> <meta name="citation_author" content="Norah Jones"> <meta name="citation_editor" content="Nick Cage"> <meta name="citation_editor" content="Don Draper"> <meta name="citation_publication_date" content="2020-09-23"> <meta name="citation_cover_date" content="2020-09-23"> <meta name="citation_year" content="2020"> <meta name="citation_fulltext_html_url" content="https://example.com/summarizing-output"> <meta name="citation_doi" content="10.23915/reprodocs.00010"> <meta name="citation_volume" content="2"> <meta name="citation_language" content="en"> <meta name="citation_conference_title" content="Proceedings of the annual conference of the Society for Research"> <meta name="citation_conference" content="Society for Research"> Footnotes Specify one or more authors using one of the following: author: Norah Jones or multiple values like: author: - Norah Jones - Nick Fury The list of authors provded under the citation key will be used instead of the document authors when generating the html metadata.↩︎ Specify one or more editors using one of the following: editors: Norah Jones or multiple values like: editors: - Norah Jones - Nick Fury ↩︎ Note that the keyword citation field is a comma separated string of keywords (consistent with CSL).↩︎
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/create-citeable-articles.html", "source": "https://quarto.org/docs/authoring/create-citeable-articles.html" }
Overview Document language plays a role in Pandoc’s processing of most formats, and controls hyphenation in PDF output when using LaTeX (through babel and polyglossia) or ConTeXt. Additonally, Quarto, Pandoc, and LaTeX will sometimes generate textual output that requires localization. For example, “Figure” or “List of Figures” for cross references, callout captions like “Note” or “Warning”, or the “Code” caption for folded code chunks. lang Option The lang document option 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. For example, this document specifies the use of French: --- title: "My Document" lang: fr --- This will result in the use of French translations as well as the application of other language specific rules to document processing. The following languages currently have full translations available: English (en, used by default) Chinese (zh) Spanish (es) French (fr) Japanese (ja) German (de) Portuguese (pt) Russian (ru) Czech (cs) Finnish (fi) Dutch (nl) Italian (it) Polish (pl) Korean (ko) Alternate Language If you aren’t happy with the default language used for a given part of a document you can provide alternate language via the language key (this can be used at a document or project level). For example, to override the values for the “Author” and “Published” captions used within title blocks you could do this: --- title: "My Document" author: "Norah Jones" date: 5/22/2022 language: title-block-author-single: "Writer" title-block-published: "Updated" --- As described below, you can also provide these translations in a standalone YAML file and reference it as follows: --- title: "My Document" author: "Norah Jones" date: 5/22/2022 language: custom.yml --- You can discover all of the language values that can be customized by referencing this file: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/language/_language.yml. Per-Language Alternates Alternate values can be restricted to a particular target language using subkeys of the language key. This way, distinct values can be defined for each language. For example, you can override the English and French versions of the “Published” caption: --- title: "My Document" author: "Norah Jones" date: 5/22/2022 lang: fr language: en: title-block-published: "Updated" fr: title-block-published: "Mis à jour" --- In this case the French “Mis à jour” will be used since lang is set to fr. These language-specific alternate values can also be provided in a standalone YAML file. For example, the following file could be used by setting language: custom.yml in the metadata: custom-language.yml en: title-block-published: "Updated" fr: title-block-published: "Mis à jour" Custom Translations You can create and use a custom translation for a new language not supported by Quarto as follows: Make a copy of the default _language.yml file (https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/language/_language.yml). Provide translations from the default English values. Specify the custom translation file using the language option. For example: --- language: custom.yml --- The language option can be specified at a project or document level. Additionally, if you include a _language.yml file in the root of your project alongside your _quarto.yml config file it will be automatically used. If you create a language translation file please consider contributing it so others can benefit from it. See the documentation on contributing language translations for additional details.
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/language.html", "source": "https://quarto.org/docs/authoring/language.html" }
Overview Cross-references make it easier for readers to navigate your document by providing numbered references and hyperlinks to various entities like figures and tables. Every cross-referenceable entity requires a label (unique identifier prefixed with type e.g. #fig-element) and caption (description). For example, this is a cross-referenceable figure: ![Elephant](elephant.png){#fig-elephant} The presence of the caption (Elephant) and label (#fig-elephant) make this figure referenceable. This enables you to use the following syntax to refer to it elsewhere in the document: See @fig-elephant for an illustration. Here is what this would look like rendered to HTML: Quarto enables you to create cross-references to figures, tables, equations, sections, code listings, theorems, proofs, and more. Cross references can also be applied to dynamic output from Knitr and Jupyter. Note that cross reference identifiers must start with their type (e.g. fig- or tbl-). So the identifier #fig-elephant is valid for a cross-reference but the identifiers #elephant and #elephant-fig are not. There are options available that control the text used for titles and references. For example, you could change “Figure 1” to read “Fig 1” or “fig. 1”. See the options documentation for details on how to customize the text used for crossrefs. Note Quarto’s syntax for cross-references is based on pandoc-crossref (which is in turn based on this discussion: https://github.com/jgm/pandoc/issues/813). There are however several differences (mostly related to handling computational output) to note: Quarto uses the prefix #fig- rather than #fig: (which is more compatible with Jupyter notebook cell ids). Quarto is able to reference raw HTML and LaTeX figures and tables (which are often produced by executable code blocks). Quarto has support for referencing theorems and proofs (and related types). Figures As described above, this is the markdown used to create a cross-referenceable figure and then refer to it: ![Elephant](elephant.png){#fig-elephant} See @fig-elephant for an illustration. Note again that cross-reference identifiers must start with their type (e.g. #fig-). Subfigures You may want to create a figure composed of multiple subfigures. To do this, enclose the figures in a div (with its own label and caption) and give each subfigure its own label and (optionally) caption. You can then refer to either the entire figure in a reference or a single subfigure: ::: {#fig-elephants layout-ncol=2} ![Surus](surus.png){#fig-surus} ![Hanno](hanno.png){#fig-hanno} Famous Elephants ::: See @fig-elephants for examples. In particular, @fig-hanno. Here is what this looks like when rendered as HTML: Note that we also used the layout-ncol attribute to specify a two-column layout. See the article on Figures for more details on laying out panels of figures. Computations Figures produced by Jupyter and Knitr can also be cross-referenced. To do this, add a label and fig-cap option at the top of the code block. For example: JupyterKnitr ```{python} #| label: fig-plot #| fig-cap: "Plot" import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` For example, see @fig-plot. ```{r} #| label: fig-plot #| fig-cap: "Plot" plot(cars) ``` For example, see @fig-plot. You can also create multiple figures within a code cell and reference them as subfigures. To do this use fig-cap for the main caption, and fig-subcap to provide an array of subcaptions. For example: ```{python} #| label: fig-plots #| fig-cap: "Plots" #| fig-subcap: #| - "Plot 1" #| - "Plot 2" #| layout-ncol: 2 import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() plt.plot([8,65,23,90]) plt.show() ``` See @fig-plots for examples. In particular, @fig-plots-2. Note that subfigure reference labels are created automatically based on the main chunk label (e.g. @fig-plots-1, @fig-plots-2, etc.). If you’d like subfigure captions that include only an identifier, e.g. “(a)”, and not a text caption, then specify fig-subcap: true rather than providing explicit subcaption text: ```{python} #| label: fig-plots #| fig-cap: "Plots" #| fig-subcap: true #| layout-ncol: 2 ``` Tables For tables produced by executable code cells, include a label with a tbl- prefix to make them cross-referenceable. For example: ```{python} #| label: tbl-planets #| tbl-cap: Planets from IPython.display import Markdown from tabulate import tabulate table = [["Sun",696000,1989100000], ["Earth",6371,5973.6], ["Moon",1737,73.5], ["Mars",3390,641.85]] Markdown(tabulate( table, headers=["Planet","R (km)", "mass (x 10^29 kg)"] )) ``` Table 1: Planets Planet R (km) mass (x 10^29 kg) Sun 696000 1.9891e+09 Earth 6371 5973.6 Moon 1737 73.5 Mars 3390 641.85 Label Prefix In order for a table to be cross-referenceable, its label must start with the tbl- prefix. For markdown tables, add a caption below the table, then include a #tbl- label in braces at the end of the caption. For example: | Col1 | Col2 | Col3 | |------|------|------| | A | B | C | | E | F | G | | A | G | G | : My Caption {#tbl-letters} See @tbl-letters. Which looks like this when rendered to HTML: Subtables You may want to create a composition of several sub-tables. To do this, create a div with a main identifier, then apply sub-identifiers (and optional caption text) to the contained tables. For example: ::: {#tbl-panel layout-ncol=2} | Col1 | Col2 | Col3 | |------|------|------| | A | B | C | | E | F | G | | A | G | G | : First Table {#tbl-first} | Col1 | Col2 | Col3 | |------|------|------| | A | B | C | | E | F | G | | A | G | G | : Second Table {#tbl-second} Main Caption ::: See @tbl-panel for details, especially @tbl-second. Which looks like this when rendered to HTML: Note that the “Main Caption” for the table is provided as the last block within the containing div. Computations You can also cross-reference tables created from code executed via computations. To do this, add the label and tbl-cap cell options. For example: ```{r} #| label: tbl-iris #| tbl-cap: "Iris Data" library(knitr) kable(head(iris)) ``` You can also create multiple tables within a code cell and reference them as sutables. To do this, add a tbl-subcap option with an array of subcaptions. For example: ```{r} #| label: tbl-tables #| tbl-cap: "Tables" #| tbl-subcap: #| - "Cars" #| - "Pressure" #| layout-ncol: 2 library(knitr) kable(head(cars)) kable(head(pressure)) ``` If you’d like subtable captions that include only an identifier, e.g. “(a)”, and not a text caption, then specify tbl-subcap: true rather than providing explicit subcaption text: ```{r} #| label: tbl-tables #| tbl-cap: "Tables" #| tbl-subcap: true #| layout-ncol: 2 library(knitr) kable(head(cars)) kable(head(pressure)) ``` Equations Provide an #eq- label immediately after an equation to make it referenceable. For example: Black-Scholes (@eq-black-scholes) is a mathematical model that seeks to explain the behavior of financial derivatives, most commonly options: $$ \frac{\partial \mathrm C}{ \partial \mathrm t } + \frac{1}{2}\sigma^{2} \mathrm S^{2} \frac{\partial^{2} \mathrm C}{\partial \mathrm C^2} + \mathrm r \mathrm S \frac{\partial \mathrm C}{\partial \mathrm S}\ = \mathrm r \mathrm C $$ {#eq-black-scholes} Black-Scholes (Equation 1) is a mathematical model that seeks to explain the behavior of financial derivatives, most commonly options: \[ \frac{\partial \mathrm C}{ \partial \mathrm t } + \frac{1}{2}\sigma^{2} \mathrm S^{2} \frac{\partial^{2} \mathrm C}{\partial \mathrm C^2} + \mathrm r \mathrm S \frac{\partial \mathrm C}{\partial \mathrm S}\ = \mathrm r \mathrm C \tag{1}\] Note that the equation number is included (via \qquad) in the right margin of the equation. Sections To reference a section, add a #sec- identifier to any heading. For example: ## Introduction {#sec-introduction} See @sec-introduction for additional context. Note that when using section cross-references, you will also need to enable the number-sections option (so that section numbering is visible to readers). For example: --- title: "My Document" number-sections: true --- Code Listings To create a reference-able code block, add a #lst- identifier along with a lst-cap attribute. For example: ```{#lst-customers .sql lst-cap="Customers Query"} SELECT * FROM Customers ``` Then we query the customers database (@lst-customers). Theorems and Proofs Theorems are commonly used in articles and books in mathematics. To include a reference-able theorem, create a div with a #thm- label (or one of other theorem-type labels described below). You also need to specify a theorem name either via the first heading in the block. You can include any content you like within the div. For example: ::: {#thm-line} ## Line The equation of any straight line, called a linear equation, can be written as: $$ y = mx + b $$ ::: See @thm-line. For LaTeX output, the amsthm package is used for typesetting theorems. For other formats an appropriate treatment is used (the above is an example of HTML output). There are a number of theorem variations supported, each with their own label prefix: Label Prefix Printed Name LaTeX Environment #thm- Theorem theorem #lem- Lemma lemma #cor- Corollary corollary #prp- Proposition proposition #cnj- Conjecture conjecture #def- Definition definition #exm- Example example #exr- Exercise exercise The proof, remark, and solution environments generally receive similar typesetting as theorems, however they are not numbered (and therefore cannot be cross-referenced). To create these environments just use them as the class name of a div: ::: {.solution} The solution. ::: As with theorems you can optionally include a heading as the first element of the div (or a name attribute) to give the environment a caption for typesetting (this typically appears in parentheses after the environment title). For LaTeX output the amsthm package is used to typeset these environments. For other formats a similar treatment is used, but you can further customizing this using CSS. References The examples above have all used the default syntax for inline references (e.g. @fig-elephant), which results in the reference text “Figure 1”, “Table 1”, etc. You can customize the appearance of inline references by either changing the syntax of the inline reference or by setting options. Here are the various ways to compose a cross-reference and their resulting output: Type Syntax Output Default @fig-elephant Figure 1 Capitalized @Fig-elephant Figure 1 Custom Prefix [Fig @fig-elephant] Fig 1 No Prefix [-@fig-elephant] 1 Note that the capitalized syntax makes no difference for the default output, but would indeed capitalize the first letter if the default had been change via an option to use lower case (e.g. “fig.”). You can also group cross references using the following syntax: As illustrated in [@fig-elephant; @fig-panther; @fig-rabbit]. There are a number of options that can be used to further customize the treatment of cross-references. See the section below on References Options for additional details. Chapter Numbering You can use the crossref: chapters option to indicate that top-level headings (H1) in your document correspond to chapters, and that cross-references should be sub-numbered by chapter. For example: --- title: "My Document" author: "Jane Doe" number-sections: true crossref: chapters: true --- # Introduction ![Elephant](elephant.png){#fig-elephant} See @fig-elephant for an illustration. Lists For LaTeX / PDF output, you can use the raw LaTeX commands \listoffigures, \listoftables and \listoflistings to produce listings of all figures, tables, etc. within a document. You can use the lof-title, lot-title, and lol-title crossref options to customize the title of the listing. For example: --- title: "My Document" crossref: lof-title: "List of Figures" format: pdf --- \listoffigures Note that the default titles for the lists use the form displayed above (i.e. “List of…<Type>”). Options There are a wide variety of options available for customizing caption labels and references. These options are all specified within the crossref key of document metadata. Note that since LaTeX does its own formatting and layout of figures and tables, not all of these options will apply when rendering to PDF. Specifically, delimiter options like title-delim and numbering options like labels don’t work for PDF output. Additionally, formatting directives are not applied (e.g. italicizing the figure title) for LaTeX titles. Titles You can specify the title prefix used for captions using *-title options. You can also specify the delimiter used between the prefix and the caption using the title-delim option. For example: --- title: "My Document" crossref: fig-title: Fig # (default is "Figure") tbl-title: Tbl # (default is "Table") title-delim: — # (default is ":") --- References You can specify the prefix used for inline reference type using *-prefix options. You can also specify whether references should be hyper-linked using the ref-hyperlink option. For example: --- title: "My Document" crossref: fig-prefix: figure # (default is "Figure") tbl-prefix: table # (default is "Table") ref-hyperlink: false # (default is true) --- Numbering There are a variety of numbering schemes available for cross-references, including: arabic (1, 2, 3) roman (I, II, III, IV) roman i (i, ii, iii, iv) alpha x (start from letter ‘x’) alpha X (start from letter ‘X’) You can specify the number scheme used for all types (other than sub-references) using the labels option. For sub-references (e.g. subfigures), you can specify the number scheme using the subref-labels option. For example: --- title: "My Document" crossref: labels: alpha a # (default is arabic) subref-labels: roman i # (default is alpha a) --- If you would like, you can specify the number scheme for a specific type using the *-labels options. For example: --- title: "My Document" crossref: fig-labels: alpha a # (default is arabic) tbl-labels: alpha a # (default is arabic) subref-labels: roman i # (default is alpha a) --- If both labels and a type specific label option is provided, the type specific option will override the labels option.
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/cross-references.html", "source": "https://quarto.org/docs/authoring/cross-references.html" }
Overview Quarto has native support for embedding Mermaid and Graphviz diagrams. This enables you to create flowcharts, sequence diagrams, state diagrams, gantt charts, and more using a plain text syntax inspired by markdown. For example, here we embed a flowchart created using Mermaid: ```{mermaid} flowchart LR A[Hard edge] --> B(Round edge) B --> C{Decision} C --> D[Result one] C --> E[Result two] ``` flowchart LR A[Hard edge] --> B(Round edge) B --> C{Decision} C --> D[Result one] C --> E[Result two] As illustrated above, Mermaid diagrams are embedded using {mermaid} executable cells. Graphviz diagrams are embedded using {dot} executable cells. Note that cell options are added with slightly different syntax: %%| for {mermaid}, and //| for {dot}. Note For print output formats like pdf or docx, diagram rendering makes use use of the Chrome or Edge web browser to create a high-quality PNG. Quarto can automatically use an existing version of Chrome or Edge on your system, or alternatively if you don’t have either installed, can use a lighter-weight library version of Chrome (see Chrome Install below for details). Mermaid Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. Mermaid diagrams use %% as their comment syntax, and so cell options are declared using %%|. Cell options must be included directly beneath the start of the diagram code chunk. Above we demonstrated a flowchart created with Mermaid, here is a sequence diagram (also embedded using a {mermaid} executable cell): ```{mermaid} sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good! ``` sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good! Note that Mermaid output varies depending on the target format (e.g. HTML vs. print-based). See the section below on Mermaid Formats for additional details. To learn more about using Mermaid, see the Mermaid website or the Mermaid book (which is written by the creator of Mermaid). Graphviz The Graphviz layout programs take descriptions of graphs in a simple text language, and make diagrams in useful formats. Graphviz has many useful features for concrete diagrams, such as options for colors, fonts, tabular node layouts, line styles, hyperlinks, and custom shapes. Graphviz diagrams use // as their comment syntax, and so cell options are declared using //|. Cell options must be included directly beneath the start of the diagram code chunk. For example, here is a simple undirected graph created using graphviz: ```{dot} graph G { layout=neato run -- intr; intr -- runbl; runbl -- run; run -- kernel; kernel -- zombie; kernel -- sleep; kernel -- runmem; sleep -- swap; swap -- runswap; runswap -- new; runswap -- runmem; new -- runmem; sleep -- runmem; } ``` G run run intr intr run–intr kernel kernel run–kernel runbl runbl intr–runbl runbl–run zombie zombie kernel–zombie sleep sleep kernel–sleep runmem runmem kernel–runmem sleep–runmem swap swap sleep–swap runswap runswap swap–runswap runswap–runmem new new runswap–new new–runmem To learn more about Graphviz, see the Graphviz website, this list of simple Graphiz Examples, or the Graphviz Gallery. Authoring There are a variety of tools available to improve your productivity authoring diagrams: The Mermaid Live Editor is an online tool for editing and previewing Mermaid diagrams in real time. Graphviz Online provides a similar tool for editing Graphviz diagrams. RStudio includes support for editing and previewing .mmd and .dot files (with help from the DiagrammeR package). The Quarto VS Code Extension supports live preview of diagrams embedded in .qmd files and in .mmd and .dot files: Note that you should be sure to have installed the very latest version of the Quarto VS Code extension to try this out. Figures Diagrams can be treated as figures the same way that images and plot output are. For example, if we added the following figure options to the diagram above: ```{dot} //| label: fig-simple //| fig-cap: "This is a simple graphviz graph." ``` We’d get this output: G run run intr intr run–intr kernel kernel run–kernel runbl runbl intr–runbl runbl–run zombie zombie kernel–zombie sleep sleep kernel–sleep runmem runmem kernel–runmem sleep–runmem swap swap sleep–swap runswap runswap swap–runswap runswap–runmem new new runswap–new new–runmem Figure 1: This is a simple graphviz graph. File Include You might find it more convenient to edit your diagram in a standalone file and then reference it from within your .qmd document. You can do this by adding the file option to a Mermaid or Graphviz cell. For example, here we include a very complex diagram whose definition would be too unwieldy to provide inline: ```{dot} //| label: fig-linux-kernel //| fig-cap: "A diagram of the Linux kernel." //| file: linux-kernel-diagram.dot ``` Linux_kernel_diagram SCI System calls system system system->system_ processing processing sysfs proc & sysfs file systems SCI->sysfs DM Device Model sysfs->DM log_sys system run, modules, generic HW access DM->log_sys bus_drv bus drivers log_sys->bus_drv buses buses: PCI, USB … bus_drv->buses sock Sockets networking networking networking->networking_ prot_fam protocol families sock->prot_fam log_prot protocols: TCP, UDP, IP prot_fam->log_prot netif network interfaces and drivers log_prot->netif net_hw network: Ethernet, WiFi … netif->net_hw NFS NFS NFS->log_prot proc Processes processing->processing_ memory memory Tasks Tasks proc->Tasks sync synchronization Tasks->sync sched Scheduler sync->sched IRQ interrupts core, CPU arch sched->IRQ CPU CPU IRQ->CPU bottom © 2007-2022 Costa Shulyupin http://www.MakeLinux.net/kernel/diagram MA memory access VM Virtual memory MA->VM mmap memory mapping VM->mmap log_mem logical memory mmap->log_mem SW Swap mmap->SW PA Page Allocator log_mem->PA RAM MMU, RAM PA->RAM block Block devices and drivers SW->block SD storage devices: SCSI, NVMe … block->SD PC page cache PC->PA memory->memory_ storage storage FS files and directories storage->storage_ VFS Virtual File System FS->VFS VFS->NFS VFS->mmap VFS->PC logFS logical filesystems: ext3, xfs … VFS->logFS logFS->block char char devices HI human interface HI->HI_ input input subsystem char->input F7 HI class drivers input->F7 HID HI peripherals drivers F7->HID display keyboard, mouse, display, audio HID->display functions functions functions->functions_ layers layers usr user space interfaces usr->usr_ virt virtual subsystems usr->virt virt->D0 bridges bridges virt->bridges bridges->E0 logical logical bridges->logical logical->F0 HWI hardware interfaces logical->HWI HWI->G0 HW electronics, hardware HWI->HW HW->H0 layers->usr LKD Linux kernel diagram Figure 2: A diagram of the Linux kernel. Note that the label and fig-cap attributes still work as expected with file includes. Sizing By default, diagrams are rendered at their natural size (i.e. they are not stretched to fit the default figure size for the current document). Within HTML output formats, diagrams are also made responsive, so that their width doesn’t overflow the current page column. This is similar to the treatment given to images and dynamic JavaScript widgets. You can disable responsive sizing by specifying the fig-responsive: false option. You can also specify explicit sizes via fig-width and fig-height. For example, here we want to make a mermaid diagram a bit bigger because it contains only a few elements: ```{mermaid} %%| fig-width: 6.5 flowchart LR A[Hard edge] --> B(Round edge) B --> C{Decision} ``` flowchart LR A[Hard edge] --> B(Round edge) B --> C{Decision} Mermaid Formats When you include a Mermaid diagram in a document, the diagram format used is chosen automatically based on the output format: Format Output HTML (html, revealjs, etc.) Mermaid native (JavaScript) GitHub Flavored Markdown (gfm) Mermaid code block Other Formats (pdf, docx, etc.) PNG image The Mermaid native format is used by default whenever the underlying output format supports JavaScript. When using format: gfm, diagrams will be emitted as plain mermaid code blocks. This is because both GitHub and GitLab natively support rendering Mermaid diagrams from code. For formats that don’t do special handling of Mermaid or lack a JavaScript run-time (e.g. formats like pdf, docx, epub, etc.) a PNG image is created using Chrome. You can change the default behavior using the mermaid-format option. For example: --- format: gfm: mermaid-format: png --- Valid values for mermaid-format include js, png, and svg, Mermaid Themes Quarto 1.3 Feature This feature is new in Quarto 1.3, which you can download at https://quarto.org/docs/download/ The following sections describe the ways in which you can control the color theme of Mermaid diagrams: Using the current document theme. Using one of Mermaid’s own color themes via a YAML option. Using SCSS and CSS variables. Default Colors for Mermaid Diagrams If you use Quarto’s bootswatch built-in themes, including the default theme, or a custom theme that uses the same SCSS variables, your Mermaid diagrams will automatically follow your theme. The following examples demonstrate this with a few of Quarto’s built-in bootswatch themes. DarklySandstoneVapor You can read more about the correspondence between Bootstrap’s SCSS variables and Quarto’s Mermaid SCSS variables, and how to change it, below in Customizing the Mermaid Theme. Using Mermaid’s Built-in Themes If you want to use Mermaid’s own themes, you can do so by configuring the mermaid option in your YAML front matter: format: html: mermaid: theme: forest The available themes from mermaid are: default, dark, forest, and neutral. defaultdarkforestneutral Customizing the Mermaid Theme Quarto provides its own Mermaid SCSS and CSS variables that can be overwritten to allow some customization of the diagram theme. The SCSS variables, together with their default values, are: $mermaid-bg-color: $body-bg; $mermaid-edge-color: $secondary; $mermaid-node-fg-color: $body-color; $mermaid-fg-color: $body-color; $mermaid-fg-color--lighter: $body-color-lighter; $mermaid-fg-color--lightest: $body-color-lightest; $mermaid-font-family: $font-family-sans-serif; $mermaid-label-bg-color: $body-bg; $mermaid-label-fg-color: $primary; $mermaid-node-bg-color: $primary-transparent; $mermaid-node-fg-color: $primary; Their CSS variable counterparts are: :root { --mermaid-bg-color: #{$mermaid-bg-color}; --mermaid-edge-color: #{$mermaid-edge-color}; --mermaid-node-fg-color: #{$mermaid-node-fg-color}; --mermaid-fg-color: #{$mermaid-fg-color}; --mermaid-fg-color--lighter: #{$mermaid-fg-color--lighter}; --mermaid-fg-color--lightest: #{$mermaid-fg-color--lightest}; --mermaid-font-family: #{$mermaid-font-family}; --mermaid-label-bg-color: #{$mermaid-label-bg-color}; --mermaid-label-fg-color: #{$mermaid-label-fg-color}; --mermaid-node-bg-color: #{$mermaid-node-bg-color}; --mermaid-node-fg-color: #{$mermaid-node-fg-color}; } For example, to provide a custom color for the background of the nodes you could add a custom CSS stylesheet containing: :root { --mermaid-node-bg-color: #375a7f; } You can find the correspondence between Quarto’s variables and Mermaid’s native CSS classes in Quarto’s source code in the file embed-mermaid.css. Code Echo Note that unlike other executable cell handlers (e.g. {python}), cells with diagrams don’t display their code in the rendered document by default. You can display code by adding an echo: true option in a comment at the top the cell. To include code for {mermaid}, add %%| echo: true to the top of the cell. For example: ```{mermaid} %%| echo: true ``` To include code for {dot}, add //| echo: true to the top of the cell. For example: ```{dot} //| echo: true ``` Chrome Install For printing to output formats like pdf or docx, diagram rendering makes use of the Chrome or Edge web browser to create a high-quality PNG. Quarto can automatically use an existing version of Chrome or Edge on your system for rendering. Alternatively, if you don’t have either, you can install a minimal version of Chrome for use by Quarto with the following command: Terminal quarto tools install chromium Note Quarto installs headless Chromium via Puppeteer. The bundled Chromium that Puppeteer installs may not work on Docker containers; please check the Puppeteer documentation as well as this article if you are attempting to install within Windows Subsystem for Linux (WSL).
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/diagrams.html", "source": "https://quarto.org/docs/authoring/diagrams.html" }
Overview Quarto supports executable Julia code blocks within markdown. This allows you to create fully reproducible documents and reports—the Julia code required to produce your output is part of the document itself, and is automatically re-run whenever the document is rendered. Quarto executes Julia code using the IJulia Jupyter kernel. Below we’ll describe how to install IJulia and related requirements but first we’ll cover the basics of creating and rendering documents with Julia code blocks. Code Blocks Code blocks that use braces around the language name (e.g. ```{julia}) are executable, and will be run by Quarto during render. Here is a simple example: --- title: "Plots Demo" author: "Norah Jones" date: "5/22/2021" format: html: code-fold: true jupyter: julia-1.8 --- ## Parametric Plots Plot function pair (x(u), y(u)). See @fig-parametric for an example. ```{julia} #| label: fig-parametric #| fig-cap: "Parametric Plots" using Plots plot(sin, x->sin(2x), 0, 2π, leg=false, fill=(0,:lavender)) ``` You’ll note that there are some special comments at the top of the code block. These are cell level options that make the figure cross-referenceable. This document would result in the following rendered output: You can produce a wide variety of output types from executable code blocks, including plots, tabular output from data frames, and plain text output (e.g. printing the results of statistical summaries). There are many options which control the behavior of code execution and output, you can read more about them in the article on Execution Options. Multiple Outputs By default Julia cells will automatically print the value of their last statement (as with the example above where the call to plot() resulted in plot output). If you want to display multiple plots (or other types of output) from a single cell you should call the display() function explicitly. For example, here we output two plots side-by-side with sub-captions: ```{julia} #| label: fig-plots #| fig-cap: "Multiple Plots" #| fig-subcap: #| - "Plot 1" #| - "Plot 2" #| layout-ncol: 2 using Plots display(plot(sin, x -> sin(2x), 0, 2)) display(plot(x -> sin(4x), y -> sin(5y), 0, 2)) ``` Rendering Quarto will automatically run computations in any markdown document that contains executable code blocks. For example, the example shown above might be rendered to various formats with: Terminal quarto render document.qmd # defaults to html quarto render document.qmd --to pdf quarto render document.qmd --to docx Quarto can also render any Jupyter notebook (.ipynb): Terminal quarto render document.ipynb Note that the target file (in this case document.qmd) should always be the very first command line argument. Note that when rendering an .ipynb Quarto will not execute the cells within the notebook by default (the presumption being that you already executed them while editing the notebook). If you want to execute the cells you can pass the --execute flag to render: Terminal quarto render notebook.ipynb --execute Installation In order to render documents with embedded Julia code you’ll need to install the following components: IJulia Revise.jl Optionally, Jupyter Cache We’ll cover each of these in turn below. IJulia IJulia is a Julia-language execution kernel for Jupyter. You can install IJulia from within the Julia REPL as follows: using Pkg Pkg.add("IJulia") using IJulia notebook() The first time you run notebook(), it will prompt you for whether it should install Jupyter. Hit enter to have it use the Conda.jl package to install a minimal Python+Jupyter distribution (via Miniconda) that is private to Julia (not in your PATH). On Linux, it defaults to looking for jupyter in your PATH first, and only asks to installs the Conda Jupyter if that fails. If you choose not to use Conda.jl to install Python and Jupyter you will need to make sure that you have another installation of it on your system (see the section on Installing Jupyter if you need help with this). Revise.jl In addition to IJulia, you’ll want to install Revise.jl and configure it for use with IJulia. Revise.jl is a library that helps you keep your Julia sessions running longer, reducing the need to restart when you make changes to code. Quarto maintains a persistent kernel daemon for each document to mitigate Jupyter start up time during iterative work. Revise.jl will make this persistent process robust in the face of package updates, git branch checkouts, etc. Install Revise.jl with: using Pkg Pkg.add("Revise") To configure Revise to launch automatically within IJulia, create a .julia/config/startup_ijulia.jl file with the contents: try @eval using Revise catch e @warn "Revise init" exception=(e, catch_backtrace()) end You can learn more about Revise.jl at https://timholy.github.io/Revise.jl/stable. Jupyter Cache Jupyter Cache enables you to cache all of the cell outputs for a notebook. If any of the cells in the notebook change then all of the cells will be re-executed. If you are using the integrated version of Jupyter installed by IJulia.notebook(), then you will need to add jupyter-cache to the Python environment managed by IJulia. You can do that as follows: using Conda Conda.add("jupyter-cache") Alternatively, if you are using Jupyter from within any other version of Python not managed by IJulia, see the instructions below on Installing Jupyter for details on installing jupyter cache, Workflow You can author Quarto documents that include Julia code using any text or notebook editor. No matter what editing tool you use, you’ll always run quarto preview first to setup a live preview of changes in your document. Live preview is available for both HTML and PDF output. For example: Terminal # preview as html quarto preview document.qmd # preview as pdf quarto preview document.qmd --to pdf # preview a jupyter notebook quarto preview document.ipynb Note that when rendering an .ipynb Quarto will not execute the cells within the notebook by default (the presumption being that you already executed them while editing the notebook). If you want to execute the cells you can pass the --execute flag to render: Terminal quarto render notebook.ipynb --execute You can also specify this behavior within the notebook’s YAML front matter: --- title: "My Notebook" execute: enabled: true --- Embed Notebooks In addition to including executable Julia code chunks in a Quarto document, you can also embed cells from an external Jupyter Notebook (.ipynb). See Embedding Jupyter Notebook Cells for more details. VS Code The Quarto Extension for VS Code provides a variety of tools for working with .qmd files in VS Code. The extension integrates directly with the Julia Extension to provide the following Julia-specific capabilities: Code completion Cell execution Contextual help You can install the VS Code extension by searching for ‘quarto’ in the extensions panel or from the extension marketplace. You can also use the VS Code notebook editor to create Julia notebooks that you will render with Quarto. The next section discusses using notebooks with Quarto in the context of Jupyter Lab, but the same concepts apply to VS Code. Jupyter Lab We could convert the simple document.qmd we used as an example above to a Jupyter notebook using the quarto convert command. For example: Terminal quarto convert document.qmd If we open this notebook in Jupyter Lab and execute the cells, here is what we see: Note that there are three different types of cell here: The YAML document options at the top are in a Raw cell. The heading and explanation are in a Markdown cell. The Julia code and its output are in a Code cell. When working in a Jupyter notebook, you can use quarto preview to provide a live preview of your rendered document: Terminal quarto preview document.ipynb The preview will be updated every time you save the notebook in Jupyter Lab. Caching Jupyter Cache enables you to cache all of the cell outputs for a notebook. If any of the cells in the notebook change then all of the cells will be re-executed. To use Jupyter Cache you’ll want to first install the jupyter-cache package: Platform Command Mac/Linux Terminal python3 -m pip install jupyter-cache Windows Terminal py -m pip install jupyter-cache To enable the cache for a document, add the cache option. For example: --- title: "My Document" format: html execute: cache: true --- You can also specify caching at the project level. For example, within a project file: project: type: website format: html: theme: united execute: cache: true Note that changes within a document that aren’t within code cells (e.g. markdown narrative) do not invalidate the document cache. This makes caching a very convenient option when you are working exclusively on the prose part of a document. Jupyter Cache include a jcache command line utility that you can use to analyze and manage the notebook cache. See the Jupyter Cache documentation for additional details. Rendering You can use quarto render command line options to control caching behavior without changing the document’s code. Use options to force the use of caching on all chunks, disable the use of caching on all chunks (even if it’s specified in options), or to force a refresh of the cache even if it has not been invalidated: Terminal # use a cache (even if not enabled in options) quarto render example.qmd --cache # don't use a cache (even if enabled in options) quarto render example.qmd --no-cache # use a cache and force a refresh quarto render example.qmd --cache-refresh Alternatives If you are using caching to mitigate long render-times, there are some alternatives you should consider alongside caching. Disabling Execution If you are working exclusively with prose / markdown, you may want to disable execution entirely. Do this by specifying the enabled: false execute option For example: --- title: "My Document" format: html execute: enabled: false --- Note that if you are authoring using Jupyter .ipynb notebooks (as opposed to plain-text .qmd files) then this is already the default behavior: no execution occurs when you call quarto render (rather, execution occurs as you work within the notebook). Freezing Execution If you are working within a project and your main concern is the cumulative impact of rendering many documents at once, consider using the freeze option. You can use the freeze option to denote that computational documents should never be re-rendered during a global project render, or alternatively only be re-rendered when their source file changes: execute: freeze: true # never re-render during project render execute: freeze: auto # re-render only when source changes Note that freeze controls whether execution occurs during global project renders. If you do an incremental render of either a single document or a project sub-directory then code is always executed. For example: Terminal # render single document (always executes code) quarto render document.qmd # render project subdirectory (always executes code) quarto render articles Learn more about using freeze with projects in the article on managing project execution. Kernel Selection You’ll note in our first example that we specified the use of the julia-1.7 kernel explicitly in our document options (shortened for brevity): --- title: "StatsPlots Demo" jupyter: julia-1.7 --- If no jupyter kernel is explicitly specified, then Quarto will attempt to automatically discover a kernel on the system that supports Julia. You can discover the available Jupyter kernels on your system using the quarto check command: Terminal quarto check jupyter Kernel Daemon To mitigate the start-up time for the Jupyter kernel Quarto keeps a daemon with a running Jupyter kernel alive for each document. This enables subsequent renders to proceed immediately without having to wait for kernel start-up. The purpose of the daemon is to make render more responsive during interactive sessions. Accordingly, no daemon is created when documents are rendered without an active tty or when they are part of a batch rendering (e.g. in a Quarto Project). Note that Quarto does not use a daemon by default on Windows (as some Windows systems will not allow the socket connection required by the daemon). You can customize this behavior using the daemon execution option. Set it to false to prevent the use of a daemon, or set it to a value (in seconds) to determine the period after which the daemon will timeout (the default is 300 seconds). For example: execute: daemon: false execute: daemon: 60 Note that if you want to use a daemon on Windows you need to enable it explicitly: execute: daemon: true Command Line You can also control use of the Jupyter daemon using the following command line options: Terminal # use a daemon w/ default timeout (300 sec) quarto render document.qmd --execute-daemon # use a daemon w/ an explicit timeout quarto render document.qmd --execute-daemon 60 # prevent use of a daemon quarto render document.qmd --no-execute-daemon You can also force an existing daemon to restart using the --execute-daemon-restart command line flag: Terminal quarto render document.qmd --execute-daemon-restart This might be useful if you suspect that the re-use of notebook sessions is causing an error. Finally, you can print extended debugging information about daemon usage (startup, shutdown, connections, etc.) using the --execute-debug flag: Terminal quarto render document.qmd --execute-debug Installing Jupyter You can rely on the minimal version of Python and Jupyter that is installed automatically by IJulia, or you can choose to install Python and Jupyter separately. If you need to install another version of Jupyter this section describes how. If you don’t yet have Python 3 on your system, we recommend you install a version using the standard installer from https://www.python.org/downloads/. If you are in a fresh Python 3 environment, installing the jupyter package will provide everything required to execute Jupyter kernels with Quarto: Pkg. Manager Command Pip (Mac/Linux) Terminal python3 -m pip install jupyter Pip (Windows) Terminal py -m pip install jupyter Conda Terminal conda install jupyter You can verify that Quarto is configured correctly for Jupyter with: Terminal quarto check jupyter Quarto will select a version of Python using the Python Launcher on Windows or system PATH on MacOS and Linux. You can override the version of Python used by Quarto by setting the QUARTO_PYTHON environment variable. Jupyter Cache Jupyter Cache enables you to cache all of the cell outputs for a notebook. If any of the cells in the notebook change then all of the cells will be re-executed. To use Jupyter Cache you’ll want to first install the jupyter-cache package: Platform Command Mac/Linux Terminal python3 -m pip install jupyter-cache Windows Terminal py -m pip install jupyter-cache Conda Terminal conda install jupyter-cache To enable the cache for a document, add the cache option. For example:
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/computations/julia.html", "source": "https://quarto.org/docs/computations/julia.html" }
Overview Quarto is a multi-language, next generation version of R Markdown from RStudio, with many new features and capabilities. Like R Markdown, Quarto uses Knitr to execute R code, and is therefore able to render most existing Rmd files without modification. We’ll start by covering the basics of Quarto, then delve into the differences between Quarto and R Markdown in the sections on Chunk Options and Output Formats below. Code Blocks Code blocks that use braces around the language name (e.g. ```{r}) are executable, and will be run by Quarto during render. Here is a simple example: --- title: "ggplot2 demo" author: "Norah Jones" date: "5/22/2021" format: html: code-fold: true --- ## Air Quality @fig-airquality further explores the impact of temperature on ozone level. ```{r} #| label: fig-airquality #| fig-cap: "Temperature and ozone level." #| warning: false library(ggplot2) ggplot(airquality, aes(Temp, Ozone)) + geom_point() + geom_smooth(method = "loess") ``` You’ll note that there are some special comments at the top of the code block. These are cell level options that make the figure cross-referenceable. This document results in the following rendered output: You can produce a wide variety of output types from executable code blocks, including plots, tabular output from data frames, and plain text output (e.g. printing the results of statistical summaries). There are many options which control the behavior of code execution and output, you can read more about them in the article on Execution Options. Rendering When a Quarto document is rendered, R code blocks are automatically executed. You can render Quarto documents in a variety of ways: Using the Render button in RStudio: From the system shell using the quarto render command: Terminal quarto render document.qmd # defaults to html quarto render document.qmd --to pdf quarto render document.qmd --to docx Note that the target file (in this case document.qmd) should always be the very first command line argument. From the R console using the quarto R package: library(quarto) quarto_render("document.qmd") # defaults to html quarto_render("document.qmd", output_format = "pdf") Note that the Quarto R package is a convenience for command line rendering from R, and is not required for using Quarto with R. Installation To use Quarto with R, you should install the rmarkdown R package: install.packages("rmarkdown") Installation of the rmarkdown package will also install the knitr package so you will have everything required to render documents containing R code. Quarto will select a version of R by looking on the system PATH. In addition, on Windows when R is not found on the PATH, the registry will be scanned for the current R version. You can override the version of R used by Quarto by setting the QUARTO_R environment variable. RStudio RStudio v2022.07 and later includes support for editing and preview of Quarto documents (the documentation below assumes you are using this build or a later version). If you are using Quarto within RStudio it is strongly recommended that you use the latest release of RStudio (v2023.03). You can download RStudio v2023.03 from https://posit.co/download/rstudio-desktop/. Creating Documents Use the File : New File : Quarto Document… command to create new Quarto documents: Render and Preview Use the Render button to preview documents as you edit them: If you prefer to automatically render whenever you save you can check the Render on Save option on the editor toolbar. The preview will appear alongside the editor: The preview will update whenever you re-render the document. Side-by-side preview works for both HTML and PDF output. Projects If you want to create a new project for a Quarto document or set of documents, use the File : New Project… command, specify New Directory, then choose Quarto Project: You can use this UI to create both vanilla projects as well as websites and books. Options are also provided for creating a git repository and initializing an renv environment for the project. VS Code The Quarto Extension for VS Code provides a variety of tools for working with .qmd files in VS Code. The extension integrates directly with the R Extension to provide the following R-specific capabilities: Code completion Cell execution Contextual help You can install the VS Code extension by searching for ‘quarto’ in the extensions panel or from the extension marketplace. When using VS Code there is not yet an integrated Render button for previewing documents. Rather, you should execute the quarto preview command from the VS Code terminal: Terminal quarto preview document.qmd The document will be re-rendered and the preview updated whenever you make changes to it in VS Code. Emacs The quarto-mode MELPA package is an Emacs mode for editing Quarto documents. Install quarto-mode as follows: M-x refresh-package-contents M-x install-package quarto-mode If you have ESS, quarto-mode will make use of it for executing R code. Use M-x quarto-preview to start a quarto preview server that watches quarto content for changes and automatically refreshes it. If the current buffer has an associated file that exists in a quarto project, the command will preview the entire project. Otherwise, it will preview the specific file. Chunk Options One important difference between R Markdown documents and Quarto documents is that in Quarto chunk options are typically included in special comments at the top of code chunks rather than within the line that begins the chunk. For example: ```{r} #| echo: false #| fig-cap: "Air Quality" library(ggplot2) ggplot(airquality, aes(Temp, Ozone)) + geom_point() + geom_smooth(method = "loess", se = FALSE) ``` Quarto uses this approach to both better accommodate longer options like fig-cap, fig-subcap, and fig-alt as well as to make it straightforward to edit chunk options within more structured editors that don’t have an easy way to edit chunk metadata (e.g. most traditional notebook UIs). Note Note that if you prefer it is still possible to include chunk options on the first line (e.g. ```{r, echo = FALSE}). That said, we recommend using the comment-based syntax to make documents more portable and consistent across execution engines. Chunk options included this way use YAML syntax rather than R syntax for consistency with options provided in YAML front matter. You can still however use R code for option values by prefacing them with !expr. For example: #| fig-cap: !expr 'paste("Air", "Quality")' Caution the !expr syntax is an example of a YAML “tag” literal, and it can be unintuitive. !expr needs to be followed by a single YAML “flow scalar”: see the YAML spec for details on how double-quoted, single-quoted, and unquoted strings work. Output Formats Another difference between R Markdown and Quarto is related to output formats. Quarto includes many more built in output formats (and many more options for customizing each format). Quarto also has native features for special project types like Websites, Books, and Blogs (rather than relying on external packages). To use a format in Quarto you use the format key rather than the output key as you did in R Markdown. Here’s a comparison of equivalent format specifications: R Markdown title: "My Document" output: html_document: toc: true number_sections: true css: styles.css Quarto title: "My Document" format: html: toc: true number-sections: true css: styles.css One source of the difference in syntax is that Quarto is more closely aligned with Pandoc format names and options (thus the use of - as a word separator rather than _). See the listing of all supported formats along with their user guides and reference pages for more details. See the articles on creating Websites, Books, and Blogs for additional details on more advanced output formats. Data Frames You can control how data frames are printed by default using the df-print document option. Available options include: Option Description 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 (implemented using rmarkdown::paged_table()) For example, here we specify that we want paged printing for data frames: --- title: "Document" format: html: df-print: paged --- Knitr Options If you are using the Knitr cell execution engine, you can specify default document-level Knitr chunk options in YAML. For example: --- title: "My Document" format: html knitr: opts_chunk: collapse: true comment: "#>" R.options: knitr.graphics.auto_pdf: true --- You can additionally specify global Knitr options using opts_knit. The R.options chunk option is a convenient way to define R options that are set temporarily via options() before the code chunk execution, and immediately restored afterwards. In the example above, we establish default Knitr chunk options for a single document. You can also add shared knitr options to a project-wide _quarto.yml file or a project-directory scoped _metadata.yml file. Caching The Knitr Cache operates at the level of individual cells rather than the entire document. While this can be very convenient, it also introduced some special requirements around managing the dependencies between cells. You can enable the Knitr cache at the document or project level using standard YAML options: --- title: "My Document" format: html execute: cache: true --- You can also enable caching on a per-cell basis (in this you would not set the document level option): ```{r} #| cache: true summary(cars) ``` There are a variety of other cell-level options that affect Knitr caching behavior. You can learn about them in the Knitr cell options reference. Another excellent resource is Yihui Xie’s article on cache invalidation. Rendering You can use quarto render command line options to control caching behavior without changing the document’s code. Use options to force the use of caching on all chunks, disable the use of caching on all chunks (even if it’s specified in options), or to force a refresh of the cache even if it has not been invalidated: Terminal # use a cache (even if not enabled in options) quarto render example.qmd --cache # don't use a cache (even if enabled in options) quarto render example.qmd --no-cache # use a cache and force a refresh quarto render example.qmd --cache-refresh Alternatives If you are using caching to mitigate long render-times, there are some alternatives you should consider alongside caching. Disabling Execution If you are working exclusively with prose / markdown, you may want to disable execution entirely. Do this by specifying the enabled: false execute option For example: --- title: "My Document" format: html execute: enabled: false --- Note that if you are authoring using Jupyter .ipynb notebooks (as opposed to plain-text .qmd files) then this is already the default behavior: no execution occurs when you call quarto render (rather, execution occurs as you work within the notebook). Freezing Execution If you are working within a project and your main concern is the cumulative impact of rendering many documents at once, consider using the freeze option. You can use the freeze option to denote that computational documents should never be re-rendered during a global project render, or alternatively only be re-rendered when their source file changes: execute: freeze: true # never re-render during project render execute: freeze: auto # re-render only when source changes Note that freeze controls whether execution occurs during global project renders. If you do an incremental render of either a single document or a project sub-directory then code is always executed. For example: Terminal # render single document (always executes code) quarto render document.qmd # render project subdirectory (always executes code) quarto render articles Learn more about using freeze with projects in the article on managing project execution.
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/computations/r.html", "source": "https://quarto.org/docs/computations/r.html" }
Overview When rendering documents with embedded computations becomes time-consuming, you may want to consider adding an execution cache, which will store the results of cell executions so they aren’t re-executed with every document render. Quarto integrates with the Jupyter Cache and Knitr Cache to to cache time consuming code chunks. These two caching facilities distinct capabilities, and we’ll cover each in detail below. Jupyter Cache Jupyter Cache enables you to cache all of the cell outputs for a notebook. If any of the cells in the notebook change then all of the cells will be re-executed. To use Jupyter Cache you’ll want to first install the jupyter-cache package: Platform Command Mac/Linux Terminal python3 -m pip install jupyter-cache Windows Terminal py -m pip install jupyter-cache Conda Terminal conda install jupyter-cache Julia Installation Note that if you are using Julia along with the integrated Python environment provided by IJulia then you should alternatively follow the directions on Installing Jupyter Cache for Julia. To enable the cache for a document, add the cache option. For example: --- title: "My Document" format: html execute: cache: true jupyter: python3 --- You can also specify caching at the project level. For example, within a project file: project: type: website format: html: theme: united execute: cache: true Note that changes within a document that aren’t within code cells (e.g. markdown narrative) do not invalidate the document cache. This makes caching a very convenient option when you are working exclusively on the prose part of a document. Jupyter Cache include a jcache command line utility that you can use to analyze and manage the notebook cache. See the Jupyter Cache documentation for additional details. Knitr Cache The Knitr Cache operates at the level of individual cells rather than the entire document. While this can be very convenient, it also introduced some special requirements around managing the dependencies between cells. You can enable the Knitr cache at the document or project level using standard YAML options: --- title: "My Document" format: html execute: cache: true --- You can also enable caching on a per-cell basis (in this you would not set the document level option): ```{r} #| cache: true summary(cars) ``` There are a variety of other cell-level options that affect Knitr caching behavior. You can learn about them in the Knitr cell options reference. Another excellent resource is Yihui Xie’s article on cache invalidation. Rendering You can use `quarto render` command line options to control caching behavior without changing the document’s code. Use options to force the use of caching on all chunks, disable the use of caching on all chunks (even if it’s specified in options), or to force a refresh of the cache even if it has not been invalidated: Terminal # use a cache (even if the document options don't enable it) quarto render example.qmd --cache # don't use a cache (even if the documentation options enable it) quarto render example.qmd --no-cache # use a cache and force a refresh (even if the cells haven't changed) quarto render example.qmd --cache-refresh Alternatives If you are using caching to mitigate long render-times, there are some alternatives you should consider alongside caching. Disabling Execution If you are working exclusively with prose / markdown, you may want to disable execution entirely. Do this by specifying the enabled: false execute option For example: --- title: "My Document" format: html execute: enabled: false --- Note that if you are authoring using Jupyter .ipynb notebooks (as opposed to plain-text .qmd files) then this is already the default behavior: no execution occurs when you call quarto render (rather, execution occurs as you work within the notebook). Freezing Execution If you are working within a project and your main concern is the cumulative impact of rendering many documents at once, consider using the freeze option. You can use the freeze option to denote that computational documents should never be re-rendered during a global project render, or alternatively only be re-rendered when their source file changes: execute: freeze: true # never re-render during project render execute: freeze: auto # re-render only when source changes Note that freeze controls whether execution occurs during global project renders. If you do an incremental render of either a single document or a project sub-directory then code is always executed. For example: Terminal # render single document (always executes code) quarto render document.qmd # render project subdirectory (always executes code) quarto render articles Learn more about using freeze with projects in the article on managing project execution.
{ "lastmod": "2023-07-05T19:35:15.263Z", "loc": "https://quarto.org/docs/computations/caching.html", "source": "https://quarto.org/docs/computations/caching.html" }
Overview Quarto supports executable Python code blocks within markdown. This allows you to create fully reproducible documents and reports—the Python code required to produce your output is part of the document itself, and is automatically re-run whenever the document is rendered. If you have Python and the jupyter package installed then you have all you need to render documents that contain embedded Python code (if you don’t, we’ll cover this in the installation section below). Next, we’ll cover the basics of creating and rendering documents with Python code blocks. Code Blocks Code blocks that use braces around the language name (e.g. ```{python}) are executable, and will be run by Quarto during render. Here is a simple example: --- title: "matplotlib demo" format: html: code-fold: true jupyter: python3 --- For a demonstration of a line plot on a polar axis, see @fig-polar. ```{python} #| label: fig-polar #| fig-cap: "A line plot on a polar axis" import numpy as np import matplotlib.pyplot as plt r = np.arange(0, 2, 0.01) theta = 2 * np.pi * r fig, ax = plt.subplots( subplot_kw = {'projection': 'polar'} ) ax.plot(theta, r) ax.set_rticks([0.5, 1, 1.5, 2]) ax.grid(True) plt.show() ``` You’ll note that there are some special comments at the top of the code block. These are cell level options that make the figure cross-referenceable. This document would result in the following rendered output: You can produce a wide variety of output types from executable code blocks, including plots, tabular output from data frames, and plain text output (e.g. printing the results of statistical summaries). There are many options which control the behavior of code execution and output, you can read more about them in the article on Execution Options. Rendering Quarto will automatically run computations in any markdown document that contains executable code blocks. For example, the example shown above might be rendered to various formats with: Terminal quarto render document.qmd # defaults to html quarto render document.qmd --to pdf quarto render document.qmd --to docx Quarto can also render any Jupyter notebook (.ipynb): Terminal quarto render document.ipynb Note that the target file (in this case document.qmd) should always be the very first command line argument. Note that when rendering an .ipynb Quarto will not execute the cells within the notebook by default (the presumption being that you already executed them while editing the notebook). If you want to execute the cells you can pass the --execute flag to render: Terminal quarto render notebook.ipynb --execute Installation If you already have Python 3 and Jupyter installed in your environment, then you should have everything required to render Jupyter notebooks with Python kernels. If you don’t yet have Python 3 on your system, we recommend you install a version using the standard installer from https://www.python.org/downloads/. If you are in a fresh Python 3 environment, installing the jupyter package will provide everything required to execute Jupyter kernels with Quarto: Pkg. Manager Command Pip (Mac/Linux) Terminal python3 -m pip install jupyter Pip (Windows) Terminal py -m pip install jupyter Conda Terminal conda install jupyter You can verify that Quarto is configured correctly for Jupyter with: Terminal quarto check jupyter Quarto will select a version of Python using the Python Launcher on Windows or system PATH on MacOS and Linux. You can override the version of Python used by Quarto by setting the QUARTO_PYTHON environment variable. Workflow You can author Quarto documents that include Python code using any text or notebook editor. No matter what editing tool you use, you’ll always run quarto preview first to setup a live preview of changes in your document. Live preview is available for both HTML and PDF output. For example: Terminal # preview as html quarto preview document.qmd # preview as pdf quarto preview document.qmd --to pdf # preview a jupyter notebook quarto preview document.ipynb Note that when rendering an .ipynb Quarto will not execute the cells within the notebook by default (the presumption being that you already executed them while editing the notebook). If you want to execute the cells you can pass the --execute flag to render: Terminal quarto render notebook.ipynb --execute You can also specify this behavior within the notebook’s YAML front matter: --- title: "My Notebook" execute: enabled: true --- Embed Notebooks In addition to including executable Python code chunks in a Quarto document, you can also embed cells from an external Jupyter Notebook (.ipynb). See Embedding Jupyter Notebook Cells for more details. VS Code The Quarto Extension for VS Code provides a variety of tools for working with .qmd files in VS Code. The extension integrates directly with the Python Extension to provide the following Python-specific capabilities: Code completion Cell execution Contextual help You can install the VS Code extension by searching for ‘quarto’ in the extensions panel or from the extension marketplace. You can also use the VS Code notebook editor to create Python notebooks that you will render with Quarto. The next section discusses using notebooks with Quarto in the context of Jupyter Lab, but the same concepts apply to VS Code. Jupyter Lab We could convert the simple document.qmd we used as an example above to a Jupyter notebook using the quarto convert command. For example: Terminal quarto convert document.qmd If we open this notebook in Jupyter Lab and execute the cells, here is what we see: Note that there are three different types of cell here: The YAML document options at the top are in a Raw cell. The heading and explanation are in a Markdown cell. The Python code and its output are in a Code cell. When working in a Jupyter notebook, you can use quarto preview to provide a live preview of your rendered document: Terminal quarto preview document.ipynb The preview will be updated every time you save the notebook in Jupyter Lab. Caching Jupyter Cache enables you to cache all of the cell outputs for a notebook. If any of the cells in the notebook change then all of the cells will be re-executed. To use Jupyter Cache you’ll want to first install the jupyter-cache package: Platform Command Mac/Linux Terminal python3 -m pip install jupyter-cache Windows Terminal py -m pip install jupyter-cache To enable the cache for a document, add the cache option. For example: --- title: "My Document" format: html execute: cache: true --- You can also specify caching at the project level. For example, within a project file: project: type: website format: html: theme: united execute: cache: true Note that changes within a document that aren’t within code cells (e.g. markdown narrative) do not invalidate the document cache. This makes caching a very convenient option when you are working exclusively on the prose part of a document. Jupyter Cache include a jcache command line utility that you can use to analyze and manage the notebook cache. See the Jupyter Cache documentation for additional details. Rendering You can use quarto render command line options to control caching behavior without changing the document’s code. Use options to force the use of caching on all chunks, disable the use of caching on all chunks (even if it’s specified in options), or to force a refresh of the cache even if it has not been invalidated: Terminal # use a cache (even if not enabled in options) quarto render example.qmd --cache # don't use a cache (even if enabled in options) quarto render example.qmd --no-cache # use a cache and force a refresh quarto render example.qmd --cache-refresh Alternatives If you are using caching to mitigate long render-times, there are some alternatives you should consider alongside caching. Disabling Execution If you are working exclusively with prose / markdown, you may want to disable execution entirely. Do this by specifying the enabled: false execute option For example: --- title: "My Document" format: html execute: enabled: false --- Note that if you are authoring using Jupyter .ipynb notebooks (as opposed to plain-text .qmd files) then this is already the default behavior: no execution occurs when you call quarto render (rather, execution occurs as you work within the notebook). Freezing Execution If you are working within a project and your main concern is the cumulative impact of rendering many documents at once, consider using the freeze option. You can use the freeze option to denote that computational documents should never be re-rendered during a global project render, or alternatively only be re-rendered when their source file changes: execute: freeze: true # never re-render during project render execute: freeze: auto # re-render only when source changes Note that freeze controls whether execution occurs during global project renders. If you do an incremental render of either a single document or a project sub-directory then code is always executed. For example: Terminal # render single document (always executes code) quarto render document.qmd # render project subdirectory (always executes code) quarto render articles Learn more about using freeze with projects in the article on managing project execution. Kernel Selection The Jupyter kernel used by Quarto is determined using the jupyter metadata option. For example, to use the Xeus Python kernel, do this: --- title: "My Document" jupyter: xpython --- Note that you can also provide a full kernelspec, for example: --- title: "My Document" jupyter: kernelspec: name: "xpython" language: "python" display_name: "Python 3.7 (XPython)" --- If no Jupyter kernel is specified, then the kernel is determined by finding an available kernel that supports the language of the first executable code block found within the file (e.g. ```{python}). Kernels from Conda If you are using a kernel that is contained within an external conda environment you need to take an extra step to make sure it is recognized by Quarto. Please follow the instructions here to make conda managed kernels available: https://github.com/Anaconda-Platform/nb_conda_kernels#use-with-nbconvert-voila-papermill Note that this step is not required if you are merely using conda with Quarto. It applies to using kernels other than the default Python kernel that happen to be installed within a conda environment separate from the one you are using. Kernel Daemon To mitigate the start-up time for the Jupyter kernel Quarto keeps a daemon with a running Jupyter kernel alive for each document. This enables subsequent renders to proceed immediately without having to wait for kernel start-up. The purpose of the daemon is to make render more responsive during interactive sessions. Accordingly, no daemon is created when documents are rendered without an active tty or when they are part of a batch rendering (e.g. in a Quarto Project). Note that Quarto does not use a daemon by default on Windows (as some Windows systems will not allow the socket connection required by the daemon). You can customize this behavior using the daemon execution option. Set it to false to prevent the use of a daemon, or set it to a value (in seconds) to determine the period after which the daemon will timeout (the default is 300 seconds). For example: execute: daemon: false execute: daemon: 60 Note that if you want to use a daemon on Windows you need to enable it explicitly: execute: daemon: true Command Line You can also control use of the Jupyter daemon using the following command line options: Terminal # use a daemon w/ default timeout (300 sec) quarto render document.qmd --execute-daemon # use a daemon w/ an explicit timeout quarto render document.qmd --execute-daemon 60 # prevent use of a daemon quarto render document.qmd --no-execute-daemon You can also force an existing daemon to restart using the --execute-daemon-restart command line flag: Terminal quarto render document.qmd --execute-daemon-restart This might be useful if you suspect that the re-use of notebook sessions is causing an error. Finally, you can print extended debugging information about daemon usage (startup, shutdown, connections, etc.) using the --execute-debug flag: Terminal quarto render document.qmd --execute-debug
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/computations/python.html", "source": "https://quarto.org/docs/computations/python.html" }
If you are an R Markdown user wondering about the relationship between Quarto and R Markdown, see also our FAQ for R Markdown Users. What can I use Quarto for? Quarto® is an open-source scientific and technical publishing system built on Pandoc. You can weave together narrative text and code to produce elegantly formatted output as documents, web pages, blog posts, books and more.  How do I install Quarto? Visit the Quarto.org Get Started page, which provides installation instructions for Windows, Mac OS, and Linux.  Is Quarto free to use? Yes! Quarto is open source with a GPL-2 license. You can use or disseminate it any way that you would any GPL-2 licensed open source software.  What output formats can Quarto create? There are many output formats available in Quarto. This includes all of the built in Pandoc formats (e.g. HTML, PDF, MS Word, Revealjs, ePub, etc.) as well as various ways to publish multiple documents (websites, blogs, and books). Learn more at Quarto Formats.  What editing tools can I use with Quarto? You can use a wide variety of tools with Quarto. We have provided documentation for writing and editing Quarto documents in VSCode, JupyterLab, RStudio IDE, or any text editor. Visit the Get Started with Quarto page to install, and then choose your tool for a brief introductory guide. Can I use Jupyter notebooks with Quarto? Yes! Quarto can render Jupyter notebooks and you can use Jupyter, JupyterLab or any other .ipynb notebook editor with Quarto. You can render existing .ipynb notebooks as-is with Quarto, but adding Quarto-specific output options or a YAML header can enhance the output. Visit theJupyterLab page for more information. What programming languages are supported in Quarto? The principal languages supported by Quarto are Python, R, Julia, and Observable JavaScript. Integration with Jupyter also enables the use of many other languages.  Each Quarto document can be optionally processed by a computational engine (the engine can be manually specified or automatically detected based on the code chunks within). Current engines include Knitr (which is also used by R Markdown and supports a variety of languages including R, Python, and Julia, etc.) and Jupyter (which supports many languages including Python, Julia, and R). See the documentation on Engine Binding for additional details. What human languages are supported in Quarto? You can write your Quarto documentation in your human language of choice. The lang document option is used to identify the main language of the document using IETF language tags (following the BCP 47 standard), such as en or en-GB.  Can I use Quarto to develop proprietary content? Yes! The copyright on Quarto does not cover the original content that you generate using Quarto. Using Quarto to create original content does not place any restrictions, legally, on the license that you choose for the original content that you create, nor does it “reach through” to affect software that you might be writing documentation for with Quarto. But doesn’t the GPL cover exported HTML documents when they include styles or functionalities from Quarto? It covers the styles or functionalities themselves. It does not cover your original content because your original content is not a derivative work of the Quarto styles or functionalities. How can I share documents and have people comment on them? You can publish Quarto content to various locations. See the user guides for publishing for details on using Quarto Pub, GitHub Pages, Netlify, Posit Connect, and other services with Quarto. Once documents are published you can use  hypothes.is, Utterances, or Giscus for commenting. Learn more in the documentation on commenting. Can I do collaborative editing with Quarto? There is not yet anything specific for collaborative editing in Quarto. You can collaborate on .qmd files in the same way you currently do for any text or code files.  Posit Workbench allows for Project Sharing for interactive editing and collaboration on the same document. Where can I publish Quarto websites? There are a wide variety of ways to publish Quarto websites. Website content is by default written to the \_site sub-directory (you can customize this using the output-dir option). Publishing is simply a matter of copying the output directory to a web server or web hosting service. The publishing documentation describes several convenient options for Quarto website deployment including Posit Connect, Netlify, GitHub Pages, Firebase, Site44, and Amazon S3. We’ll mostly defer to the documentation provided by those various services, but will note any Quarto website specific configuration required. Does Posit Connect support Quarto? Yes! You can publish Quarto content to Posit Connect v2021.08.0 or later. Quarto has to be enabled as documented in the Posit Connect admin guide. Connect’s user documentation refers to Quarto.org docs on how to publish from the RStudio IDE. To publish Python-based Quarto content, you can use the rsconnect-python CLI from various locations, including VSCode, JupyterLab or the terminal. Who are the developers of Quarto? Development of Quarto is sponsored by Posit, PBC. The same core team works on both Quarto and R Markdown: Carlos Scheidegger (@cscheid) Charles Teague (@dragonstyle) Christophe Dervieux (@cderv) J.J. Allaire (@jjallaire) Yihui Xie (@yihui) Here is the full contributors list. Quarto is open source and we welcome contributions in our github repository as well! https://github.com/quarto-dev/quarto-cli. Why the name Quarto? We wanted to use a name that had meaning in the history of publishing and landed on Quarto, which is the format of a book or pamphlet produced from full sheets printed with eight pages of text, four to a side, then folded twice to produce four leaves. The earliest known European printed book is a Quarto, the Sibyllenbuch, believed to have been printed by Johannes Gutenberg in 1452–53. Where can I report bugs or request features? Thanks for finding something and sharing with us! You can file an issue in the Quarto repository https://github.com/quarto-dev/quarto-cli/issues. Where can I ask questions and discuss using Quarto with others? The best place to ask questions and see what questions other people have is in Quarto discussions (https://github.com/quarto-dev/quarto-cli/discussions).
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/faq/index.html", "source": "https://quarto.org/docs/faq/index.html" }
This policy is adapted directly from the WordPress Foundation’s trademark policy for the WordPress and WordCamp names and logos. We admire the job that WordPress has done building a thriving open source community while at the same time making possible a wide variety of WordPress related businesses. We hope that this policy will help us do the same for Quarto. Goals Posit, PBC owns and oversees the trademark for the Quarto name and logo. We have developed this trademark usage policy with the following goals in mind: We’d like to make it easy for anyone to use the Quarto name or logo for community-oriented efforts that help spread and improve Quarto. We’d like to make it clear how Quarto-related businesses and projects can (and cannot) use the Quarto name and logo. We’d like to make it hard for anyone to use the Quarto name and logo to unfairly profit from, trick or confuse people who are looking for official Quarto resources. Please note that it is not the goal of this policy to limit open source or commercial activity around Quarto. We actively encourage Quarto-based open source projects and businesses—our goal with this policy is to prevent confusion about the source of Quarto related software and services. Permission Permission from Posit is required to use the Quarto name or logo as part of any project, product, service, domain name, or company name. We will grant permission to use the Quarto name and logo for projects that meet the following criteria: The primary purpose of your project is to promote the spread and improvement of the Quarto software. Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business). Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which Quarto is distributed. If your project meets these criteria, you will be permitted to use the Quarto name and logo to promote your project in any way you see fit with these exceptions: (1) Please do not use Quarto as part of a domain name; and (2) We do not allow the use of the trademark in advertising, including AdSense/AdWords. All other Quarto-related businesses or projects can use the Quarto name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain name, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by the Quarto open source project. The abbreviation “QMD” is not covered by the Quarto trademark and you are free to use it in any way you see fit. Examples A consulting company can describe its business as “123 Publishing Services, offering Quarto consulting for publishers,” but cannot call its business “The Quarto Consulting Company.” Similarly, a business related to Quarto extensions can describe itself as “XYZ Extensions, the world’s best Quarto extensions,” but cannot call itself “The Quarto Extension Portal.” Similarly, it’s OK to use the Quarto logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use Quarto as part of a domain name or top-level domain name. When in doubt about your use of the Quarto name or logo, please contact Posit at [email protected] for clarification.
{ "lastmod": "2023-07-05T19:35:16.055Z", "loc": "https://quarto.org/trademark.html", "source": "https://quarto.org/trademark.html" }
Welcome to Quarto® An open-source scientific and technical publishing system Author using Jupyter notebooks or with plain text markdown in your favorite editor. Create dynamic content with Python, R, Julia, and Observable. Publish reproducible, production quality articles, presentations, websites, blogs, and books in HTML, PDF, MS Word, ePub, and more. Share knowledge and insights organization-wide by publishing to Posit Connect, Confluence, or other publishing systems. Write using Pandoc markdown, including equations, citations, crossrefs, figure panels, callouts, advanced layout, and more. Analyze. Share. Reproduce. You have a story to tell with data—tell it with Quarto. Get Started Guide Hello, Quarto Python R Julia Observable Combine Jupyter notebooks with flexible options to produce production quality output in a wide variety of formats. Author using traditional notebook UIs or with a plain text markdown representation of notebooks. Quarto is a multi-language, next generation version of R Markdown from Posit, with many new new features and capabilities. Like R Markdown, Quarto uses Knitr to execute R code, and is therefore able to render most existing Rmd files without modification. --- title: "ggplot2 demo" author: "Norah Jones" date: "5/22/2021" format: html: fig-width: 8 fig-height: 4 code-fold: true --- ## Air Quality @fig-airquality further explores the impact of temperature on ozone level. ```{r} #| label: fig-airquality #| fig-cap: "Temperature and ozone level." #| warning: false library(ggplot2) ggplot(airquality, aes(Temp, Ozone)) + geom_point() + geom_smooth(method = "loess" ) ``` Combine markdown and Julia code to create dynamic documents that are fully reproducible. Quarto executes Julia code via the IJulia Jupyter kernel, enabling you to author in plain text (as shown below) or render existing Jupyter notebooks. --- title: "Plots Demo" author: "Norah Jones" date: "5/22/2021" format: html: code-fold: true jupyter: julia-1.8 --- ## Parametric Plots Plot function pair (x(u), y(u)). See @fig-parametric for an example. ```{julia} #| label: fig-parametric #| fig-cap: "Parametric Plots" using Plots plot(sin, x->sin(2x), 0, 2π, leg=false, fill=(0,:lavender)) ``` Quarto includes native support for Observable JS, a set of JavaScript enhancements created by Mike Bostock (the author of D3). Observable JS uses a reactive execution model, and is especially well suited for interactive data exploration and analysis. --- title: "observable plot" author: "Norah Jones" format: html: code-fold: true --- ## Seattle Precipitation by Day (2012 to 2016) ```{ojs} data = FileAttachment("seattle-weather.csv") .csv({typed: true}) Plot.plot({ width: 800, height: 500, padding: 0, color: { scheme: "blues", type: "sqrt"}, y: { tickFormat: i => "JFMAMJJASOND"[i] }, marks: [ Plot.cell(data, Plot.group({fill: "mean"}, { x: d => new Date(d.date).getDate(), y: d => new Date(d.date).getMonth(), fill: "precipitation", inset: 0.5 })) ] }) ``` Dynamic Documents Generate dynamic output using Python, R, Julia, and Observable. Create reproducible documents that can be regenerated when underlying assumptions or data change. Learn more » Beautiful Publications Publish high-quality articles, reports, presentations, websites, and books in HTML, PDF, MS Word, ePub, and more. Use a single source document to target multiple formats. Learn more » Scientific Markdown Pandoc markdown has excellent support for LaTeX equations and citations. Quarto adds extensions for cross-references, figure panels, callouts, advanced page layout, and more. Learn more » Authoring Tools Use your favorite tools including VS Code, RStudio, Jupyter Lab, or any text editor. Use the Quarto visual markdown editor for long-form documents. Learn more » Interactivity Engage readers by adding interactive data exploration to your documents using Jupyter Widgets, htmlwidgets for R, Observable JS, and Shiny. Learn more » Websites and Books Publish collections of documents as a blog or full website. Create books and manuscripts in both print formats (PDF and MS Word) and online formats (HTML and ePub). Learn more » Get Started
{ "lastmod": "2023-07-05T19:35:16.055Z", "loc": "https://quarto.org/index.html", "source": "https://quarto.org/index.html" }
What can I use Quarto for? Quarto® is an open-source scientific and technical publishing system built on Pandoc. You can weave together narrative text and code to produce elegantly formatted output as documents, web pages, blog posts, books and more.  Quarto sounds similar to R Markdown. What is the difference and why create a new project? At its core, Quarto works the same way as R Markdown:  The goal of Quarto is to make the process of creating and collaborating on scientific and technical documents dramatically better. Quarto combines the functionality of R Markdown, bookdown, distill, xaringian, etc into a single consistent system with “batteries included” that reflects everything we’ve learned from R Markdown over the past 10 years. The number of languages and runtimes used for scientific discourse is very broad (and the Jupyter ecosystem in particular is extraordinarily popular). Quarto is at its core multi-language and multi-engine (supporting Knitr, Jupyter, and Observable today and potentially other engines tomorrow). On the other hand, R Markdown is fundamentally tied to R which severely limits the number of practitioners it can benefit. Quarto is Posit’s attempt to bring R Markdown to everyone! Unlike R Markdown, Quarto doesn’t have a dependency or requirement for R. Quarto was developed to be multilingual, beginning with R, Python, Javascript, and Julia, with the idea that it will work even for languages that don’t yet exist. While it is a “new” system, it should also be noted that it is highly compatible with existing content: you can render most R Markdown documents and Jupyter notebooks unmodified with Quarto. The concept is to make a major, long term investment in reproducible research, while keeping it compatible with existing formats and adaptable to the various environments users work in. Is R Markdown going away? Will my R Markdown documents continue to work? R Markdown is not going away! R Markdown is used extensively and continues to work well. It will continue to be actively supported. We’re not leaving R Markdown, we’re expanding our scope. Over the years there have been many feature requests, and rather than implementing them all in R Markdown, for certain features we may refer you to Quarto. Everything that is currently in R Markdown will continue to work and be supported. There are no plans for deprecation. Read more about this in Yihui Xie’s blog post With Quarto Coming, is R Markdown Going Away? No. Should I switch from R Markdown to Quarto? If you like using R Markdown, there’s no need to switch! R Markdown will continue to be supported and work as it always has been. You’re welcome to try Quarto if you like, but there’s no need to switch. Some new features may only exist in Quarto, so if you want to use those, then that’s where you would give those a try.   We should emphasize that switching is not imperative. While we don’t plan on major feature initiatives in R Markdown and related packages, we are going to continue to maintain them (smaller improvements and bug fixes) for a long time to come. Furthermore, since Rmd files can in most cases be rendered without modification by Quarto, you can continue using R Markdown and the switching cost will still be minimal whenever you decide to do it.  I use X (bookdown, blogdown, etc.). What is the Quarto equivalent? Here are the Quarto equivalents for various packages and features of the R Markdown ecosystem (in some cases Quarto equivalents are not yet available but will be later this year): Feature R Markdown Quarto Basic Formats html_document pdf_document word_document html pdf docx Beamer beamer_presentation beamer PowerPoint powerpoint_presentation pptx HTML Slides xaringan ioslides revealjs revealjs Advanced Layout tufte distill Quarto Article Layout Cross References html_document2 pdf_document2 word_document2 Quarto Crossrefs Websites & Blogs blogdown distill Quarto Websites Quarto Blogs Books bookdown Quarto Books Interactivity Shiny Documents Quarto Interactive Documents Journal Articles rticles Quarto Journal Articles Paged HTML pagedown Planned Dashboards flexdashboard Planned Interactive Tutorials learnr No equivalent planned Can you create custom formats for Quarto like you can for R Markdown? Quarto offers an Extension mechanism to add features to a format using Shortcodes or Filters but also create custom formats. A major difference with custom output format in R Markdown is that Quarto Extension does not use R but Lua, for example if you need to add some logic behind custom metadata fields. See Developing with Lua to get started if you need use it your extension. Some of the features from R Markdown custom formats like customizing knitting behavior can also now be done in YAML with execution options. As example of custom formats for Quarto, Journal Articles for Quarto are port of some custom output format inside the rticles R package. Extensions lives in Quarto Journals Github organization, and you can find information on how to customize templates and manage Authors for you format. If you are an advanced developer of R Markdown custom format, the Extension mechanism may still have limitation (like pre and post processor). The Extension feature in Quarto will be improved over time - do not hesitate to share with us your use case or wished in our Discussion Board. When would be a good time to start new projects in Quarto rather than R Markdown? Quarto v1.0 was announced at rstudio::conf(2022). This is the first stable release which is already an excellent foundation for starting new projects with Quarto or migrating existing R Markdown projects (if you are so inclined). If you start using Quarto, please do stay updated with latest release and changes as development is very active. Does the RStudio IDE support Quarto? Yes! You need to use RStudio v2022.07 or a later version, which includes support for editing and preview of Quarto documents. You can download the latest release (v2023.03) of RStudio v2023.03 from https://posit.co/download/rstudio-desktop/. Does Posit Connect support Quarto? Yes! You can publish Quarto content to Posit Connect v2021.08.0 or later. Quarto has to be enabled as documented in the Posit Connect admin guide. Connect’s user documentation refers to Quarto.org docs on how to publish from the RStudio IDE. To publish Python-based Quarto content, you can use the rsconnect-python CLI from various locations, including VSCode, JupyterLab or the terminal.
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/faq/rmarkdown.html", "source": "https://quarto.org/docs/faq/rmarkdown.html" }
Output Options There are a wide variety of options available for customizing output from executed code. All of these options can be specified either globally (in the document front-matter) or per code-block. For example, here’s a modification of the Python example to specify that we don’t want to “echo” the code into the output document: --- title: "My Document" execute: echo: false jupyter: python3 --- Note that we can override this option on a per code-block basis. For example: ```{python} #| echo: true import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.show() ``` Code block options are included in a special comment at the top of the block (lines at the top prefaced with #| are considered options). Options available for customizing output include: Option Description eval Evaluate the code chunk (if false, just echos the code into the output). echo Include the source code in output output Include the results of executing the code in the output (true, false, or asis to indicate that the output is raw markdown and should not have any of Quarto’s standard enclosing markdown). warning Include warnings in the output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included (e.g. include: false suppresses all output from the code block). Here’s a Knitr example with some of these additional options included: --- title: "Knitr Document" execute: echo: false --- ```{r} #| warning: false library(ggplot2) ggplot(airquality, aes(Temp, Ozone)) + geom_point() + geom_smooth(method = "loess", se = FALSE) ``` ```{r} summary(airquality) ``` Tip When using the Knitr engine, you can also use any of the available native options (e.g. collapse, tidy, comment, etc.). See the Knitr options documentation for additional details. You can include these native options in option comment blocks as shown above, or on the same line as the {r} as shown in the Knitr documentation. Figure Options There are a number of ways to control the default width and height of figures generated from code. First, it’s important to know that Quarto sets a default width and height for figures appropriate to the target output format. Here are the defaults (expressed in inches): Format Default Default 7 x 5 HTML Slides 9.5 x 6.5 HTML Slides (reveal.js) 9 x 5 PDF 5.5 x 3.5 PDF Slides (Beamer) 10 x 7 PowerPoint 7.5 x 5.5 MS Word, ODT, RTF 5 x 4 EPUB 5 x 4 Hugo 8 x 5 These defaults were chosen to provide attractive well proportioned figures, but feel free to experiment to see whether you prefer another default size. You can change the default sizes using the fig-width and fig-height options. For example: --- title: "My Document" format: html: fig-width: 8 fig-height: 6 pdf: fig-width: 7 fig-height: 5 --- How do these sizes make their way into the engine-level defaults for generating figures? This differs by engine: For the Knitr engine, these values become the default values for the fig.width and fig.height chunk options. You can override these default values via chunk level options. For Python, these values are used to set the Matplotlib figure.figsize rcParam (you can of course manually override these defaults for any given plot). For Julia, these values are used to initialize the default figure size for the Plots.jl GR backend. If you are using another graphics library with Jupyter and want to utilize these values, you can read them from QUARTO_FIG_WIDTH and QUARTO_FIG_HEIGHT environment variables. Caution When using the Knitr engine, fig-width and fig-height are supported on a per-cell basis. But when using the Jupyter engine, these options only have an effect if specified at the document- or project-level metadata. Caption and Alt Text You can specify the caption and alt text for figures generated from code using the fig-cap and fig-alt options. For example, here we add these options to a Python code cell that creates a plot: ```{python} #| fig-cap: "Polar axis plot" #| fig-alt: "A line plot on a polar axis" import numpy as np import matplotlib.pyplot as plt r = np.arange(0, 2, 0.01) theta = 2 * np.pi * r fig, ax = plt.subplots(subplot_kw={'projection': 'polar'}) ax.plot(theta, r) ax.set_rticks([0.5, 1, 1.5, 2]) ax.grid(True) plt.show() ``` Inline Code Jupyter, Knitr and OJS all support executing inline code within markdown (e.g. to allow narrative to automatically use the most up to date computations). The syntax for this varies across the engines. Jupyter To include executable expressions within markdown in a Python notebook, you use IPython.display.Markdown to dynamically generate markdown from within an ordinary code cell. For example, if we have a variable radius we can use it within markdown as follows: ```{python} #| echo: false radius = 10 from IPython.display import display, Markdown display(Markdown(""" The radius of the circle is {radius}. """.format(radius = radius))) ``` You can do the same in a Julia notebook using the Markdown package: ```{julia} #| echo: false radius = 10 using Markdown Markdown.parse(""" The radius of the circle is $radius. """) ``` Note that we also include the echo: false option to ensure that the code used to generate markdown isn’t included in the final output. Knitr To include executable expressions within markdown for Knitr, enclose the expression in `r `. For example, if we have a variable radius we can use it within markdown as follows: ## Circle The radius of the circle is `r radius`. OJS To include reactive OJS expressions within markdown, use the syntax ${expr}. For example, if we have a reactive called radius we can use it within markdown as follows: ## Circle The radius of the circle is ${radius} Raw Output The output: asis option enables you to generate raw markdown output. When output: asis is specified none of Quarto’s standard enclosing divs will be included. For example, here we specify output: asis in order to generate a pair of headings: JupyterKnitr ```{python} #| echo: false #| output: asis print("# Heading 1\n") print("## Heading 2\n") ``` ```{r} #| echo: false #| output: asis cat("# Heading 1\n") cat("## Heading 2\n") ``` Which generates the following output: # Heading 1 ## Heading 2 Note that we also include the echo: false option to ensure that the code used to generate markdown isn’t included in the final output. If we had not specified output: asis then the output would have been this: ::: {.cell-output-stdout} ``` # Heading 1 ## Heading 2 ``` ::: For the Jupyter engine, you can also create raw markdown output using the functions in IPython.display. For example: ```{python} #| echo: false from IPython.display import display, Markdown display(Markdown("# Heading 1\n")) display(Markdown("## Heading 2\n")) ``` Knitr Options If you are using the Knitr cell execution engine, you can specify default document-level Knitr chunk options in YAML. For example: --- title: "My Document" format: html knitr: opts_chunk: collapse: true comment: "#>" R.options: knitr.graphics.auto_pdf: true --- You can additionally specify global Knitr options using opts_knit. The R.options chunk option is a convenient way to define R options that are set temporarily via options() before the code chunk execution, and immediately restored afterwards. In the example above, we establish default Knitr chunk options for a single document. You can also add shared knitr options to a project-wide _quarto.yml file or a project-directory scoped _metadata.yml file. Intermediates On the way from markdown input to final output, there are some intermediate files that are created and automatically deleted at the end of rendering. You can use the following options to keep these intermediate files: Option Description keep-md Keep the markdown file generated by executing code. keep-ipynb Keep the notebook file generated from executing code (applicable only to markdown input files) For example, here we specify that we want to keep the jupyter intermediate file after rendering: --- title: "My Document" execute: keep-ipynb: true jupyter: python3 --- Fenced Echo If you are writing a tutorial or documentation on using Quarto code blocks, you’ll likely want to include the fenced code delimiter (e.g. ```{python}) in your code output to emphasize that executable code requires that delimiter. You can do this using the echo: fenced option. For example, the following code block: ```{python} #| echo: fenced 1 + 1 ``` Will be rendered as: ```{python} 1 + 1 ``` 2 This is especially useful when you want to demonstrate the use of cell options. For example, here we demonstrate the use of the output and code-overflow options: ```{python} #| echo: fenced #| output: false #| code-overflow: wrap 1 + 1 ``` This code block appears in the rendered document as: ```{python} #| output: false #| code-overflow: wrap 1 + 1 ``` Note that all YAML options will be included in the fenced code output except for echo: fenced (as that might be confusing to readers). This behavior can also be specified at the document level if you want all of your executable code blocks to include the fenced delimiter and YAML options: --- title: "My Document" format: html execute: echo: fenced --- Unexecuted Blocks Often you’ll want to include a fenced code block purely as documentation (not executable). You can do this by using two curly braces around the language (e.g. python, r, etc.) rather than one. For example: ```{{python}} 1 + 1 ``` Will be output into the document as: ```{python} 1 + 1 ``` If you want to show an example with multiple code blocks and other markdown, just enclose the entire example in 4 backticks (e.g. ````) and use the two curly brace syntax for code blocks within. For example: ```` --- title: "My document" --- Some markdown content. ```{{python}} 1 + 1 ``` Some additional markdown content. ```` Engine Binding Earlier we said that the engine used for computations was determined automatically. You may want to customize this—for example you may want to use the Jupyter R kernel rather than Knitr, or you may want to use Knitr with Python code (via reticulate). Here are the basic rules for automatic binding: Extension Engine Binding .qmd Use Knitr engine if an {r} code block is discovered within the file Use Jupyter engine if any other executable code block (e.g. {python}, {julia}, {bash}, etc.) is discovered within the file. The kernel used is determined based on the language of the first executable code block discovered. Use no engine if no executable code blocks are discovered. .ipynb Jupyter engine .Rmd Knitr engine .md No engine (note that if an md document does contain executable code blocks then an error will occur) You can override the engine used via the engine option. For example: engine: jupyter engine: knitr You can also specify that no execution engine should be used via engine: markdown. The presence of the knitr or jupyter option will also override the default engine: knitr: true jupyter: python3 Variations with additional engine-specific options also work to override the default engine: knitr: opts_knit: verbose: true jupyter: kernelspec: display_name: Python 3 language: python name: python3 Shell Commands Using shell commands (from Bash, Zsh, etc.) within Quarto computational documents differs by engine. If you are using the Jupyter engine you can use Jupyter shell magics. For example: --- title: "Using Bash" engine: jupyter --- ```{python} !echo "foo" ``` Note that ! preceding echo is what enables a Python cell to be able to execute a shell command. If you are using the Knitr engine you can use ```{bash} cells, for example: --- title: "Using Bash" engine: knitr --- ```{bash} echo "foo" ``` Note that the Knitr engine also supports ```{python} cells, enabling the combination of R, Python, and Bash in the same document
{ "lastmod": "2023-07-05T19:35:15.263Z", "loc": "https://quarto.org/docs/computations/execution-options.html", "source": "https://quarto.org/docs/computations/execution-options.html" }
Overview You may have a set of parameters that are used to create different variations of a report. For example: Showing results for a specific geographic location. Running a report that covers a specific time period. Running a single analysis multiple times for different assumptions. This article describes how to define and use computational parameters with Quarto. Definition Adding parameter definitions to a document works differently depending on whether you are using the Jupyter or Knitr engine. Jupyter For Jupyter, Quarto uses the same syntax for defining parameters as Papermill. To parameterize a notebook, designate a cell with the tag parameters and provide appropriate default values: ```{python} #| tags: [parameters] alpha = 0.1 ratio = 0.1 ``` The parameters are available in the top level environment: ```{python} str(alpha) ``` When the notebook is executed with a set of new parameters a cell is injected which overrides these defaults as appropriate. Knitr For Knitr, the standard Knitr params YAML option is used to define parameters. For example: --- title: "My Document" params: alpha: 0.1 ratio: 0.1 --- The parameters are available in the params list: ```{r} str(params$alpha) ``` Rendering To render using different parameters you can pass them on the command line using the -P flag: Terminal quarto render notebook.ipynb -P alpha:0.2 -P ratio:0.3 Alternatively you can create a YAML file that defines the parameter values you want to render with, then call quarto render with the --execute-params flag: Terminal quarto render notebook.ipynb --execute-params params.yml
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/computations/parameters.html", "source": "https://quarto.org/docs/computations/parameters.html" }
Overview Quarto includes native support for Observable JS, a set of enhancements to vanilla JavaScript created by Mike Bostock (also the author of D3). Observable JS is distinguished by its reactive runtime, which is especially well suited for interactive data exploration and analysis. The creators of Observable JS (Observable, Inc.) run a hosted service at https://observablehq.com/ where you can create and publish notebooks. Additionally, you can use Observable JS (“OJS”) in standalone documents and websites via its core libraries. Quarto uses these libraries along with a compiler that is run at render time to enable the use of OJS within Quarto documents. OJS works in any Quarto document (plain markdown as well as Jupyter and Knitr documents). Just include your code in an {ojs} executable code block. The rest of this article explains the basics of using OJS with Quarto. Example We’ll start with a simple example based on Allison Horst’s Palmer Penguins dataset. Here we look at how penguin body mass varies across both sex and species (use the provided inputs to filter the dataset by bill length and island): filtered = transpose(data).filter(function(penguin) { return bill_length_min < penguin.bill_length_mm && islands.includes(penguin.island); }) viewof bill_length_min = Inputs.range( [32, 50], {value: 35, step: 1, label: "Bill length (min):"} ) viewof islands = Inputs.checkbox( ["Torgersen", "Biscoe", "Dream"], { value: ["Torgersen", "Biscoe"], label: "Islands:" } ) Plot.rectY(filtered, Plot.binX( {y: "count"}, {x: "body_mass_g", fill: "species", thresholds: 20} )) .plot({ facet: { data: filtered, x: "sex", y: "species", marginRight: 80 }, marks: [ Plot.frame(), ] } ) Let’s take a look at the source code for this example. First we create an {ojs} cell that reads in some data from a CSV file using a FileAttachment: ```{ojs} data = FileAttachment("palmer-penguins.csv").csv({ typed: true }) ``` The example above doesn’t plot all of the data but rather a filtered subset. To create our filter we’ll need some inputs, and we’ll want to be able to use the values of these inputs in our filtering function. To do this, we use the viewof keyword and with some standard Inputs: ```{ojs} viewof bill_length_min = Inputs.range( [32, 50], {value: 35, step: 1, label: "Bill length (min):"} ) viewof islands = Inputs.checkbox( ["Torgersen", "Biscoe", "Dream"], { value: ["Torgersen", "Biscoe"], label: "Islands:" } ) ``` Now we write the filtering function that will transform the data read from the CSV using the values of bill_length_min and island. ```{ojs} filtered = data.filter(function(penguin) { return bill_length_min < penguin.bill_length && islands.includes(penguin.island); }) ``` Here we see reactivity in action: we don’t need any special syntax to refer to the dynamic input values, they “just work”, and the filtering code is automatically re-run when the inputs change. This works in much the same way a spreadsheet works when you update a cell and other cells that refer to it are recalculated. Finally, we’ll plot the filtered data using Observable Plot (an open-source JavaScript library for quick visualization of tabular data): ```{ojs} Plot.rectY(filtered, Plot.binX( {y: "count"}, {x: "body_mass", fill: "species", thresholds: 20} )) .plot({ facet: { data: filtered, x: "sex", y: "species", marginRight: 80 }, marks: [ Plot.frame(), ] } ) ``` Note that as with our inputs, we refer to the filtered variable with no special syntax—the plotting code will be automatically re-run whenever filtered changes (which in turn is updated whenever an input changes). That covers a basic end-to-end use of OJS (see the Penguins examples for the full source code). If you take a look at the Penguins code, you’ll notice something curious: the inputs and plotting code are defined before the data processing code. This demonstrates a critical difference between OJS cell execution and traditional notebooks: cells do not need to be defined in any particular order. Because execution is fully reactive, the runtime will automatically execute cells in the correct order based on how they reference each other. This is more akin to a spreadsheet than a traditional notebook with linear cell execution. Libraries Our example above made use of several standard libraries, including: Observable stdlib — Core primitives for DOM manipulation, file handling, importing code, and much more. Observable Inputs — Standard inputs controls including sliders, drop-downs, tables, check-boxes, etc. Observable Plot — High level plotting library for exploratory data visualization. The libraries are somewhat special because they are automatically available within notebooks on https://observablehq.com as well as within {ojs} cells in Quarto documents. Using other JavaScript libraries is also straightforward, they just need to be explicitly imported. For example, here we import a some libraries using the require function (which in turn loads NPM modules from jsDelivr): ```{ojs} d3 = require("d3@7") topojson = require("topojson") ``` See the article on Libraries to learn more about using standard and third-party libraries. Data Sources In our initial example we used a FileAttachment as our data source. File attachments support many formats including CSV, TSV, JSON, Arrow (uncompressed), and SQLite so are a convenient way to read a dataset that has already been prepared for analysis. Frequently though you’ll need to do some pre-processing of your data in Python or R before it’s ready for visualization. Within Quarto, you can do this pre-processing during document render then make the results available to OJS. Use the ojs_define() function from Python or R to define variables that you want to use within JavaScript. For example, to reproduce the simple CSV read in Python you might do this: ```{python} import pandas as pd penguins = pd.read_csv("palmer-penguins.csv") ojs_define(data = penguins) ``` The call to ojs_define(data = penguins) says that we want to make a variable named data (with the value of the penguins data frame) available to OJS Depending on the visualization library you use, one additional step may be required to consume the data from JavaScript. In this case, the Plot function expects data by row rather than by column, so we transpose() it before filtering: ```{ojs} filtered = transpose(data).filter(function(penguin) { return bill_length_min < penguin.bill_length && islands.includes(penguin.island); }) ``` See the article on Data Sources to learn more about the various ways to prepare and read data. OJS Cells There are many options available to customize the behavior of {ojs} code cells, including showing, hiding, and collapsing code as well as controlling the visibility and layout of outputs. The most important cell option to be aware of is the echo option, which controls whether source code is displayed. You’ll have different preferences depending on whether you are embedding visualizations in an article or creating a notebook or full-on tutorial. Code in {ojs} cells is displayed by default. To prevent display of code for an entire document, set the echo: false option in YAML metadata: --- title: "My Document" execute: echo: false --- You can also specify this option on a per-cell basis. For example: ```{ojs} //| echo: false data = FileAttachment("palmer-penguins.csv").csv({ typed: true }) ``` To learn about all of the options available, see the article on OJS Cells. Learning More These articles go into more depth on using OJS in Quarto documents: Libraries covers using standard libraries and external JavaScript libraries. Data Sources outlines the various ways to read and pre-process data. OJS Cells goes into more depth on cell execution, output, and layout. Shiny Reactives describes how to integrate Shiny with OJS. Code Reuse delves into ways to re-use OJS code across multiple documents. If you want to learn more about the underlying mechanics of reactivity, check out these notebooks from Mike Bostock: Five Minute Introduction Observable’s not JavaScript Introduction to Views How Observable Runs
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/computations/ojs.html", "source": "https://quarto.org/docs/computations/ojs.html" }
This page documents a number of strategies you can employ in case you run into problems with Quarto. As always, we welcome feedback and bug reports on the Quarto issue tracker, but this page might help you get up and running quickly. Basics Check the version of quarto and its dependencies You can check the version of Quarto and its dependencies by running quarto check. Here’s an example of the output it generates: [✓] Checking versions of quarto binary dependencies... Pandoc version 2.19.2: OK Dart Sass version 1.32.8: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.2.313 Path: /Users/cscheid/repos/github/quarto-dev/quarto-cli/package/dist/bin [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.10.9 Path: /Users/cscheid/virtualenvs/homebrew-python3/bin/python3 Jupyter: 5.1.3 Kernels: python3, julia-1.6, julia-1.8 [✓] Checking Jupyter engine render....OK [✓] Checking R installation...........OK Version: 4.2.2 Path: /Library/Frameworks/R.framework/Resources LibPaths: - /Users/cscheid/repos/github/quarto-dev/quarto-web/renv/library/R-4.2/aarch64-apple-darwin20 - /private/var/folders/nm/m64n9_z9307305n0xtzpp54m0000gn/T/RtmpXmQfZA/renv-system-library rmarkdown: 2.14 [✓] Checking Knitr engine render......OK Get a stack trace Setting QUARTO_PRINT_STACK=true in your environment will cause Quarto to print a stack trace when an error occurs. WindowsUnix On PowerShell: $env:QUARTO_PRINT_STACK = "true" On bash-like shells: export QUARTO_PRINT_STACK=true Verbose mode Quarto will print more information about its internal state if you set QUARTO_LOG_LEVEL=DEBUG in your environment. Inspect log files Quarto creates log files that can help you diagnose problems. These are stored in different locations depending on your operating system: WindowsmacOSLinux %LOCALAPPDATA%\quarto\logs ${HOME}/Library/Application Support/quarto/logs If $XDG_DATA_HOME is set, ${XDG_DATA_HOME}/.local/share/quarto/logs, otherwise ${HOME}/.local/share/quarto/logs Out-of-memory issues When building a large project or website, you might run into memory limits. In that case, consider the following environment variable. In this example, we’re setting the maximum amount of memory to be allocated by Deno to be 8GB. Adjust this to your computer’s limits. WindowsUnix On PowerShell: $env:QUARTO_DENO_EXTRA_OPTIONS = "--v8-flags=--max-old-space-size=8192" On bash-like shells: export QUARTO_DENO_EXTRA_OPTIONS=--v8-flags=--max-old-space-size=8192 Installer issues macOS In macOS, installers write their output to /var/log/install.log. Inspecting this file might offer hints to what went wrong. Warning If you’re going to ask for help on public forums, be aware that every macOS installer writes to the same file /var/log/install.log. You should make sure you’re not accidentally disclosing installation information you would rather not. PDF/LaTeX issues If quarto finds an existing installation of texlive in your system, it will use that. If you’re seeing issues with rendering to PDF, make sure you have an up-to-date installation of texlive. Alternatively, you can have quarto use its own version, by calling quarto install tinytex. Environment, Libraries, and Dependencies One common source of tricky problems is the presence of multiple installations of R and Python in a system. Quarto will attempt to find an R or Python installation, and sometimes your shell environment is pointing to a different one. knitr If you suspect that quarto is finding the wrong version of an R installation, you can obtain information about the R installation that Quarto sees by running the following .qmd file: --- engine: knitr --- ```{r} sessionInfo() Sys.getenv() .libPaths() # If the sessioninfo package is available, # it provides output that is easier to read, # and can write its results to a file sessioninfo:::session_info(to_file = "quarto-session-info-output.txt") ``` You can then also run those commands from your R environment, and compare the output. If sessioninfo is available, then you can ask for a difference between the outputs more directly: sessioninfo:::session_diff(new = "quarto-session-info-output.txt") Advanced Debugging Jupyter engine issues To enable Jupyter debugging, add the following to your YAML front matter: execute: debug: true Quarto creates a log of the execution of jupyter notebooks in its log directory under jupyter-kernel.log. If Jupyter execution is hanging instead of failing, you can force immediate flushing of the log by setting QUARTO_JUPYTER_FLUSH_LOGS=true in your environment before running quarto. Debugging Lua filters Useful Lua helper functions Quarto includes a number of useful Lua helper functions that can be used to debug Lua filters. These are available in the quarto module, and can be used as follows: quarto.log.output(obj) -- prints a potentially complex object to the console Filter tracing Setting QUARTO_TRACE_FILTERS=true in your environment will cause Quarto to produce a trace of the Lua filters it runs. This will be a file written to the directory in which quarto runs, named quarto-filter-trace.json. We include an HTML page that can be used to visualize this trace, which you can find in the quarto-cli repository at package/src/common/trace-viewer/index.html. Open this page in your browser and provide the path to the JSON file as the URL parameter file (eg. index.html?file=quarto-filter-trace.json), and you’ll see a report of the changes produced by each part of the filter chain.
{ "lastmod": "2023-07-05T19:35:15.859Z", "loc": "https://quarto.org/docs/troubleshooting/index.html", "source": "https://quarto.org/docs/troubleshooting/index.html" }
Overview Includes are a convenient way to re-use content across documents. Includes work for plain markdown content as well as for .qmd files with executable code cells (note however that the cells must all use the same engine – i.e. knitr or jupyter, but not both). To include a file, add the {{< include >}} shortcode at the location in your document where you want it included. {{< include _content.qmd >}} Important Include shortcodes are equivalent to copying and pasting the text from the included file into the main file. This means that relative references (links, images, etc.) inside the included file resolve based on the directory of the main file not the included file. Important Include shortcodes need to appear by themselves in a line, and they need to be surrounded by empty lines. This means that you cannot use an include shortcode inside markdown syntax (such as an item in a bulleted list). Content A concrete example would be if you have several articles about a topic that share a common introduction. Here we have an article titled “Revealjs Presentations” that wants to include some basic information on presentations not specific to Revealjs (we do that by including _basics.qmd): --- title: "Revealjs Presentations" --- ## Overview Revealjs Presentations are a great way to present your ideas to others! {{< include _basics.qmd >}} ## Revealjs Options More content here... Note that we use an underscore (_) prefix for the included file. You should always use an underscore prefix with included files so that they are automatically ignored (i.e. not treated as standalone files) by a quarto render of a project). Computations You can also include files with computational cells. For example, here we include a .qmd that does some data preprocessing that we want shared across multiple documents: --- title: "My Document" --- {{< include _data.qmd >}} Use the data... A couple of important things to remember when using computational includes: All computations still share a single engine (e.g. knitr or jupyter) Computational includes work only in .qmd files (they don’t work in .ipynb notebook files)
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/includes.html", "source": "https://quarto.org/docs/authoring/includes.html" }
Quarto 1.3 Feature This feature is new in Quarto 1.3, which you can download at https://quarto.org/docs/download/ Overview You can include the output of an external Jupyter notebook in a Quarto document with the embed shortcode. To embed a notebook cell, provide the path to a Jupyter Notebook and a cell identifier. For example, this notebook called penguins.ipynb has a cell labelled fig-bill-scatter: You can use the following shortcode to embed the output of this cell: {{< embed penguins.ipynb#fig-bill-scatter >}} This will embed the plot as follows: Figure 1: A scatterplot of bill dimensions for penguins, made with Altair. Source: Palmer Penguins A link to the source notebook is automatically provided beneath the plot. Following the link takes users to a rendered version of the notebook, allowing them to explore the notebook without having to download and run it locally. For example, clicking on the link to penguins.ipynb gets you to a page that looks like the following: Beyond this basic usage, you can also: Specify cells in multiple ways, see Specifying Cells. Control the output using code cell options in the source Notebook, including things like figure captions, figure layout, and code display, see Code Cell Options. Include the cell code along with the output by adding an echo option to the shortcode, see Embedding Code. Customize or exclude the link to the the source notebooks, see Links to Source Notebooks. Specifying Cells The embed shortcode specifies target notebooks using a relative path followed by a cell identifier (e.g. penguins.ipynb#fig-bill-scatter). If the cell identifier is omitted, all of the cells in the notebook will be embedded in the document. The cell identifier is used to locate the proper cell using the following heuristics: Cell id First, the cell metadata will be checked for a matching id. (Cell IDs are a newer feature of Jupyter Notebooks that are not yet well supported in Jupyter front ends, but id is checked first to allow for future compatibility as they become more common). Label If no cell with a matching id is found, Quarto will use a cell that has a label in the code metadata which matches the cell identifier. Tags If no cell has been found, Quarto will use a cell or cell(s) whose tag matches the cell identifier. Cell Tags For example, to embed the output of a cell that you have given the tag bill-ratio within Jupyter Lab: You would use the following embed: {{< embed penguins.ipynb#bill-ratio >}} Which results in the following output: Source: Palmer Penguins Code Cell Options Code cell options from the source Jupyter Notebook are propagated to the document in which they are embedded. For instance, you may specify code cell options like fig-cap, fig-alt and layout-ncol, to control aspects of embedded figures. For example, this cell in the Notebook specifies figure options including a caption, sub-caption, alt text and layout: penguins.ipynb #| label: fig-bill-marginal #| fig-cap: "Marginal distributions of bill dimensions" #| fig-subcap: #| - "Gentoo penguins tend to have thinner bills," #| - "and Adelie penguins tend to have shorter bills." #| fig-alt: #| - "Density plot of bill depth by species." #| - "Density plot of bill length by species." #| layout-ncol: 2 sns.displot(penguins, x = "bill_depth_mm", hue = "species", kind = "kde", fill = True, aspect = 2, height = 3) plt.show() sns.displot(penguins, x = "bill_length_mm", hue = "species", kind = "kde", fill = True, aspect = 2, height = 3) plt.show() When this cell is embedded: {{< embed penguins.ipynb#fig-bill-marginal >}} The following output is produced: (a) Gentoo penguins tend to have thinner bills, (b) and Adelie penguins tend to have shorter bills. Figure 2: Marginal distributions of bill dimensions Source: Palmer Penguins Embedding Code You may include the code from a cell along with the output by using the echo=true option. For example, to include the code and the plot from the cell labelled species-counts the embed would be: {{< embed penguins.ipynb#species-counts echo=true >}} The result in the document is both the code and output for the cell: penguins.groupby("species").size().reset_index(name = "count") species count 0 Adelie 152 1 Chinstrap 68 2 Gentoo 124 Source: Palmer Penguins Like figure options, options for displaying the code will propagate from the source Jupyter Notebook. For example, to fold the code for this cell, you could add code-fold: true to the options for the species-counts cell: penguins.ipynb #| label: species-counts #| code-fold: true penguins.groupby("species").size().reset_index(name = "count") The options set in the YAML header for the document in which these cells are embedded will also control these code cells. For example, to fold all the code, including the code embedded from penguins.ipynb, you could add code-fold: true to the document YAML: sample.qmd title: Exploration of penguin characteristics author: Norah Jones toc: true format: html: code-fold: true Links to Source Notebooks When you embed the contents of Notebooks in a Quarto document and render the document to HTML, Quarto will automatically include links to the source Notebooks that provided the embedded content. These links will by default appear both inline below the embedded content as well as below the table of contents. For example, the following document embeds content from the notebook penguins.ipynb. You can see the links in the rendered HTML document below: Link Placement You can control the placement of the links to source notebooks by specifying the option notebook-links in the document YAML with one of the following values: true (default) Display links to source notebooks inline below the embedded content, and alongside the table of contents. false Do not display any links to source notebooks. inline Display only the links inline below the embedded content. global Display only the links alongside the table of contents. Notebook Views By default, the link to the source notebook goes to an automatically generated HTML render of the notebook. This makes it easier for users to view the Notebook contents without needing to download and run the Notebook locally. This notebook view displays the contents of the notebook and includes a button to download the notebook. For example: As an example, you can view the live preview for the `penguins.ipynb` notebook used in this document. View Options You can control the behavior of notebook views using notebook-view. For each source notebook, you can provide a title and a url. The title will be used as the text of the any links to the source notebook and will also appear at the top of the rendered notebook view. The url, if provided, will be used as the href of any links to the source notebook. This is useful if you have deployed a copy of the source notebook to a site like Github, Google Colab, or Kaggle and would rather link to that instead. For example: notebook-view: - notebook: penguins.ipynb title: "Plots and Computations" url: https://colab.research.google.com/drive/12GsIPQ644SI4vkEEHiZn-Qqfbr-bD1__ will result in links to the source notebook like so: To disable the notebook views, and instead link directly to the Jupyter notebook (so the user may download the notebook with no intermediary view), set notebook-view to false.
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/notebook-embed.html", "source": "https://quarto.org/docs/authoring/notebook-embed.html" }
Quarto 1.3 Feature This feature is new in Quarto 1.3, which you can download at https://quarto.org/docs/download/ Overview Code blocks and executable code cells in Quarto can include line-based annotations. Line-based annotations provide a way to attach explanation to lines of code much like footnotes. For example, this code uses annotation to describe the steps in an R dplyr pipeline in plain language: library(tidyverse) library(palmerpenguins) 1penguins |> 2 mutate( bill_ratio = bill_depth_mm / bill_length_mm, bill_area = bill_depth_mm * bill_length_mm ) 1 Take penguins, and then, 2 add new columns for the bill ratio and bill area. The default HTML annotation style displays annotations in a list below the code block. Clicking on the annotation number in the list highlights the relevant lines in the code. Other HTML styles hide the annotations, revealing them in a tooltip when a user hovers or selects a marker, as illustrated in this example of a Revealjs presentation: format: revealjs The PDF format also allows for annotations, numbering, and displaying the annotation text below the code. In other formats, like Word and GitHub Markdown, annotations are instead labeled with the line of code (or lines of code) to which the annotation text applies. PDFGitHub Flavored Markdown ``` r library(tidyverse) library(palmerpenguins) penguins |> mutate( bill_ratio = bill_depth_mm / bill_length_mm, bill_area = bill_depth_mm * bill_length_mm ) ``` Line 3 Take `penguins`, and then, Lines 4-7 add new columns for the bill ratio and bill area. To add code annotation to a code block, you need to add two things: specially formatted code comments in your code cell, and an ordered list below the code cell with the annotation text. Read more in Annotation Syntax. The code-annotations option controls how annotations appear in the HTML format (below (default), hover or select), and in all formats, whether annotation is disabled (false), or if annotations should be removed from the output (none). Annotation Syntax Annotations for a code cell consist of two related elements: Each annotated line should be terminated with a comment (using the code cell’s language comment character) followed by a space and then an annotation number enclosed in angle brackets (e.g. # <2>). You may repeat an annotation number if the annotation spans multiple lines. An ordered list that appears immediately after the code cell which includes the contents of each annotation. Each numbered item in the ordered list will correspond to the line(s) of code with the same annotation number. For example, the annotations in the overview were produced with the following: ```r library(tidyverse) library(palmerpenguins) penguins |> # <1> mutate( # <2> bill_ratio = bill_depth_mm / bill_length_mm, # <2> bill_area = bill_depth_mm * bill_length_mm # <2> ) # <2> ``` 1. Take `penguins`, and then, 2. add new columns for the bill ratio and bill area. Annotation Style For HTML output, there are three annotation styles you can set with the code-annotations document option: below By default (or if code-annotations: below is specified), code annotation text will appear below the code cell. hover Code annotation text will be displayed when the user hovers over the annotation marker for a line of code. select Code annotation text will be displayed when the user clicks on an annotation marker (selecting it). The annotation text can be dismissed by clicking the annotation marker once again. For example, to set the display style to hover, the complete Quarto file would be: --- code-annotations: hover --- ```r library(tidyverse) library(palmerpenguins) penguins |> # <1> mutate( # <2> bill_ratio = bill_depth_mm / bill_length_mm, # <2> bill_area = bill_depth_mm * bill_length_mm # <2> ) # <2> ``` 1. Take `penguins`, and then, 2. add new columns for the bill ratio and bill area. Removing Annotations For some formats, you may prefer to remove annotations from the output. In this case, you can set code-annotations: none, which will remove the annotation comments from your code and suppress the output of the ordered list which contains the annotation text. Disabling Annotation You can disable code annotation by including the option code-annotations: false in your document. This will stop the processing of code annotations and leave your code (including the annotation comments) and the original ordered list as is.
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/code-annotation.html", "source": "https://quarto.org/docs/authoring/code-annotation.html" }
Overview Quarto is based on Pandoc and uses its variation of markdown as its underlying document syntax. Pandoc markdown is an extended and slightly revised version of John Gruber’s Markdown syntax. Markdown is a plain text format that is designed to be easy to write, and, even more importantly, easy to read: A Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. – John Gruber This document provides examples of the most commonly used markdown syntax. See the full documentation of Pandoc’s Markdown for more in-depth documentation. Text Formatting Markdown Syntax Output *italics*, **bold**, ***bold italics*** italics, bold, bold italics superscript^2^ / subscript~2~ superscript2 / subscript2 ~~strikethrough~~ strikethrough `verbatim code` verbatim code Headings Markdown Syntax Output # Header 1 Header 1 ## Header 2 Header 2 ### Header 3 Header 3 #### Header 4 Header 4 ##### Header 5 Header 5 ###### Header 6 Header 6 Links & Images Markdown Syntax Output <https://quarto.org> https://quarto.org [Quarto](https://quarto.org) Quarto ![Caption](elephant.png) [![Caption](elephant.png)](https://quarto.org) [![Caption](elephant.png)](https://quarto.org "An elephant") [![](elephant.png){fig-alt="Alt text"}](https://quarto.org) Lists Markdown Syntax Output * unordered list + sub-item 1 + sub-item 2 - sub-sub-item 1 unordered list sub-item 1 sub-item 2 sub-sub-item 1 * item 2 Continued (indent 4 spaces) item 2 Continued (indent 4 spaces) 1. ordered list 2. item 2 i) sub-item 1 A. sub-sub-item 1 ordered list item 2 sub-item 1 sub-sub-item 1 (@) A list whose numbering continues after (@) an interruption A list whose numbering continues after an interruption term : definition term definition Note that unlike other Markdown renderers (notably Jupyter and GitHub), lists in Quarto require an entire blank line above the list. Otherwise the list will not be rendered in list form, rather it will all appear as normal text along a single line. Tables Markdown Syntax | Right | Left | Default | Center | |------:|:-----|---------|:------:| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | Output Right Left Default Center 12 12 12 12 123 123 123 123 1 1 1 1 Learn more in the article on Tables. Source Code Use ``` to delimit blocks of source code: ``` code ``` Add a language to syntax highlight code blocks: ```python 1 + 1 ``` Pandoc supports syntax highlighting for over 140 different languages. If your language is not supported then you can use the default language to get a similar visual treatment: ```default code ``` If you are creating HTML output there is a wide variety of options available for code block output. See the article on HTML Code for additional details. Equations Use $ delimiters for inline math and $$ delimiters for display math. For example: Markdown Syntax Output inline math: $E = mc^{2}$ inline math: \(E=mc^{2}\) display math: $$E = mc^{2}$$ display math: \[E = mc^{2}\] If you want to define custom TeX macros, include them within $$ delimiters enclosed in a .hidden block. For example: ::: {.hidden} $$ \def\RR{{\bf R}} \def\bold#1{{\bf #1}} $$ ::: For HTML math processed using MathJax (the default) you can use the \def, \newcommand, \renewcommand, \newenvironment, \renewenvironment, and \let commands to create your own macros and environments. Diagrams Quarto has native support for embedding Mermaid and Graphviz diagrams. This enables you to create flowcharts, sequence diagrams, state diagrams, Gantt charts, and more using a plain text syntax inspired by markdown. For example, here we embed a flowchart created using Mermaid: ```{mermaid} flowchart LR A[Hard edge] --> B(Round edge) B --> C{Decision} C --> D[Result one] C --> E[Result two] ``` flowchart LR A[Hard edge] --> B(Round edge) B --> C{Decision} C --> D[Result one] C --> E[Result two] Learn more in the article on Diagrams. Videos You can include videos in documents using the {{< video >}} shortcode. For example, here we embed a YouTube video: {{< video https://www.youtube.com/embed/wo9vZccmqwc >}} Videos can refer to video files (e.g. MPEG) or can be links to videos published on YouTube, Vimeo, or BrightCove. Learn more in the article on Videos. Page Breaks The pagebreak shortcode enables you to insert a native pagebreak into a document (.e.g in LaTeX this would be a \newpage, in MS Word a docx-native pagebreak, in HTML a page-break-after: always CSS directive, etc.): page 1 {{< pagebreak >}} page 2 Native pagebreaks are supported for HTML, LaTeX, Context, MS Word, Open Document, and ePub (for other formats a form-feed character \f is inserted). Divs and Spans You can add classes, attributes, and other identifiers to regions of content using Divs and Spans (you’ll see an example of this below in Callout Blocks). For example, here we add the “border” class to a region of content using a div (:::): ::: {.border} This content can be styled with a border ::: Once rendered to HTML, Quarto will translate the markdown into: <div class="border"> <p>This content can be styled with a border</p> </div> Divs start with a fence containing at least three consecutive colons plus some attributes. The attributes may optionally be followed by another string of consecutive colons. The Div ends with another line containing a string of at least three consecutive colons. The Div should be separated by blank lines from preceding and following blocks. Divs may also be nested. For example ::::: {#special .sidebar} ::: {.warning} Here is a warning. ::: More content. ::::: Once rendered to HTML, Quarto will translate the markdown into: <div id="special" class="sidebar"> <div class="warning"> <p>Here is a warning.</p> </div> <p>More content.</p> </div> Fences without attributes are always closing fences. Unlike with fenced code blocks, the number of colons in the closing fence need not match the number in the opening fence. However, it can be helpful for visual clarity to use fences of different lengths to distinguish nested divs from their parents. A bracketed sequence of inlines, as one would use to begin a link, will be treated as a Span with attributes if it is followed immediately by attributes: [This is *some text*]{.class key="val"} Once rendered to HTML, Quarto will translate the markdown into: <span class="class" data-key="val"> This is <em>some text</em> </span> Typically, you’ll use CSS and/or a Filter along with Divs and Spans to provide styling or other behavior within rendered documents. Ordering of Attributes Both divs and spans in Pandoc can have any combination of identifiers, classes, and (potentially many) key-value attributes. In order for these to be recognized by Pandoc, they have to be provided in a specific order: identifiers, classes, and then key-value attributes. Any of these can be omitted, but must follow that order if they are provided. For example, the following is valid: [This is good]{#id .class key1="val1" key2="val2"} However, the following will not be recognized by Pandoc: [This does *not* work!]{.class key="val" #id} This ordering restriction applies to both divs and spans. See Pandoc’s documentation on Divs and Spans for additional details. Callout Blocks Markdown Syntax :::{.callout-note} Note that there are five types of callouts, including: `note`, `tip`, `warning`, `caution`, and `important`. ::: Output Note Note that there are five types of callouts, including note, tip, warning, caution, and important. Learn more in the article on Callout Blocks. Other Blocks Markdown Syntax Output > Blockquote Blockquote ::: {.classname} Div ::: Div | Line Block | Spaces and newlines | are preserved Line Block    Spaces and newlines    are preserved Special Characters Markdown Syntax Output endash: -- endash: – emdash: --- emdash: — Keyboard Shortcuts Quarto 1.3 Feature This feature is new in Quarto 1.3, which you can download at https://quarto.org/docs/download/ The kbd shortcode can be used to describe keyboard shortcuts in documentation. On Javascript formats, it will attempt to detect the operating system of the format and show the correct shortcut. On print formats, it will print the keyboard shortcut information for all operating systems. For example, writing the following markdown: To print, press {{< kbd Shift-Ctrl-P >}}. To open an existing new project, press {{< kbd mac=Shift-Command-O win=Shift-Control-O linux=Shift-Ctrl-L >}}. will render the keyboard shortcuts as: To print, press Shift-Ctrl-P. To open an existing new project, press .
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/markdown-basics.html", "source": "https://quarto.org/docs/authoring/markdown-basics.html" }
import pandas as pd import altair as alt import seaborn as sns from matplotlib import pyplot as plt Data from Palmer Penguins R package penguins = pd.read_csv("https://pos.it/palmer-penguins-github-csv") penguins.groupby("species").size().reset_index(name = "count") species count 0 Adelie 152 1 Chinstrap 68 2 Gentoo 124 colors = ["#FF8C00", "#A020F0", "#008B8B"] sns.set_palette(colors, n_colors = 3) penguins["bill_ratio"] = ( penguins["bill_length_mm"] / penguins["bill_depth_mm"] ) sns.displot(penguins, x = "bill_ratio", hue = "species", kind = "kde", fill = True, aspect = 2, height = 3) plt.show() sns.displot(penguins, x = "bill_depth_mm", hue = "species", kind = "kde", fill = True, aspect = 2, height = 3) plt.show() sns.displot(penguins, x = "bill_length_mm", hue = "species", kind = "kde", fill = True, aspect = 2, height = 3) plt.show() (a) Gentoo penguins tend to have thinner bills, (b) and Adelie penguins tend to have shorter bills. Figure 1: Marginal distributions of bill dimensions scale = alt.Scale(domain = ['Adelie', 'Chinstrap', 'Gentoo'], range = colors) alt.Chart(penguins).mark_circle(size=60).encode( alt.X('bill_length_mm', scale=alt.Scale(zero=False) ), alt.Y('bill_depth_mm', scale=alt.Scale(zero=False) ), color = alt.Color('species', scale = scale), tooltip=['species', 'sex', 'island'] ) Figure 2: A scatterplot of bill dimensions for penguins, made with Altair.
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/penguins.html", "source": "https://quarto.org/docs/authoring/penguins.html" }
Citations Quarto will use Pandoc to automatically generate citations and a bibliography in a number of styles. To use this capability, you will need: A quarto document formatted with citations (see Citation Markdown). A bibliographic data source, for example a BibLaTeX (.bib) or BibTeX (.bibtex) file. Optionally, a CSL file which specifies the formatting to use when generating the citations and bibliography (when not using natbib or biblatex to generate the bibliography). Bibliography Files Quarto supports bibliography files in a wide variety of formats including BibLaTeX and CSL. Add a bibliography to your document using the bibliography YAML metadata field. For example: --- title: "My Document" bibliography: references.bib --- Tip You can provide more than one bibliography file if you would like by setting the bibliography field’s value to a YAML array. See the Pandoc Citations documentation for additional information on bibliography formats. Citation Syntax Quarto uses the standard Pandoc markdown representation for citations (e.g. [@citation]) — citations go inside square brackets and are separated by semicolons. Each citation must have a key, composed of ‘@’ + the citation identifier from the database, and may optionally have a prefix, a locator, and a suffix. The citation key must begin with a letter, digit, or _, and may contain alphanumerics, _, and internal punctuation characters (:.#$%&-+?<>~/). Here are some examples: Markdown Format Output (author-date format) Output (numerical format) Blah Blah [see @knuth1984, pp. 33-35; also @wickham2015, chap. 1] Blah Blah (see Knuth 1984, 33–35; also Wickham 2015, chap. 1) Blah Blah see [1], pp. 33-35; also [1], chap. 1 Blah Blah [@knuth1984, pp. 33-35, 38-39 and passim] Blah Blah (Knuth 1984, 33–35, 38–39 and passim) Blah Blah [1], pp. 33-35, 38-39 and passim Blah Blah [@wickham2015; @knuth1984]. Blah Blah (Wickham 2015; Knuth 1984). Blah Blah [1, 2]. Wickham says blah [-@wickham2015] Wickham says blah (2015) Wickham says blah [1] You can also write in-text citations, as follows: Markdown Format Output (author-date format) Output (numerical format) @knuth1984 says blah. Knuth (1984) says blah. [1] says blah. @knuth1984 [p. 33] says blah. Knuth (1984, 33) says blah. [1] [p. 33] says blah. See the Pandoc Citations documentation for additional information on citation syntax. Citation Style Quarto uses Pandoc to format citations and bibliographies. By default, Pandoc will use the Chicago Manual of Style author-date format, but you can specify a custom formatting using CSL (Citation Style Language). To provide a custom citation stylesheet, provide a path to a CSL file using the csl metadata field in your document, for example: --- title: "My Document" bibliography: references.bib csl: nature.csl --- You can find CSL files or learn more about using styles at the CSL Project. You can browse the list of more than 8,500 Creative Commons CSL definitions in the CSL Project’s central repository or Zotero’s style repository. CSL styling is only available when the cite-method is citeproc (which it is by default). If you are using another cite-method, you can control the formatting of the references using the mechanism provided by that method. Bibliography Generation By default, Pandoc will automatically generate a list of works cited and place it in the document if the style calls for it. It will be placed in a div with the id refs if one exists: ### References ::: {#refs} ::: If no such div is found, the works cited list will be placed at the end of the document. If your bibliography is being generated using BibLaTeX or natbib (Section 1.6), the bibliography will always appear at the end of the document and the #refs div will be ignored. Tip You can suppress generation of a bibliography by including suppress-bibliography: true option in your document metadata Here’s an example of a generated bibliography: Knuth, Donald E. 1984. “Literate Programming.” The Computer Journal 27 (2): 97–111. Wickham, Hadley. 2015. R Packages. 1st ed. O’Reilly Media, Inc. Including Uncited Items If you want to include items in the bibliography without actually citing them in the body text, you can define a dummy nocite metadata field and put the citations there: --- nocite: | @item1, @item2 --- @item3 In this example, the document will contain a citation for item3 only, but the bibliography will contain entries for item1, item2, and item3. It is possible to create a bibliography with all the citations, whether or not they appear in the document, by using a wildcard: --- nocite: | @* --- Using BibLaTeX or natbib When creating PDFs, you can choose to use either the default Pandoc citation handling based on citeproc, or alternatively use natbib or BibLaTeX. This can be controlled using the cite-method option. For example: format: pdf: cite-method: biblatex The default is to use citeproc (Pandoc’s built in citation processor). See the main article on using Citations with Quarto for additional details on citation syntax, available bibliography formats, etc. Options When using natbib or biblatex you can specify the following additional options to affect how bibliographies are rendered: Option Description biblatexoptions List of options for biblatex natbiboptions List of options for natbib biblio-title Title for bibliography biblio-style Style for bibliography Footnotes Pandoc supports numbering and formatting footnotes using the following syntax: Here is a footnote reference,[^1] and another.[^longnote] [^1]: Here is the footnote. [^longnote]: Here's one with multiple blocks. Subsequent paragraphs are indented to show that they belong to the previous footnote. { some.code } The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items. This paragraph won't be part of the note, because it isn't indented. Output Here is a footnote reference,1 and another.2 This paragraph won’t be part of the note, because it isn’t indented. In addition, you can also write single paragraph footnotes inline using the following syntax: Here is an inline note.^[Inlines notes are easier to write, since you don't have to pick an identifier and move down to type the note.] Output Here is an inline note.3 The footnotes that are generated from the above examples are included in the following section. See the Pandoc Footnotes for additional information. Footnotes Here is the footnote.↩︎ Here’s one with multiple blocks. Subsequent paragraphs are indented to show that they belong to the previous footnote. { some.code } The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.↩︎ Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.↩︎
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/footnotes-and-citations.html", "source": "https://quarto.org/docs/authoring/footnotes-and-citations.html" }
Overview There are a number of ways to include dynamic variables within documents rendered by Quarto. This is useful for externalizing content that varies depending on context, or as an alternative to repeating a value in multiple places (e.g. a version number). For example, the following prints the title from document metadata: {{< meta title >}} The {{< meta >}} syntax used here is an example of a shortcode. Quarto supports the following shortcodes for dynamic variables: Shortcode Description var Value from _variables.yml file meta Value from document metadata env Value of System environment variable var If you are using a Quarto project, the var shortcode enables you to insert content from a project-level _variables.yml file. Create this file alongside your _quarto.yml project file, and then include references to those variables within any document in your project. Variables can be either simple values or can include arbitrary markdown content. To define variables, create a _variables.yml file in the root directory of your project. For example: version: 1.2 email: info: [email protected] support: [email protected] engine: jupyter: "[Jupyter](https://jupyter.org)" knitr: "[Knitr](<https://yihui.name/knitr>)" Note that the engine variable values include markdown for hyperlinks. To include the value of a variable, use the {{< var >}} shortcode, for example: Version {{< var version >}} is a minor upgrade. Please contact us at {{< var email.info >}}. Quarto includes {{< var engine.jupyter >}} and {{< var engine.knitr >}} computation engines. meta The meta shortcode allows you to insert content from Pandoc metadata (e.g. YAML at the top of the document and/or in _quarto.yml). For example, the following shortcode inserts the value of the title field from YAML metadata: {{< meta title >}} You can dereference sub-keys using the dot (.) delimiter. For example: {{< meta labels.description >}} env The env shortcode enables you to read values from environment variables. For example: Version {{< env PRODUCT_VERSION >}} is a minor upgrade. Escaping If you are writing documentation about using variable shortcodes (for example, this article!) you might need to prevent them from being processed. You can do this in two ways: Escape the shortcode reference with extra braces like this: {{{< var version >}}} Add a shortcodes=false attribute to any code block you want to prevent processing of shortcodes within: ```{shortcodes=false} {{< var version >}} ```
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/variables.html", "source": "https://quarto.org/docs/authoring/variables.html" }
Overview Quarto supports a variety of page layout options that enable you to author content that: Fills the main content region Overflows the content region Spans the entire page Occupies the document margin Quarto uses the concept of columns to describe page layout (e.g. the “body” column, the “margin” column, etc.). Below we’ll describe how to arrange content into these columns. All of the layout capabilities described in this document work for HTML output and many work for PDF and LaTeX output. For details about the PDF / LaTeX output, see PDF/LaTeX Layout. Body Column By default, elements are position in the body of the document and are allowed to span the content of the document, like the below. .column-body But if you’d like, you can extend content slightly outside the bounds of the body by creating a div with the .column-body-outset class. For example: :::{.column-body-outset} Outset content... ::: .column-body-outset Page Column If you need even more space for your content, you can use the .column-page class to make the content much wider, though stopping short of extending across the whole document. .column-page For example, to create a wider image, you could use: :::{.column-page} ![](images/elephant.jpg) ::: For computational output, you can specify the page column in your code cell options. For example: ```{r} #| column: page knitr::kable( mtcars[1:6, 1:10] ) ``` mpg cyl disp hp drat wt qsec vs am gear Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 In addition, you can use .column-page-inset to inset the element from the page slightly, like so: .column-page-inset Screen Column You can have content span the full width of the page with no margin (full bleed). For this, use the .column-screen class or specify column: screen on a code cell. For example: ::: {.column-screen} ![A full screen image](/image.png) ::: .column-screen The following code displays a Leaflet map across the whole page. ```{r} #| column: screen library(leaflet) leaflet() %>% addTiles() %>% # Add default OpenStreetMap map tiles addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R") ``` Screen Inset If you’d like a full width appearance, but would like to retain a margin, you can use inset or inset-shaded modifiers on the column. For example: ::: {.column-screen-inset} ![A full screen image](/image.png) ::: .column-screen-inset The inset-shaded modifier results in a block spanning the full width but wrapped with a lightly shaded background. For example: ```{r} #| column: screen-inset-shaded library(leaflet) leaflet() %>% addTiles() %>% # Add default OpenStreetMap map tiles addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R") ``` Column layouts like screen-inset-shaded will work with advanced figure layout. For example, it is straightforward to create a multi column presentation of figures that spans the document: ```{r} #| column: screen-inset-shaded #| layout-nrow: 1 plot(cars) plot(iris) plot(pressure) ``` Margin Content You can place content within the right margin of Quarto document. For example, here we use the .column-margin class to place an image in the margin: ::: {.column-margin} ![A margin image](image.png) ::: .column-margin This also works for text content: ::: {.column-margin} We know from *the first fundamental theorem of calculus* that for $x$ in $[a, b]$: $$\frac{d}{dx}\left( \int_{a}^{x} f(u)\,du\right)=f(x).$$ ::: We know from the first fundamental theorem of calculus that for \(x\) in \([a, b]\): \[\frac{d}{dx}\left( \int_{a}^{x} f(u)\,du\right)=f(x).\] Margin Figures Figures that you create using code cells can be placed in the margin by using the column: margin code cell option. If the code produces more than one figure, each of the figures will be placed in the margin. ```{r} #| label: fig-mtcars #| fig-cap: "MPG vs horsepower, colored by transmission." #| column: margin library(ggplot2) mtcars2 <- mtcars mtcars2$am <- factor( mtcars$am, labels = c('automatic', 'manual') ) ggplot(mtcars2, aes(hp, mpg, color = am)) + geom_point() + geom_smooth(formula = y ~ x, method = "loess") + theme(legend.position = 'bottom') ``` Figure 1: MPG vs horsepower, colored by transmission. Margin Tables You an also place tables in the margin of your document by specifying column: margin. ```{r} #| column: margin knitr::kable( mtcars[1:6, 1:3] ) ``` mpg cyl disp Mazda RX4 21.0 6 160 Mazda RX4 Wag 21.0 6 160 Datsun 710 22.8 4 108 Hornet 4 Drive 21.4 6 258 Hornet Sportabout 18.7 8 360 Valiant 18.1 6 225 Multiple Outputs You can also target specific output types (for example, figures) to be placed in the margin. For example, the following code will render a table summarizing the mtcars dataset and render a lot of the data in the margin next to the table. ```{r} #| fig-column: margin mtcars2 <- mtcars mtcars2$am <- factor( mtcars$am, labels = c('automatic', 'manual') ) knitr::kable( mtcars[1:6, 1:6] ) library(ggplot2) ggplot(mtcars2, aes(hp, mpg, color = am)) + geom_point() + geom_smooth(formula = y ~ x, method = "loess") + theme(legend.position = 'bottom') ``` mpg cyl disp hp drat wt Mazda RX4 21.0 6 160 110 3.90 2.620 Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 Datsun 710 22.8 4 108 93 3.85 2.320 Hornet 4 Drive 21.4 6 258 110 3.08 3.215 Hornet Sportabout 18.7 8 360 175 3.15 3.440 Valiant 18.1 6 225 105 2.76 3.460 Page Breaks The pagebreak shortcode enables you to insert a native pagebreak into a document (.e.g in LaTeX this would be a \newpage, in MS Word a docx-native pagebreak, in HTML a page-break-after: always CSS directive, etc.): page 1 {{< pagebreak >}} page 2 Native pagebreaks are supported for HTML, LaTeX, Context, MS Word, Open Document, and ePub (for other formats a form-feed character \f is inserted). Margin References Footnotes and the bibliography typically appear at the end of the document, but you can choose to have them placed in the margin by setting the following option1 in the document front matter: 1 You can also position references in other location (such as the bottom of the block, section, or document).--- reference-location: margin citation-location: margin --- With these options set, footnotes and citations will (respectively) be automatically be placed in the margin of the document rather than the bottom of the page. As an example, when I cite Xie, Allaire, and Grolemund (2018), the citation bibliography entry itself will now appear in the margin. Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown. Asides Asides allow you to place content aside from the content it is placed in. Asides look like footnotes, but do not include the footnote mark (the superscript number). This is a span that has the class aside which places it in the margin without a footnote number. [This is a span that has the class aside which places it in the margin without a footnote number.]{.aside} Margin Captions For figures and tables, you may leave the content in the body of the document while placing the caption in the margin of the document. Using cap-location: margin in a code cell or document front matter to control this. For example: ```{r} #| label: fig-cap-margin #| fig-cap: "MPG vs horsepower, colored by transmission." #| cap-location: margin library(ggplot2) mtcars2 <- mtcars mtcars2$am <- factor( mtcars$am, labels = c('automatic', 'manual') ) ggplot(mtcars2, aes(hp, mpg, color = am)) + geom_point() + geom_smooth(formula = y ~ x, method = "loess") + theme(legend.position = 'bottom') ``` Figure 2: MPG vs horsepower, colored by transmission. Overflowing Content You can also extend content outside the body region on only the left or right side of the document by using the right and left versions of the body, page, and screen columns to layout your content. The left or right version of these columns are as follows: .column-body-outset-right .column-page-inset-right .column-page-right .column-screen-inset-right .column-screen-right .column-body-outset-left .column-page-inset-left .column-page-left .column-screen-inset-left .column-screen-left Use a div with one of the above classes to align content into one of the overflow regions. This also works using the column option of executable code cells: ```{r} #| column: screen-inset-right library(leaflet) leaflet() %>% addTiles() %>% # Add default OpenStreetMap map tiles addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R") ``` Options Reference Global Options Some layout options can be specified globally in document yaml. For example: --- fig-cap-location: margin reference-location: margin --- All of the below options currently only support setting a value of margin which tells Quarto to place the corresponding element in the margin. Option Description reference-location Where to place footnotes. Defaults to document. [document | section | block | margin ] citation-location Where to place citations. Defaults to document. [document | margin ] cap-location Where to place figure and table captions. Defaults to `bottom` for figures and top for tables. [top | bottom | margin] fig-cap-location Where to place figure captions. Defaults to bottom. [top | bottom | margin] tbl-cap-location Where to place table captions. Defaults to top. [top | bottom | margin] Code Cell Options You can also set layout column on specific code cells. This controls the layout of content that is produced by the code cell. ```{r} #| column: page plot(cars) ``` Option Description column Layout column to use for code cell outputs. See column options below. fig-column Layout column to use for code cell figure outputs. See column options below. tbl-column Layout column to use for code cell table outputs. See column options below. cap-location Where to place figure and table captions produced by this code cell. Defaults to bottom for figures and top for tables. [top | bottom | margin] fig-cap-location Where to place captions for figures produced by this code cell. Defaults to inline. [inline | margin] tbl-cap-location Where to place captions for tables produced by this code cell. Defaults to inline. [inline | margin] Using Classes In addition to global and code cell specific options, you may use divs with layout classes (prefixed with .column-) to arrange content into columns: ::: {.column-margin} This content will appear in the margin! ::: Available Columns Here are all of the available column specifiers: Column Code Cell column Class Name Body column: body column: body-outset column: body-outset-left column: body-outset-right .column-body .column-body-outset .column-body-outset-left .column-body-outset-right Page column: page column: page-left column: page-right .column-page .column-page-left .column-page-right Screen Inset column: screen-inset column: screen-inset-shaded column: screen-inset-left column: screen-inset-right .column-screen-inset .column-screen-inset-shaded .column-screen-inset-left .column-screen-inset-right Screen column: screen column: screen-left column: screen-right .column-screen .column-screen-left .column-screen-right Margin column: margin .column-margin PDF/LaTeX Layout While most of the layout capabilities described are supported for both HTML and PDF output, some are available only for HTML output. You can use the full set of columns for HTML. Then, when you render PDF or LaTeX output, content will automatically be placed in the most appropriate related column (typically this will mean using the main column and right margin). Here is how columns are mapped: Any column that uses the right margin (e.g. page, screen, screen-right, etc. will be rendered as page-right in LaTeX. Any column that uses the left margin will be rendered as normal body content. Page Geometry When you render a PDF using content in the margin or content that spans the page, Quarto automatically will adjust the page geometry for the default Quarto LaTeX document classes (KOMA scrartcl, scrreport, or scrbook) to create a slightly narrower body content region and a slightly wider margin region. This adjustment will incorporate known paper sizes to create a reasonable page geometry for most content. You can control the page geometry directly yourself by setting geometry options in your document’s front matter. For example: --- geometry: - left=.75in - textwidth=4.5in - marginparsep=.25in - marginparwidth=2.25in --- You can use these options to control the page geometry for the built in document classes or to customize the geometry of other document classes that you may be using. If you’d like to view the page geometry in your rendered PDF, you can pass showframe to the geometry option as in the below example. --- geometry: - showframe --- Code Blocks When rendering a PDF that uses the margins for content, Quarto automatically adjusts the appearance of code blocks. Rather than having a solid background color, a left border treatment is used. This enables non-breaking code to overflow into the margin without cosmetic issues created by the code block background (which does not overflow into the margin region). You can disable this treatment by setting the following code-block-border-left: false in your document front matter.
{ "lastmod": "2023-07-05T19:35:15.135Z", "loc": "https://quarto.org/docs/authoring/article-layout.html", "source": "https://quarto.org/docs/authoring/article-layout.html" }
Quarto includes a number of features aimed at making it easier to work with figures and subfigures, as well as for laying out panels that contain multiple figures, tables, or other content. Figure Basics In Pandoc markdown, a figure is created whenever a captioned image appears by-itself in a paragraph. For example: ![Elephant](elephant.png) This results in the following treatment for various output types: HTML PDF Word Note that for LaTeX / PDF output figures are automatically numbered (you can arrange for figures to be numbered in other formats using Cross References). Figure Sizing By default figures are displayed using their actual size (subject to the width constraints imposed by the page they are rendered within). You can change the display size by adding the width and height attributes to the figure. For example: ![Elephant](elephant.png){width=300} Note that if only width is specified then height is calculated automatically. If you need to modify the default behaviour just add an explicit height attribute. The default units for width and height are pixels. You can also specify sizes using a percentage or a conventional measurement like inches or millimetres. For example: ![Elephant](elephant.png){width=80%} ![Elephant](elephant.png){width=4in} Linked Figures When rendering with Quarto, you can enclose a figure within a link and it will still be treated within output as a captioned figure. For example: [![Elephant](elephant.png)](https://en.wikipedia.org/wiki/Elephant) Figure Alignment Figures are center aligned by default. Add the fig-align attribute to the image to use a different alignment. For example: ![Elephant](elephant.png){fig-align="left"} Note that figure captions are left aligned to accommodate longer caption text (which looks odd when center aligned). Alt Text You can add alternative text to a figure by adding the fig-alt attribute to the image. For example, the following Markdown… ![](elephant.png){fig-alt="A drawing of an elephant."} … will create the following HTML with the corresponding alt tag: <img src="elephant.png" alt="A drawing of an elephant."> Note that the figure caption, title, and alt text can all be different. For example, the following code… ![Elephant](elephant.png "Title: An elephant"){fig-alt="A drawing of an elephant."} …produces this HTML: <img src="elephant.png" title="Title: An elephant" alt="A drawing of an elephant."> Multiformat Figures You can write markdown that provides a distinct image file format depending on the target output format. To do this simply leave-off the extension, for example: ![](elephant) By default this will look for elephant.png, however if you are rendering to PDF it will look for elephant.pdf. You can customize this behavior using the default-image-extension option. For example: format: html: default-image-extension: svg pdf: default-image-extension: tex Applying Multiple Parameters To combine the above methods, separate arguments by a space, for example: ![](elephant.png){fig-alt="A drawing of an elephant." fig-align="left" width=20%} Cross References You can cross-reference figures by adding an ID with the fig- prefix to them, and then referencing the figure using the @ prefix. For example: ![An Elephant](elephant.png){#fig-elephant} This is illustrated well by @fig-elephant. For figures produced by executable code cells, include a label with a fig- prefix to make them cross-referenceable. For example: For a demonstration of a line plot, see @fig-line-plot. ```{python} #| label: fig-line-plot #| fig-cap: "A line plot " import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` Label Prefix In order for a figure to be cross-referenceable, its label must start with the fig- prefix. See the article on Cross References for additional details. Subfigures If you have several figures that appear as a group, you can create a figure div to enclose them. For example: ::: {#fig-elephants layout-ncol=2} ![Surus](surus.png){#fig-surus} ![Hanno](hanno.png){#fig-hanno} Famous Elephants ::: Again, the last paragraph provides the main caption, and the individual figures carry the sub-captions. Here is what this looks like when rendered as HTML: Note that the empty lines between the figures (and between the last figure and the caption) are required (it’s what indicates that these images belong to their own paragraphs rather than being multiple images within the same paragraph). Note also that we also used a layout-ncol attribute to specify a two-column layout. The next section delves more into customizing figure layouts. Figure Panels Above we demonstrate laying out two side-by-side figures with subcaptions and a main caption. You may or may not want the caption / sub-caption treatment, and you might also want to use multiple rows of figures. All of these variations are possible. To layout two figures with their own standalone captions (and no main caption), just eliminate the #fig identifiers and main caption at the bottom: ::: {layout-ncol=2} ![Surus](surus.png) ![Hanno](hanno.png) ::: You can also eliminate the captions entirely: ::: {layout-ncol=2} ![](surus.png) ![](hanno.png) ::: Multiple Rows If you have more than 2 images, you might want to lay them out across multiple rows. You can do this using the layout-nrow attribute. For example: ::: {layout-nrow=2} ![Surus](surus.png) ![Hanno](hanno.png) ![Abdul Abbas](abdul-abbas.png) ![Lin Wang](lin-wang.png) ::: More complex figure arrangements (e.g. rows with varying column layouts) are possible. See the Custom Layouts section below for more details. Figure Divs You can treat any markdown content you want as a figure by enclosing it in Pandoc div block with an identifier prefaced with #fig-. For example, here we create a figure that includes an embedded iframe: ::: {#fig-elephant} <iframe width="560" height="315" src="https://www.youtube.com/embed/SNggmeilXDQ"></iframe> Elephant ::: Note that the last paragraph in the div block is used as the figure caption. LaTeX Figures This section describes some figure handling options that are specific to LaTeX output. One very important thing to note is that using the fig-env and fig-pos options described below will trigger the creation of a LaTeX floating environment (most often \begin{figure}). Depending upon where this LaTeX is generated it (e.g. is it within another \begin{figure}) this could generate invalid LaTeX. To be on the safe side these attributes should typically only be used for images at the very top level of your document. Environments There are a number of LaTeX packages that provide custom figure environments. For example, the mdframed package includes an mdframed environment used to enclose figures in a special border style. By default, Quarto uses the standard figure environment, but you can use the fig-env attribute to specify a custom one. For example: --- title: "Sidenotes" format: pdf: include-in-header: text: | \usepackage{mdframed} --- ![Elephant](elephant.png){fig-env="mdframed"} Figure Position The default LaTeX figure is a floating environment, so the specific location it appears in your document will depend on its size and the nature of the other content around it. You can exercise some control over this behavior using the fig-pos option. The fig-pos option provides a placement specifier for the figure environment. For example, the ht in this LaTeX snippet is the fig-pos: \begin{figure}[ht] \end{figure} You can specify fig-pos either at the document level, as a executable code block option, or within markdown. Here we do all three: --- title: "My Document" format: pdf: fig-pos: 'h' --- ```{python} #| fig-pos: 't' ``` ![](figure.png){fig-pos='b'} See this article for additional details on LaTeX figure positioning. Figures and Code Blocks If your figure was generated by an executable code block and the code was included in the output (echo: true), then fig-pos will be set to H by default (to try to keep it alongside the code that generated it). In all other cases, default LaTeX handing of figure position is used unless you specify an explicit fig-pos. PGF/TikZ Graphics If you are creating LaTeX output, Quarto will automatically emit the correct LaTeX for markdown images that reference .tex files containg PGF/TikZ vector graphics. For example, the following markdown images: ![](image1.tex) ![](image2.tex){width=80%} Will be written to LaTeX as: \input{image1.tex} \resizebox{0.8\linewidth}{!}{\input{image2.tex}} As shown above, width and height percentages are automatically converted to \linewidth scaled. Alternatively you can specify custom LaTeX for the width and height arguments of \resizebox. Caption Locations By default, figure captions are positioned below figures. In HTML and PDF formats, you can modify this behavior using the fig-cap-location option. For example: --- fig-cap-location: top --- Note that this option is specified at the top level so that it can be shared by both PDF and HTML formats. If you are only targeting a single format you can place it alongside other format specific options. Valid values for the caption location include: Value Description top Position the caption above the figure. bottom Position the caption below the figure. margin Position the caption in the margin. See the article on Article Layout for additional details on placing captions in the margin. Custom Layouts The examples above used the layout-ncol or layout-nrow attributes to create straightforward layouts where all columns are of equal sizes. The layout attribute enables the creation of much more complex layouts. For example, this defines a layout with two equally sized figures in the first row, then another image that spans the entire second row: ::: {layout="[[1,1], [1]]"} ![Surus](surus.png) ![Hanno](hanno.png) ![Lin Wang](lin-wang.png) ::: The layout attribute is a 2-dimensional array where the first dimension defines rows and the second columns. In this case "layout="[[1,1], [1]]" translates to: create two rows, the first of which has two columns of equal size and the second of which has a single column. Note that the numbers in a row are arbitrary and don’t need to add up to a particular total. You can therefore use whatever scheme is most natural. For example, here we define columns that occupy varying percentage widths of the row: ::: {layout="[[70,30], [100]]"} ![Surus](surus.png) ![Hanno](hanno.png) ![Lin Wang](lin-wang.png) ::: You can also use negative values to create space between elements. For example: ::: {layout="[[40,-20,40], [100]]"} ![Surus](surus.png) ![Hanno](hanno.png) ![Lin Wang](lin-wang.png) ::: Vertical Alignment If you have a layout with a row of images of differing heights, you can control their vertical alignment using the layout-valign attribute. A simple example: ::: {layout="[25,-2,10]" layout-valign="bottom"} ![Surus](surus.png) ![Lin Wang](lin-wang.png) ::: Note that vertical alignment isn’t limited to images, you can also vertically align any other elements that are included in a panel. Computations Figures Note that figure layout attributes also work for figures produced by executable code blocks. Here are examples for both Jupyter and Knitr: JupyterKnitr ```{python} #| layout-ncol: 2 #| fig-cap: #| - "Line Plot 1" #| - "Line Plot 2" import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() plt.plot([8,65,23,90]) plt.show() ``` ```{r} #| layout-ncol: 2 #| fig-cap: #| - "Speed and Stopping Distances of Cars" #| - "Vapor Pressure of Mercury as a Function of Temperature" plot(cars) plot(pressure) ``` Note that in these examples we also use the fig-cap option to apply a caption to each of the generated figures. Subcaptions You can create subcaptions for computational output by combining the fig-cap and fig-subcap options. When applying captions to computational output you can optionally include a label with a fig- prefix—if you do this then the figure will be numbered and cross-referenceable. JupyterKnitr ```{python} #| label: fig-charts #| fig-cap: "Charts" #| fig-subcap: #| - "First" #| - "Second" #| layout-ncol: 2 import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() plt.plot([8,65,23,90]) plt.show() ``` ```{r} #| label: fig-charts #| fig-cap: "Charts" #| fig-subcap: #| - "Cars" #| - "Pressure" #| layout-ncol: 2 plot(cars) plot(pressure) ``` Custom Layout The layout works the same way for figures produced by Knitr or Jupyter. For example, here’s an Rmd code chunk that produces 3 plots and defines a custom layout for them: ```{r} #| layout: [[45,-10, 45], [100]] plot(cars) plot(pressure) plot(mtcars) ``` Block Layout While the examples above illustrate laying out figures, it’s important to note that layout attributes can be used to layout any sort of block content. For example, here we layout 2 lists side-by-side: ::: {layout-ncol=2} ### List One - Item A - Item B - Item C ### List Two - Item X - Item Y - Item Z ::: Note that headings are automatically combined with the block that follows them, so this markdown has a total of 2 columns to lay out. Here’s an example of a paragraph next to a bullet list (without headings): ::: {layout-ncol=2} - Item X - Item Y - Item Z Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur gravida eu erat et fring. Morbi congue augue vel eros ullamcorper, eget convallis tortor sagittis. Fusce sodales viverra mauris a fringilla. Donec feugiat, justo eu blandit placerat, enim dui volutpat turpis, eu dictum lectus urna eu urna. Mauris sed massa ornare, interdum ipsum a, semper massa. :::
{ "lastmod": "2023-07-05T19:35:15.139Z", "loc": "https://quarto.org/docs/authoring/figures.html", "source": "https://quarto.org/docs/authoring/figures.html" }
Overview Quarto includes a number of features aimed at making it easy to to author and customize markdown table output, including: Specifying column alignment and widths. Providing captions, subcaptions, and cross-references. Generating tables dynamically from executable code cells. This article covers using these features in-depth. Markdown Tables The most commonly used markdown table is known as a pipe table. Pipe tables support specifying per column alignment as well as captions. For example: | Default | Left | Right | Center | |---------|:-----|------:|:------:| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | 123 | | 1 | 1 | 1 | 1 | : Demonstration of pipe table syntax Demonstration of pipe table syntax Default Left Right Center 12 12 12 12 123 123 123 123 1 1 1 1 The beginning and ending pipe characters are optional, but pipes are required between all columns. The colons indicate column alignment as shown. The header cannot be omitted, however you can simulate a headerless table by including a header with blank cells. Since the pipes indicate column boundaries, columns need not be vertically aligned, as they are in the above example. So, this is a perfectly legal (though ugly) pipe table: fruit| price -----|-----: apple|2.05 pear|1.37 orange|3.09 The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If a pipe table contains a row whose markdown content is wider than the column width (see columns option), then the table will take up the full text width and the cell contents will wrap, with the relative cell widths determined by the number of dashes in the line separating the table header from the table body. For example ---|- would make the first column 3/4 and the second column 1/4 of the full text width. On the other hand, if no lines are wider than column width, then cell contents will not be wrapped, and the cells will be sized to their contents. Using Bootstrap classes Bootstrap table classes given as attributes next to a table caption are inserted into the <table> element. The classes permitted are those that apply expressly to the entire table, and these are: "primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "striped", "hover", "active", "bordered", "borderless", "sm", "responsive", "responsive-sm", "responsive-md", "responsive-lg", "responsive-xl", "responsive-xxl". For example, the following Markdown table will be rendered with row stripes and the rows will also be highlighted on hover: | fruit | price | |--------|--------| | apple | 2.05 | | pear | 1.37 | | orange | 3.09 | : Fruit prices {.striped .hover} Fruit prices fruit price apple 2.05 pear 1.37 orange 3.09 Authoring For simple tables with only a few cells it’s straightforward to create them directly in markdown. As tables get larger, it makes sense to use an authoring tool. Some table authoring tools to consider include: TablesGenerator Online tool for generating markdown tables Emacs TableMode Text based table creation and editing capabilities for Emacs. Quarto Visual Editor Visual editor for .qmd files with table editing support. Column Widths Above we describe a means of specifying column widths using the relative number of dashes in each column header (e.g., ---|- to get a 75% / 25% split for a two-column table). You can also explicitly specify columns widths using the tbl-colwidths attribute or document-level option. For an individual markdown table, add the attribute after the caption. For example: | fruit | price | |--------|--------| | apple | 2.05 | | pear | 1.37 | | orange | 3.09 | : Fruit prices {tbl-colwidths="[75,25]"} Fruit prices fruit price apple 2.05 pear 1.37 orange 3.09 If your table doesn’t have a caption, then you can still specify only tbl-colwidths: | fruit | price | |--------|--------| | apple | 2.05 | | pear | 1.37 | | orange | 3.09 | : {tbl-colwidths="[75,25]"} fruit price apple 2.05 pear 1.37 orange 3.09 Column widths can also be specified at the document level (e.g., to have uniform widths across a set of tables): --- title: "My Document" format: html tbl-colwidths: [75,25] --- Cross References For tables produced by executable code cells, include a label with a tbl- prefix to make them cross-referenceable. For example: ```{python} #| label: tbl-planets #| tbl-cap: Astronomical object from IPython.display import Markdown from tabulate import tabulate table = [["Sun","696,000",1.989e30], ["Earth","6,371",5.972e24], ["Moon","1,737",7.34e22], ["Mars","3,390",6.39e23]] Markdown(tabulate( table, headers=["Astronomical object","R (km)", "mass (kg)"] )) ``` Table 1: Astronomical object Astronomical object R (km) mass (kg) Sun 696,000 1.989e+30 Earth 6,371 5.972e+24 Moon 1,737 7.34e+22 Mars 3,390 6.39e+23 Label Prefix In order for a table to be cross-referenceable, its label must start with the tbl- prefix. For markdown tables, add a caption below the table, then include a #tbl- label in braces at the end of the caption. For example: | Col1 | Col2 | Col3 | |------|------|------| | A | B | C | | E | F | G | | A | G | G | : My Caption {#tbl-letters} See @tbl-letters. Which looks like this when rendered to HTML: Subtables You may want to create a composition of several sub-tables. To do this, create a div with a main identifier, then apply sub-identifiers (and optional caption text) to the contained tables. For example: ::: {#tbl-panel layout-ncol=2} | Col1 | Col2 | Col3 | |------|------|------| | A | B | C | | E | F | G | | A | G | G | : First Table {#tbl-first} | Col1 | Col2 | Col3 | |------|------|------| | A | B | C | | E | F | G | | A | G | G | : Second Table {#tbl-second} Main Caption ::: See @tbl-panel for details, especially @tbl-second. Which looks like this when rendered to HTML: Note that the “Main Caption” for the table is provided as the last block within the containing div. Caption Location By default, table captions are positioned above tables. You can modify this behavior using the tbl-cap-location option. For example: --- tbl-cap-location: top --- Note that this option is specified at the top level so that it can be shared by both PDF and HTML formats. If you are only targeting a single format you can place it alongside other format specific options. Valid values for the caption location include: Value Description top Position the caption above the table. bottom Position the caption below the table. margin Position the caption in the margin. See the article on Article Layout for additional details on placing captions in the margin. Computations All of the options described above work for tables produced by executable code cells. For example, here we use the Python tabulate package along with the Markdown() function from the IPython display module to print a markdown table: ```{python} #| label: tbl-planet-measures #| tbl-cap: Astronomical object from IPython.display import Markdown from tabulate import tabulate table = [["Sun","696,000",1.989e30], ["Earth","6,371",5.972e24], ["Moon","1,737",7.34e22], ["Mars","3,390",6.39e23]] Markdown(tabulate( table, headers=["Astronomical object","R (km)", "mass (kg)"] )) ``` Table 2: Astronomical object Astronomical object R (km) mass (kg) Sun 696,000 1.989e+30 Earth 6,371 5.972e+24 Moon 1,737 7.34e+22 Mars 3,390 6.39e+23 Here we apply the tbl-cap and tbl-colwidths options to a code cell that uses the knitr kable() function to write a markdown table: ```{r} #| label: tbl-cars #| tbl-cap: "Cars" #| tbl-colwidths: [60,40] kable(head(cars)) ``` If your code cell produces multiple tables, you can also specify subcaptions and layout using cell options: ```{r} #| label: tbl-example #| tbl-cap: "Example" #| tbl-subcap: #| - "Cars" #| - "Pressure" #| layout-ncol: 2 #| echo: fenced library(knitr) kable(head(cars)) kable(head(pressure)) ``` Grid Tables Grid tables are a more advanced type of markdown tables that allow arbitrary block elements (multiple paragraphs, code blocks, lists, etc.). For example: +-----------+-----------+--------------------+ | Fruit | Price | Advantages | +===========+===========+====================+ | Bananas | $1.34 | - built-in wrapper | | | | - bright color | +-----------+-----------+--------------------+ | Oranges | $2.10 | - cures scurvy | | | | - tasty | +-----------+-----------+--------------------+ : Sample grid table. Sample grid table. Fruit Price Advantages Bananas $1.34 built-in wrapper bright color Oranges $2.10 cures scurvy tasty The row of =s separates the header from the table body, and can be omitted for a headerless table. Cells that span multiple columns or rows are not supported. Alignments can be specified as with pipe tables, by putting colons at the boundaries of the separator line after the header: +---------+--------+------------------+ | Right | Left | Centered | +========:+:=======+:================:+ | Bananas | $1.34 | built-in wrapper | +---------+--------+------------------+ Right Left Centered Bananas $1.34 built-in wrapper For headerless tables, the colons go on the top line instead: +----------:+:----------+:--------:+ | Right | Left | Centered | +-----------+-----------+----------+ Right Left Centered Note that grid tables are quite awkward to write with a plain text editor (because unlike pipe tables, the column indicators must align). Here are some tools that can assist with creating grid tables: Emacs’ table-mode (M-x table-insert) Quarto Visual Editor Tables Generator’s Plain Text mode with Use reStructuredText syntax enabled HTML Tables Quarto can process HTML tables in html RawBlock nodes (i.e., {=html}) and convert them to Markdown tables, regardless of the output format (intentionally including non-HTML formats). As a result, you can use HTML table syntax in your documents and it will be converted to Markdown syntax for all formats. Additionally, libraries that emit computational tables in HTML format can work in other output formats. For example, consider the following raw HTML block: ```{=html} <table> <caption>As described in the section above, Quarto tables are great.</caption> <thead> <tr> <th>Header 1</th> <th>Header 2</th> </tr> </thead> <tbody> <tr> <td><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/African_Bush_Elephant.jpg/220px-African_Bush_Elephant.jpg" alt="African Bush Elephant" /></td> <td>Regular output</td> </tr> </tbody> </table> ``` When rendered, this results in the following output for HTML and PDF formats: HTML Output As described in the section above, Quarto tables are great. Header 1 Header 2 Regular output PDF Output In addition, Quarto supports the specification of embedded Markdown content in tables. This is done by providing a data attribute qmd or qmd-base64 in an embedded span or div node. These nodes can appear anywhere that such content is allowed: table headers, footers, cells, captions, etc. For example, the following table includes a cross reference, markdown formatting and a shortcode: ## HTML Tables Example {#sec-html-tables} ```{=html} <table> <caption><span data-qmd="As described in [Section -@sec-html-tables], Quarto are great."></span></caption> <thead> <tr> <th><span data-qmd="_Header 1_"></span></th> <th><span data-qmd="_Header 2_"></span></th> </tr> </thead> <tbody> <tr> <td><span data-qmd="{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}"></span></td> <td>Regular output</td> </tr> </tbody> </table> ``` Which renders as follows: HTML Tables Example As described in Section 9, Quarto are great. Header 1 Header 2 Regular output Disabling Quarto Table Processing It’s possible that Quarto’s processing of HTML tables interferes with your library’s processing. If this is the case, you can disable Quarto’s processing of HTML tables by adding the attribute data-quarto-disable-processing="true" to your table, for example: <table data-quarto-disable-processing="true"> ... </table>
{ "lastmod": "2023-07-05T19:35:15.215Z", "loc": "https://quarto.org/docs/authoring/tables.html", "source": "https://quarto.org/docs/authoring/tables.html" }
Note Pre-release builds are intended for testing purposes, and are not recommended for general use. For stable builds, please visit Release Builds. _ Find your operating system in the table below Highlights Quarto 1.4 includes the following new features: Typst Format—Support for the typst output format. Typst is a new open-source markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use. Lua changes—Quarto v1.4 adds new features to writers of Lua filters. Release Notes
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/download/prerelease.html", "source": "https://quarto.org/docs/download/prerelease.html" }
_ Find your operating system in the table below Release Notes
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/download/release.html", "source": "https://quarto.org/docs/download/release.html" }
Authoring Create content with markdown Markdown Basics Figures Tables Diagrams Citations & Footnotes Cross References Article Layout Computations Execute code and display its output Using Python Using R Using Julia Using Observable Execution Options Parameters Tools Use your favorite tools with Quarto JupyterLab RStudio IDE VS Code Neovim Text Editors Visual Editor Documents Generate output in many formats HTML PDF MS Word Markdown All Formats Presentations Present code and technical content Presentation Basics Revealjs (HTML) PowerPoint (Office) Beamer (PDF) Websites Create websites and blogs Creating a Website Website Navigation Creating a Blog Website Search Website Listings Books Create books and manuscripts Creating a Book Book Structure Book Crossrefs Customizing Output Interactivity Engage readers with interactivity Overview Observable JS Shiny Widgets Component Layout Publishing Publishing documents and sites Publishing Basics Quarto Pub GitHub Pages Posit Connect Netlify Confluence Other Services Projects Scale up your work with projects Project Basics Managing Execution Project Profiles Environment Variables Project Scripts Virtual Environments Advanced Refine documents with advanced tools Includes Variables Page Layout Document Language Conditional Content Notebook Filters No matching items
{ "lastmod": "2023-07-05T19:35:15.471Z", "loc": "https://quarto.org/docs/guide/index.html", "source": "https://quarto.org/docs/guide/index.html" }
Quarto 1.3 Feature This feature is new in Quarto 1.3, which you can download at https://quarto.org/docs/download/ Overview HTML pages (either standalone or in a website) can automatically include links to other formats specified in the document front matter. For example, the following document front matter: title: Sample Page author: Norah Jones date: last-modified toc: true format: html: default ipynb: default Results in an HTML page that includes a link to the additional notebook format in the right margin below the table of contents: If a table of contents is enabled for the page, the additional formats will be automatically placed within the table of contents as a new section. If no table of contents is displayed, the additional formats will be displayed in the right margin at the top of the document. Links to additional formats are displayed by default, but you can control whether they are shown or even which specific formats are included with the format-links YAML option. Rendering All Formats in Standalone HTML Documents The Render buttons in RStudio and VS Code will not automatically render all formats if the document isn’t part of a Quarto website. To render all formats use quarto render on the command line: Terminal quarto render multi-format.qmd Rendering Formats with the Same Extension If your formats share a file extension, for example, both HTML pages and Revealjs presentations use .html, their outputs will overwrite each other. To include formats with the same extension, use output-file to distinguish one. For example, to include a link to a RevealJS presentation provide a distinct output-file: document.qmd title: Sample Page format: html: default revealjs: output-file: document-revealjs.html Specifying Formats to Link You can provide an explicit list of formats to include in the Other Formats section by providing a list as the value for format-links. For example, this document front matter will result in only the link to the Jupyter notebook format, excluding the PDF format: title: Sample Page author: Norah Jones date: last-modified toc: true format: html: default ipynb: default pdf: default format-links: [ipynb] Hiding All Links To prevent format links from being shown at all, specify format-links: false in your document front matter. For example this front matter will not display the Other Formats links: title: Sample Page author: Norah Jones date: last-modified toc: true format: html: default ipynb: default format-links: false Controlling Formats at a Project Level In a Quarto Project, to control the formats and their behavior for a specific folder, provide the format and format-links options in a _metadata.yml file. Similarly, you can specify these options for an entire project by including them in the _quarto.yml project file. See Directory Metadata or Project Metadata for additional details. The format option isn’t merged like all other metadata across _quarto.yml, _metadata.yml, and the document YAML. If you have some formats specified at a project or directory level, you’ll also need to explicitly list them in the document YAML. For example, suppose you have HTML options set at the project level: _quarto.yml format: html: toc: true In order to get an HTML document with a link to the PDF format, you’ll need to list both formats in the YAML header: document.qmd format: html: default pdf: default
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/html-multi-format.html", "source": "https://quarto.org/docs/output-formats/html-multi-format.html" }
Overview Hugo is a very popular open source website publishing system. Pages in Hugo websites are typically written in plain markdown, so don’t have a straightforward way to automatically and reproducibly incorporate computational output. Using the Quarto hugo-md format, you can incorporate computational output (e.g. R or Python code that produces plots) into Hugo websites. This article explains how. It’s important to note that many of the Quarto features related to theming, page layout, and navigation are not applicable when you are using Quarto with Hugo. Hugo has its own theming system, syntax highlighting, table of contents, page layout, navigational menus, and full text search. You’ll use Quarto to execute code and generate markdown that is rendered within the Hugo HTML publishing framework rather than Quarto’s own. Site Config There are a couple of changes you should make to your Hugo config.toml in preparation for using Quarto with Hugo. First, make sure that .qmd and .ipynb files and other source code or data files are not published as part of the site. For example: ignoreFiles = [ "\\.qmd$", "\\.ipynb$", "\\.py$" ] Next, configure Hugo’s markdown renderer to allow raw HTML (as many R and Python packages will produce computational output using raw HTML rather than markdown): [markup.goldmark.renderer] unsafe= true Creating a Page Hugo articles and posts that use Quarto should live in their own directory (taking advantage of the Hugo Page Bundles feature). This allows any content generated/referenced by the page (e.g. plot output) to live right alongside the markdown source. To add Quarto documents to a Hugo site: Create a directory within content that will hold your Quarto article. Add an index.qmd document to the directory. When rendered this will create an index.md, which in turn will ensure that Hugo treats it as a Page Bundle (automatically copying images and other referenced resources to the publish directory). Add the requisite Hugo front matter, then also specify format: hugo-md and any other required Quarto options. For example, let’s say we wanted to create a new article named hello-quarto within the content directory. The filesystem would look like this: mysite/ content/ hello-quarto/ index.qmd Here’s what the source code of index.qmd might look like: --- title: Hello, Quarto date: "2012-04-06" categories: - Matplotlib - Coordinates format: hugo-md jupyter: python3 --- ## Polar Axis For a demonstration of a line plot on a polar axis, see @fig-polar. ```{python} #| label: fig-polar #| fig-cap: "A line plot on a polar axis" import numpy as np import matplotlib.pyplot as plt r = np.arange(0, 2, 0.01) theta = 2 * np.pi * r fig, ax = plt.subplots(subplot_kw={'projection': 'polar'}) ax.plot(theta, r) ax.set_rticks([0.5, 1, 1.5, 2]) ax.grid(True) plt.show() ``` Workflow The basic concept of using Quarto with Hugo is that you take computational markdown documents (.qmd) or Jupyter notebooks (.ipynb) and use them to generate plain markdown files (.md) that are rendered to HTML by Hugo. index.qmd   quarto =>   index.md   hugo =>   index.html The quarto render and quarto preview commands are used to transform .qmd or .ipynb files to Hugo compatible markdown (.md). The computational files are located in the same place you would also locate ordinary markdown files (e.g. the blog directory). After rendering, a plain .md file is written right alongside the computational document. This markdown file is then processed by Hugo. Live Preview The quarto preview command will automatically recognize when it is run from a directory that contains a Hugo website: Terminal cd my-hugo-website quarto preview This will automatically run hugo serve on your behalf to bring up a local preview server. In addition, it will monitor the filesystem for changes to .qmd and .ipynb inputs and automatically re-render them to Hugo compatible .md files when they change. Note that this also works for the integrated Render/Preview command within the Quarto VS Code Extension. Rendering If you are not previewing and want to render all of the Quarto documents (.qmd) and notebooks (.ipynb) in your site, call quarto render from the root directory of the site: Terminal cd my-hugo-website quarto render Typically you’ll want to do a quarto render at the site level before you build the site for publishing: Terminal quarto render && hugo You can also render individual documents or notebooks: Terminal quarto render blog/2022-07-26/hello-quarto/index.qmd If you have computationally expensive documents you may want to consider using Quarto’s freeze feature to only re-execute code when your document source code changes. Note that if aren’t ever rendering at the project level and just have individual files that you want to render with Quarto, you should specify the hugo-md format as follows: --- title: "My Blog Post" format: hugo-md --- Configuration While Quarto works well within a Hugo site that has no _quarto.yml project config file, you can add one if you want to customize the default behavior, add a bibliography, etc. For example, here is what a simple customized _quarto.yml file might look like: _quarto.yml project: type: hugo format: hugo-md: code-fold: true execute: warning: false biliography: references.lib It’s important to note that if you do provide an explicit _quarto.yml file you need to explicitly specify the project type (type: hugo) as shown above. External Directory You might decide that you prefer to keep all of your Quarto documents and/or notebooks in their own directory, separate from the Hugo website. In this configuration you would mirror the directory structure of your site in the Quarto directory, and then set the output-dir in the project file to point to the Hugo directory. For example: _quarto.yml project: type: hugo output-dir: ../hugo-site Shortcodes Note that Hugo shortcodes and Quarto shortcodes share the same basic syntax (e.g. {{< var foo >}}). This is normally not a problem as shortcodes not recognized by Quarto are passed through unmodified to Hugo. However, in some cases the use of a Hugo shortcode throws off Pandoc markdown processing, and its necessary to “protect” the Hugo shortcode from processing by Pandoc. This can typically be handled by escaping the shortcode with an extra brace. For example: {{{< ref "foo/index.md" >}}} It’s possible that this won’t be enough if the presence of the shortcode changes how Pandoc processes the surrounding markdown (e.g. this is currently known to occur for links). In this case you need to use a markdown raw block around the entire construct. For example: ```{=markdown} [click here]() ``` Or for inline content, use a markdown raw inline: For more info, `[click here]()`{=markdown} WebTeX Math The hugo format renders LaTeX equations using standard dollar-delimited inline ($...$) and display ($$...$$) syntax. However, if the web environment you are publishing into doesn’t support dollar-delimited math, you can alternatively use WebTeX to display math. This is done by setting the Pandoc html-math-method to webtex. For example: format: hugo: html-math-method: webtex WebTeX works for any web page that can display images, and requires no special JavaScript or CSS. Any inline or display equations contained within your document will be converted to an image URL that requests a rendered version of the equation. For example, the following markdown: $x + 1$ Will be converted to: ![](https://latex.codecogs.com/svg.latex?x%20%2B%201) Which renders as: Dark Mode SVG is used as the default rendering method because it has the best overall appearance. However, if your hugo document is being rendered on a dark background, you may want to switch to PNG with a dark background specified. You can do this as follows: format: hugo: html-math-method: method: webtex url: https://latex.codecogs.com/png.image?%5Cbg_black&space;
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/hugo.html", "source": "https://quarto.org/docs/output-formats/hugo.html" }
Overview HTML documents rendered with Quarto use Bootstrap 5 by default. This can be disabled or customized via the theme option: theme: default # bootstrap 5 default theme: cosmo # cosmo bootswatch theme theme: pandoc # pandoc default html treatment theme: none # no theme css added to document Quarto includes 25 themes from the Bootswatch project (for example, the website uses the cosmo theme). Available themes include: default cerulean cosmo cyborg darkly flatly journal litera lumen lux materia minty morph pulse quartz sandstone simplex sketchy slate solar spacelab superhero united vapor yeti zephyr Use of any of these themes via the theme option. For example: format: html: theme: united You can also customize these themes or create your own new themes. Learn how to do this below in Theme Options. Basic Options If you are using a Bootstrap theme or the Pandoc theme, there are a set of options you can provide in document metadata to customize its appearance. These include: Option Description max-width The maximum width occupied by page content. Defaults to 1400px for bootstrap themes and 36em for the pandoc theme. mainfont Sets the font-family property for the document. fontsize Sets the base CSS font-size for the document. fontcolor Sets the default text color for the document. linkcolor Sets the default text color for hyperlinks. monofont Sets the font-family property for <code> elements. monobackgroundcolor Sets the background-color property for <code> elements. linestretch Sets the CSS line-height property (affects distance between lines of text, defaults to 1.5). backgroundcolor Sets the background-color for the document. margin-left, margin-right, margin-top, margin-bottom Sets the CSS margin properties for the document body. For example. here we set the font-size a bit larger and specify that we want a bit more space between lines of text: title: "My Document" format: html: theme: cosmo fontsize: 1.1em linestretch: 1.7 Theme Options While the basic customization described above handles many common requirements, you can do extensive additional customization using SASS theme files. Bootstrap defines over 1,400 variables that control fonts, colors, padding, borders, and much more. You can see all of the variables here: https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss SASS theme files can define both variables that globally set things like colors and fonts, as well as rules that define more fine grained behavior. To customize an existing Bootstrap theme with your own set of variables and/or rules, just provide the base theme and then your custom theme file(s): theme: - cosmo - custom.scss Your custom.scss file might look something like this: /*-- scss:defaults --*/ $h2-font-size: 1.6rem !default; $headings-font-weight: 500 !default; $body-color: $gray-700 !default; /*-- scss:rules --*/ h1, h2, h3, h4, h5, h6 { text-shadow: -1px -1px 0 rgba(0, 0, 0, .3); } Note that the variables section is denoted by the /*-- scss:defaults --*/ comment and the rules section (where normal CSS rules go) is denoted by the /*-- scss:rules --*/ comment. Custom Themes You can naturally also create an entirely custom theme and provide only that (in this case you will inherit from the default Bootstrap theme): theme: custom.scss For example, here are the theme files for the 25 built-in Bootswatch themes: https://github.com/quarto-dev/quarto-cli/tree/main/src/resources/formats/html/bootstrap/themes You can read more about the custom theming design here. Dark Mode In addition to providing a single theme for your html output, you may also provide a light and dark theme. For example: theme: light: flatly dark: darkly Setting the above themes in your _quarto.yml results in both a dark and light version of your output being available. For example: Flatly Themed Output Darkly Themed Output When providing both a dark and light mode for your html output, Quarto will automatically create a toggle to allow your reader to select the desired dark or light appearance. The toggle will automatically appear in the top right corner of your html output. When possible, the toggle will use browser local storage to maintain the user’s preference across sessions. The first appearance (light or dark) elements in the theme to determine the default appearance for your html output. For example, since the light option appears first in the above example, a reader will see the light appearance by default. Quarto will automatically select the appropriate light or dark version of the text highlighter that you have specified when possible. For more information, see Code Highlighting. Customizing Themes As when providing a single theme, you may provide a custom theme for dark and light mode, or a list of scss files to customize the light and dark appearance. This website, for example uses the following to use a light cosmo theme and then customizes the cosmo theme with additional Sass variables when in dark mode: theme: light: cosmo dark: [cosmo, theme-dark.scss] The contents of theme-dark.scss which is customizing the cosmo document appearance is: /*-- scss:defaults --*/ // Base document colors $body-bg: #181818; $body-color: white; $link-color: #75AADB; // Code blocks $code-block-bg-alpha: -.8; For more information about available Sass variables, see HTML Customization Using Sass Variables. Sass Variables The following Sass Variables can be specified within SCSS files (note that these variables should always be prefixed with a $ and are specified within theme files rather than within YAML options): Colors Variable Notes $body-bg The page background color. $body-color The page text color. $link-color The link color. $input-bg The background color for HTML inputs. $popover-bg The background color for popovers (for example, when a citation preview is shown). Fonts Variable Notes $font-family-sans-serif The sans-serif font family for the page. $font-family-monospace The monospace font family for the page. $font-size-root The base font size for the page. $toc-font-size The font size for the page TOC. $h1-font-size $h2-font-size $h3-font-size $h4-font-size $h5-font-size Font sizes for the specified headings. Code Blocks Variable Notes $code-block-border-left By default, Quarto does not display a left border on code blocks. Set this variable to a truthy value or a CSS color to enable the left border. $code-block-border-left-style The style of the left border displayed on code blocks. Defaults to solid. $code-block-border-left-size The thickness of the left border displayed on code blocks. Defaults to 3px; $code-block-padding-left The amount of padding applied between the code and the border. Defaults to 0.6em. $code-block-bg By default, Quarto sets a background on code blocks by adding transparency to the theme’s progress-bg color. Set this variable to truthy value or a CSS color. $code-block-bg-padding The padding applied to the code block. Defaults to 0.4em. $code-block-bg-alpha The amount to alter the transparency fo the progress-bg color. This is not used if an explicit background color is set. Defaults to -0.35. Code Copy You can also customize the colors of the button which appears for code-copy: true with the following variables: Variable Notes $btn-code-copy-color The color used for the copy button at the top right of code blocks. $btn-code-copy-color-active The hover color used for the copy button at the top right of code blocks. Inline Code Variable Notes $code-bg The background color of inline code. Defaults to a mix between the body-bg and body-color. $code-color The text color of inline code. Defaults to a generated contrasting color against the code-bg. Table of Contents Variable Notes $toc-color The color for table of contents text. $toc-font-size The font-size for table of contents text. $toc-active-border The left border color for the currently active table of contents item. $toc-inactive-border The left border colors for inactive table of contents items. Layout Variable Notes $content-padding-top Padding that should appear before the main content area (including the sidebar, content, and TOC. Navigation Variable Notes $navbar-bg The background color of the navbar. Defaults to the theme’s $primary color. $navbar-fg The color of foreground elements (text and navigation) on the navbar. If not specified, a contrasting color is automatically computed. $navbar-hl The highlight color for links in the navbar. If not specified, the $link-color is used or a contrasting color is automatically computed. $sidebar-bg The background color for a sidebar. Defaults to $light except when a navbar is present or when the style is floating. In that case it defaults to the $body-bg color. $sidebar-fg The color of foreground elements (text and navigation) on the sidebar. If not specified, a contrasting color is automatically computed. $sidebar-hl The highlight color for links in the sidebar. If not specified, the $link-color is used. $footer-bg The background color for a sidebar. Defaults to the $body-bg color. $footer-fg The color of foreground elements (text and navigation) on the footer. If not specified, a contrasting color is automatically computed. Callouts Variable Notes $callout-border-width By default, Quarto does not display a left border on code blocks. Set this variable to a truthy value or a CSS color to enable the left border. Defaults to 5px. $callout-border-scale The border color of callouts computed by shifting the callout color by this amount. Defaults to 0%. $callout-icon-scale The color of the callout icon computed by shifting the callout color by this amount. Defaults to 10%. $callout-margin-top The amount of top margin on the callout. Defaults to 1.25rem. $callout-margin-bottom The amount of bottom margin on the callout. Defaults to 1.25rem. $callout-color-<type> The colors for the various types of callouts. Defaults: type default note $blue tip $green caution $orange warning $yellow important $red In addition to the above Sass variables, Bootstrap itself supports hundreds of additional variables. You can learn more about Bootstrap’s use of Sass variables or review the raw variables and their default values.
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/html-themes.html", "source": "https://quarto.org/docs/output-formats/html-themes.html" }
Overview There are wide variety of options available to customize the display of source code within HTML documents, including: Hiding some or all code that was executed by Knitr or Jupyter. Code folding for executed code (hidden by default and expandable by readers). Handling code that overflows the available horizontal display space. View the source code of the markdown file used to generate the document. Syntax highlighting themes and other options to control the appearance of code. Copy to clipboard button for code blocks. Generating hyperlinks to online documentation for functions used within code blocks via the downlit package (note that this option currently only works when using the Knitr engine). Details on using all of these options are provided below. Hiding Code For many documents you may want to hide all of the executable source code used to produce dynamic outputs. You can do this by specifying echo: false in the document execute options. For example: --- title: "My Document" execute: echo: false jupyter: python3 --- Note that we can override this option on a per code-block basis. For example: ```{python} #| echo: true import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.show() ``` Code block options are included in a special comment at the top of the block (lines at the top prefaced with #| are considered options). Folding Code Use the code-fold option to include code but have it hidden by default using the HTML <details> tag. For example, click the Code button to see the code that produced this plot. Code library(ggplot2) dat <- data.frame(cond = rep(c("A", "B"), each=10), xvar = 1:20 + rnorm(20,sd=3), yvar = 1:20 + rnorm(20,sd=3)) ggplot(dat, aes(x=xvar, y=yvar)) + geom_point(shape=1) + geom_smooth() Here we specify both code-fold: true as well as custom summary text (the default is just “Code” as shown above): format: html: code-fold: true code-summary: "Show the code" Valid values for code-fold include: Value Behavior false No folding (default) true Fold code (initially hidden) show Fold code (initially shown) Use the code-fold and code-summary chunk attributes to control this on a chunk-by-chunk basis: ```{r} #| code-fold: true #| code-summary: "Show the code" ``` Code Overflow In some cases the width of source code will overflow the available horizontal display space. By default, this will result in a horizontal scroll bar for the code block. However if you prefer not to have scrollbars you can have the longer lines wrap instead. To set the global default behavior use the code-overflow option. For example: format: html: code-overflow: wrap Valid values for code-overflow are: Option Description scroll Scroll code blocks that exceed available width (default, corresponds to white-space: pre). wrap Wrap lines of code that exceed available width (corresponds to white-space: pre-wrap). You can also override the global default on a per-code-block basis. For computational cells you do this with the code-overflow cell option: ```{python} #| code-overflow: wrap # very long line of code.... ``` For a static code block, add the .code-overflow-scroll or .code-overflow-wrap CSS class: ```{.python .code-overflow-wrap} # very long line of code.... ``` Note that irrespective of these options, code will always wrap within printed HTML output (as it would otherwise be clipped off the edge of the page). Code Tools You can include a Code menu in the header of your document that provides various tools for readers to interact with the source code. Specify code-tools: true to activate these tools: format: html: code-fold: true code-tools: true If you have a document that includes folded code blocks then the Code menu will present options to show and hide the folded code as well as view the full source code of the document: This document specifies code-tools: true in its options so you should see the Code menu above next to the main header. You can control which of these options are made available as well as the “Code” caption text using sub-options of code-tools. For example, here we specify that we want only “View Source” (no toggling of code visibility) and no caption on the code menu: format: html: code-tools: source: true toggle: false caption: none By default, the source code is embedded in the document and shown in a popup window like this: You can alternatively specify a URL for the value of source: format: html: code-tools: source: https://github.com/quarto-dev/quarto-web/blob/main/index.md If you are within a project and have specified a repo-url option then you can just use repo and the correct link to your source file will be generated: format: html: code-tools: source: repo Note that the code-tools option is not available when you disable the standard HTML theme (e.g. if you specify the theme: none option). Appearance By default code blocks are rendered with a left border whose color is derived from the current theme. You can customize code chunk appearance with some simple options that control the background color and left border. Options can either be booleans to enable or disable the treatment or can be legal CSS color strings (or they could even be SASS variable names!). Here is the default appearance for code blocks (code-block-background: true): You can instead use a left border treatment using the code-block-border-left option: code-block-border-left: true You can combine a background and border treatment as well as customize the left border color: code-block-bg: true code-block-border-left: "#31BAE9" Code Filename Use the filename attribute on code blocks If you are documenting the contents of a file and want to be especially clear about the name of the file the code is associated with. For example, the following code: ```{.python filename="matplotlib.py"} import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` Results in this HTML output: Non-HTML formats will still have the filename, but it will simply be shown in bold above the code block. Highlighting Pandoc will automatically highlight syntax in fenced code blocks that are marked with a language name. For example: ```python 1 + 1 ``` Pandoc can provide syntax highlighting for over 140 different languages (see the output of quarto pandoc --list-highlight-languages for a list of all of them). If you want to provide the appearance of a highlighted code block for a language not supported, just use default as the language name. You can specify the code highlighting style using highlight-style and specifying one of the supported themes. These themes are “adaptive”, which means they will automatically switch between a dark and light mode based upon the theme of the website. These are designed to work well with sites that include a dark and light mode. a11y arrow atom-one ayu breeze github gruvbox All of the standard Pandoc themes are also available: pygments tango espresso zenburn kate monochrome breezedark haddock As well as an additional set of extended themes, including: dracula monokai nord oblivion printing radical solarized vim-dark The highlight-style option determines which theme is used. For example: highlight-style: github Highlighting themes can provide either a single highlighting definition or two definitions, one optimized for a light colored background and another optimized for a dark color background. When available, Quarto will automatically select the appropriate style based upon the code chunk background color’s darkness. Users may always opt to specify the full name (e.g. atom-one-dark) to by pass this automatic behavior. By default, code is highlighted using the arrow theme, which is optimized for accessibility. We’ve additionally introduced the arrow-dark theme which is designed to provide accessible highlighting against dark backgrounds. Examples of the light and dark themes: Arrow (light) Arrow (dark) Ayu (light) Ayu (dark) Custom Highlighting In addition to the built in themes available for syntax highlighting, you can also specify your own syntax highlighting by providing the path to a valid theme file (which is based upon the KDE XML syntax highlighting descriptions). Highlighting is implemented using skylighting. For example: --- highlight-style: custom.theme --- In addition, if you’d like to provide adaptive themes, you may also pass both a light and dark theme file: --- highlight-style: light: custom-light.theme dark: custom-dark.theme --- Note that as with adaptive text higlighting themes, when you provide a dark and light highlight-style, background colors specified in the themes will be ignored in favor of the overall theme specified background colors. Code Annotation You can add annotations to lines of code in code blocks and executable code cells. See Code Annotation for full details. Line Numbers If you want to display line numbers alongside the code block, add the code-line-numbers option. For example: format: html: code-line-numbers: true Here’s how a code block with line numbers would display: import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() You can also enable line numbers for an individual code block using the code-line-numbers attribute. For example: ``` {.python code-line-numbers="true"} import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` Executable Blocks The documentation on computations covers how to include executable code blocks (code which is actually executed, with its output being included in the rendered document). We won’t additionally cover that here, but we will talk about how to include code blocks that demonstrate executable syntax (e.g. for writing a tutorial). Often you’ll want to include a fenced code block purely as documentation (not executable). You can do this by using two curly braces around the language (e.g. python, r, etc.) rather than one. For example: ```{{python}} 1 + 1 ``` Will be output into the document as: ```{python} 1 + 1 ``` If you want to show an example with multiple code blocks and other markdown, just enclose the entire example in 4 backticks (e.g. ````) and use the two curly brace syntax for code blocks within. For example: ```` --- title: "My document" --- Some markdown content. ```{{python}} 1 + 1 ``` Some additional markdown content. ```` Copy Button Hover over the code block below and you will see a copy icon in the top-right corner: library(dygraphs) dygraph(nhtemp, main = "New Haven Temperatures") %>% dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01")) This behavior is enabled by default but you configure it using the code-copy option: format: html: code-copy: false Valid values for code-copy include: hover Show button on hover (default) true Always show code copy button false Never show code copy button Code Linking The code-link option enables hyper-linking of functions within code blocks to their online documentation: format: html: code-link: true Code linking is currently implemented only for the knitr engine (via the downlit package). A limitation of downlit currently prevents code linking if code-line-numbers is also true. Source Code --- title: "HTML Code Blocks" format: html: code-tools: true execute: warning: false --- ## Overview There are wide variety of options available to customize the display of source code within HTML documents, including: 1. Hiding some or all code that was executed by [Knitr](https://yihui.name/knitr) or [Jupyter](https://jupyter.org). 2. Code folding for executed code (hidden by default and expandable by readers). 3. Handling code that overflows the available horizontal display space. 4. View the source code of the markdown file used to generate the document. 5. Syntax highlighting themes and other options to control the appearance of code. 6. Copy to clipboard button for code blocks. 7. Generating hyperlinks to online documentation for functions used within code blocks via the [downlit](https://downlit.r-lib.org/) package (note that this option currently only works when using the Knitr engine). Details on using all of these options are provided below. ## Hiding Code For many documents you may want to hide all of the executable source code used to produce dynamic outputs. You can do this by specifying `echo: false` in the document `execute` options. For example: ``` yaml --- title: "My Document" execute: echo: false jupyter: python3 --- ``` Note that we can override this option on a per code-block basis. For example: ```{python} #| echo: true import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.show() ``` Code block options are included in a special comment at the top of the block (lines at the top prefaced with `#|` are considered options). ## Folding Code Use the `code-fold` option to include code but have it hidden by default using the HTML `<details>` tag. For example, click the **Code** button to see the code that produced this plot. ```{r} #| code-fold: true library(ggplot2) dat <- data.frame(cond = rep(c("A", "B"), each=10), xvar = 1:20 + rnorm(20,sd=3), yvar = 1:20 + rnorm(20,sd=3)) ggplot(dat, aes(x=xvar, y=yvar)) + geom_point(shape=1) + geom_smooth() ``` Here we specify both `code-fold: true` as well as custom summary text (the default is just "Code" as shown above): ``` yaml format: html: code-fold: true code-summary: "Show the code" ``` Valid values for `code-fold` include: | Value | Behavior | |---------|------------------------------| | `false` | No folding (default) | | `true` | Fold code (initially hidden) | | `show` | Fold code (initially shown) | Use the `code-fold` and `code-summary` chunk attributes to control this on a chunk-by-chunk basis: ```{r} #| code-fold: true #| code-summary: "Show the code" ``` ## Code Overflow In some cases the width of source code will overflow the available horizontal display space. By default, this will result in a horizontal scroll bar for the code block. However if you prefer not to have scrollbars you can have the longer lines wrap instead. To set the global default behavior use the `code-overflow` option. For example: ``` yaml format: html: code-overflow: wrap ``` Valid values for `code-overflow` are: | Option | Description | |------------------|------------------------------------------------------| | `scroll` | Scroll code blocks that exceed available width (default, corresponds to `white-space: pre`). | | `wrap` | Wrap lines of code that exceed available width (corresponds to `white-space: pre-wrap`). | You can also override the global default on a per-code-block basis. For computational cells you do this with the `code-overflow` cell option: ```{python} #| code-overflow: wrap # very long line of code.... ``` For a static code block, add the `.code-overflow-scroll` or `.code-overflow-wrap` CSS class: ```` python ```{.python .code-overflow-wrap} # very long line of code.... ``` ```` Note that irrespective of these options, code will always wrap within printed HTML output (as it would otherwise be clipped off the edge of the page). ## Code Tools You can include a **Code** menu in the header of your document that provides various tools for readers to interact with the source code. Specify `code-tools: true` to activate these tools: ``` yaml format: html: code-fold: true code-tools: true ``` If you have a document that includes folded code blocks then the **Code** menu will present options to show and hide the folded code as well as view the full source code of the document: ![](images/code-tools-01.png){.border fig-alt="A screen shot of the header of a rendered Quarto document showing the result of setting both the code-fold and code-tools option to true. There is a drop-down menu labeled 'Code' to the right of the page title with a triangle pointing down. The menu is open and there are three options listed vertically beneath it: 'Hide All Code,' 'Show All Code,' and 'View Source.'"} This document specifies `code-tools: true` in its options so you should see the **Code** menu above next to the main header. You can control which of these options are made available as well as the "Code" caption text using sub-options of `code-tools`. For example, here we specify that we want only "View Source" (no toggling of code visibility) and no caption on the code menu: ``` yaml format: html: code-tools: source: true toggle: false caption: none ``` By default, the source code is embedded in the document and shown in a popup window like this: ![](images/code-tools-source.png){fig-alt="A screenshot of this webpage with a pop-up window labeled 'Source Code' over it. This 'Source Code' window contains the raw markdown and R code used to write this page. There is an 'X' on the upper right corner of the 'Source Code' pop up to close it."} You can alternatively specify a URL for the value of `source`: ``` yaml format: html: code-tools: source: https://github.com/quarto-dev/quarto-web/blob/main/index.md ``` If you are within a project and have specified a `repo-url` option then you can just use `repo` and the correct link to your source file will be generated: ``` yaml format: html: code-tools: source: repo ``` Note that the `code-tools` option is not available when you disable the standard HTML theme (e.g. if you specify the `theme: none` option). ## Appearance By default code blocks are rendered with a left border whose color is derived from the current theme. You can customize code chunk appearance with some simple options that control the background color and left border. Options can either be booleans to enable or disable the treatment or can be legal CSS color strings (or they could even be SASS variable names!). Here is the default appearance for code blocks (`code-block-background: true`): ![](images/code-bg.png){fig-alt="A block of code with a gray background."} You can instead use a left border treatment using the `code-block-border-left` option: ``` yaml code-block-border-left: true ``` ![](images/code-default.png){fig-alt="A block of code with a gray vertical stripe running along its left border. This code block has no background."} You can combine a background and border treatment as well as customize the left border color: ``` yaml code-block-bg: true code-block-border-left: "#31BAE9" ``` ![](images/code-custom.png){fig-alt="A block of code with a gray background and a blue vertical stripe running along its left border."} ## Code Filename Use the `filename` attribute on code blocks If you are documenting the contents of a file and want to be especially clear about the name of the file the code is associated with. For example, the following code: ```` markdown ```{.python filename="matplotlib.py"} import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` ```` Results in this HTML output: ![](images/code-filename.png) Non-HTML formats will still have the filename, but it will simply be shown in bold above the code block. ## Highlighting Pandoc will automatically highlight syntax in [fenced code blocks](https://pandoc.org/MANUAL.html#fenced-code-blocks) that are marked with a language name. For example: ```python 1 + 1 ``` Pandoc can provide syntax highlighting for over 140 different languages (see the output of `quarto pandoc --list-highlight-languages` for a list of all of them). If you want to provide the appearance of a highlighted code block for a language not supported, just use `default` as the language name. You can specify the code highlighting style using `highlight-style` and specifying one of the supported themes. These themes are "adaptive", which means they will automatically switch between a dark and light mode based upon the theme of the website. These are designed to work well with sites that include a dark and light mode. - a11y - arrow - atom-one - ayu - breeze - github - gruvbox All of the standard Pandoc themes are also available: - pygments - tango - espresso - zenburn - kate - monochrome - breezedark - haddock As well as an additional set of extended themes, including: - dracula - monokai - nord - oblivion - printing - radical - solarized - vim-dark The `highlight-style` option determines which theme is used. For example: ``` yaml highlight-style: github ``` Highlighting themes can provide either a single highlighting definition or two definitions, one optimized for a light colored background and another optimized for a dark color background. When available, Quarto will automatically select the appropriate style based upon the code chunk background color's darkness. Users may always opt to specify the full name (e.g. `atom-one-dark`) to by pass this automatic behavior. By default, code is highlighted using the `arrow` theme, which is optimized for accessibility. We've additionally introduced the `arrow-dark` theme which is designed to provide accessible highlighting against dark backgrounds. Examples of the light and dark themes: #### Arrow (light) ![](images/arrow.png){fig.alt="A block of code showcasing the Arrow (light) theme."} #### Arrow (dark) ![](images/arrow-dark.png){fig.alt="A block of code showcasing the Arrow (dark) theme."} #### Ayu (light) ![](images/ayu.png){fig.alt="A block of code showcasing the Ayu (light) theme."} #### Ayu (dark) ![](images/ayu-dark.png){.preview-image fig.alt="A block of code showcasing the Ayu (dark) theme."} ### Custom Highlighting In addition to the built in themes available for syntax highlighting, you can also specify your own syntax highlighting by providing the path to a valid theme file (which is based upon the KDE XML syntax highlighting descriptions). Highlighting is implemented using [skylighting](https://github.com/jgm/skylighting). For example: ``` yaml --- highlight-style: custom.theme --- ``` In addition, if you'd like to provide adaptive themes, you may also pass both a light and dark theme file: ``` yaml --- highlight-style: light: custom-light.theme dark: custom-dark.theme --- ``` Note that as with adaptive text higlighting themes, when you provide a dark and light `highlight-style`, background colors specified in the themes will be ignored in favor of the overall theme specified background colors. {{< include _code-annotation.md >}} ## Line Numbers If you want to display line numbers alongside the code block, add the `code-line-numbers` option. For example: ``` yaml format: html: code-line-numbers: true ``` Here's how a code block with line numbers would display: ``` {.python code-line-numbers="true"} import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` You can also enable line numbers for an individual code block using the `code-line-numbers` attribute. For example: ```` python ``` {.python code-line-numbers="true"} import matplotlib.pyplot as plt plt.plot([1,23,2,4]) plt.show() ``` ```` ## Executable Blocks The documentation on [computations](/docs/get-started/computations/) covers how to include executable code blocks (code which is actually executed, with its output being included in the rendered document). We won't additionally cover that here, but we will talk about how to include code blocks that demonstrate executable syntax (e.g. for writing a tutorial). {{< include ../computations/_unexecuted-blocks.md >}} ## Copy Button Hover over the code block below and you will see a copy icon in the top-right corner: ```{r eval=FALSE} library(dygraphs) dygraph(nhtemp, main = "New Haven Temperatures") %>% dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01")) ``` This behavior is enabled by default but you configure it using the `code-copy` option: ``` yaml format: html: code-copy: false ``` Valid values for `code-copy` include: | | | |---------|--------------------------------| | `hover` | Show button on hover (default) | | `true` | Always show code copy button | | `false` | Never show code copy button | ## Code Linking The `code-link` option enables hyper-linking of functions within code blocks to their online documentation: ``` yaml format: html: code-link: true ``` Code linking is currently implemented only for the knitr engine (via the [downlit](https://downlit.r-lib.org) package). A limitation of downlit currently prevents code linking if `code-line-numbers` is also `true`.
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/html-code.html", "source": "https://quarto.org/docs/output-formats/html-code.html" }
Overview Use the html format to create HTML output. For example: --- title: "My document" format: html: toc: true html-math-method: katex css: styles.css --- This example highlights a few of the options available for HTML output. This document covers these and other options in detail. See the HTML format reference for a complete list of all available options. Table of Contents Use the toc option to include an automatically generated table of contents in the output document. Use the toc-depth option to specify the number of section levels to include in the table of contents. The default is 3 (which means that level-1, 2, and 3 headings will be listed in the contents). For example: toc: true toc-depth: 2 Use the toc-expand option to specify how much of the table of contents to show initially (defaults to 1 with auto-expansion as the user scrolls). Use true to expand all or false to collapse all. toc: true toc-expand: 2 You can customize the title used for the table of contents using the toc-title option: toc-title: Contents If you want to exclude a heading from the table of contents, add both the .unnumbered and .unlisted classes to it: ### More Options {.unnumbered .unlisted} The HTML format by default floats the table of contents to the right. You can alternatively position it at the left, or in the body. For example: format: html: toc: true toc-location: left The floating table of contents can be used to navigate to sections of the document and also will automatically highlight the appropriate section as the user scrolls. The table of contents is responsive and will become hidden once the viewport becomes too narrow. See an example on the right of this page. Note that the toc-location option is not available when you disable the standard HTML theme (e.g. if you specify the theme: none or theme: pandoc option). Section Numbering Use the number-sections option to number section headings in the output document. For example: number-sections: true Use the number-depth option to specify the deepest level of heading to add numbers to (by default all headings are numbered). For example: number-depth: 3 To exclude an individual heading from numbering, add the .unnumbered class to it: ### More Options {.unnumbered} CSS Styles To add a CSS stylesheet to your document, just provide the css option. For example: format: html: css: styles.css Using the css option works well for simple tweaks to document appearance. If you want to do more extensive customization see the documentation on HTML Themes. LaTeX Equations By default, LaTeX equations are rendered using MathJax. Use the html-math-method option to choose another method. For example: format: html: html-math-method: katex You can also specify a url for the library to load for a given method: html-math-method: method: mathjax url: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" Available math rendering methods include: Method Description mathjax Use MathJax to display embedded TeX math in HTML output. katex Use KaTeX to display embedded TeX math in HTML output. webtex Convert TeX formulas to <img> tags that link to an external script that converts formulas to images. gladtex Enclose TeX math in <eq> tags in HTML output. The resulting HTML can then be processed by GladTeX to produce images of the typeset formulas and an HTML file with links to these images. mathml Convert TeX math to MathML (note that currently only Firefox and Safari natively support MathML) plain No special processing (formulas are put inside a span with class="math"). Note that this is more detailed documentation on each of these options in the Pandoc Math Rendering in HTML documentation. Tabsets You can use tabsets to present content that will vary in interest depending on the audience. For example, here we provide some example code in a variety of languages: RPythonJavaJulia fizz_buzz <- function(fbnums = 1:50) { output <- dplyr::case_when( fbnums %% 15 == 0 ~ "FizzBuzz", fbnums %% 3 == 0 ~ "Fizz", fbnums %% 5 == 0 ~ "Buzz", TRUE ~ as.character(fbnums) ) print(output) } def fizz_buzz(num): if num % 15 == 0: print("FizzBuzz") elif num % 5 == 0: print("Buzz") elif num % 3 == 0: print("Fizz") else: print(num) public class FizzBuzz { public static void fizzBuzz(int num) { if (num % 15 == 0) { System.out.println("FizzBuzz"); } else if (num % 5 == 0) { System.out.println("Buzz"); } else if (num % 3 == 0) { System.out.println("Fizz"); } else { System.out.println(num); } } } function FizzBuzz(num) if num % 15 == 0 println("FizzBuzz") elseif num % 5 == 0 println("Buzz") elseif num % 3 == 0 println("Fizz") else println(num) end end Create a tabset via a markdown div with the class name panel-tabset (e.g. ::: {.panel-tabset}). Each top-level heading within the div creates a new tab. For example, here is the markdown used to implement the first two tabs displayed above: ::: {.panel-tabset} ## R ``` {.r} fizz_buzz <- function(fbnums = 1:50) { output <- dplyr::case_when( fbnums %% 15 == 0 ~ "FizzBuzz", fbnums %% 3 == 0 ~ "Fizz", fbnums %% 5 == 0 ~ "Buzz", TRUE ~ as.character(fbnums) ) print(output) } ``` ## Python ``` {.python} def fizz_buzz(num): if num % 15 == 0: print("FizzBuzz") elif num % 5 == 0: print("Buzz") elif num % 3 == 0: print("Fizz") else: print(num) ``` ::: Tabset Groups If you have multiple tabsets that include the same tab names, you can define a tabset group. Tabs within a group are all switched together (so in the example above once a reader switches to R or Python in one tabset the others will follow along). For example: ::: {.panel-tabset group="language"} ## R Tab content ## Python Tab content ::: Self Contained HTML documents typically have a number of external dependencies (e.g. images, CSS style sheets, JavaScript, etc.). By default these dependencies are placed in a _files directory alongside your document. For example, if you render report.qmd to HTML: Terminal quarto render report.qmd --to html Then the following output is produced: report.html report_files/ You might alternatively want to create an entirely self-contained HTML document (with images, CSS style sheets, JavaScript, etc. embedded into the HTML file). You can do this by specifying the embed-resources option: format: html: embed-resources: true This will produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, style sheets, images, and videos. The resulting file should be self contained, in the sense that it needs no external files and no net access to be displayed properly by a browser. Anchor Sections Hover over a section title to see an anchor link. Enable/disable this behavior with: format: html: anchor-sections: true Anchor links are also automatically added to figures and tables that have a cross reference defined. Smooth Scrolling Enable smooth scrolling within the page. By default, smooth scroll is not enabled. Enable/disable it with: format: html: smooth-scroll: true External Links By default external links (i.e. links that don’t target the current site) receive no special visual adornment or navigation treatment (the current page is navigated). You can use the following options to modify this behavior: Option Description link-external-icon true to show an icon next to the link to indicate that it’s external (e.g. external). link-external-newwindow true to open external links in a new browser window or tab (rather than navigating the current tab). link-external-filter A regular expression that can be used to determine whether a link is an internal link. For example ^(?:http:|https:)\/\/www\.quarto\.org\/custom will treat links that start with http://www.quarto.org as internal links (and others will be considered external). External links are identified either using the site-url (if provided) or using the window.host if no site-url or link-external-filter is provided. For example, here we enable both options and a custom filter: format: html: link-external-icon: true link-external-newwindow: true link-external-filter: '^(?:http:|https:)\/\/www\.quarto\.org\/custom' You can also specify one or both of these behaviors for an individual link using the .external class and target attribute. For example: [example](https://example.com){.external target="_blank"} Reference Popups If you hover your mouse over the citation and footnote in this sentence you’ll see a popup displaying the reference contents:    Hover over Xie (2015) to see a reference to the definitive book on knitr1. This behavior is enabled by default. You can disable it with the following options: format: html: citations-hover: false footnotes-hover: false Commenting This page has commenting with Hypothes.is enabled via the following YAML option: comments: hypothesis: true You can see the Hypothesis UI at the far right of the page. Rather than true, you can specify any of the available Hypothesis embedding options as a sub-key of hypothesis. For example: comments: hypothesis: theme: clean You can enable Utterances commenting using the utterances option. Here you need to specify at least the GitHub repo you want to use for storing comments: comments: utterances: repo: quarto-dev/quarto-docs You can also specify the other options documented here. You may also enable Giscus for commenting using the giscus option. Giscus will store comments in the ‘Discussions’ of a Github repo. comments: giscus: repo: quarto-dev/quarto-docs Like utterances, you need to specify at least the Git repo you want to use for storing comments. In addition, the repo that you use must: Be public Have the Giscus app installed. Have discussion enabled Review the Giscus documentation for instructions on setting up Giscus in your repository. Additional options are covered here. Disabling Comments If you have comments enabled for an entire website or book, you can selectively disable comments for a single page by specifying comments: false. For example: title: "Home Page" comments: false Includes If you want to include additional content in your document from another file, you can use the include-in-* options: Option Description include-in-header Include contents of file, verbatim, at the end of the header. This can be used, for example, to include special CSS or JavaScript in HTML documents or to inject commands into the LaTeX preamble. include-before-body Include contents of file, verbatim, at the beginning of the document body (e.g. after the <body> tag in HTML, or the \begin{document} command in LaTeX). This can be used to include navigation bars or banners in HTML documents. include-after-body Include contents of file, verbatim, at the end of the document body (before the </body> tag in HTML, or the \end{document} command in LaTeX). You can specify a single file or multiple files for each of these options directly, or use the file: subkey. To include raw content in the YAML header, use the text subkey. When using text:, add the | character after text: to indicate that the value is a multi-line string. If you omit file: or text:, Quarto assumes you are providing a file. For example: format: html: include-in-header: - text: | <script src="https://examples.org/demo.js"></script> - file: analytics.html - comments.html include-before-body: header.html Minimal HTML The default Quarto HTML output format includes several features by default, including bootstrap themes, anchor sections, reference popups, tabsets, code block copying, and responsive figures. You can disable all of these built in features at once using the minimal option. For example: --- title: "My Document" format: html: minimal: true --- When specifying minimal: true you can still selectively re-enable features you do want, for example: --- title: "My Document" format: html: minimal: true code-copy: true --- References Xie, Yihui. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. https://yihui.name/knitr/. Footnotes knitr is an R package for creating dynamic documents.↩︎
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/html-basics.html", "source": "https://quarto.org/docs/output-formats/html-basics.html" }
Overview This article covers the various ways you can publish Quarto HTML documents, including publishing to a hosting service or sharing a standalone HTML file using E-mail, Dropbox, etc. Note that it’s also possible to publish collections of Quarto documents as a website. See the article on Publishing Basics for additional details. Publish Command The quarto publish command provides a straightforward way to publish documents to Quarto Pub, GitHub Pages, Netlify, and Posit Connect. For example, here are the commands to publish document.qmd to each of these services: Terminal quarto publish quarto-pub document.qmd quarto publish gh-pages document.qmd quarto publish netlify document.qmd quarto publish connect document.qmd For simple publishing of individual documents there’s not much more to learn than quarto publish. Here’s a brief overview of the various supported services and when they might be an appropriate choice: Destination Description Quarto Pub Publishing service for Quarto documents, websites, and books. Use Quarto Pub when you want a free, easy to use service for publicly available content. GitHub Pages Publish content based on source code managed within a GitHub repository. Use GitHub Pages when the source code for your document or site is hosted on GitHub. Posit Connect Publishing platform for secure sharing of data products within an organization. Use Posit Connect when you want to publish content within an organization rather than on the public internet. Netlify Professional web publishing platform. Use Netlify when you want support for custom domains, authentication, previewing branches, and other more advanced capabilities. Other Services Content rendered with Quarto uses standard formats (HTML, PDFs, MS Word, etc.) that can be published anywhere. Use this if one of the methods above don’t meet your requirements. Note that the documentation linked to above generally references publishing an entire project (website or book) but all of the commands work just the same if you publish an individual document or presentation as demonstrated above. Standalone HTML You can optionally render Quarto documents into self contained HTML, whereby all of the content required to render the article (images generated by plots, required CSS and JavaScript, etc.) are bundled into a single HTML file. Use the embed-resources option to do this: format: html: embed-resources: true Then, you can share this HTML file using the same means you use to share other document types like spreadsheets, presentations, and PDFs (e.g by uploading it to Dropbox or any other file sharing service). Note that when using embed-resources: true, math libraries like MathJax and KaTeX are not embedded by default because they are quite large and often time consuming to download. If you do want to embed math libraries, add the self-contained-math: true option: format: html: embed-resources: true self-contained-math: true
{ "lastmod": "2023-07-05T19:35:15.675Z", "loc": "https://quarto.org/docs/output-formats/html-publishing.html", "source": "https://quarto.org/docs/output-formats/html-publishing.html" }
Using Templates If you want to customize the appearance of MS Word output, Pandoc supports a special type of template called a reference document. Here’s an example of specifying a custom reference document for docx: format: docx: reference-doc: custom-reference-doc.docx Reference documents include sample text that uses all of the output styles used by Pandoc. To use a reference doc template, just copy it to your document’s directory and reference it as shown above. Creating Templates To create a new reference doc based on the Pandoc default, execute the following command: $ quarto pandoc -o custom-reference-doc.docx \ --print-default-data-file reference.docx Then, open custom-reference-doc.docx in MS Word and modify styles as you wish: You can open the Styles pane from the HOME tab in the MS Word toolbar. When you move the cursor to a specific element in the document, an item in the styles list will be highlighted. If you want to modify the style of any type of element, you can click the drop-down menu on the highlighted item, and you will see a dialog box like this: After you finish modifying the styles, you can save the document and use it as the template for future Word documents.
{ "lastmod": "2023-07-05T19:35:15.703Z", "loc": "https://quarto.org/docs/output-formats/ms-word-templates.html", "source": "https://quarto.org/docs/output-formats/ms-word-templates.html" }
Overview Quarto sometimes allows you to provide a path or paths using glob syntax, providing wildcard expansion and other behavior that makes it simple to match a list of files without having to specify each file individually. Globs may be used: When specifying render targets in Quarto projects (see Render Targets). When defining resources for Quarto websites (see Site Resources). When defining documents to include in a listing (see Listing Contents). When automatically creating navigation for sidebars (see Auto Navigation). Glob Syntax The below is a general reference of the syntax used for globs in Quarto. Note that globs match the filesystem recursively. If you prefer that they don’t, then prefix the pattern with a / (for example, use /*.qmd rather than *.qmd). * - Matches everything. {foo,bar} - Matches foo or bar. [abcd] - Matches a, b, c or d. [a-d] - Matches a, b, c or d. [!abcd] - Matches any single character besides a, b, c or d. [[:<class>:]] - Matches any character belonging to <class>. [[:alnum:]] - Matches any digit or letter. [[:digit:]abc] - Matches any digit, a, b or c. See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes for a complete list of supported character classes. \ - Escapes the next character for an os other than "windows". ` - Escapes the next character for os set to "windows". / - Path separator. \ - Additional path separator only for os set to "windows". ?(foo|bar) - Matches 0 or 1 instance of {foo,bar}. @(foo|bar) - Matches 1 instance of {foo,bar}. They behave the same. *(foo|bar) - Matches n instances of {foo,bar}. +(foo|bar) - Matches n > 0 instances of {foo,bar}. !(foo|bar) - Matches anything other than {foo,bar}. ** - Matches any number of any path segments. Must comprise its entire path segment in the provided glob. See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/globs.html", "source": "https://quarto.org/docs/reference/globs.html" }
Documents HTML PDF MS Word Open Office ePub Presentations Revealjs PowerPoint Beamer Markdown GitHub CommonMark Markua Wikis MediaWiki Jira Wiki DokuWiki ZimWiki XWiki Code Cells Jupyter Knitr Observable JS Projects Options Websites Books Metadata Dates Globs Citations No matching items
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/index.html", "source": "https://quarto.org/docs/reference/index.html" }
GitHub Flavored Markdown, often shortened as GFM, is the dialect of Markdown that is currently supported for user content on GitHub.com and GitHub Enterprise. To learn about GFM see https://github.github.com/gfm/. See the GFM format user guide for more details on creating GFM output with Quarto. format: gfm Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options html-math-method 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. identifier-prefix 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. variant Enable and disable extensions for markdown output (e.g. “+emoji”) markdown-headings Specify whether to use atx (#-prefixed) or setext (underlined) headings for level 1 and 2 headings (atx or setext). keep-yaml Preserve the original YAML front matter in rendered markdown quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 preview-mode The mode to use when previewing this document. To disable any special previewing features, pass raw as the preview-mode. Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Footnotes reference-location 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 citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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-comments 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. ascii 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/markdown/gfm.html", "source": "https://quarto.org/docs/reference/formats/markdown/gfm.html" }
CommonMark is a strongly defined, highly compatible specification of Markdown. You can learn more about CommonMark at https://commonmark.org/. format: commonmark Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options identifier-prefix 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. variant Enable and disable extensions for markdown output (e.g. “+emoji”) markdown-headings Specify whether to use atx (#-prefixed) or setext (underlined) headings for level 1 and 2 headings (atx or setext). keep-yaml Preserve the original YAML front matter in rendered markdown quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Footnotes reference-location 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 citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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-comments 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. ascii 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/markdown/commonmark.html", "source": "https://quarto.org/docs/reference/formats/markdown/commonmark.html" }
JATS (Journal Article Tag Suite) is an XML format for marking up and exchanging journal content. You can learn more about JATS here https://jats.nlm.nih.gov/publishing/. format: jats format: jats_archiving format: jats_articleauthoring format: jats_publishing Title & Author title Document title date Document date author Author or authors of the document affiliation The list of organizations with which contributors are affiliated. Each institution is added as an [<aff>] element to the author’s contrib-group. See the Pandoc JATS documentation for details on affiliation fields. copyright Licensing and copyright information. This information is rendered via the <permissions> element. The variables type, link, and text should always be used together. See the Pandoc JATS documentation for details on copyright fields. article Information concerning the article that identifies or describes it. The key-value pairs within this map are typically used within the <article-meta> element. See the Pandoc JATS documentation for details on article fields. journal Information on the journal in which the article is published. See the Pandoc JATS documentation for details on journal fields. abstract Summary of document notes Additional notes concerning the whole article. Added to the article’s frontmatter via the <notes> element. tags List of keywords. Items are used as contents of the <kwd> element; the elements are grouped in a <kwd-group> with the kwd-group-type value author. order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 preview-mode The mode to use when previewing this document. To disable any special previewing features, pass raw as the preview-mode. Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes metadata-files 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. Metadata copyright The copyright for this document, if any. license The license for this document, if any. Creative Commons licenses CC BY, CC BY-SA, CC BY-ND, CC BY-NC will automatically generate a license link in the document appendix. Other license text will be placed in the appendix verbatim. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/jats.html", "source": "https://quarto.org/docs/reference/formats/jats.html" }
OpenDocument, is an open standard file format for word processing documents It was developed with the aim of providing an open, XML-based file format specification for office applications. To learn more about OpenDocument see https://en.wikipedia.org/wiki/OpenDocument. format: odt Title & Author title Document title subtitle Identifies the subtitle of the document. date Document date author Author or authors of the document abstract Summary of document order Order for document when included in a website automatic sidebar menu. Format Options reference-doc Use the specified file as a style reference in producing a docx, pptx, or odt file. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 toc-title The title used for the table of contents. Numbering number-sections 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. number-offset 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-level-by 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. Layout page-width Target page width for output (used to compute columns widths for layout divs). Defaults to 6.5 inches, which corresponds to default letter page settings in docx and odt. grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-align Figure horizontal alignment (default, left, right, or center) fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/odt.html", "source": "https://quarto.org/docs/reference/formats/odt.html" }
reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for in-line program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. You can learn more about reStructuredText at https://docutils.sourceforge.io/rst.html. format: rst Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Formatting list-tables If true, tables are formatted as RST list tables. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/rst.html", "source": "https://quarto.org/docs/reference/formats/rst.html" }
Org-Mode is an Emacs major mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more. To learn more about Org-Mode see https://orgmode.org/. format: org Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/org.html", "source": "https://quarto.org/docs/reference/formats/org.html" }
MediaWiki is the native document format of Wikipedia. To learn more about MediaWiki see https://www.mediawiki.org. format: mediawiki Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/wiki/mediawiki.html", "source": "https://quarto.org/docs/reference/formats/wiki/mediawiki.html" }
Jira Wiki is the native document format for the Jira issue tracking and project management system from Atlassian. To learn more about Jira Wikis see https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all. format: jira Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/wiki/jira.html", "source": "https://quarto.org/docs/reference/formats/wiki/jira.html" }
Zim is a graphical text editor used to maintain a collection of wiki pages. To learn more about ZimWiki see https://zim-wiki.org/. format: zimwiki Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/wiki/zimwiki.html", "source": "https://quarto.org/docs/reference/formats/wiki/zimwiki.html" }
Emacs Muse is an authoring and publishing environment for Emacs. It simplifies the process of writing documents and publishing them to various output formats. To learn more about Emacs Muse see https://www.gnu.org/software/emacs-muse/manual/. format: muse Title & Author title Document title subtitle Identifies the subtitle of the document. date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Footnotes reference-location 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 citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/muse.html", "source": "https://quarto.org/docs/reference/formats/muse.html" }
Haddock is a tool for automatically generating documentation from annotated Haskell source code. You can learn more about Haddock at https://haskell-haddock.readthedocs.io/. format: haddock Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options identifier-prefix 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. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/haddock.html", "source": "https://quarto.org/docs/reference/formats/haddock.html" }
PowerPoint is the presentation editing software included with Microsoft Office. You can learn more about PowerPoint at https://en.wikipedia.org/wiki/Microsoft_PowerPoint. See the PowerPoint format user guide for more details on creating PowerPoint output with Quarto. format: pptx Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options reference-doc Use the specified file as a style reference in producing a docx, pptx, or odt file. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 toc-title The title used for the table of contents. Numbering number-sections 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. number-offset 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-level-by 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. Slides incremental Make list items in slide shows display incrementally (one by one). The default is for lists to be displayed all at once. slide-level Specifies that headings with the specified level create slides. Headings above this level in the hierarchy are used to divide the slide show into sections; headings below this level create subheads within a slide. Valid values are 0-6. If a slide level of 0 is specified, slides will not be split automatically on headings, and horizontal rules must be used to indicate slide boundaries. If a slide level is not specified explicitly, the slide level will be set automatically based on the contents of the document Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes metadata-files 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. Metadata subject The document subject description The document description. Some applications show this as Comments metadata. category The document category. Rendering from 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 Output file to write to output-ext Extension to use for generated output file standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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.
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/presentations/pptx.html", "source": "https://quarto.org/docs/reference/formats/presentations/pptx.html" }
DocBook is an XML schema particularly well suited to books and papers about computer hardware and software (though it is by no means limited to these applications). You can learn more about DocBook at https://www.docbook.org/. format: docbook Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options identifier-prefix 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. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Numbering number-sections 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. number-offset 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-level-by 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. top-level-division Treat top-level headings as the given division type (default, section, chapter, or part). The hierarchy order is part, chapter, then section; all headings are shifted such that the top-level heading becomes the specified type. The default behavior is to determine the best division type via heuristics: unless other conditions apply, section is chosen. When the documentclass variable is set to report, book, or memoir (unless the article option is specified), chapter is implied as the setting for this option. If beamer is the output format, specifying either chapter or part will cause top-level headings to become \part{..}, while second-level headings remain as their default type. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/docbook.html", "source": "https://quarto.org/docs/reference/formats/docbook.html" }
The Rich Text Format (RTF) is a proprietary document file format with published specification developed by Microsoft Corporation from 1987 until 2008 for cross-platform document interchange with Microsoft products. Learn more about RTF at https://en.wikipedia.org/wiki/Rich_Text_Format. format: rtf Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-align Figure horizontal alignment (default, left, right, or center) fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/rtf.html", "source": "https://quarto.org/docs/reference/formats/rtf.html" }
ICML is an XML representation of an Adobe InDesign document. You can learn more about ICML at https://wwwimages.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-specification.pdf. format: icml Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/icml.html", "source": "https://quarto.org/docs/reference/formats/icml.html" }
Texinfo is the official documentation format of the GNU project. Texinfo uses a single source file to produce output in a number of formats, both online and printed (DVI, HTML, Info, PDF, XML, etc.). To learn more about Texinfo see https://www.gnu.org/software/texinfo/. format: texinfo Title & Author title Document title date Document date author Author or authors of the document order Order for document when included in a website automatic sidebar menu. Format Options quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 Numbering number-sections 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. number-offset 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-level-by 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. Layout grid Properties of the grid system used to layout Quarto HTML pages. Code code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 metadata-files 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. Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 wrap 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. columns 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. tab-stop 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 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. eol 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).
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/formats/texinfo.html", "source": "https://quarto.org/docs/reference/formats/texinfo.html" }
ePub is an e-book file format that is supported by many e-readers, and compatible software is available for most smartphones, tablets, and computers. You can learn more about ePub at https://en.wikipedia.org/wiki/EPUB. format: epub Title & Author title Document title subtitle Identifies the subtitle of the document. date Document date author Author or authors of the document abstract Summary of document abstract-title Title used to label document abstract order Order for document when included in a website automatic sidebar menu. Format Options css One or more CSS style sheets. html-math-method 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. html-q-tags Use <q> tags for quotes in HTML. quarto-required A semver version range describing the supported quarto versions for this document or project. Examples: >= 1.1.0: Require at least quarto version 1.1 1.*: Require any quarto versions whose major version number is 1 Table of Contents toc 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. toc-depth Specify the number of section levels to include in the table of contents. The default is 3 toc-title The title used for the table of contents. Numbering number-sections 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. number-depth By default, all headings in your document create a numbered section. You customize numbering depth using the number-depth option. For example, to only number sections immediately below the chapter level, use this: number-depth: 1 number-offset 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-level-by 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. ePub Options identifier The identifier for this publication. creator Creators of this publication. contributor Contributors to this publication. subject The subject of the publication. type Text describing the specialized type of this publication. An informative registry of specialized EPUB Publication types for use with this element is maintained in the TypesRegistry, but Authors may use any text string as a value. format Text describing the format of this publication. relation Text describing the relation of this publication. coverage Text describing the coverage of this publication. rights Text describing the rights of this publication. belongs-to-collection Identifies the name of a collection to which the EPUB Publication belongs. group-position Indicates the numeric position in which this publication belongs relative to other works belonging to the same belongs-to-collection field. page-progression-direction Sets the global direction in which content flows (ltr or rtl) ibooks iBooks specific metadata options. epub-metadata Look in the specified XML file for metadata for the EPUB. The file should contain a series of Dublin Core elements. For example: <dc:rights>Creative Commons</dc:rights> <dc:language>es-AR</dc:language> By default, pandoc will include the following metadata elements: <dc:title> (from the document title), <dc:creator> (from the document authors), <dc:date> (from the document date, which should be in [ISO 8601 format]), <dc:language> (from the lang variable, or, if is not set, the locale), and <dc:identifier id="BookId"> (a randomly generated UUID). Any of these may be overridden by elements in the metadata file. Note: if the source document is Markdown, a YAML metadata block in the document can be used instead. epub-subdirectory Specify the subdirectory in the OCF container that is to hold the EPUB-specific contents. The default is EPUB. To put the EPUB contents in the top level, use an empty string. epub-fonts Embed the specified fonts in the EPUB. Wildcards can also be used: for example, DejaVuSans-*.ttf. To use the embedded fonts, you will need to add declarations like the following to your CSS: @font-face { font-family: DejaVuSans; font-style: normal; font-weight: normal; src:url("DejaVuSans-Regular.ttf"); } epub-chapter-level Specify the heading level at which to split the EPUB into separate chapter files. The default is to split into chapters at level-1 headings. This option only affects the internal composition of the EPUB, not the way chapters and sections are displayed to users. Some readers may be slow if the chapter files are too large, so for large documents with few level-1 headings, one might want to use a chapter level of 2 or 3. epub-cover-image Use the specified image as the EPUB cover. It is recommended that the image be less than 1000px in width and height. epub-title-page If false, disables the generation of a title page. Layout grid Properties of the grid system used to layout Quarto HTML pages. Formatting split-level Specify the heading level at which to split the EPUB into separate chapter files. The default is to split into chapters at level-1 headings. This option only affects the internal composition of the EPUB, not the way chapters and sections are displayed to users. Some readers may be slow if the chapter files are too large, so for large documents with few level-1 headings, one might want to use a chapter level of 2 or 3. Code code-fold Collapse code into an HTML <details> tag so the user can display it on-demand. true: collapse code false (default): do not collapse code show: use the <details> tag, but show the expanded code initially. code-summary Summary text to use for code blocks collapsed using code-fold code-overflow Choose how to handle code overflow, when code lines are too wide for their container. One of: scroll wrap code-line-numbers Include line numbers in code block output (true or false). For revealjs output only, you can also specify a string to highlight specific lines (and/or animate between sets of highlighted lines). Sets of lines are denoted with commas: 3,4,5 1,10,12 Ranges can be denoted with dashes and combined with commas: 1-3,5 5-10,12,14 Finally, animation steps are separated by |: 1-3|1-3,5 first shows 1-3, then 1-3,5 |5|5-10,12 first shows no numbering, then 5, then lines 5-10 and 12 code-copy Enable a code copy icon for code blocks. true: Always show the icon false: Never show the icon hover (default): Show the icon when the mouse hovers over the code block code-annotations The style to use when displaying code annotations. Set this value to false to hide code annotations. highlight-style Specifies the coloring style to be used in highlighted source code. Instead of a STYLE name, a JSON file with extension .theme may be supplied. This will be parsed as a KDE syntax highlighting theme and (if valid) used as the highlighting style. syntax-definitions KDE language syntax definition files (XML) indented-code-classes Specify classes to use for all indented code blocks Execution Execution options should be specified within the execute key. For example: execute: echo: false warning: false eval 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) echo 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) output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. cache 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. freeze 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 Figures fig-align Figure horizontal alignment (default, left, right, or center) fig-width 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. fig-height 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. fig-format Default format for figures generated by Matplotlib or R graphics (retina, png, jpeg, svg, or pdf) fig-dpi 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. fig-asp 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. fig-responsive Whether to make images in this document responsive. Tables tbl-colwidths 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. df-print 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. References bibliography Document bibliography (BibTeX or CSL). May be a single file or a list of files csl Citation Style Language file to use for formatting references. citeproc 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. citation-abbreviations 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" } } } Citation citation Citation information for the document itself specified as CSL YAML in the document front matter. For more on supported options, see Citation Metadata. Language lang 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. language YAML file containing custom language translations dir 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). Includes include-before-body 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-after-body 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-in-header 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 resources Path (or glob) to files to publish with this document. metadata-files 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. Metadata date-meta Sets the date metadata for the document Rendering from 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 Output file to write to output-ext Extension to use for generated output file template Use the specified file as a custom template for the generated document. template-partials Include the specified files as partials accessible to the template for the generated content. standalone Produce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment) filters 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. shortcodes Specify Lua scripts that implement shortcode handlers keep-md Keep the markdown file generated by executing code keep-ipynb Keep the notebook file generated from executing code. ipynb-filters Filters to pre-process ipynb files before rendering to markdown extract-media 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. resource-path List of paths to search for images and other resources. default-image-extension 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. abbreviations 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. dpi 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 ascii 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.
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/formats/epub.html", "source": "https://quarto.org/docs/reference/formats/epub.html" }
All available options for book projects are documented below. See Creating a Book for an in-depth guide to creating books with Quarto. Project Options that define the type, render targets, and output of a project. Project options are specified under the project key. For example: --- project: type: book output-dir: _book --- title type Project type (default, website, or book) render Files to render (defaults to all files) execute-dir Control the working directory for computations. file: Use the directory of the file that is currently executing. project: Use the root directory of the project. output-dir Output directory lib-dir HTML library (JS/CSS/etc.) directory resources Additional file resources to be copied to output directory preview Options for quarto preview (see Preview) pre-render Scripts to run as a pre-render step post-render Scripts to run as a post-render step Preview Specify options that control the behavior of quarto preview within the preview key. For example: --- project: type: book output-dir: _book preview: port: 4200 browser: false --- Available preview options include: port Port to listen on (defaults to random value between 3000 and 8000) host Hostname to bind to (defaults to 127.0.0.1) serve Options for external preview server (see Serve) browser Open a web browser to view the preview (defaults to true) watch-inputs Re-render input files when they change (defaults to true) navigate Navigate the browser automatically when outputs are updated (defaults to true) timeout Time (in seconds) after which to exit if there are no active clients Serve If you are creating a project extension for another publishing system that includes its own preview server (for example, Hugo or Docusaurus) then use the preview: serve options to customize the behavior of the preview server. cmd Serve project preview using the specified command. Interpolate the --port into the command using {port}. args Additional command line arguments for preview command. env Environment variables to set for preview command. ready Regular expression for detecting when the server is ready. See the Hugo and Docusaurus extension source code for example usages of preview: serve. Book Options that affect book output. Book options are specified under the book key. For example: --- book: title: "My Book" image: opengraph.png page-navigation: true --- title Book title subtitle Book subtitle author Author or authors of the book date Book publication date date-format Format string for dates in the book abstract Book abstract description Description metadata for HTML version of book references Book references file output-file Base name for single-file output (e.g. PDF, ePub) cover-image Cover image (used in HTML and ePub formats) cover-image-alt Alternative text for cover image (used in HTML format) sharing Sharing buttons to include on navbar or sidebar (one or more of twitter, facebook, linkedin) downloads Download buttons for other formats to include on navbar or sidebar (one or more of pdf, epub, and docx) tools Custom tools for navbar or sidebar doi The Digital Object Identifier for this book. abstract-url A url to the abstract for this item. accessed Date the item has been accessed. annote Short markup, decoration, or annotation to the item (e.g., to indicate items included in a review); For descriptive text (e.g., in an annotated bibliography), use note instead archive Archive storing the item archive-collection Collection the item is part of within an archive. archive-location Storage location within an archive (e.g. a box and folder number). archive-place Geographic location of the archive. authority Issuing or judicial authority (e.g. “USPTO” for a patent, “Fairfax Circuit Court” for a legal case). available-date Date the item was initially available (e.g. the online publication date of a journal article before its formal publication date; the date a treaty was made available for signing). call-number Call number (to locate the item in a library). chair The person leading the session containing a presentation (e.g. the organizer of the container-title of a speech). chapter-number Chapter number (e.g. chapter number in a book; track number on an album). citation-key Identifier of the item in the input data file (analogous to BiTeX entrykey); Use this variable to facilitate conversion between word-processor and plain-text writing systems; For an identifer intended as formatted output label for a citation (e.g. “Ferr78”), use citation-label instead citation-label Label identifying the item in in-text citations of label styles (e.g. “Ferr78”); May be assigned by the CSL processor based on item metadata; For the identifier of the item in the input data file, use citation-key instead collection-editor Editor of the collection holding the item (e.g. the series editor for a book). collection-number Number identifying the collection holding the item (e.g. the series number for a book) collection-title Title of the collection holding the item (e.g. the series title for a book; the lecture series title for a presentation). compiler Person compiling or selecting material for an item from the works of various persons or bodies (e.g. for an anthology). composer Composer (e.g. of a musical score). container-author Author of the container holding the item (e.g. the book author for a book chapter). container-title Title of the container holding the item (e.g. the book title for a book chapter, the journal title for a journal article; the album title for a recording; the session title for multi-part presentation at a conference) contributor A minor contributor to the item; typically cited using “with” before the name when listed in a bibliography. curator Curator of an exhibit or collection (e.g. in a museum). dimensions Physical (e.g. size) or temporal (e.g. running time) dimensions of the item. director Director (e.g. of a film). division Minor subdivision of a court with a jurisdiction for a legal item edition (Container) edition holding the item (e.g. “3” when citing a chapter in the third edition of a book). editor The editor of the item. editorial-director Managing editor (“Directeur de la Publication” in French). editor-translator Combined editor and translator of a work. The citation processory must be automatically generate if editor and translator variables are identical; May also be provided directly in item data. event-date Date the event related to an item took place. event-title Name of the event related to the item (e.g. the conference name when citing a conference paper; the meeting where presentation was made). event-place Geographic location of the event related to the item (e.g. “Amsterdam, The Netherlands”). executive-producer Executive producer of the item (e.g. of a television series). fulltext-url A url to the full text for this item. genre Type, class, or subtype of the item (e.g. “Doctoral dissertation” for a PhD thesis; “NIH Publication” for an NIH technical report); Do not use for topical descriptions or categories (e.g. “adventure” for an adventure movie) guest Guest (e.g. on a TV show or podcast). host Host of the item (e.g. of a TV show or podcast). illustrator Illustrator (e.g. of a children’s book or graphic novel). interviewer Interviewer (e.g. of an interview). isbn International Standard Book Number (e.g. “978-3-8474-1017-1”). issn International Standard Serial Number. issue Issue number of the item or container holding the item (e.g. “5” when citing a journal article from journal volume 2, issue 5); Use volume-title for the title of the issue, if any. issued Date the item was issued/published. jurisdiction Geographic scope of relevance (e.g. “US” for a US patent; the court hearing a legal case). keyword Keyword(s) or tag(s) attached to the item. language The language of the item (used only for citation of the item). Should be entered as an ISO 639-1 two-letter language code (e.g. “en”, “zh”), optionally with a two-letter locale code (e.g. “de-DE”, “de-AT”). This does not change the language of the item, instead it documents what language the item uses (which may be used in citing the item). license The license information applicable to an item (e.g. the license an article or software is released under; the copyright information for an item; the classification status of a document) locator A cite-specific pinpointer within the item (e.g. a page number within a book, or a volume in a multi-volume work). Must be accompanied in the input data by a label indicating the locator type (see the Locators term list). medium Description of the item’s format or medium (e.g. “CD”, “DVD”, “Album”, etc.) narrator Narrator (e.g. of an audio book). note Descriptive text or notes about an item (e.g. in an annotated bibliography). number Number identifying the item (e.g. a report number). number-of-pages Total number of pages of the cited item. number-of-volumes Total number of volumes, used when citing multi-volume books and such. organizer Organizer of an event (e.g. organizer of a workshop or conference). original-author The original creator of a work (e.g. the form of the author name listed on the original version of a book; the historical author of a work; the original songwriter or performer for a musical piece; the original developer or programmer for a piece of software; the original author of an adapted work such as a book adapted into a screenplay) original-date Issue date of the original version. original-publisher Original publisher, for items that have been republished by a different publisher. original-publisher-place Geographic location of the original publisher (e.g. “London, UK”). original-title Title of the original version (e.g. “Война и мир”, the untranslated Russian title of “War and Peace”). page Range of pages the item (e.g. a journal article) covers in a container (e.g. a journal issue). page-first First page of the range of pages the item (e.g. a journal article) covers in a container (e.g. a journal issue). page-last Last page of the range of pages the item (e.g. a journal article) covers in a container (e.g. a journal issue). part-number Number of the specific part of the item being cited (e.g. part 2 of a journal article). Use part-title for the title of the part, if any. part-title Title of the specific part of an item being cited. pdf-url A url to the pdf for this item. performer Performer of an item (e.g. an actor appearing in a film; a muscian performing a piece of music). pmcid PubMed Central reference number. pmid PubMed reference number. printing-number Printing number of the item or container holding the item. producer Producer (e.g. of a television or radio broadcast). public-url A public url for this item. publisher The publisher of the item. publisher-place The geographic location of the publisher. recipient Recipient (e.g. of a letter). reviewed-author Author of the item reviewed by the current item. reviewed-genre Type of the item being reviewed by the current item (e.g. book, film). reviewed-title Title of the item reviewed by the current item. scale Scale of e.g. a map or model. script-writer Writer of a script or screenplay (e.g. of a film). section Section of the item or container holding the item (e.g. “§2.0.1” for a law; “politics” for a newspaper article). series-creator Creator of a series (e.g. of a television series). source Source from whence the item originates (e.g. a library catalog or database). status Publication status of the item (e.g. “forthcoming”; “in press”; “advance online publication”; “retracted”) submitted Date the item (e.g. a manuscript) was submitted for publication. supplement-number Supplement number of the item or container holding the item (e.g. for secondary legal items that are regularly updated between editions). translator Translator type The type of the item. url Uniform Resource Locator (e.g. “https://aem.asm.org/cgi/content/full/74/9/2766”) version Version of the item (e.g. “2.0.9” for a software program). volume Volume number of the item (e.g. “2” when citing volume 2 of a book) or the container holding the item (e.g. “2” when citing a chapter from volume 2 of a book). Use volume-title for the title of the volume, if any. volume-title Title of the volume of the item or container holding the item. Also use for titles of periodical special issues, special sections, and the like. year-suffix Disambiguating year suffix in author-date styles (e.g. “a” in “Doe, 1999a”). description Website description favicon The path to the favicon for this website site-url Base URL for published website site-path Path to site (defaults to /). Not required if you specify site-url. repo-url Base URL for website source code repository repo-subdir Subdirectory of repository containing website repo-branch Branch of website source code (defaults to main) issue-url URL to use for the ‘report an issue’ repository action. repo-actions Links to source repository actions (none or one or more of edit, source, issue) reader-mode Displays a ‘reader-mode’ tool which allows users to hide the sidebar and table of contents when viewing a page. google-analytics The Google tracking Id or measurement Id of this website. cookie-consent The type of consent that should be requested, using one of these two values: implied (default): This will notify the user that the site uses cookies and permit them to change preferences, but not block cookies unless the user changes their preferences. express: This will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn’t agree). search Site search (true or false to enable/disable, or provide custom Search Options navbar Navbar options (see Navbar) sidebar Sidebar options (see Sidebar) body-header Markdown to insert at the beginning of each page’s body (below the title and author block). body-footer Markdown to insert below each page’s body. margin-header Markdown to place above margin content (text or file path) margin-footer Markdown to place below margin content (text or file path) page-navigation Provide next and previous article links in footer back-to-top-navigation Provide a ‘back to top’ navigation button page-footer Page footer. Text content or page footer definition. image Default site thumbnail image for twitter /open-graph comments open-graph Generate Open Graph metadata (see Open Graph options) twitter-card Generate Twitter Card metadata (see Twitter Card options) Navbar Options that define the top navigation bar for a book For example: --- book: navbar: search: true --- title The navbar title. Uses the project title if none is specified. logo Path to a logo image that will be displayed to the left of the title. logo-alt Alternate text for the logo image. logo-href Target href from navbar logo / title. By default, the logo and title link to the root page of the site (/index.html). background The navbar’s background color (named or hex color). foreground The navbar’s foreground color (named or hex color). search Include a search box in the navbar. pinned Always show the navbar (keeping it pinned). collapse Collapse the navbar into a menu when the display becomes narrow. collapse-below The responsive breakpoint below which the navbar will collapse into a menu (sm, md, lg (default), xl, xxl). left List of items for the left side of the navbar (see Nav Items) right List of items for the left side of the navbar (see Nav Items) Nav Items Nav items appear in the left or right key of navbar definitions. For example: --- book: navbar: right: - icon: github href: https://github.com/ aria-label: GitHub --- aria-label Accessible label for the item. href Link to file contained with the project or external URL icon Name of bootstrap icon (e.g. github, twitter, share) See https://icons.getbootstrap.com/ for a list of available icons menu Submenu of navigation items text Text to display for item (defaults to the document title if not provided) rel Value for rel attribute. Multiple space-separated values are permitted. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel for a details. target Value for target attribute. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target for details. Note that the icon option is available for items in the Navbar, however items in the Sidebar do not support the icon option. Sidebar Options that define the side navigation area for a book. For example: --- book: sidebar: search: true --- id The identifier for this sidebar. title The sidebar title. Uses the project title if none is specified. logo Path to a logo image that will be displayed in the sidebar. search Include a search control in the sidebar. tools List of sidebar tools (see Sidebar Tools) contents List of navigation items to appear in the sidebar. Can also include section entries which in turn contain sub-lists of navigation items. style The style of sidebar (docked or floating). background The sidebar’s background color (named or hex color). foreground The sidebar’s foreground color (named or hex color). border Whether to show a border on the sidebar (defaults to true for ‘docked’ sidebars) alignment Alignment of the items within the sidebar (left, right, or center) collapse-level The depth at which the sidebar contents should be collapsed by default. pinned When collapsed, pin the collapsed sidebar to the top of the page. header Markdown to place above sidebar content (text or file path) footer Markdown to place below sidebar content (text or file path) Sidebar Tools Action buttons that appear on the sidebar. For example: --- book: sidebar: tools: - icon: github href: https://github.com/ --- icon Name of bootstrap icon (e.g. github, twitter, share) See https://icons.getbootstrap.com/ for a list of available icons href Link to file contained with the project or external URL menu Submenu of navigation items Footer Book page footer definition. For example: --- book: page-footer: center: - text: "About" href: about.qmd - text: "License" href: license.qmd - text: "Trademark" href: trademark.qmd --- left Footer left content right Footer right content center Footer center content border Footer border (true, false, or a border color) background Footer background color foreground Footer foreground color Search Search options are specified under the search key of book. For example: book: search: location: navbar type: overlay --- location Location for search widget (navbar or sidebar) type Type of search UI (overlay or textbox) limit Number of matches to display (defaults to 20) collapse-after Matches after which to collapse additional results copy-button Provide button for copying search link algolia Use an Algolia index for site search (see Algolia Options) Algolia Options You can use an Algolia index as the back end of book search. Specify Algolia options using the algolia sub-key of search, for example: --- book: search: algolia: index-name: <my-index-name> application-id: <my-application-id> search-only-api-key: <my-search-only-api-key> --- index-name The name of the index to use when performing a search application-id The unique ID used by Algolia to identify your application search-only-api-key The Search-Only API key to use to connect to Algolia analytics-events Enable tracking of Algolia analytics events show-logo Enable the display of the Algolia logo in the search results footer. index-fields Fields to target for searches (see below for details) params Additional parameters to pass when executing a search The index-fields option provides sub-fields within the Algolia index to target for searches: href Field that contains the URL of index entries title Field that contains the title of index entries text Field that contains the text of index entries section Field that contains the section of index entries Social Social metadata is provided as a subkey of book options. You can specify true to generate social metadata using a set of default option, or specify one or more Twitter or Open Graph specific options as enumerated below. For example: --- book: open-graph: true twitter-card: site: "@sitehandle" --- Twitter Card title The title of the page. Note that by default Quarto will automatically use the title metadata from the page. Specify this field if you’d like to override the title for this provider. description A short description of the content. Note that by default Quarto will automatically use the description metadata from the page. Specify this field if you’d like to override the description for this provider. image The path to a preview image for the content. By default, Quarto will use the image value from the format metadata. If you provide an image, you may also optionally provide an image-width and image-height. image-alt The alt text for the preview image. By default, Quarto will use the image-alt value from the format metadata. If you provide an image, you may also optionally provide an image-width and image-height. image-width Image width (pixels) image-height Image height (pixels) card-style Card style (summary or summary_large_image). If this is not provided, the best style will automatically selected based upon other metadata. You can learn more about Twitter Card styles here. creator @username of the content creator (must be a quoted string) site @username of the website (must be a quoted string) Open Graph title The title of the page. Note that by default Quarto will automatically use the title metadata from the page. Specify this field if you’d like to override the title for this provider. description A short description of the content. Note that by default Quarto will automatically use the description metadata from the page. Specify this field if you’d like to override the description for this provider. image The path to a preview image for the content. By default, Quarto will use the image value from the format metadata. If you provide an image, you may also optionally provide an image-width and image-height. image-alt The alt text for the preview image. By default, Quarto will use the image-alt value from the format metadata. If you provide an image, you may also optionally provide an image-width and image-height. image-width Image width (pixels) image-height Image height (pixels) locale Locale of open graph metadata site-name Name that should be displayed for the overall site. If not explicitly provided in the open-graph metadata, Quarto will use the website or book title by default. Comments You can add commenting to your book using either Hypothesis, Utterances, or Giscus. Hypothesis Enable and configure Hypothesis commenting via comments key. For example: --- website: comments: hypothesis: theme: clean openSidebar: false --- openSidebar Controls whether the sidebar opens automatically on startup. showHighlights Controls whether the in-document highlights are shown by default (always, whenSidebarOpen or never) theme Controls the overall look of the sidebar (classic or clean) enableExperimentalNewNoteButton Controls whether the experimental New Note button should be shown in the notes tab in the sidebar. usernameUrl Specify a URL to direct a user to, in a new tab. when they click on the annotation author link in the header of an annotation. services Array of service definitions branding Custom branding/colors to apply to UI externalContainerSelector A CSS selector specifying the containing element into which the sidebar iframe will be placed. focus User focused filter set for the available annotations on a page requestConfigFromFrame Specify a host iframe to request configuration from assetRoot The root URL from which assets are loaded. sidebarAppUrl The URL for the sidebar application which displays annotations. For additional documentation on the Hypothesis options enumerated above, see the Hypothesis Publisher Config documentation. Utterances Enable and configure Utterances commenting via the comments key. For example: --- website: comments: utterances: repo: quarto-dev/quarto-web --- repo The Github repo that will be used to store comments. label The label that will be assigned to issues created by Utterances. theme The Github theme that should be used for Utterances (github-light, github-dark, github-dark-orange, icy-dark, dark-blue, photon-dark, body-light, or gruvbox-dark) issue-term How posts should be mapped to Github issues (pathname, url, title or og:title) Giscus Enable and configure usage of the Giscus app via the comments key. For example: --- website: comments: giscus: repo: quarto-dev/quarto-web --- repo The Github repo that will be used to store comments. In order to work correctly, the repo must be public, with the giscus app installed, and the discussions feature must be enabled. repo-id The Github repository identifier. You can quickly find this by using the configuration tool at https://giscus.app. If this is not provided, Quarto will attempt to discover it at render time. category The discussion category where new discussions will be created. It is recommended to use a category with the Announcements type so that new discussions can only be created by maintainers and giscus. category-id The Github category identifier. You can quickly find this by using the configuration tool at https://giscus.app. If this is not provided, Quarto will attempt to discover it at render time. mapping The mapping between the page and the embedded discussion. pathname: The discussion title contains the page path url: The discussion title contains the page url title: The discussion title contains the page title og:title: The discussion title contains the og:title metadata value any other string or number: Any other strings will be passed through verbatim and a discussion title containing that value will be used. Numbers will be treated as a discussion number and automatic discussion creation is not supported. reactions-enabled Display reactions for the discussion’s main post before the comments. loading Specify loading: lazy to defer loading comments until the user scrolls near the comments container. input-position Place the comment input box above or below the comments. theme The giscus theme to use when displaying comments. language The language that should be used when displaying the commenting interface. Listings Listings enable you to automatically generate the contents of a page (or region of a page) from a list of Quarto documents or other custom data. You can enable listings on a page using the listing option in the document front matter, for example: --- title: "Listing Example" listing: default --- id The id of this listing. When the listing is rendered, it will place the contents into a div with this id. If no such div is defined on the page, a div with this id will be created and appended to the end of the page. In no id is provided for a listing, Quarto will synthesize one when rendering the page. type The type of listing to create. Choose one of: default: A blog style list of items table: A table of items grid: A grid of item cards custom: A custom template, provided by the template field contents The files or path globs of Quarto documents or YAML files that should be included in the listing. sort Sort items in the listing by these fields. The sort key is made up of a field name followed by a direction asc or desc. For example: date asc Use sort:false to use the unsorted original order of items. max-items The maximum number of items to include in this listing. page-size The number of items to display on a page. sort-ui Shows or hides the sorting control for the listing. To control the fields that will be displayed in the sorting control, provide a list of field names. filter-ui Shows or hides the filtering control for the listing. To control the fields that will be used to filter the listing, provide a list of field names. By default all fields of the listing will be used when filtering. categories Display item categories from this listing in the margin of the page. numbered: Category list with number of items unnumbered: Category list cloud: Word cloud style categories feed Create an RSS feed for this page using the items in this listing (see Feed). date-format The date format to use when displaying dates (e.g. d-M-yyy). Learn more about supported date formatting values here. max-description-length The maximum length (in characters) of the description displayed in the listing. Defaults to 175. image-placeholder The default image to use if an item in the listing doesn’t have an image. image-align In default type listings, whether to place the image on the right or left side of the post content (left or right). image-height The height of the image being displayed (a CSS height string). The width is automatically determined and the image will fill the rectangle without scaling (cropped to fill). grid-columns In grid type listings, the number of columns in the grid display. Defaults to 3. grid-item-border In grid type listings, whether to display a border around the item card. Defaults to true. grid-item-align In grid type listings, the alignment of the content within the card (left (default), right, or center). table-striped In table type listings, display the table rows with alternating background colors. Defaults to false. table-hover In table type listings, highlight rows of the table when the user hovers the mouse over them. Defaults to false. template The path to a custom listing template. template-params Parameters that are passed to the custom template. fields The list of fields to include in this listing. field-display-names A mapping that provides display names for specific fields. For example, to display the title column as ‘Report’ in a table listing you would write: listing: field-display-names: title: "Report" field-types Provides the date type for the field of a listing item. Unknown fields are treated as strings unless a type is provided. Valid types are date, number. field-links The list of fields to display as hyperlinks to the source document when the listing type is a table. By default, only the title or filename is displayed as a link. field-required Fields that items in this listing must have populated. If a listing is rendered and one more items in this listing is missing a required field, an error will occur and the render will. include Items with matching field values will be included in the listing. exclude Items with matching field values will be excluded from the listing. Feed Enable an RSS feed for your listing by including the feed option. items The number of items to include in your feed. Defaults to 20. type Whether to include full or partial content in the feed. full (default): Include the complete content of the document in the feed. partial: Include only the first paragraph of the document in the feed. title The title for this feed. Defaults to the site title provided the Quarto project. image The path to an image for this feed. If not specified, the image for the page the listing appears on will be used, otherwise an image will be used if specified for the site in the Quarto project. description The description of this feed. If not specified, the description for the page the listing appears on will be used, otherwise the description of the site will be used if specified in the Quarto project. language The language of the feed. Omitted if not specified. See https://www.rssboard.org/rss-language-codes for a list of valid language codes. categories A list of categories for which to create separate RSS feeds containing only posts with that category. About Layout a simple about page for an individual or organization. For more, see the About Pages documentation. id The target id of this about page. When the about page is rendered, it will place read the contents of a div with this id into the about template that you have selected (and replace the contents with the rendered about content). If no such div is defined on the page, a div with this id will be created and appended to the end of the page. template The template to use to layout this about page. Choose from: jolla trestles solana marquee broadside image The path to the main image on the about page. If not specified, the image provided for the document itself will be used. image-width A valid CSS width for the about page image. image-shape The shape of the image on the about page. rectangle round rounded links Links (as navigation items) to display on the about page.
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/projects/books.html", "source": "https://quarto.org/docs/reference/projects/books.html" }
This article documents options that define the type, render targets, and output of a project. See the Project Basics article for additional documentation on using projects. Project options are specified under the project key. For example: --- project: type: website output-dir: _site --- title type Project type (default, website, or book) render Files to render (defaults to all files) execute-dir Control the working directory for computations. file: Use the directory of the file that is currently executing. project: Use the root directory of the project. output-dir Output directory lib-dir HTML library (JS/CSS/etc.) directory resources Additional file resources to be copied to output directory preview Options for quarto preview (see Preview) pre-render Scripts to run as a pre-render step post-render Scripts to run as a post-render step Preview Specify options that control the behavior of quarto preview within the preview key. For example: --- project: type: website output-dir: _site preview: port: 4200 browser: false --- Available preview options include: port Port to listen on (defaults to random value between 3000 and 8000) host Hostname to bind to (defaults to 127.0.0.1) serve Options for external preview server (see Serve) browser Open a web browser to view the preview (defaults to true) watch-inputs Re-render input files when they change (defaults to true) navigate Navigate the browser automatically when outputs are updated (defaults to true) timeout Time (in seconds) after which to exit if there are no active clients
{ "lastmod": "2023-07-05T19:35:15.799Z", "loc": "https://quarto.org/docs/reference/projects/core.html", "source": "https://quarto.org/docs/reference/projects/core.html" }
Knitr is an R package for dynamic document generation. Learn more about using Knitr in the article on Using R. Overview Cell options affect the execution and output of executable code blocks. They are specified within comments at the top of a block. For example: ```{r} #| label: fig-polar #| echo: false #| fig-cap: "A line plot on a polar axis" ``` Attributes label Unique label for code cell. Used when other code needs to refer to the cell (e.g. for cross references fig-samples or tbl-summary) classes Classes to apply to cell container Code Output eval 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) echo 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) code-fold Collapse code into an HTML <details> tag so the user can display it on-demand. true: collapse code false (default): do not collapse code show: use the <details> tag, but show the expanded code initially. code-summary Summary text to use for code blocks collapsed using code-fold code-overflow Choose how to handle code overflow, when code lines are too wide for their container. One of: scroll wrap code-line-numbers Include line numbers in code block output (true or false). For revealjs output only, you can also specify a string to highlight specific lines (and/or animate between sets of highlighted lines). Sets of lines are denoted with commas: 3,4,5 1,10,12 Ranges can be denoted with dashes and combined with commas: 1-3,5 5-10,12,14 Finally, animation steps are separated by |: 1-3|1-3,5 first shows 1-3, then 1-3,5 |5|5-10,12 first shows no numbering, then 5, then lines 5-10 and 12 lst-label Unique label for code listing (used in cross references) lst-cap Caption for code listing tidy Whether to reformat R code. tidy-opts List of options to pass to tidy handler collapse Collapse all the source and output blocks from one code chunk into a single block prompt Whether to add the prompt characters in R code. See prompt and continue on the help page ?base::options. Note that adding prompts can make it difficult for readers to copy R code from the output, so prompt: false may be a better choice. This option may not work well when the engine is not R (#1274). class-source Class name(s) for source code blocks attr-source Attribute(s) for source code blocks Cell Output output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. panel Panel type for cell output (tabset, input, sidebar, fill, center) output-location Location of output relative to the code that generated it. The possible values are as follows: default: Normal flow of the slide after the code fragment: In a fragment (not visible until you advance) slide: On a new slide after the curent one ‘column’: In an adjacent column column-fragment: In an adjacent column (not visible until you advance) Note that this option is supported only for the revealjs format. message Include messages in rendered output. results How to display text results. Note that this option only applies to normal text output (not warnings, messages, or errors). The possible values are as follows: markup: Mark up text output with the appropriate environments depending on the output format. For example, if the text output is a character string "[1] 1 2 3", the actual output that knitr produces will be: ``` [1] 1 2 3 ``` In this case, results: markup means to put the text output in fenced code blocks (```). asis: Write text output as-is, i.e., write the raw text results directly into the output document without any markups. ```{r} #| results: asis cat("I'm raw **Markdown** content.\n") ``` hold: Hold all pieces of text output in a chunk and flush them to the end of the chunk. hide (or false): Hide text output. comment Prefix to be added before each line of text output. By default, the text output is commented out by ##, so if readers want to copy and run the source code from the output document, they can select and copy everything from the chunk, since the text output is masked in comments (and will be ignored when running the copied text). Set comment: '' to remove the default ##. class-output Class name(s) for text/console output attr-output Attribute(s) for text/console output class-warning Class name(s) for warning output attr-warning Attribute(s) for warning output class-message Class name(s) for message output attr-message Attribute(s) for message output class-error Class name(s) for error output attr-error Attribute(s) for error output Figures fig-width Default width for figures fig-height Default height for figures fig-cap Figure caption fig-subcap Figure subcaptions fig-link Hyperlink target for the figure fig-align Figure horizontal alignment (default, left, right, or center) fig-alt Alternative text to be used in the alt attribute of HTML images. fig-env LaTeX environment for figure output fig-pos LaTeX figure position arrangement to be used in \begin{figure}[]. Computational figure output that is accompanied by the code that produced it is given a default value of fig-pos="H" (so that the code and figure are not inordinately separated). If fig-pos is false, then we don’t use any figure position specifier, which is sometimes necessary with custom figure environments (such as sidewaysfigure). fig-scap A short caption (only used in LaTeX output). A short caption is inserted in \caption[], and usually displayed in the “List of Figures” of a PDF document. fig-format Default output format for figures (retina, png, jpeg, svg, or pdf) fig-dpi Default DPI for figures fig-asp 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. out-width Width of the plot in the output document, which can be different from its physical fig-width, i.e., plots can be scaled in the output document. When used without a unit, the unit is assumed to be pixels. However, any of the following unit identifiers can be used: px, cm, mm, in, inch and %, for example, 3in, 8cm, 300px or 50%. out-height Height of the plot in the output document, which can be different from its physical fig-height, i.e., plots can be scaled in the output document. Depending on the output format, this option can take special values. For example, for LaTeX output, it can be 3in, or 8cm; for HTML, it can be 300px. fig-keep How plots in chunks should be kept. Possible values are as follows: high: Only keep high-level plots (merge low-level changes into high-level plots). none: Discard all plots. all: Keep all plots (low-level plot changes may produce new plots). first: Only keep the first plot. last: Only keep the last plot. A numeric vector: In this case, the values are indices of (low-level) plots to keep. fig-show How to show/arrange the plots. Possible values are as follows: asis: Show plots exactly in places where they were generated (as if the code were run in an R terminal). hold: Hold all plots and output them at the end of a code chunk. animate: Concatenate all plots into an animation if there are multiple plots in a chunk. hide: Generate plot files but hide them in the output document. out-extra Additional raw LaTeX or HTML options to be applied to figures external Externalize tikz graphics (pre-compile to PDF) sanitize sanitize tikz graphics (escape special LaTeX characters). interval Time interval (number of seconds) between animation frames. aniopts Extra options for animations; see the documentation of the LaTeX animate package. animation-hook Hook function to create animations in HTML output. The default hook (ffmpeg) uses FFmpeg to convert images to a WebM video. Another hook function is gifski based on the gifski package to create GIF animations. Tables tbl-cap Table caption tbl-subcap Table subcaptions tbl-colwidths 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. Panel Layout layout 2d-array of widths where the first dimension specifies columns and the second rows. For example, to layout the first two output blocks side-by-side on the top with the third block spanning the full width below, use [[3,3], [1]]. Use negative values to create margin. For example, to create space between the output blocks in the top row of the previous example, use [[3,-1, 3], [1]]. layout-ncol Layout output blocks into columns layout-nrow Layout output blocks into rows layout-align Horizontal alignment for layout content (default, left, right, or center) layout-valign Vertical alignment for layout content (default, top, center, or bottom) Page Columns column Page column for output fig-column Page column for figure output tbl-column Page column for table output cap-location Where to place figure and table captions (top, bottom, or margin) fig-cap-location Where to place figure captions (top, bottom, or margin) tbl-cap-location Where to place table captions (top, bottom, or margin) Cache cache Whether to cache a code chunk. When evaluating code chunks for the second time, the cached chunks are skipped (unless they have been modified), but the objects created in these chunks are loaded from previously saved databases (.rdb and .rdx files), and these files are saved when a chunk is evaluated for the first time, or when cached files are not found (e.g., you may have removed them by hand). Note that the filename consists of the chunk label with an MD5 digest of the R code and chunk options of the code chunk, which means any changes in the chunk will produce a different MD5 digest, and hence invalidate the cache. cache-vars Variable names to be saved in the cache database. By default, all variables created in the current chunks are identified and saved, but you may want to manually specify the variables to be saved, because the automatic detection of variables may not be robust, or you may want to save only a subset of variables. cache-globals Variables names that are not created from the current chunk. This option is mainly for autodep: true to work more precisely—a chunk B depends on chunk A when any of B’s global variables are A’s local variables. In case the automatic detection of global variables in a chunk fails, you may manually specify the names of global variables via this option. In addition, cache-globals: false means detecting all variables in a code chunk, no matter if they are global or local variables. cache-lazy Whether to lazyLoad() or directly load() objects. For very large objects, lazyloading may not work, so cache-lazy: false may be desirable (see #572). cache-rebuild Force rebuild of cache for chunk cache-comments Prevent comment changes from invalidating the cache for a chunk dependson Explicitly specify cache dependencies for this chunk (one or more chunk labels) autodep Detect cache dependencies automatically via usage of global variables Include child One or more paths of child documents to be knitted and input into the main document. file File containing code to execute for this chunk code String containing code to execute for this chunk purl Include chunk when extracting code with knitr::purl()
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/cells/cells-knitr.html", "source": "https://quarto.org/docs/reference/cells/cells-knitr.html" }
Jupyter is an open document format that supports computations in many languages including Python, R, and Julia. Learn more about using Jupyter with Quarto in the articles on Using Python and Using Julia. Overview Cell options affect the execution and output of executable code blocks. They are specified within comments at the top of a block. For example: ```{python} #| label: fig-polar #| echo: false #| fig-cap: "A line plot on a polar axis" ``` Attributes label Unique label for code cell. Used when other code needs to refer to the cell (e.g. for cross references fig-samples or tbl-summary) classes Classes to apply to cell container tags Array of tags for notebook cell id Notebook cell identifier. Note that if there is no cell id then label will be used as the cell id if it is present. See https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html for additional details on cell ids. Code Output eval 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) echo 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) code-fold Collapse code into an HTML <details> tag so the user can display it on-demand. true: collapse code false (default): do not collapse code show: use the <details> tag, but show the expanded code initially. code-summary Summary text to use for code blocks collapsed using code-fold code-overflow Choose how to handle code overflow, when code lines are too wide for their container. One of: scroll wrap code-line-numbers Include line numbers in code block output (true or false). For revealjs output only, you can also specify a string to highlight specific lines (and/or animate between sets of highlighted lines). Sets of lines are denoted with commas: 3,4,5 1,10,12 Ranges can be denoted with dashes and combined with commas: 1-3,5 5-10,12,14 Finally, animation steps are separated by |: 1-3|1-3,5 first shows 1-3, then 1-3,5 |5|5-10,12 first shows no numbering, then 5, then lines 5-10 and 12 lst-label Unique label for code listing (used in cross references) lst-cap Caption for code listing Cell Output output 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. warning Include warnings in rendered output. error Include errors in the output (note that this implies that errors executing code will not halt processing of the document). include Catch all for preventing any output (code or results) from being included in output. panel Panel type for cell output (tabset, input, sidebar, fill, center) output-location Location of output relative to the code that generated it. The possible values are as follows: default: Normal flow of the slide after the code fragment: In a fragment (not visible until you advance) slide: On a new slide after the curent one ‘column’: In an adjacent column column-fragment: In an adjacent column (not visible until you advance) Note that this option is supported only for the revealjs format. Figures fig-cap Figure caption fig-subcap Figure subcaptions fig-link Hyperlink target for the figure fig-align Figure horizontal alignment (default, left, right, or center) fig-alt Alternative text to be used in the alt attribute of HTML images. fig-env LaTeX environment for figure output fig-pos LaTeX figure position arrangement to be used in \begin{figure}[]. Computational figure output that is accompanied by the code that produced it is given a default value of fig-pos="H" (so that the code and figure are not inordinately separated). If fig-pos is false, then we don’t use any figure position specifier, which is sometimes necessary with custom figure environments (such as sidewaysfigure). fig-scap A short caption (only used in LaTeX output). A short caption is inserted in \caption[], and usually displayed in the “List of Figures” of a PDF document. Tables tbl-cap Table caption tbl-subcap Table subcaptions tbl-colwidths 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. Panel Layout layout 2d-array of widths where the first dimension specifies columns and the second rows. For example, to layout the first two output blocks side-by-side on the top with the third block spanning the full width below, use [[3,3], [1]]. Use negative values to create margin. For example, to create space between the output blocks in the top row of the previous example, use [[3,-1, 3], [1]]. layout-ncol Layout output blocks into columns layout-nrow Layout output blocks into rows layout-align Horizontal alignment for layout content (default, left, right, or center) layout-valign Vertical alignment for layout content (default, top, center, or bottom) Page Columns column Page column for output fig-column Page column for figure output tbl-column Page column for table output cap-location Where to place figure and table captions (top, bottom, or margin) fig-cap-location Where to place figure captions (top, bottom, or margin) tbl-cap-location Where to place table captions (top, bottom, or margin)
{ "lastmod": "2023-07-05T19:35:15.795Z", "loc": "https://quarto.org/docs/reference/cells/cells-jupyter.html", "source": "https://quarto.org/docs/reference/cells/cells-jupyter.html" }
Have you been hearing about Quarto but didn’t give it a try yet? Perused the Get Started pages but would like another intro? Or have about 20 minutes to spare and want to pick up a few Quarto tips? You’ve come to the right place! In this video, I walk you through creating documents, presentations, and websites and publishing with Quarto. The video features authoring Quarto documents with executable R code chunks using the RStudio Visual Editor. Select highlights include: Inserting cross references to tables and figures Adding a citation from a DOI Seamlessly switching between output formats as well as creating multi-format documents Customizing the output location of code in presentations Creating a website from scratch Publishing the website to QuartoPub If you would like to follow along as you watch the video, you can find the source code for everything created in the video in this GitHub repository and the published website on QuartoPub. Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.251Z", "loc": "https://quarto.org/docs/blog/posts/2023-05-15-get-started/index.html", "source": "https://quarto.org/docs/blog/posts/2023-05-15-get-started/index.html" }
Other FormatsJupyterMS Word Quarto 1.3 Feature This post is part of a series highlighting new features in the 1.3 release of Quarto. Get the latest release at https://quarto.org/docs/download. Starting in Quarto 1.3, HTML pages (either standalone or in a website) can automatically include links to other formats specified in the document front matter. For example, the following document front matter: title: Sample Page author: Norah Jones date: last-modified toc: true format: html: default ipynb: default Results in an HTML page that includes a link to the additional notebook format in the right margin below the table of contents: If a table of contents is enabled for the page, the additional formats will be automatically placed within the table of contents as a new section. If no table of contents is displayed, the additional formats will be displayed in the right margin at the top of the document. Links to additional formats are displayed by default, but you can control whether they are shown or even which specific formats are included with the format-links YAML option. Read more about this feature on the Multi-format page of the pre-release highlights. Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.223Z", "loc": "https://quarto.org/docs/blog/posts/2023-03-15-multi-format/index.html", "source": "https://quarto.org/docs/blog/posts/2023-03-15-multi-format/index.html" }
NotebooksPalmer Penguins Quarto 1.3 Feature This post is part of a series highlighting new features in the 1.3 release of Quarto. Get the latest release at https://quarto.org/docs/download. Starting in Quarto 1.3, you can include the output of an external Jupyter notebook in a Quarto document with the embed shortcode. To embed a notebook cell, provide the path to a Jupyter Notebook and a cell identifier. For example, this notebook called penguins.ipynb has a cell labelled fig-bill-scatter: You can use the following shortcode to embed the output of this cell: This will embed the plot as follows: Figure 1: A scatterplot of bill dimensions for penguins, made with Altair. Source: Palmer Penguins A link to the source notebook is automatically provided beneath the plot. Following the link takes users to a rendered version of the notebook, allowing them to explore the notebook without having to download and run it locally. For example, clicking on the link to penguins.ipynb gets you to a page that looks like the following: Beyond this basic usage, head to the Jupyter Cell Embedding highlight docs to learn how to: Specify cells in multiple ways, see Specifying Cells. Control the output using code cell options in the source Notebook, including things like figure captions, figure layout, and code display, see Code Cell Options. Include the cell code along with the output by adding an echo option to the shortcode, see Embedding Code. Customize or exclude the link to the source notebook, see Links to Source Notebooks. Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.227Z", "loc": "https://quarto.org/docs/blog/posts/2023-03-17-jupyter-cell-embedding/index.html", "source": "https://quarto.org/docs/blog/posts/2023-03-17-jupyter-cell-embedding/index.html" }
Quarto 1.3 Feature This post is part of a series highlighting new features in the 1.3 release of Quarto. Get the latest release at https://quarto.org/docs/download. Atlassian Confluence is a publishing platform for supporting team collaboration. Confluence has a variety of hosting options which include both free and paid subscription plans. Quarto 1.3 adds support for publishing individual documents, as well as projects composed of multiple documents into Confluence Spaces. A Quarto Document Published to Confluence A Quarto Project Published to Confluence Managing Confluence content with Quarto allows you to author content in Markdown, manage that content with your usual version control tools like Git and GitHub, and leverage Quarto’s tools for including computational output. If you’re curious about using Confluence Publishing for your own project, head to the Confluence Publishing page of the pre-release highlights to learn more. Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.247Z", "loc": "https://quarto.org/docs/blog/posts/2023-03-20-confluence/index.html", "source": "https://quarto.org/docs/blog/posts/2023-03-20-confluence/index.html" }
The new Shinylive Quarto extension makes it easy to embed Shiny for Python applications in your Quarto documents. This makes it possible to add interactivity to your documents with just Python code. For example, you can include an interactive Shiny application like this, directly inside your Quarto document. In case you’re not already familiar with Shiny, here’s some background: Shiny is a framework for creating web applications. Shiny was originally just for R, but we’ve recently released an alpha version of Shiny for Python. One of the exciting new features of Shiny for Python is a deployment method called Shinylive: the application can be run entirely within the browser, without needing a remote server running Python. Instead, Python runs in the web browser, thanks to the magic of WebAssembly. In essence, but the server and client sides of the Shiny application run in the browser. The Shiny for Python website contains many interactive, editable Shiny applications, and is built using this extension. Bear in mind that not all Shiny applications can be deployed with Shinylive, in part because not all Python packages can run in WebAssembly – but for those that can, this extension makes it possible to deploy the Quarto document with the embedded application on any web hosting service. To learn more about Shinylive, see this page. The new Shinylive Quarto extension makes it easy to embed Shiny for Python applications in Quarto documents. This is a great way of adding interactive components to your Quarto document. And, once again, you don’t need a server running Python to share these Quarto documents – just deploy the generated files as you would for any other Quarto website. Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.223Z", "loc": "https://quarto.org/docs/blog/posts/2022-10-25-shinylive-extension/index.html", "source": "https://quarto.org/docs/blog/posts/2022-10-25-shinylive-extension/index.html" }
We are happy to announce that Quarto 1.3 has been released. You can grab the current release from https://quarto.org/docs/download/. If you are ever wondering which version of Quarto you are using, a quick way to check on the command line is: Terminal quarto --version We’ve previously blogged about some of the features of this release that we were most excited about, but let’s highlight them again. Code Annotation You can now add line-based annotations to your code blocks using special code comments along with an ordered list. Code annotations work across many formats, and are interactive in HTML-based formats. Code Annotation in an HTML document To learn more, check out the Code Annotation documentation. Multi-format Publishing HTML pages (either standalone or in a website) now automatically include links to other formats specified in the document front matter. For example, the following document front matter: title: Sample Page author: Norah Jones date: last-modified toc: true format: html: default ipynb: default Results in an HTML page that includes a link to the additional notebook format in the right margin below the table of contents: An HTML document with a link to another format Find out more in the documentation on Including Other Formats. Jupyter Cell Embedding Easily include the output of an external Jupyter notebook in a Quarto document with the embed shortcode. Provide the path to a Jupyter Notebook and a cell identifier and the output will be included in your document along with a link back to the source Notebook. A plot embedded in a document from a Jupyter Notebook Learn more about the embed shortcode in Embedding Jupyter Notebook Cells in the docs. Confluence Publishing Atlassian Confluence is a publishing platform for supporting team collaboration. Quarto now provides support for publishing individual documents, as well as projects composed of multiple documents, into Confluence Spaces. A Quarto Project Published to Confluence To learn more, head to the documentation on Confluence Publishing. Other Highlights Some other notable highlights include: Article Grid Customization—Customize the widths of layout components in HTML documents Quarto Book AsciiDoc Support—Output Quarto books to AsciiDoc files Website Navigation Improvements—Include tools in your navbar, and provide better navigation for Quarto websites on mobile devices Mermaid Diagram Theming—Use your document theme, or built-in Mermaid themes, for your Mermaid diagrams PDF: SVG and Remote Images—Include SVG images and remote images in PDF documents kbd Shortcode—Show well-formatted keyboard shortcuts in Quarto documents. You can find all the other changes in 1.3, in the Release Notes. Acknowledgements We’d like to say a huge thank you to everyone who contributed to this release by opening issues and pull requests: ABohynDOE, aborruso, agerlach, aimundo, alperyilmaz, ameliaritger, anaveenan, andrewheiss, apreshill, apsteinmetz, arnaudgallou, aronatkins, arronlacey, ArturKlauser, astrowonk, ats, awehrfritz, b-rodrigues, baptiste, batpigandme, bayeslearner, benabel, BertTijhuis, boshek, brunomioto, busemorose, bvancil, bwelman, cboettig, cgoo4, ChoCho66, cicarrascog, coatless, code86, condwanaland, daniel-smit-haw, daranzolin, davidbudzynski, DavidD003, ddobrinskiy, dgkf, DhruvaSambrani, directknowledge, dkubek, dmalan, dmenne, drcaprosser, drscotthawley, edoson, eeholmes, eitsupi, elgabbas, EllaKaye, emmansh, ericvmai, espinielli, etiennebacher, EvoArt, fire, fortunewalla, freestatman, fuhrmanator, fulem, g-simmons, gadenbuie, GegznaV, ghost, giabaio, githubpsyche, GraceEMc, gregswinehart, GShotwell, guoruizhong, harrelfe, hemonika, henningsway, iandol, ijlyttle, iusgit, ivanek, jake-wittman, jakobarendt, jakub-jedrusiak, javajon, jcmkk3, jcolomb, jdutant, JeffreyRacine, jensschroer, jeremiahpslewis, jfbarthelemy, jhelvy, Jiayou-Chao, jimjam-slam, jkylearmstrong, jmbarbone, jmbuhr, jmcastagnetto, joelvonrotz, JoFrhwld, johannes4998, jrcuesta, jthomasmock, juba, justanothergithubber, KaiWaldrant, kalenkovich, kdheepak, kelly-sovacool, KittJonathan, kmasiello, knuesel, koehlerson, koushikkhan, lcnbr, leovan, linogaliana, m-legrand, m4jing, machow, maelle, malcolmbarrett, marierivers, MattF-NSIDC, mattsams89, mattwarkentin, maxdrohde, mccarthy-m-g, MHellmund, mikheyev, mine-cetinkaya-rundel, mksinicus, mrajeev08, nanxstats, NeubertJonas, nikcleju, njbart, patrickvdb, petrbouchal, philip-khor, philwunderlich, Pierre9344, pitmonticone, pmagwene, poldrack, pommevilla, psychelzh, ratnanil, ravimakhija, RaymondBalise, reuning, rexdouglass, rgaiacs, richardsprague, rjake, rleyvasal, rmcd1024, RobTour, rsenft1, runlevel0, sagikazarmark, salim-b, SamEdwardes, samperman, schochastics, ScientiaFelis, scottamain, scottfranz, sebastian-c, seeM, shafayetShafee, singuyenmai, sje30, snhansen, streepvaren, thedabs91, thomashallam, timothee-bacri, tomshafer, tomsutch, tomvaneyck, topepo, tverbeiren, TylerHillery, ucpresearch, verbalins, vfacta, vlyubchich, VMTdeJong, vpratz, white-c, wklimowicz, XiangyunHuang, Xitian9, xl0, xtimbeau, y9c, yevgenryeznik, zachcp, zkwabm Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.247Z", "loc": "https://quarto.org/docs/blog/posts/2023-04-26-1.3-release/index.html", "source": "https://quarto.org/docs/blog/posts/2023-04-26-1.3-release/index.html" }
Quarto 1.3 Feature This post is part of a series highlighting new features in the 1.3 release of Quarto. Get the latest release at https://quarto.org/docs/download. Code blocks and executable code cells in Quarto may now include line-based annotations. Line-based annotations provide a way to attach explanation to lines of code much like footnotes. For example, this code uses annotation to describe the steps in an R dplyr pipeline in plain language: library(tidyverse) library(palmerpenguins) 1penguins |> 2 mutate( bill_ratio = bill_depth_mm / bill_length_mm, bill_area = bill_depth_mm * bill_length_mm ) 1 Take penguins, and then, 2 add new columns for the bill ratio and bill area. The default HTML annotation style displays annotations in a list below the code block. Clicking on the annotation number in the list highlights the relevant lines in the code. Other HTML styles hide the annotations, revealing them in a tooltip when a user hovers or selects a marker. The PDF format also allows for annotations, numbering, and displaying the annotation text below the code. In other formats, like Word and GitHub Markdown, annotations are instead labeled with the line of code (or lines of code) to which the annotation text applies. PDFGitHub Flavored Markdown ``` r library(tidyverse) library(palmerpenguins) penguins |> mutate( bill_ratio = bill_depth_mm / bill_length_mm, bill_area = bill_depth_mm * bill_length_mm ) ``` Line 3 Take `penguins`, and then, Lines 4-7 add new columns for the bill ratio and bill area. To add code annotation to a code block, you need to add two things: specially formatted code comments in your code cell, and an ordered list below the code cell with the annotation text: Code Comments: Each annotated line in the code cell should be terminated with a comment (using the code cell’s language comment character) followed by a space and then an annotation number enclosed in angle brackets (e.g. # <2>). You may repeat an annotation number if the annotation spans multiple lines. Ordered List: An ordered list should appear immediately after the code cell, and include the contents of each annotation. Each numbered item in the ordered list will correspond to the line(s) of code with the same annotation number. For example, the annotations above were produced by including the following in the Quarto document: ```r library(tidyverse) library(palmerpenguins) penguins |> # <1> mutate( # <2> bill_ratio = bill_depth_mm / bill_length_mm, # <2> bill_area = bill_depth_mm * bill_length_mm # <2> ) # <2> ``` 1. Take `penguins`, and then, 2. add new columns for the bill ratio and bill area. You can read more about how to control the annotation style, and whether annotations appear at all on the Code Annotation page of the pre-release highlights. Subscribe Enjoy this blog? Get notified of new posts by email:
{ "lastmod": "2023-07-05T19:35:15.223Z", "loc": "https://quarto.org/docs/blog/posts/2023-03-13-code-annotation/index.html", "source": "https://quarto.org/docs/blog/posts/2023-03-13-code-annotation/index.html" }
Overview Shortcodes are special markdown directives that generate various types of content. Quarto shortcodes are similar in form and function to Hugo shortcodes and WordPress shortcodes. For example, the following shortcode prints the title from document metadata: {{< meta title >}} Quarto supports several shortcodes natively: Shortcode Description var Print value from _variables.yml file meta Print value from document metadata env Print system environment variable pagebreak Insert a native page-break kbd Describe keyboard shortcuts video Embed a video in a document include Include contents of another qmd embed Embed cells from a Jupyter Notebook This article describes how to create your own shortcodes. Quick Start Here we’ll describe how to create a simple shortcode extension. We’ll use the quarto create command to do this. If you are using VS Code or RStudio, you should execute quarto create within their respective integrated terminal panes. To get started, execute quarto create extension shortcode within the parent directory where you’d like the shortcode extension to be created: Terminal $ quarto create extension shortcode ? Extension Name › shorty As shown above, you’ll be prompted for an extension name. Type shorty and press Enter—the shortcode extension is then created: Creating extension at /Users/jjallaire/extensions/shorty/shorty: - Created README.md - Created _extensions/shorty/shorty.lua - Created _extensions/shorty/_extension.yml - Created .gitignore - Created example.qmd If you are running within VS Code or RStudio, a new window will open with the extension project. Here’s what the contents of the files in _extensions/shorty/ look like: _extensions/shorty/_extension.yml title: Shorty author: J.J. Allaire version: 1.0.0 quarto-required: ">=1.2.222" contributes: shortcodes: - shorty.lua _extensions/shorty/shorty.lua return { ['shorty'] = function(args, kwargs, meta) return pandoc.Str("Hello from Shorty!") end } Finally, the example.qmd file includes code that exercises the extension. For example: example.qmd --- title: "Shorty Example" --- To develop your shortcode, render/preview example.qmd, and then make changes to shorty.lua (the preview will automatically refresh when you change shorty.lua). Development Shortcodes are created using Lua. If you aren’t familar with Lua (or with Pandoc filters), here are some resources to help you along: Lua Development (Lua is the language used to create shortcodes). Lua API Reference, which describes the Lua extension API for Quarto. Shortcodes are implemented as Lua functions that take one or more arguments and return a Pandoc AST node (or list of nodes). Here’s the implementation of the env shortcode that is built in to Quarto: env.lua function env(args) local var = pandoc.utils.stringify(args[1]) local value = os.getenv(var) if value ~= nil then return pandoc.Str(value) else return pandoc.Null() end end Note that arguments to shortcodes are provided in args (a 1-dimensional array), and that each argument is a list of Pandoc inlines (i.e. markdown AST parsed from the text). We use the pandoc.utils.stringify() function to convert the inlines to an ordinary string, and then the os.getenv() function to get its value. You would use this shortcode as follows: {{< env HOME >}} Distribution If your extension source code is located within a GitHub repository, then it can be installed by referencing the GitHub organization and repository name. For example: Terminal # install the current HEAD of the extension quarto add cooltools/shorty # install a branch or tagged release of the extension quarto add cooltools/[email protected] quarto add cooltools/shorty@bugfix-22 Note that it is possible to bundle and distribute extensions as simple gzip archives (as opposed to using a GitHub repository as described above). See the article on Distributing Extensions for additional details. Examples You might find it instructive to examine the source code of these shortcode extensions authored by the Quarto team: Extension Description fancy-text Output nicely formatted versions of fancy strings such as LaTeX and BibTeX in multiple formats. fontawesome Use Font Awesome icons in HTML and PDF documents. video Embed videos in HTML documents and Revealjs presentations. Some additional annotated examples are provided below. Raw Output Shortcodes can tailor their output to the format being rendered to. This is often useful when you want to conditionally generate rich HTML output but still have the same document render properly to PDF or MS Word. The pagebreak shortcode generates “native” pagebreaks in a variety of formats. Here’s the implementation of pagebreak: pagebreak.lua function pagebreak() local raw = { epub = '<p style="page-break-after: always;"> </p>', html = '<div style="page-break-after: always;"></div>', latex = '\\newpage{}', ooxml = '<w:p><w:r><w:br w:type="page"/></w:r></w:p>', odt = '<text:p text:style-name="Pagebreak"/>', context = '\\page' } if quarto.doc.isFormat('docx') then return pandoc.RawBlock('openxml', raw.ooxml) elseif quarto.doc.isFormat('pdf') then return pandoc.RawBlock('tex', raw.latex) elseif quarto.doc.isFormat('odt') then return pandoc.RawBlock('opendocument', raw.odt) elseif quarto.doc.isFormat('epub') then return pandoc.RawBlock('html', raw.epub) elseif quarto.doc.isFormat('html') then return pandoc.RawBlock('html', raw.html) elseif quarto.doc.isFormat('context') then return pandoc.RawBlock('context', raw.context) else -- fall back to insert a form feed character return pandoc.Para{pandoc.Str '\f'} end end We use the pandoc.RawBlock() function to output the appropriate raw content for the target format. Note that raw blocks are passed straight through to the output file and are not processed as markdown. You’d use this shortcode as follows: {{< pagebreak >}} Named Arguments The examples above use either a single argument (env) or no arguments at all (pagebreak). Here we demonstrate named argument handling by implementing a git-rev shortcode that prints the current git revision, providing a short option to determine whether a short or long SHA1 value is displayed: git.lua -- run git and read its output function git(command) local p = io.popen("git " .. command) local output = p:read('*all') p:close() return output end -- return a table containing shortcode definitions -- defining shortcodes this way allows us to create helper -- functions that are not themselves considered shortcodes return { ["git-rev"] = function(args, kwargs) -- command line args local cmdArgs = "" local short = pandoc.utils.stringify(kwargs["short"]) if short == "true" then cmdArgs = cmdArgs .. "--short " end -- run the command local cmd = "rev-parse " .. cmdArgs .. "HEAD" local rev = git(cmd) -- return as string return pandoc.Str(rev) end } There are some new things demonstrated here: Rather than defining our shortcode functions globally, we return a table with the shortcode definitions. This allows us to define helper functions that are not themselves registered as shortcodes. It also enables us to define a shortcode with a dash (-) in its name. There is a new argument to our shortcode handler: kwargs. This holds any named arguments to the shortcode. As with args, values in kwargs will always be a list of Pandoc inlines (allowing you to accept markdown as an argument). Since short is a simple boolean value we need to call pandoc.utils.stringify() to treat it as a string and then compare it to "true". We’d use this shortcode as follows: --- title: "My Document" --- {{< git-rev >}} {{< git-rev short=true >}} Metadata Options In some cases you may want to provide options that affect how your shortcode behaves. There is a third argument to shortcode handlers (meta) that provides access to document and/or project level metadata. Let’s implement a different version of the git-rev shortcode that emits the revision as a link to GitHub rather than plain text. To do this, we make use of github.owner and github.repo metadata values: git.lua function git(command) local p = io.popen("git " .. command) local output = p:read('*all') p:close() return output end return { ["git-rev"] = function(args, kwargs, meta) -- run the command local rev = git("rev-parse HEAD") -- target repo local owner = pandoc.utils.stringify(meta["github.owner"]) local repo = pandoc.utils.stringify(meta["github.repo"]) local url = "https://github.com/" .. owner .. "/" .. repo .. "/" .. rev -- return as link return pandoc.Link(pandoc.Str(rev), url) end } As with args and kwargs, meta values are always provided as a list of Pandoc inlines, so often need to be converted to string using pandoc.utils.stringify(). To use this shortcode in a document, we provide the GitHub info as document options, then include the shortcode where we want the link to be: --- title: "My Document" github: owner: quarto-dev repo: quarto-cli --- {{< git-rev >}} The shortcode registration and GitHub metadata could just as well been provided in a project-level _quarto.yml file or a directory-level _metadata.yml file. Raw Arguments In Quarto >= 1.3 you can also access the raw stream of inlines passed to a shortcode by adding a raw_args parameter. For example: function shorty(args, kwargs, meta, raw_args) end Escaping If you are writing documentation about using variable shortcodes (for example, this article!) you might need to prevent them from being processed. You can do this in two ways: Escape the shortcode reference with extra braces like this: {{{< var version >}}} Add a shortcodes=false attribute to any code block you want to prevent processing of shortcodes within: ```{shortcodes=false} {{< var version >}} ```
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/shortcodes.html", "source": "https://quarto.org/docs/extensions/shortcodes.html" }
Overview Revealjs plugins enable you to extend the capabilities of HTML presentations created with Revealjs. The Reveal Plugin API is very rich, and many of the built-in capabilities of Quarto Revealjs presentations are implemented as plugins, including Menu, Chalkboard, and PDF Export. Here are some examples of Revealjs plugins packaged as Quarto extensions: Extension Description Pointer Adds support for switching the cursor to a ‘pointer’ style element while presenting. Attribution Display attribution text along the right edge of slides. Quick Start Here we’ll describe how to create a simple Revealjs plugin extension. We’ll use the quarto create command to do this. If you are using VS Code or RStudio you should execute quarto create within their repsective integrated Terminal panes. To get started, execute quarto create extension revealjs-plugin within the parent directory where you’d like the plugin extension to be created: Terminal $ quarto create extension revealjs-plugin ? Extension Name › shuffler As shown above, you’ll be prompted for an extension name. Type shuffler and press Enter—the Revealjs plugin extension is then created: Creating extension at /Users/jjallaire/quarto/dev/shuffler: - Created README.md - Created _extensions/shuffler/_extension.yml - Created _extensions/shuffler/shuffler.css - Created _extensions/shuffler/shuffler.js - Created .gitignore - Created example.qmd If you are running within VS Code or RStudio a new window will open with the extension project. Here’s what the contents of the files in _extensions/shuffler/ look like: _extensions/shuffler/_extension.yml title: Shuffler author: J.J. Allaire version: 1.0.0 quarto-required: ">=1.2.222" contributes: revealjs-plugins: - name: RevealShuffler script: - shuffler.js stylesheet: - shuffler.css _extensions/shuffler/shuffler.js window.RevealShuffler = function () { return { id: "RevealShuffler", init: function (deck) { // TODO: Implement your plugin functionality // Learn more at https://revealjs.com/creating-plugins/ // This example shuffles the deck when the 'T' key is pressed deck.addKeyBinding({ keyCode: 84, key: "T" }, () => { deck.shuffle(); }); }, }; }; There is also a shuffler.css file for providing any styles required by your plugin. Finally, the example.qmd file includes code that exercises the extension. For example: example.qmd --- title: "Shuffler Example" format: revealjs: default revealjs-plugins: - shuffler --- ## Breakfast - Eat eggs - Drink coffee ## Dinner - Eat spaghetti - Drink wine To develop your plugin, render/preview example.qmd, and then make changes to shuffler.js and shuffler.css (the preview will automatically refresh when you change these files). Installation and Use If your extension source code it located within a GitHub repository, then it can be added by referencing the GitHub organization and repository name. For example, you can install the attribution extension with the following: Terminal quarto add quarto-ext/attribution Note that it is possible to bundle and distribute extensions as simple gzip archives (as opposed to using a GitHub repository as described above). See the article on Distributing Extensions for additional details. Once an extension has been added, you can use the Reveal plugin by adding it to the reveal-plugins key. For example: --- title: "My Presentation" format: revealjs revealjs-plugins: - attribution --- Plugin Packaging Note that the plugins listed above were not initially developed for use with Quarto. Rather, they were developed intially as native Revealjs plugins and then packaged as Quarto extensions. For example, you can find the original implementation of the attribution plugin here: https://github.com/rschmehl/reveal-plugins/tree/main/attribution. The plugin is implemented with a JavaScript file and a CSS file. To make the plugin available as a Quarto extension, we package these files along with an _extension.yml config file that registers the plugin. Here are the files in the Quarto extension: LICENSE README.md example.qmd _extensions/ attribution/ _extension.yml attribution.js attribution.css Note that the LICENSE and README.md are standard documentation files and the example.qmd is used for development and documentation of the extension. None of those files are actually installed by end users (rather only the contents of the _extensions directory is installed). You can see the full source code of the Quarto version here: https://github.com/quarto-ext/attribution (we’ll also walk through the code in detail below). Plugin Development You can develop either entirely new Revealjs plugins from scratch or you can package existing Revealjs extensions as described above. Here is a list of existing 3rd party plugins for Revealjs that you might consider packaging as Quarto extensions: https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware. If you want to develop new plugins, check out the Quarto Reveal extensions listed above as well as the code of other 3rd party Reveal Plugins. The following documentation on the Revealjs website provides additional important technical details: API Methods Reveal Events Plugin Configuration Some Revealjs plugins make available various user options. If you are developing a plugin from scratch, you should use a distinct key for your plugin’s configuration. Users can use this key alongside other revealjs options. For example the pointer extension can be configured as follows: --- title: "Example Presentation" format: revealjs: pointer: pointerSize: 18 color: '#32cd32' revealjs-plugins: - pointer --- The extension accesses options using the deck.getConfig() function: return { id: "pointer", init: (deck) => { const config = deck.getConfig(); const options = config.pointer || {}; // etc } } Note that when packaging an existing Revealjs plugin, you can override its default configuration using the config key within your _extension.yml file. For example, these are the overrides provided by the pointer extension: title: Pointer author: Charles Teague contributes: revealjs-plugins: - name: RevealPointer script: - pointer.js stylesheet: - pointer.css config: pointer: key: "q" color: "red" pointerSize: 16 alwaysVisible: false Example: Attribution Here we’ll walk through the complete source code for the attribution extension. This extension enables you to display attribution text sideways along the right edge of Revealjs slides. Here are source files used to develop the extension: LICENSE README.md example.qmd _extensions/ attribution/ _extension.yml attribution.js attribution.css The example.qmd and documentation files are used for development of the the extension only (it is not installed by end users). The other files provide extension registration (_extension.yml) and the actual implementation of the Revealjs plugin (attribution.js and attribution.css). The example.qmd is a simple one-slide presentation that includes an image along with a a div with class .attribution: example.qmd --- title: "Attribution Extension" format: revealjs revealjs-plugins: - attribution --- ## Forest Image ![](ingtotheforest.jpg) ::: {.attribution) Photo courtesy of [@ingtotheforest](https://unsplash.com/@ingtotheforest) ::: Note that the revealjs-plugins key references the attribution extension, which will implemented in the _extensions/attribution directory. The _extension.yml file indicates that the extension is making available a Revealjs plugin along with the plugin name, script, and style-sheets (note that the plugin name is not arbitrary, it will be whatever name is used within the script that implements the plugin, in this case RevealAttribution): _extensions/attribution/_extension.yml title: Attribution author: Roland Schmehl version: 0.1.0 quarto-required: ">=1.2.0" contributes: revealjs-plugins: - name: RevealAttribution script: - attribution.js stylesheet: - attribution.css The attribution.js file contains the implementation of the Plugin using the Revealjs Plugin API: _extensions/attribution/attribution.js window.RevealAttribution = window.RevealAttribution || { id: 'RevealAttribution', init: function(deck) { initAttribution(deck); } }; const initAttribution = function(Reveal){ var ready = false; var resize = false; var scale = 1; window.addEventListener( 'ready', function( event ) { var content; // Remove configured margin of the presentation var attribution = document.getElementsByClassName("attribution"); var width = window.innerWidth; var configuredWidth = Reveal.getConfig().width; var configuredHeight = Reveal.getConfig().height; scale = 1/(1-Reveal.getConfig().margin); for (var i = 0; i < attribution.length; i++) { content = attribution[i].innerHTML; attribution[i].style.width = configuredWidth + "px"; attribution[i].style.height = configuredHeight + "px"; attribution[i].innerHTML = "<span class='content'>" + content + "</span>"; attribution[i].style.transform = 'translate( -50%, -50% ) scale( ' + scale*100 + '% ) rotate(-180deg)'; } // Scale with cover class to mimic backgroundSize cover resizeCover(); }); window.addEventListener( 'resize', resizeCover ); function resizeCover() { // Scale to mimic backgroundSize cover var attribution = document.getElementsByClassName("attribution"); var xScale = window.innerWidth / Reveal.getConfig().width; var yScale = window.innerHeight / Reveal.getConfig().height; var s = 1; if (xScale > yScale) { // The div fits perfectly in x axis, stretched in y s = xScale/yScale; } for (var i = 0; i < attribution.length; i++) { attribution[i].style.transform = 'translate( -50%, -50% ) scale( ' + s*scale*100 + '% ) rotate(-180deg)'; } } }; Finally, attribution.css includes the CSS that repositions and rotates the element with class .attribution on the far right side of the slide: _extensions/attribution/attribution.css /* Attribution plugin: text along the right edge of the viewport */ .attribution{ position: absolute; top: 50%; bottom: auto; left: 50%; right: auto; font-size: 0.4em; pointer-events: none; text-align: center; writing-mode: vertical-lr; transform: translate( -50%, -50% ) scale( 100% ) rotate(-180deg); } /* Attribution plugin: activate pointer events for attribution text only */ .attribution .content{ pointer-events: auto; }
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/revealjs.html", "source": "https://quarto.org/docs/extensions/revealjs.html" }
Extensions are a powerful way to modify and extend the behavior of Quarto. Below is a listing of available extensions (please let us know if you have an extension you’d like to see added to the list). See the articles on Creating Extensions to learn how to develop your own extensions. Shortcode/Filter Journal Articles Custom Formats Revealjs Journal Articles Name Description Author acm Association of Computing Machinery (ACM) quarto-journals acs American Chemical Society (ACS) quarto-journals agu American Geophysical Union (AGU) quarto-journals biophysical Biophysical Journal (BJ) quarto-journals elsevier Format for journals published by Elsevier quarto-journals jasa American Statistical Association (ASA) quarto-journals jss Journal of Statistical Software (JSS) quarto-journals plos Public Library of Science (PLOS) quarto-journals arxiv Style and template for paper preprints (based on NIPS style) mikemahoney218 tandf Taylor and Francis style. mikemahoney218 sportrxiv Manuscripts for the SportRxiv preprint server. smnnlt computo Template for contribution to the Computo journal. computorg asm Quarto template for ASM mSystems. kelly-sovacool No matching items
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/listing-journals.html", "source": "https://quarto.org/docs/extensions/listing-journals.html" }
Overview Starter templates provide a straightforward way for users to get started with new Quarto projects by providing example content and options. You might use starter templates to: Create a working initial document for Journal Articles or Custom Formats. Provide the initial content for a custom Project Type. Scaffold a standard form of data analysis project used by your organization. Starter templates are essentially just GitHub repositories that are copied to a new directory on the user’s system. As we’ll describe below in Extensions & Templates, often times the repository for a custom format is also used as a starter template. Creating a Template To create a starter template, just create a GitHub repository that includes the files you want copied into projects created with the template. All of the files in the repository are copied save for: Hidden files (any file or directory name that starts with . (e.g. .gitignore). Common GitHub repository files like README.md and LICENSE. If you’d like, you can also include a .quartoignore file in the root of your repository listing other files or directories you’d like to exclude. Each line of the file should be a glob describing file(s) to ignore (using syntax like a .gitignore file). template.qmd There is one special file you’ll typically want to include in templates that target creation of documents (as opposed to projects): template.qmd. There are two reasons to include a template.qmd: It provides an easy way to test that your template is working as expected. When the template is copied into the target directory, the template.qmd will automatically be renamed to match the name that the user provided for the directory. If you are creating a template that targets creation of a website or book, a template.qmd is generally not necessary (as the index.qmd file already serves this purpose). Using a Template Once you’ve created the template repository and pushed it to GitHub, it can be instantiated with the following command: Terminal quarto use template cooltools/cool-project This command copies the contents of the GitHub repository at https://github.com/cooltools/cool-project to the local system (excluding selected files as discussed above). If the command is run in an empty directory, the user will be prompted whether they’d like to use the existing directory or create a new directory. If the command is run in a directory which contains other files or directories, they’ll be prompted for the name of a directory to create. Extensions & Templates When creating Journal Articles, Custom Formats, or Project Type extensions, we recommend that you additionally provide a starter template to make it easy for users to get started. This is generally as easy as adding a template.qmd file to your extension that demonstrates its use. With this configuration, users can either begin using your extension via the template or by a conventional quarto install of the extension. For example, consider the ACM Journal Article extension. The extension repository supports either getting started with a template: Terminal quarto use template quarto-journals/acm Alternatively, you can add the format (without the template) into an existing project or directory: Terminal quarto add quarto-journals/acm
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/starter-templates.html", "source": "https://quarto.org/docs/extensions/starter-templates.html" }
Extensions are a powerful way to modify and extend the behavior of Quarto. Below is a listing of available extensions (please let us know if you have an extension you’d like to see added to the list). See the articles on Creating Extensions to learn how to develop your own extensions. Shortcode/Filter Journal Articles Custom Formats Revealjs Revealjs Extensions Name Description Author pointer Switch the cursor to a ‘pointer’ style element. quarto-ext attribution Display attribution text along the right edge of slides. quarto-ext auto-agenda Automatically creates agenda slides from H1 heading titles. andrie roughnotation Uses the Rough Notation library to add animated annotations to presentations. EmilHvitfeldt appearance An animation extension that animates elements sequentially like in Powerpoint. Perfect for online portfolios or other presentations with images. martino simplemenu A simple extension for a menubar or a header or footer with an auto-generated menu. martino verticator A plugin that adds indicators to show the amount of slides in a vertical stack. martino confetti Add some fun and send confetti into your presentation. ArthurData codefocus A plugin that lets you step through fragments and code higlights at the same time. Reuning reveal-header Filter that provides options to add a header text and header logo in top-left corner of the RevealJs slides. Shafayet Khan Shafee style-speaker-note Filter that allows to style the Speaker Notes of the RevealJs slides from a CSS file. Shafayet Khan Shafee spotlight A Quarto extension for Reveal.js allowing to highlight the current mouse position with a spotlight. Mickaël CANOUIL code-fullscreen Filter that adds a fullscreen button in the code blocks in Revealjs slides and html documents. Shafayet Khan Shafee animate Create animations from svg files, and integrate them to fragments François-David Collin storybook-revealjs Medieval inspired format for Revealjs Mickaël CANOUIL ceeos-revealjs Dark grey / white based format for Revealjs Mickaël CANOUIL rladies-revealjs R-Ladies format for Revealjs beatrizmilz onyxia-revealjs Onyxia format for Revealjs InseeFrLab blackboard-revealjs Blackboard like format for Revealjs schochastics nes-revealjs NES.css format for Revealjs EmilHvitfeldt rlille-revealjs R Lille (R User Group) format for Revealjs Mickaël CANOUIL metropolis-revealjs Beamer Metropolis like format for Revealjs. Shafayet Khan Shafee illinois-revealjs University of Illinois Urbana-Champaign inspired theme for the reveal.js format based on Metropolis. James Joseph Balamuta clean-revealjs A minimal and elegant theme for reveal.js, inspired by modern Beamer templates. Grant McDermott No matching items
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/listing-revealjs.html", "source": "https://quarto.org/docs/extensions/listing-revealjs.html" }
Overview If you are rendering existing Jupyter notebooks that were not created with Quarto in mind, you may wish to do some pre-processing on the notebook prior to its conversion to markdown. This can be accomplished by specifying one or more ipynb-filters. These filters are passed the JSON representation of the notebook on stdin and should write a transformed JSON representation to stdout. Note The purpose of notebook filters is to adapt existing .ipynb files for use with Quarto. Consequently, notebook filters are only run when the original input is an .ipynb file (they are not run for .qmd files). Example For example, this notebook filter uses the nbformat package to read a notebook, prepend a comment to the source of each code cell, and then write it back to stdout: import sys import nbformat # read notebook from stdin nb = nbformat.reads(sys.stdin.read(), as_version = 4) # prepend a comment to the source of each cell for index, cell in enumerate(nb.cells): if cell.cell_type == 'code': cell.source = "# comment\n" + cell.source # write notebook to stdout nbformat.write(nb, sys.stdout) You can arrange for this filter to be run using the ipynb-filters option (specified at either the document or project level): --- ipynb-filters: - filter.py --- Note that the current working directory for the filter will be set to the location of the input notebook.
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/nbfilter.html", "source": "https://quarto.org/docs/extensions/nbfilter.html" }
Overview This article provides documentation on the standard APIs available when implementing Lua filters and shortcodes. There are three major sets of APIs available: Lua Base API—Base functions provided for string handling, pattern matching, table manipulation, and file input and output. Pandoc Lua API—Core API provided by Pandoc for filter development, and includes both core AST types (e.g. pandoc.Div, pandoc.CodeBlock, etc.) as well as a wide variety of helper functions for common tasks. Quarto Lua API—Additional functions used for debugging, format detection, encoding (e.g. JSON), and adding dependencies to documents (e.g. JavaScript libraries or LaTeX packages). To get started with programming in Lua and learn about some recommended tools and workflow, see the article on Lua Development. Lua Base API The Lua standard library provides core functions for low-level string, math, table, and file operations. Here we provide links to a few of the more useful standard libaries (complete documentation can be found in the Lua Reference Manual). Library Description string This library provides generic functions for string manipulation, such as finding and extracting substrings, and pattern matching. utf8 This library provides basic support for UTF-8 encoding. table This library provides generic functions for table manipulation. math This library provides basic mathematical functions. io, file The I/O library provides two different styles for file manipulation: one uses implicit file handles and the other explicit handles. os Date/time, locales, environment variables, etc. Pandoc Lua API Complete documentation for the Pandoc Lua API can be found in the Lua Filters article available on the Pandoc website. Here are the various components of the API along with links to their reference documentation: Lua Module Description pandoc (ast) Constructors for document tree elements (e.g. pandoc.Div(), pandoc.Strong(), etc.) as well as core components (e.g. pandoc.Attr()) pandoc (functions) Functions to parse text in a given format, filter and modify a sub-tree, and run child processes. pandoc.text UTF-8 aware text manipulation functions (e.g. upper(), lower(), etc.) pandoc.List This module defines pandoc’s list type. It comes with useful methods and convenience function (e.g find_if(), includes(), filter(), map(), etc.) pandoc.utils Internal pandoc functions and utility functions (e.g. blocks_to_inlines(), stringify(), citeproc(), etc.) pandoc.path Module for file path manipulations (e.g. is_absolute(), is_relative(), join(), etc. pandoc.system Access to system information and functionality (e.g. get_working_directory(), list_directory(), etc. pandoc.mediabag Access to pandoc’s media storage. The “media bag” is used when pandoc is called with the --extract-media or (for HTML only) --embed-resources option. pandoc.template Compile and access defualt pandoc templates (e.g. compile()) pandoc.types Constructors for types which are not part of the pandoc AST (e.g. Version()) Quarto Lua API Utility Functions Various utility functions are provided: Function Description quarto.version() Return the current Quarto version as a pandoc.Version object. quarto.utils.dump(obj) Dump a text representation of the passed object to stdout. quarto.utils.resolve_path(path) Compute the full path to a file that is installed alongside your extension’s Lua script. This is useful for internal resources that your filter needs but should not be visible to the user. Quarto includes the pandoc-lua-logging library, which should be used in preference to the dump function. For example, you can examine an element passed to a filter function as follows: function Div(el) quarto.log.output(el) end Format Detection Extensions will often need to detect the current format to create custom content depending on the target output medium. The quarto.doc.is_format() function Function Description quarto.doc.is_format(name) Detect if the current format matches name. quarto.doc.has_bootstrap() Query whether Bootstrap CSS is available within the current document (it is by default for standard html documents but this may have been overridden by e.g. theme: none). The name parameter can match an exact Pandoc format name (e.g. docx, latex, etc. or can match based on an alias that groups commonly targeted formats together. The following values format aliases are handled specially by quarto.doc.is_format(): Alias Formats latex latex, pdf pdf latex, pdf epub epub* html html*, epub*, revealjs html:js html*, revealjs markdown markdown*, commonmark*, gfm, markua Note that the html:js alias indicates that the target format is capable of executing JavaScript (this maps to all HTML formats save for ePub). For example, here we check for PDF and HTML output: if quarto.doc.is_format("pdf") then -- pdf specific output elseif quarto.doc.is_format("html") then -- html specific output else -- output for other formats end For LaTeX output, you may need to additionally detect which citation utility and pdf engine are being used for the current render. You can use these functions to do that detection: Function Description quarto.doc.cite_method() Returns a string (citeproc, natbib, or biblatex) indicating the cite method in use. quarto.doc.pdf_engine() Returns a string (pdflatex, xelatex, lualatex, or tectonic) indicating the PDF engine being used to render the document. Includes Sometimes extensions need to inject content into the target document. There are three locations that content can be included (pass one of these locations as the first argument of the include functions): Location Description in-header In the header of the document (HTML <head> tag or LaTeX preamble) before-body Before the document body after-body After the document body Note that the included content should use the raw target format (e.g. HTML or LaTeX) rather than markdown. You can use these functions to include text or the contents of a file: Function Description quarto.doc.include_text(location, text) Include text at the specified location (in-header, before-body, or after-body) quarto.doc.include_file(location, file) Include file at the specified location (in-header, before-body, or after-body). The path to the file should relative to the Lua script calling this function. For example the following code includes an HTML file after the body in the rendered document: quarto.doc.include_file("after-body", "comments.html") Dependencies Extensions will sometimes want to add external dependencies (for example, a JavaScript library and related CSS, or the usage of a LaTeX package). This can be accomplished with the following functions: Function Description quarto.doc.add_html_dependency(dep) Add an HTML dependency (additional resources and content) to a document. See docs on the HTML Dependencies below for additional details. quarto.doc.attach_to_dependency(name, attach) Attach a file to an existing dependency. attach is a file path relative to the Lua filter or table with `path` and `name` for renaming the file as its copied. quarto.doc.use_latex_package(pkg, opt) Adds a \usepackage statement to the LaTeX output (along an options string specified in opt) quarto.doc.add_format_resource(path) Add a format resource to the document. Format resources will be copied into the directory next to the rendered output. This is useful, for example, if your format references a bst or cls file which must be copied into the LaTeX output directory. For example, here we add a LaTeX package dependency: quarto.doc.use_latex_package("gamebook") HTML Dependencies HTML Dependencies can bundle together JavaScript, CSS, and even arbitrary content to inject into the <head> of the document. These dependencies have a name and a version, which is used to ensure that the same dependency isn’t bundled into the document more than once. The dep object passed to quarto.doc.add_html_dependency() has the following fields: Field Description name Unique name. Required. version Version number (as a string). Required. scripts List of scripts to include (paths can be absolute or relative to the Lua file calling the function). Scripts can be either a simple path or a script object. stylesheets List of CSS style-sheets to include (paths can be absolute or relative to the Lua file calling the function). Stylesheets can either be a simple path or a stylesheet object links List of link tags to add to the document. Each tag should be a table with rel and ref (required) and optionally type resources Additional files to copy to the input directory (each resource is an object with name (target file name in input directory) and path (source file name relative to Lua script). serviceworkers JavaScript serviceworker files that should be copied to the root output directory (can be a simple string file name or table with `path` and `name` for renaming the file as its copied). meta Table of optional key = value meta tags to insert into the document <head> head Arbitrary string to include in document <head> For example, here we add a dependency to a JavaScript library: quarto.doc.add_html_dependency({ name = "glightbox", version = "3.2.0", scripts = {"glightbox.min.js"}, stylesheets = {"glightbox.min.css"} }) Script Object The easiest way to specify scripts is with simple paths. However, in some cases you may need to add attributes to the <script> tag or specify that the script should go after the body. In those cases pass a script object: Field Description path Path to the script (relative to the calling Lua script) attribs Table with key = value attributes to add to the <script> tag afterBody Specify that the <script> tag should be inserted after the body For example, here update the previous example to add an integrity attribute to the script: quarto.doc.add_html_dependency({ name = "glightbox", version = "3.2.0", scripts = { { path = "glightbox.min.js ", attribs = {integrity = "R9GqQ8K/uxy9rx"} } }, stylesheets = {"glightbox.min.css"} }) Stylesheet Object The easiest way to specify stylesheets is with simple paths. However, in some cases you may need to add attributes to the <link> tag generated for the stylesheet. In those cases pass a stylesheet object: Field Description path Path to the stylesheet (relative to the calling Lua script) attribs Table with key = value attributes to add to the <link> tag For example, here we update the previous example to add an integrity attribute to the stylesheet: quarto.doc.add_html_dependency({ name = "glightbox", version = "3.2.0", scripts = { { path = "glightbox.min.js ", attribs = {integrity = "R9GqQ8K/uxy9rx"} } }, stylesheets = { { path = "glightbox.min.css ", attribs = {integrity = "GYl1kPzQho1wx"} } } }) JSON Encoding Quarto includes a copy of json.lua. a lightweight JSON library for Lua. You can access the JSON functions as follows: Function Description quarto.json.encode(input) Encode a Lua table into a JSON string. quarto.json.decode(str) Parse a JSON string into a Lua table. For example, here we encode and then decode a table: local json = quarto.json.encode({foo = "bar"}) local obj = quarto.json.decode(json) Base64 Encoding Quarto includes a copy of lbase64, a pure Lua implementation of Base64 encoding. You can access the Base 64 encoding functions as follows: Function Description quarto.base64.encode(str) Encode a string into Base 64. quarto.base64.decode(b64str) Decode a Base 64 string.
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/lua-api.html", "source": "https://quarto.org/docs/extensions/lua-api.html" }
Overview Custom project types provide the ability to tailor projects for a particular purpose. This could be used to create a project type that implements an organization-level standard for creating documentation or conducting analyses. For example, if you created a project type extension called lexdocs, it could be used with: _quarto.yml project: type: lexdocs This single line of configuration could provide: Navigational elements Headers and footers Document filters Graphical elements HTML options and styles If you additionally include some basic scaffolding as a Starter Template for using the project type, and host it within a GitHub repository, then users could get a new project up and running as simply as: Terminal quarto use template lexcorp/lexdocs Note that it is possible to bundle and distribute project type extensions as simple gzip archives (as opposed to using a GitHub repository as described above). See the article on Distributing Extensions for additional details. Development Tools If you are using custom project types within VS Code or RStudio, only the very latest versions of these tools handle custom project types correctly: For the Quarto VS Code Extension, use version 1.45 or greater. For RStudio, use version 2022.12 or higher. Please be sure to update your version(s) of these tools before proceeding. Complete Example In this section we’ll describe exactly what a project type extension should include by providing a complete example of the lexdocs project type alluded to above. Here are the files contained in our lexdocs project type: _quarto.yml index.qmd team.qmd _extensions lexdocs/ _extension.yml lexcorp.png theme.scss filter.lua Note that this repository provides both: The project type extension (contained in the _extensions directory). A starter template for using the project type (the _quarto.yml, index.qmd, and team.qmd files in the root of the repository). Project Type Extension Let’s explore the code for the extension first. Here is the main _extension.yml file: _extensions/lexdocs/_extension.yml title: Lexdocs Project author: Lexcorp, Inc. version: 1.0.0 quarto-version: ">=1.2.0" contributes: project: project: type: website website: sidebar: contents: auto search: true style: docked background: light logo: lexcorp.png page-footer: | "Copyright 2022, Lexcorp, Inc." format: lexdocs-html formats: html: theme: [default, theme.scss] code-overflow: wrap code-line-numbers: true filters: - filter.lua The contributes key includes a project entry, which in turn defines the default values for the _quarto.yml configuration file when this project type is used. Note that custom project types always need to inherit from one of the base project types built into Quarto (default, website, or book). Here we specify project: type: website. You’ll also note that we additionally define a lexdocs-html Custom Format within the extension (and then make that the default format for the project). This enables us to reference that format explicitly within documents (e.g. if you want to include a document that renders both pdf and lexdocs-html variations). There are three additional files referenced in the custom project definition in _extension.yml. We won’t show their source code, but here’s a rundown on the role they play: lexcorp.png is a logo added to the sidebar. theme.scss provides a custom theme for HTML output. filter.lua provides some additional transformations required by the format. Starter Template This repository also provides a starter template by including these files at the root of the repository: _quarto.yml is the project configuration file index.qmd is an empty default home page team.qmd is a page where users of the project type are encouraged to list the team members who contributed. Here’s what _quarto.yml might look like: _quarto.yml project: title: "Docs Site" type: lexdocs format: lexdocs-html: toc: true Users of the template will natually change the default title, and can add whatever other project, website, or format level options they require (these options will be merged with the defaults provided by the extension). Markdown Publishing If you are using Quarto to produce markdown for another publishing system, you can use a project type extension to tailor the markdown output created by Quarto, as well as integrate with the native preview capabilities of the other system. Quarto includes a couple of built-in project-types for integrating with the Hugo and Docusaurus publishing systems. You can see the source code for these project types here: hugo project type docusaurus project type Hugo Example Here is the the _extension.yml file for the Hugo project type (this demonstrates a few of the additional options you’d typically specify when creating a project type for markdown publishing, we’ll describe these options below): _extension.yml title: Hugo author: RStudio, PBC organization: quarto contributes: project: project: type: default detect: - ["config.toml", "content"] - ["config/_default/config.toml", "content"] render: - "**/*.qmd" - "**/*.ipynb" preview: serve: cmd: "hugo serve --port {port} --bind {host} --navigateToChanged" env: HUGO_RELATIVEURLS: "true" ready: "Web Server is available at" format: hugo-md formats: md: variant: gfm+yaml_metadata_block+definition_lists prefer-html: true fig-format: retina fig-width: 8 fig-height: 5 wrap: preserve Let’s look specifically at some project options provided for Hugo that you may not have seen before: project: type: default detect: - ["config.toml", "content"] - ["config/_default/config.toml", "content"] render: - "**/*.qmd" - "**/*.ipynb" preview: serve: cmd: "hugo serve --port {port} --bind {host} --navigateToChanged" env: HUGO_RELATIVEURLS: "true" ready: "Web Server is available at" The detect option enables Quarto to automatically detect when to activate this project type based on the presence of one or more files. The render option indicates which files Quarto should render (note that by default Quarto will render .md files, but this would interfere with Hugo’s native rendering of .md files so we exclude them here). The preview option enables quarto preview to launch the native preview server for Hugo. The cmd indicates the shell command to use (with spots to interpolate the {port} and {host}); the env option specifies values for environment variables; and the ready option is a sequence of characters to look for to indicate that the preview server has started and is ready to handle requests. Markdown Formats When creating a project type for a markdown publishing system you’ll always need to define a custom format along with it which defines what flavor of markdown to produce. In the case of Hugo we define the markdown flavor using the variant option: formats: md: variant: gfm+yaml_metadata_block+definition_lists+smart This results in GitHub Flavored Markdown w/ YAML metadata blocks (which Hugo requires for tags/categories/etc) in addition to support for definition lists and smart typography. Note that for some systems you’ll need to do more than just declare a variant. For example, in the case of Docusaurus we declare the variant as well as a Lua filter that deals with Docusaurus-specific constructs like MDX, Callouts, and Tabsets: formats: md: variant: +yaml_metadata_block+pipe_tables+tex_math_dollars+header_attributes-all_symbols_escapable filters: - docusaurus.lua A project type for any given markdown publishing system will have its own variant, and will often also require a filters to deal with non-standard constructs and other vagaries of the target system.
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/project-types.html", "source": "https://quarto.org/docs/extensions/project-types.html" }
Overview Quarto format extensions enable you to add new formats to the built-in formats (e.g. html, pdf, docx) already available. Custom formats can provide default document options, style-sheets, header, footer, or logo elements, and even bundle other extensions like filters and shortcodes. They are a great way to provide a common baseline for authoring documents or presentations within an organization, for a particular type of project or analysis, or for a specific publication. You can specify a custom format beneath the format key just like a built-in format. For example: --- title: "My Document" format: acm-pdf: toc: true --- Custom formats all derive from one of the base formats, and include that base format as a suffix. Formats can also provide multiple variations that derive from distinct base formats. For example: --- title: "My Document" toc: true format: acm-pdf: default acm-html: default --- Note that we moved the toc option to the top level since it is shared between both of the formats. Custom formats can also be used with the --to argument to quarto render. For example: Terminal quarto render document.qmd --to acm-html Note that if you are specifically interested in using or creating custom formats for journals and manuscripts, you may want to proceed instead to the documentation on Journal Articles. Quick Start Here we’ll describe how to create a simple HTML-based format extension. We’ll use the quarto create command to do this. If you are using VS Code or RStudio you should execute quarto create within their repsective integrated Terminal panes. To get started, execute quarto create extension format:html within the parent directory where you’d like the format to be created: Terminal $ quarto create extension format:html ? Extension Name › lexdoc As shown above, you’ll be prompted for an extension name. Type lexdoc (a document format for a fictional company named LexCrop) and press Enter—the custom format extension is then created: Creating extension at /Users/jjallaire/quarto/dev/lexdoc: - Created README.md - Created _extensions/lexdoc/custom.scss - Created _extensions/lexdoc/_extension.yml - Created template.qmd If you are running within VS Code or RStudio a new window will open with the extension project. Note that this example creates a format that is derivative of the Quarto base html format. You can similarly create formats that are derivative of pdf, docx, and revealjs as follows: Terminal quarto create extension format:pdf quarto create extension format:docx quarto create extension format:revealjs Here’s what the contents of the files in _extensions/lexdoc/ look like: _extensions/lexdoc/_extension.yml title: Lexdoc author: J.J. Allaire version: 1.0.0 quarto-required: ">=1.2.222" contributes: formats: html: toc: true theme: [yeti, custom.scss] The custom HTML format defined here is very simple. It takes the base html format, turns on the table of contents by default, and sets the theme as yeti along with a custom.scss file for additional customizations: _extensions/lexdoc/custom.css /*-- scss:defaults --*/ /* TODO: Customize appearance with SCSS variables */ /* See https://quarto.org/docs/output-formats/html-themes.html#theme-options */ /*-- scss:rules --*/ /* TODO: Provide custom CSS rules */ Finally, the template.qmd provides a base example article for users of the format: template.qmd --- title: "Lexdoc Example" format: lexdoc-html: default author: J.J. Allaire date: last-modified --- ## Introduction *TODO* Create an example file that demonstrates the formatting and features of your format. ## More Information You can learn more about controlling the appearance of HTML output here: <https://quarto.org/docs/output-formats/html-basics.html> To develop your format, render/preview template.qmd, and then make changes to the various files in the _extensions directory (the preview will automatically refresh when you change these files). Example: Revealjs Next, we’ll walk through the creation of a custom format that extends the revealjs presentation format. Here is what the source code repository of the format extension might look like: README.md LICENSE template.qmd _extensions/ lexconf/ _extension.yml theme.scss logo.png title.png Note that the format suffix (revealjs) is excluded from the directory name (this is to account for the possibility of multiple formats e.g. lexconf-revealjs, lexconf-pptx, etc.) As with other types of extensions, the only thing strictly required is the _extensions directory (anything above that is for your own purposes and is ignored during format installation). Even so, it’s good practice to include a README.md and LICENSE file. The template.qmd file serves a couple of purposes: It can be rendered as you develop your format to ensure that things work as expected. It can serve as the basis for a format template (which helps users gets started with using your format). Here is what the contents of _extension.yml might look like: title: LexConf 2022 Presentation author: LexCorp version: 1.0.0 quarto-required: ">=1.2.0" contributes: formats: revealjs: theme: [default, theme.scss] logo: logo.png footer: | Copyright 2022 (c) LexCorp, Inc. title-slide-attributes: data-background-image: title.png data-background-size: contain preview-links: auto This format mostly provides organization-level content and theming. As mentioned above, formats can also include filters which allow for adding custom markdown constructs and rendering behavior. Here is what the contents of template.qmd might look like: --- title: "Presentation" subtitle: "LexConf 2022" author: "Your Name" date: today format: lexconf-revealjs --- # Overview Extension repositories are structured in such a way that you can test your extension and the template by simply rendering the template.qmd file right in the root of your repository. The template.qmd will be able to load your extension just as it would when installed, so testing and iterating should be as simple as working within your extension directory until you’re satisfied (without the need to repeatedly install or update the extension in order to test it). Format Templates Above we described including a template.qmd alongside your extension and then installing the template and format together with: Terminal quarto use template <gh-organization>/<extension> The template.qmd should demonstrate the functionality of the format and serve as a sound starting point for the user. When the extension template is copied into the target directory, the template.qmd will automatically be renamed to match the name that the user provided for the directory. You can also include other files alongside template.qmd and they will be copied as well. Note that by default, Quarto will exclude common Github repository files when copying an extension template. This includes any file name or directory starting with a . (e.g. .gitignore), README.md, LICENSE, etc.. If you’d like, you can place a .quartoignore file in the root of your repository with each line of the file being a glob describing file(s) to ignore (using syntax like a .gitignore file). Distributing Formats You can distribute format extensions in one of two ways: As a template that includes both the format in the _extensions directory and the template.qmd (which is automatically renamed to match the name of the enclosing directory). As a plain format with no template scaffolding (this is useful for adding the format to an existing document or project). If you have a GitHub repository containing the files enumerated above in the lexconf example, users could install your extension and associated template as follows (where lexcorp is the GitHub organization hosting the repo): Terminal quarto use template lexcorp/lexconf This is often the preferred way to get started with a format as it provides the user with a working document right out of the box. It’s also possible to install only the format if you working with an existing project: Terminal quarto add lexcorp/lexconf Note that it is possible to bundle and distribute extensions as simple gzip archives (as opposed to using a GitHub repository as described above). See the article on Distributing Extensions for additional details. Common Metadata If you have metadata that is common to any output format when your format extension is targeted, you can place that metadata under the common key. For example: contributes: format: common: filters: - filter.lua shortcodes: - quarto-ext/fancy-text html: # html-specifc pdf: # pdf-specifc Format Resources You can usually include other files and resources within a format extension by placing those files within the extension directory and using relative paths to reference them in your _extension.yml metadata file. These relative paths will be properly handled as your extension’s metadata is merged with the rendered document metadata. If there are resources that you need to have copied to the input directory as a part of rendering the document (for example, a bst file for LaTeX bibliographies or a logo or other file referenced from a LaTeX template), you can provide format-resources, which is a list of file paths1. Each of these files will be copied into the directory containing the input that is being rendered when the document is rendered. For example: contributes: format: pdf: format-resources: - plos2015.bst Extension Embedding In some cases format extensions will want to make use of other extensions. This is permitted, but adding extensions for use within a custom format must be done with a special command line flag to ensure they are embedded correctly. For example, here we want to make the fancy-text extension (which provides special formatting for the words \(\LaTeX\) and BibTEX) available for users of the jss custom format: Terminal quarto add quarto-ext/fancy-text --embed quarto-journals/jss This will add the quarto-ext/fancy-text extension into the quarto-journals/jss extension in the _extensions folder. By embedding an extension you make it available without creating the potential for conflict with other versions of the extension that uses might already have installed. Footnotes This is most common in the the case of PDF based formats which have a secondary step of converting the LaTeX produced by Pandoc into a PDF. If there are files that are referenced indirectly by the LaTeX, they will need to be discoverable and should typically be copied into the same directory that contains the LaTeX input.↩︎
{ "lastmod": "2023-07-05T19:35:15.275Z", "loc": "https://quarto.org/docs/extensions/formats.html", "source": "https://quarto.org/docs/extensions/formats.html" }