Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/resources/schema/cell-codeoutput.yml
12925 views
1
- name: eval
2
tags:
3
contexts: [document-execute]
4
execute-only: true
5
schema: boolean
6
default: true
7
description:
8
short: Evaluate code cells (if `false` just echos the code into output).
9
long: |
10
Evaluate code cells (if `false` just echos the code into output).
11
12
- `true` (default): evaluate code cell
13
- `false`: don't evaluate code cell
14
- `[...]`: A list of positive or negative numbers to selectively include or exclude expressions
15
(explicit inclusion/exclusion of expressions is available only when using the knitr engine)
16
17
- name: echo
18
tags:
19
contexts: [document-execute]
20
execute-only: true
21
schema:
22
anyOf:
23
- boolean
24
- enum: [fenced]
25
errorDescription: "be `true`, `false`, or `fenced`"
26
description:
27
short: Include cell source code in rendered output.
28
long: |
29
Include cell source code in rendered output.
30
31
- `true` (default in most formats): include source code in output
32
- `false` (default in presentation formats like `beamer`, `revealjs`, and `pptx`): do not include source code in output
33
- `fenced`: in addition to echoing, include the cell delimiter as part of the output.
34
- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines
35
(explicit inclusion/excusion of lines is available only when using the knitr engine)
36
37
- name: code-fold
38
tags:
39
contexts: [document-code]
40
formats: [$html-all]
41
schema:
42
anyOf:
43
- boolean
44
- enum: [show]
45
default: false
46
description:
47
short: "Collapse code into an HTML `<details>` tag so the user can display it on-demand."
48
long: |
49
Collapse code into an HTML `<details>` tag so the user can display it on-demand.
50
51
- `true`: collapse code
52
- `false` (default): do not collapse code
53
- `show`: use the `<details>` tag, but show the expanded code initially.
54
55
- name: code-summary
56
tags:
57
contexts: [document-code]
58
formats: [$html-all]
59
schema: string
60
default: "Code"
61
description: "Summary text to use for code blocks collapsed using `code-fold`"
62
63
- name: code-overflow
64
tags:
65
contexts: [document-code]
66
formats: [$html-all]
67
schema:
68
enum: [scroll, wrap]
69
default: scroll
70
description:
71
short: "Choose whether to `scroll` or `wrap` when code lines are too wide for their container."
72
long: |
73
Choose how to handle code overflow, when code lines are too wide for their container. One of:
74
75
- `scroll`
76
- `wrap`
77
78
- name: code-line-numbers
79
tags:
80
contexts: [document-code]
81
formats: [$html-all, ms, $pdf-all]
82
schema:
83
anyOf:
84
- boolean
85
- string
86
tags:
87
doNotNarrowError: true
88
errorDescription: "be `true`, `false`, or a string specifying the lines to highlight"
89
default: false
90
description:
91
short: "Include line numbers in code block output (`true` or `false`)"
92
long: |
93
Include line numbers in code block output (`true` or `false`).
94
95
For revealjs output only, you can also specify a string to highlight
96
specific lines (and/or animate between sets of highlighted lines).
97
98
* Sets of lines are denoted with commas:
99
* `3,4,5`
100
* `1,10,12`
101
* Ranges can be denoted with dashes and combined with commas:
102
* `1-3,5`
103
* `5-10,12,14`
104
* Finally, animation steps are separated by `|`:
105
* `1-3|1-3,5` first shows `1-3`, then `1-3,5`
106
* `|5|5-10,12` first shows no numbering, then 5, then lines 5-10
107
and 12
108
109
- name: lst-label
110
schema: string
111
description: "Unique label for code listing (used in cross references)"
112
113
- name: lst-cap
114
schema: string
115
description: "Caption for code listing"
116
117
- name: tidy
118
tags:
119
engine: knitr
120
schema:
121
anyOf:
122
- boolean
123
- enum: [styler, formatR]
124
default: false
125
description: "Whether to reformat R code."
126
127
- name: tidy-opts
128
tags:
129
engine: knitr
130
schema:
131
arrayOf: string
132
description: "List of options to pass to `tidy` handler"
133
134
- name: collapse
135
tags:
136
engine: knitr
137
schema: boolean
138
default: false
139
description: |
140
Collapse all the source and output blocks from one code chunk into a single block
141
142
- name: prompt
143
tags:
144
engine: knitr
145
schema: boolean
146
default: false
147
description:
148
short: "Whether to add the prompt characters in R code."
149
long: |
150
Whether to add the prompt characters in R
151
code. See `prompt` and `continue` on the help page `?base::options`. Note
152
that adding prompts can make it difficult for readers to copy R code from
153
the output, so `prompt: false` may be a better choice. This option may not
154
work well when the `engine` is not `R`
155
([#1274](https://github.com/yihui/knitr/issues/1274)).
156
157
- name: highlight
158
tags:
159
engine: knitr
160
schema: boolean
161
default: false
162
hidden: true
163
description: "Whether to syntax highlight the source code"
164
165
- name: class-source
166
tags:
167
engine: knitr
168
schema:
169
maybeArrayOf: string
170
description: "Class name(s) for source code blocks"
171
172
- name: attr-source
173
tags:
174
engine: knitr
175
schema:
176
maybeArrayOf: string
177
description: "Attribute(s) for source code blocks"
178
179