-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathdocument-code.yml
More file actions
175 lines (165 loc) · 4.86 KB
/
document-code.yml
File metadata and controls
175 lines (165 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
- name: code-copy
schema:
anyOf:
- enum: [hover]
- boolean
tags:
formats: [$html-all]
default: "hover"
description:
short: Enable a code copy icon for code blocks.
long: |
Enable a code copy icon for code blocks.
- `true`: Always show the icon
- `false`: Never show the icon
- `hover` (default): Show the icon when the mouse hovers over the code block
- name: code-link
schema: boolean
tags:
engine: knitr
formats: [$html-files]
default: false
description:
short: |
Enables hyper-linking of functions within code blocks
to their online documentation.
long: |
Enables hyper-linking of functions within code blocks
to their online documentation.
Code linking is currently implemented only for the knitr engine
(via the [downlit](https://downlit.r-lib.org/) package).
A limitation of downlit currently prevents code linking
if `code-line-numbers` is also `true`.
- name: code-annotations
schema:
anyOf:
- boolean
- enum: [hover, select, below, none]
default: below
description:
short: The style to use when displaying code annotations
long: |
The style to use when displaying code annotations. Set this value
to false to hide code annotations.
- name: code-tools
tags:
formats: [$html-doc]
schema:
anyOf:
- boolean
- object:
closed: true
properties:
source:
anyOf:
- boolean
- string
toggle: boolean
caption: string
section: boolean
default: false
description:
short: "Include a code tools menu (for hiding and showing code)."
long: |
Include a code tools menu (for hiding and showing code).
Use `true` or `false` to enable or disable the standard code
tools menu. Specify sub-properties `source`, `toggle`, and
`caption` to customize the behavior and appearance of code tools.
- name: code-block-border-left
tags:
formats: [$html-doc, $pdf-all]
schema:
anyOf:
- string
- boolean
description:
short: "Show a thick left border on code blocks."
long: |
Specifies to apply a left border on code blocks. Provide a hex color to specify that the border is
enabled as well as the color of the border.
- name: code-block-bg
tags:
formats: [$html-doc, $pdf-all]
schema:
anyOf:
- string
- boolean
description:
short: "Show a background color for code blocks."
long: |
Specifies to apply a background color on code blocks. Provide a hex color to specify that the background color is
enabled as well as the color of the background.
- name: highlight-style
tags:
formats: [$html-all, docx, ms, $pdf-all]
schema:
anyOf:
- object:
closed: true
properties:
light: path
dark: path
- string:
completions:
- a11y
- arrow
- atom-one
- ayu
- ayu-mirage
- breeze
- breezedark
- dracula
- espresso
- github
- gruvbox
- haddock
- kate
- monochrome
- monokai
- none
- nord
- oblivion
- printing
- pygments
- radical
- solarized
- tango
- vim-dark
- zenburn
description:
short: Specifies the coloring style to be used in highlighted source code.
long: |
Specifies the coloring style to be used in highlighted source code.
Instead of a *STYLE* name, a JSON file with extension
` .theme` may be supplied. This will be parsed as a KDE
syntax highlighting theme and (if valid) used as the
highlighting style.
- name: syntax-definition
tags:
formats: [$html-all, docx, ms, $pdf-all]
schema: path
hidden: true
description: "KDE language syntax definition file (XML)"
- name: syntax-definitions
tags:
formats: [$html-all, docx, ms, $pdf-all]
schema:
arrayOf: path
description: "KDE language syntax definition files (XML)"
- name: listings
tags:
formats: [$pdf-all]
schema: boolean
description:
short: "Use the listings package for LaTeX code blocks."
long: |
Use the `listings` package for LaTeX code blocks. The package
does not support multi-byte encoding for source code. To handle UTF-8
you would need to use a custom template. This issue is fully
documented here: [Encoding issue with the listings package](https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings#Encoding_issue)
- name: indented-code-classes
tags:
formats: [$html-all, docx, ms, $pdf-all]
schema:
arrayOf: string
description: "Specify classes to use for all indented code blocks"