``` --- title: "Untitled" format: pptx editor: visual --- ## Quarto Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>. CLicking the **Render** button will generate a PPTX document. ## Slides In markdown, slides are delineated using headings. Each slide is defined with a level 2 heading (`##`). You can also delineate slides using horizontal rules. You can also divide slide shows into sections with title slides using a level 1 header (`#`). ## Bullets When you click the **Render** button a document will be generated that includes bullets: ::: {.incremental} - Content authored with markdown - Output from executable code ::: ## Code When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code. You can embed code like this: ```{r} 1 + 1 ``` ## Background Images[](https://quarto.org/docs/presentations/powerpoint.html#background-images) To provide a common background image for multiple slides in a PowerPoint presentation, include the background image within the relevant slide layouts of a custom PowerPoint template (see [Creating a Template](https://quarto.org/docs/presentations/powerpoint.html#creating-a-template) for details on creating templates). To add a background image to an individual slide, add the `background-image` attribute to the slide’s heading. For example: ``` ## Slide Title {background-image="background.png"} ``` Note that this also works even if you don’t have slide heading text. For example: ``` ## {background-image="background.png"} ``` For background images, only the “stretch” mode is supported, and the background image is centred around the slide in the image’s larger axis, matching the observed default behaviour of PowerPoint. ## Incremental Lists[](https://quarto.org/docs/presentations/powerpoint.html#incremental-lists) By default number and bullet lists within slides are displayed all at once. You can override this globally using the `incremental` option. For example: ``` title: "My Presentation" format: pptx: incremental: true ``` You can also explicitly make any list incremental or non-incremental by surrounding it in a div with an explicit class that determines the mode. To make a list incremental do this: ``` ::: {.incremental} - Eat spaghetti - Drink wine ::: ``` To make a list non-incremental do this: ``` ::: {.nonincremental} - Eat spaghetti - Drink wine ::: ``` ## Multiple Columns[](https://quarto.org/docs/presentations/powerpoint.html#multiple-columns) To put material in side by side columns, you can use a native div container with class `.columns`, containing two or more div containers with class `.column` and a `width` attribute: ``` :::: {.columns} ::: {.column width="40%"} contents... ::: ::: {.column width="60%"} contents... ::: :::: ``` ## Speaker Notes[](https://quarto.org/docs/presentations/powerpoint.html#speaker-notes) You can add speaker notes to a slide using a div with class `.notes`. For example: ``` ## Slide with speaker notes Slide content ::: {.notes} Speaker notes go here. ::: ``` ## Title & Author[](https://quarto.org/docs/reference/formats/presentations/pptx.html#title-author) `title` Document title `date` Document date `author` Author or authors of the document ## Format Options[](https://quarto.org/docs/reference/formats/presentations/pptx.html#format-options) `reference-doc` Use the specified file as a style reference in producing a docx, pptx, or odt file. ## Table of Contents[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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 ## Execution[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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](https://yihui.org/knitr/demo/cache/) for R documents, and [Jupyter Cache](https://jupyter-cache.readthedocs.io/en/latest/) 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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#figures) `fig-width` Default width for figures generated by Matplotlib or R graphics `fig-height` Default height for figures generated by Matplotlib or R graphics `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 `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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#citation) `citation` Citation information for the document itself specified as [CSL](https://docs.citationstyles.org/en/stable/specification.html) YAML in the document front matter. For more on supported options, see [Citation Metadata](https://quarto.org/docs/reference/metadata/citation.html). ## Language[](https://quarto.org/docs/reference/formats/presentations/pptx.html#language) `lang` Identifies the main language of the document using IETF language tags (following the [BCP 47](https://www.rfc-editor.org/info/bcp47) standard), such as `en` or `en-GB`. The [Language subtag lookup](https://r12a.github.io/app-subtags/) tool can look up or verify these tags. This affects most formats, and controls hyphenation in PDF output when using LaTeX (through [`babel`](https://ctan.org/pkg/babel) and [`polyglossia`](https://ctan.org/pkg/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 `span`s and `div`s 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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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[](https://quarto.org/docs/reference/formats/presentations/pptx.html#metadata) `subject` The document subject `description` The document description. Some applications show this as `Comments` metadata. `category` The document category. ## Rendering[](https://quarto.org/docs/reference/formats/presentations/pptx.html#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` Speicfy 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. The paths should be separated by : on Linux, UNIX, and macOS systems, and by ; on Windows. `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. ## PowerPoint Templates[](https://quarto.org/docs/presentations/powerpoint.html#powerpoint-templates) By default PowerPoint output uses a fairly plain looking template. You can customize what template is used via the `reference-doc` option. For example: ``` --- title: "Presentation" format: pptx: reference-doc: template.pptx --- ``` Nearly all templates included with recent versions of PowerPoint (either with `.pptx` or `.potx` extension) are known to work, as are most templates derived from these. The specific requirement is that the template should contain layouts with the following names (as seen within PowerPoint, click on `Layout` under the `Home` menu to check): - Title Slide - Title and Content - Section Header - Two Content - Comparison - Content with Caption - Blank For each name, the first layout found with that name will be used. If no layout is found with one of the names, Pandoc will output a warning and use the layout with that name from the default `reference-doc` instead. ### Creating a Template[](https://quarto.org/docs/presentations/powerpoint.html#creating-a-template) To create a template from scratch, start with the default PowerPoint template as follows: **Terminal** ``` quarto pandoc -o template.pptx --print-default-data-file reference.pptx ``` Then edit the `template.pptx` file within PowerPoint as desired, and use it as the value for `reference-doc` (as shown above) when rendering your slides: ## Slide Layouts[](https://quarto.org/docs/presentations/powerpoint.html#slide-layouts) When creating slides, the pptx writer chooses from a number of pre-defined layouts, based on the content of the slide: **Title Slide** This layout is used for the initial slide, which is generated and filled from the metadata fields `date`, `author`, and `title`, if they are present. **Section Header** This layout is used for what pandoc calls “title slides”, i.e. slides which start with a header which is above the slide level in the hierarchy. **Two Content** This layout is used for two-column slides, i.e. slides containing a div with class `columns` which contains at least two divs with class `column`. **Comparison** This layout is used instead of “Two Content” for any two-column slides in which at least one column contains text followed by non-text (e.g. an image or a table). **Content with Caption** This layout is used for any non-two-column slides which contain text followed by non-text (e.g. an image or a table). **Blank** This layout is used for any slides which only contain blank content, e.g. a slide containing only speaker notes, or a slide containing only a non-breaking space. **Title and Content** This layout is used for all slides which do not match the criteria for another layout. These layouts are chosen from the default `pptx` reference doc included with Pandoc, unless an alternative reference doc is specified using `reference-doc`. ## Background Images[](https://quarto.org/docs/presentations/powerpoint.html#background-images) To provide a common background image for multiple slides in a PowerPoint presentation, include the background image within the relevant slide layouts of a custom PowerPoint template (see [Creating a Template](https://quarto.org/docs/presentations/powerpoint.html#creating-a-template) for details on creating templates). To add a background image to an individual slide, add the `background-image` attribute to the slide’s heading. For example: ``` ## Slide Title {background-image="background.png"} ``` Note that this also works even if you don’t have slide heading text. For example: ``` ## {background-image="background.png"} ``` For background images, only the “stretch” mode is supported, and the background image is centred around the slide in the image’s larger axis, matching the observed default behaviour of PowerPoint. ``` *** 2023 cloudedknowledge.net