Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/resources/schema/document-code.yml
12921 views
1
- name: code-copy
2
schema:
3
anyOf:
4
- enum: [hover]
5
- boolean
6
tags:
7
formats: [$html-all]
8
default: "hover"
9
description:
10
short: Enable a code copy icon for code blocks.
11
long: |
12
Enable a code copy icon for code blocks.
13
14
- `true`: Always show the icon
15
- `false`: Never show the icon
16
- `hover` (default): Show the icon when the mouse hovers over the code block
17
18
- name: code-link
19
schema: boolean
20
tags:
21
engine: knitr
22
formats: [$html-files]
23
default: false
24
description:
25
short: |
26
Enables hyper-linking of functions within code blocks
27
to their online documentation.
28
long: |
29
Enables hyper-linking of functions within code blocks
30
to their online documentation.
31
32
Code linking is currently implemented only for the knitr engine
33
(via the [downlit](https://downlit.r-lib.org/) package).
34
A limitation of downlit currently prevents code linking
35
if `code-line-numbers` is also `true`.
36
37
- name: code-annotations
38
schema:
39
anyOf:
40
- boolean
41
- enum: [hover, select, below, none]
42
default: below
43
description:
44
short: The style to use when displaying code annotations
45
long: |
46
The style to use when displaying code annotations. Set this value
47
to false to hide code annotations.
48
49
- name: code-tools
50
tags:
51
formats: [$html-doc]
52
schema:
53
anyOf:
54
- boolean
55
- object:
56
closed: true
57
properties:
58
source:
59
anyOf:
60
- boolean
61
- string
62
toggle: boolean
63
caption: string
64
default: false
65
description:
66
short: "Include a code tools menu (for hiding and showing code)."
67
long: |
68
Include a code tools menu (for hiding and showing code).
69
Use `true` or `false` to enable or disable the standard code
70
tools menu. Specify sub-properties `source`, `toggle`, and
71
`caption` to customize the behavior and appearance of code tools.
72
- name: code-block-border-left
73
tags:
74
formats: [$html-doc, $pdf-all]
75
schema:
76
anyOf:
77
- string
78
- boolean
79
description:
80
short: "Show a thick left border on code blocks."
81
long: |
82
Specifies to apply a left border on code blocks. Provide a hex color to specify that the border is
83
enabled as well as the color of the border.
84
- name: code-block-bg
85
tags:
86
formats: [$html-doc, $pdf-all]
87
schema:
88
anyOf:
89
- string
90
- boolean
91
description:
92
short: "Show a background color for code blocks."
93
long: |
94
Specifies to apply a background color on code blocks. Provide a hex color to specify that the background color is
95
enabled as well as the color of the background.
96
- name: syntax-highlighting
97
tags:
98
formats: [$html-all, docx, ms, $pdf-all, typst]
99
schema:
100
anyOf:
101
- object:
102
closed: true
103
properties:
104
light: path
105
dark: path
106
- string:
107
completions:
108
- a11y
109
- arrow
110
- atom-one
111
- ayu
112
- ayu-mirage
113
- breeze
114
- breezedark
115
- dracula
116
- espresso
117
- github
118
- gruvbox
119
- haddock
120
- idiomatic
121
- kate
122
- monochrome
123
- monokai
124
- none
125
- nord
126
- oblivion
127
- printing
128
- pygments
129
- radical
130
- solarized
131
- tango
132
- vim-dark
133
- zenburn
134
description:
135
short: Specifies the coloring style to be used in highlighted source code.
136
long: |
137
Specifies the coloring style to be used in highlighted source code.
138
139
Valid values:
140
141
- `none`: Disables syntax highlighting for code blocks.
142
- `idiomatic`: Uses the format's native syntax highlighter
143
(e.g., Typst's built-in highlighting, LaTeX `listings` package,
144
or reveal.js highlight.js plugin).
145
- A style name (e.g., `pygments`, `tango`, `github`): Uses
146
Pandoc's skylighting with the specified theme.
147
- A path to a `.theme` file: Uses a custom KDE syntax
148
highlighting theme.
149
150
For adaptive light/dark themes, specify an object with `light`
151
and `dark` properties pointing to theme files.
152
153
- name: highlight-style
154
hidden: true
155
tags:
156
formats: [$html-all, docx, ms, $pdf-all, typst]
157
schema:
158
anyOf:
159
- object:
160
closed: true
161
properties:
162
light: path
163
dark: path
164
- string
165
description:
166
short: "Deprecated: use `syntax-highlighting` instead."
167
long: |
168
Deprecated: use `syntax-highlighting` instead.
169
170
Specifies the coloring style to be used in highlighted source code.
171
172
- name: syntax-definition
173
tags:
174
formats: [$html-all, docx, ms, $pdf-all, typst]
175
schema: path
176
hidden: true
177
description: "KDE language syntax definition file (XML)"
178
179
- name: syntax-definitions
180
tags:
181
formats: [$html-all, docx, ms, $pdf-all, typst]
182
schema:
183
arrayOf: path
184
description: "KDE language syntax definition files (XML)"
185
186
- name: listings
187
tags:
188
formats: [$pdf-all]
189
schema: boolean
190
description:
191
short: "Use the listings package for LaTeX code blocks."
192
long: |
193
Use the `listings` package for LaTeX code blocks. The package
194
does not support multi-byte encoding for source code. To handle UTF-8
195
you would need to use a custom template. This issue is fully
196
documented here: [Encoding issue with the listings package](https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings#Encoding_issue)
197
198
- name: indented-code-classes
199
tags:
200
formats: [$html-all, docx, ms, $pdf-all]
201
schema:
202
arrayOf: string
203
description: "Specify classes to use for all indented code blocks"
204
205