Path: blob/main/src/resources/schema/cell-figure.yml
12921 views
- name: fig-width1tags:2engine: knitr3schema: number4description: "Default width for figures"56- name: fig-height7tags:8engine: knitr9schema: number10description: "Default height for figures"1112- name: fig-cap13schema:14maybeArrayOf: string15description: Figure caption1617- name: fig-subcap18schema:19anyOf:20- enum: [true]21- maybeArrayOf: string22description: Figure subcaptions2324- name: fig-link25schema:26maybeArrayOf: string27description: Hyperlink target for the figure2829- name: fig-align30tags:31contexts: [document-figures]32formats: [docx, rtf, $odt-all, $pdf-all, $html-all]33schema:34maybeArrayOf:35enum: [default, left, right, center]36default: default37description: Figure horizontal alignment (`default`, `left`, `right`, or `center`)3839- name: fig-alt40tags:41formats: [$html-all]42schema:43maybeArrayOf: string44description: |45Alternative text to be used in the `alt` attribute of HTML images.4647- name: fig-env48tags:49formats: [$pdf-all]50contexts: [document-figures]51schema:52maybeArrayOf: string53description: LaTeX environment for figure output5455- name: fig-pos56tags:57formats: [$pdf-all]58contexts: [document-figures]59schema:60anyOf:61- maybeArrayOf: string62- enum: [false]63description:64short: LaTeX figure position arrangement to be used in `\begin{figure}[]`.65long: |66LaTeX figure position arrangement to be used in `\begin{figure}[]`.6768Computational figure output that is accompanied by the code69that produced it is given a default value of `fig-pos="H"` (so70that the code and figure are not inordinately separated).7172If `fig-pos` is `false`, then we don't use any figure position73specifier, which is sometimes necessary with custom figure74environments (such as `sidewaysfigure`).7576- name: fig-scap77tags:78formats: [$pdf-all]79schema:80maybeArrayOf: string81description:82short: A short caption (only used in LaTeX output)83long: |84A short caption (only used in LaTeX output). A short caption is inserted in `\caption[]`,85and usually displayed in the “List of Figures” of a PDF document.8687- name: fig-format88tags:89engine: knitr90schema:91enum: [retina, png, jpeg, svg, pdf]92description: "Default output format for figures (`retina`, `png`, `jpeg`, `svg`, or `pdf`)"9394- name: fig-dpi95tags:96engine: knitr97schema: number98description: "Default DPI for figures"99100- name: fig-asp101tags:102engine: knitr103schema: number104description: |105The aspect ratio of the plot, i.e., the ratio of height/width. When `fig-asp` is specified, the height of a plot106(the option `fig-height`) is calculated from `fig-width * fig-asp`.107108- name: out-width109tags:110engine: knitr111schema:112anyOf:113- string114- schema:115"null":116completions: []117description:118short: "Width of plot in the output document"119long: |120Width of the plot in the output document, which can be different from its physical `fig-width`,121i.e., plots can be scaled in the output document.122When used without a unit, the unit is assumed to be pixels. However, any of the following unit123identifiers can be used: px, cm, mm, in, inch and %, for example, `3in`, `8cm`, `300px` or `50%`.124125- name: out-height126tags:127engine: knitr128schema: string129description:130short: "Height of plot in the output document"131long: |132Height of the plot in the output document, which can be different from its physical `fig-height`,133i.e., plots can be scaled in the output document.134Depending on the output format, this option can take special values.135For example, for LaTeX output, it can be `3in`, or `8cm`;136for HTML, it can be `300px`.137138- name: fig-keep139tags:140engine: knitr141schema:142anyOf:143- enum: [high, none, all, first, last]144- maybeArrayOf: number145default: high146description:147short: "How plots in chunks should be kept."148long: |149How plots in chunks should be kept. Possible values are as follows:150151- `high`: Only keep high-level plots (merge low-level changes into152high-level plots).153- `none`: Discard all plots.154- `all`: Keep all plots (low-level plot changes may produce new plots).155- `first`: Only keep the first plot.156- `last`: Only keep the last plot.157- A numeric vector: In this case, the values are indices of (low-level) plots158to keep.159160- name: fig-show161tags:162engine: knitr163schema:164enum: [asis, hold, animate, hide]165default: asis166description:167short: "How to show/arrange the plots"168long: |169How to show/arrange the plots. Possible values are as follows:170171- `asis`: Show plots exactly in places where they were generated (as if172the code were run in an R terminal).173- `hold`: Hold all plots and output them at the end of a code chunk.174- `animate`: Concatenate all plots into an animation if there are multiple175plots in a chunk.176- `hide`: Generate plot files but hide them in the output document.177178- name: out-extra179tags:180engine: knitr181schema: string182description: "Additional raw LaTeX or HTML options to be applied to figures"183184- name: external185tags:186engine: knitr187formats: [$pdf-all]188schema: boolean189default: true190description: "Externalize tikz graphics (pre-compile to PDF)"191192- name: sanitize193tags:194engine: knitr195formats: [$pdf-all]196schema: boolean197default: false198description: "sanitize tikz graphics (escape special LaTeX characters)."199200- name: interval201tags:202engine: knitr203schema: number204default: 1205description: "Time interval (number of seconds) between animation frames."206207- name: aniopts208tags:209engine: knitr210schema: string211default: "controls, loop"212description:213short: "Extra options for animations"214long: |215Extra options for animations; see the documentation of the LaTeX [**animate**216package.](http://ctan.org/pkg/animate)217218- name: animation-hook219tags:220engine: knitr221schema:222string:223completions: [ffmpeg, gifski]224default: ffmpeg225description:226short: "Hook function to create animations in HTML output"227long: |228Hook function to create animations in HTML output.229230The default hook (`ffmpeg`) uses FFmpeg to convert images to a WebM video.231232Another hook function is `gifski` based on the233[**gifski**](https://cran.r-project.org/package=gifski) package to234create GIF animations.235236237