Path: blob/main/src/resources/schema/cell-codeoutput.yml
12921 views
- name: eval1tags:2contexts: [document-execute]3execute-only: true4schema: boolean5default: true6description:7short: Evaluate code cells (if `false` just echos the code into output).8long: |9Evaluate code cells (if `false` just echos the code into output).1011- `true` (default): evaluate code cell12- `false`: don't evaluate code cell13- `[...]`: A list of positive or negative numbers to selectively include or exclude expressions14(explicit inclusion/exclusion of expressions is available only when using the knitr engine)1516- name: echo17tags:18contexts: [document-execute]19execute-only: true20schema:21anyOf:22- boolean23- enum: [fenced]24errorDescription: "be `true`, `false`, or `fenced`"25description:26short: Include cell source code in rendered output.27long: |28Include cell source code in rendered output.2930- `true` (default in most formats): include source code in output31- `false` (default in presentation formats like `beamer`, `revealjs`, and `pptx`): do not include source code in output32- `fenced`: in addition to echoing, include the cell delimiter as part of the output.33- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines34(explicit inclusion/excusion of lines is available only when using the knitr engine)3536- name: code-fold37tags:38contexts: [document-code]39formats: [$html-all]40schema:41anyOf:42- boolean43- enum: [show]44default: false45description:46short: "Collapse code into an HTML `<details>` tag so the user can display it on-demand."47long: |48Collapse code into an HTML `<details>` tag so the user can display it on-demand.4950- `true`: collapse code51- `false` (default): do not collapse code52- `show`: use the `<details>` tag, but show the expanded code initially.5354- name: code-summary55tags:56contexts: [document-code]57formats: [$html-all]58schema: string59default: "Code"60description: "Summary text to use for code blocks collapsed using `code-fold`"6162- name: code-overflow63tags:64contexts: [document-code]65formats: [$html-all]66schema:67enum: [scroll, wrap]68default: scroll69description:70short: "Choose whether to `scroll` or `wrap` when code lines are too wide for their container."71long: |72Choose how to handle code overflow, when code lines are too wide for their container. One of:7374- `scroll`75- `wrap`7677- name: code-line-numbers78tags:79contexts: [document-code]80formats: [$html-all, ms, $pdf-all]81schema:82anyOf:83- boolean84- string85tags:86doNotNarrowError: true87errorDescription: "be `true`, `false`, or a string specifying the lines to highlight"88default: false89description:90short: "Include line numbers in code block output (`true` or `false`)"91long: |92Include line numbers in code block output (`true` or `false`).9394For revealjs output only, you can also specify a string to highlight95specific lines (and/or animate between sets of highlighted lines).9697* Sets of lines are denoted with commas:98* `3,4,5`99* `1,10,12`100* Ranges can be denoted with dashes and combined with commas:101* `1-3,5`102* `5-10,12,14`103* Finally, animation steps are separated by `|`:104* `1-3|1-3,5` first shows `1-3`, then `1-3,5`105* `|5|5-10,12` first shows no numbering, then 5, then lines 5-10106and 12107108- name: lst-label109schema: string110description: "Unique label for code listing (used in cross references)"111112- name: lst-cap113schema: string114description: "Caption for code listing"115116- name: tidy117tags:118engine: knitr119schema:120anyOf:121- boolean122- enum: [styler, formatR]123default: false124description: "Whether to reformat R code."125126- name: tidy-opts127tags:128engine: knitr129schema:130arrayOf: string131description: "List of options to pass to `tidy` handler"132133- name: collapse134tags:135engine: knitr136schema: boolean137default: false138description: |139Collapse all the source and output blocks from one code chunk into a single block140141- name: prompt142tags:143engine: knitr144schema: boolean145default: false146description:147short: "Whether to add the prompt characters in R code."148long: |149Whether to add the prompt characters in R150code. See `prompt` and `continue` on the help page `?base::options`. Note151that adding prompts can make it difficult for readers to copy R code from152the output, so `prompt: false` may be a better choice. This option may not153work well when the `engine` is not `R`154([#1274](https://github.com/yihui/knitr/issues/1274)).155156- name: highlight157tags:158engine: knitr159schema: boolean160default: false161hidden: true162description: "Whether to syntax highlight the source code"163164- name: class-source165tags:166engine: knitr167schema:168maybeArrayOf: string169description: "Class name(s) for source code blocks"170171- name: attr-source172tags:173engine: knitr174schema:175maybeArrayOf: string176description: "Attribute(s) for source code blocks"177178179