apex-ruby 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/apex_ext/apex_ext.c +6 -0
- data/ext/apex_ext/apex_src/AGENTS.md +41 -0
- data/ext/apex_ext/apex_src/CHANGELOG.md +412 -2
- data/ext/apex_ext/apex_src/CMakeLists.txt +41 -29
- data/ext/apex_ext/apex_src/Formula/apex.rb +2 -2
- data/ext/apex_ext/apex_src/Package.swift +9 -0
- data/ext/apex_ext/apex_src/README.md +31 -9
- data/ext/apex_ext/apex_src/ROADMAP.md +5 -0
- data/ext/apex_ext/apex_src/VERSION +1 -1
- data/ext/apex_ext/apex_src/cli/main.c +1125 -13
- data/ext/apex_ext/apex_src/docs/index.md +459 -0
- data/ext/apex_ext/apex_src/include/apex/apex.h +67 -5
- data/ext/apex_ext/apex_src/include/apex/ast_man.h +20 -0
- data/ext/apex_ext/apex_src/include/apex/ast_markdown.h +39 -0
- data/ext/apex_ext/apex_src/include/apex/ast_terminal.h +40 -0
- data/ext/apex_ext/apex_src/include/apex/module.modulemap +1 -1
- data/ext/apex_ext/apex_src/man/apex-config.5 +333 -258
- data/ext/apex_ext/apex_src/man/apex-config.5.md +3 -1
- data/ext/apex_ext/apex_src/man/apex-plugins.7 +401 -316
- data/ext/apex_ext/apex_src/man/apex.1 +663 -620
- data/ext/apex_ext/apex_src/man/apex.1.html +703 -0
- data/ext/apex_ext/apex_src/man/apex.1.md +160 -90
- data/ext/apex_ext/apex_src/objc/Apex.swift +6 -0
- data/ext/apex_ext/apex_src/objc/NSString+Apex.h +12 -0
- data/ext/apex_ext/apex_src/objc/NSString+Apex.m +9 -0
- data/ext/apex_ext/apex_src/pages/index.md +459 -0
- data/ext/apex_ext/apex_src/src/_README.md +4 -4
- data/ext/apex_ext/apex_src/src/apex.c +702 -44
- data/ext/apex_ext/apex_src/src/ast_json.c +1130 -0
- data/ext/apex_ext/apex_src/src/ast_json.h +46 -0
- data/ext/apex_ext/apex_src/src/ast_man.c +948 -0
- data/ext/apex_ext/apex_src/src/ast_markdown.c +409 -0
- data/ext/apex_ext/apex_src/src/ast_terminal.c +2516 -0
- data/ext/apex_ext/apex_src/src/extensions/abbreviations.c +8 -5
- data/ext/apex_ext/apex_src/src/extensions/definition_list.c +491 -1514
- data/ext/apex_ext/apex_src/src/extensions/definition_list.h +8 -15
- data/ext/apex_ext/apex_src/src/extensions/emoji.c +207 -0
- data/ext/apex_ext/apex_src/src/extensions/emoji.h +14 -0
- data/ext/apex_ext/apex_src/src/extensions/header_ids.c +178 -71
- data/ext/apex_ext/apex_src/src/extensions/highlight.c +37 -5
- data/ext/apex_ext/apex_src/src/extensions/ial.c +416 -47
- data/ext/apex_ext/apex_src/src/extensions/includes.c +241 -10
- data/ext/apex_ext/apex_src/src/extensions/includes.h +1 -0
- data/ext/apex_ext/apex_src/src/extensions/metadata.c +166 -3
- data/ext/apex_ext/apex_src/src/extensions/metadata.h +7 -0
- data/ext/apex_ext/apex_src/src/extensions/sup_sub.c +34 -3
- data/ext/apex_ext/apex_src/src/extensions/syntax_highlight.c +55 -10
- data/ext/apex_ext/apex_src/src/extensions/syntax_highlight.h +7 -4
- data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.c +84 -52
- data/ext/apex_ext/apex_src/src/extensions/toc.c +133 -19
- data/ext/apex_ext/apex_src/src/filters_ast.c +194 -0
- data/ext/apex_ext/apex_src/src/filters_ast.h +36 -0
- data/ext/apex_ext/apex_src/src/html_renderer.c +1265 -35
- data/ext/apex_ext/apex_src/src/html_renderer.h +21 -0
- data/ext/apex_ext/apex_src/src/plugins_remote.c +40 -14
- data/ext/apex_ext/apex_src/tests/CMakeLists.txt +1 -0
- data/ext/apex_ext/apex_src/tests/README.md +11 -5
- data/ext/apex_ext/apex_src/tests/fixtures/comprehensive_test.md +13 -2
- data/ext/apex_ext/apex_src/tests/fixtures/filters/filter_output_with_rawblock.json +1 -0
- data/ext/apex_ext/apex_src/tests/fixtures/filters/unwrap.md +7 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/auto-wildcard.md +8 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.avif +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.jpg +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.webp +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.avif +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.jpg +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.webp +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/media_formats_test.md +63 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data-semi.csv +3 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/with space.txt +1 -0
- data/ext/apex_ext/apex_src/tests/fixtures/tables/inline_tables_test.md +4 -1
- data/ext/apex_ext/apex_src/tests/paginate_cli_test.sh +64 -0
- data/ext/apex_ext/apex_src/tests/terminal_width_test.sh +29 -0
- data/ext/apex_ext/apex_src/tests/test-swift-package.sh +14 -0
- data/ext/apex_ext/apex_src/tests/test_cmark_callback.c +189 -0
- data/ext/apex_ext/apex_src/tests/test_extensions.c +374 -0
- data/ext/apex_ext/apex_src/tests/test_metadata.c +68 -0
- data/ext/apex_ext/apex_src/tests/test_output.c +291 -2
- data/ext/apex_ext/apex_src/tests/test_runner.c +10 -0
- data/ext/apex_ext/apex_src/tests/test_syntax_highlight.c +1 -1
- data/ext/apex_ext/apex_src/tests/test_tables.c +17 -1
- data/lib/apex/version.rb +1 -1
- metadata +32 -2
- data/ext/apex_ext/apex_src/docs/FUTURE_FEATURES.md +0 -456
|
@@ -1,374 +1,449 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.TH "APEX\-CONFIG" "5" "December 2025" ""
|
|
1
|
+
.TH "NAME" "1" "1 January 1970" ""
|
|
2
|
+
|
|
4
3
|
.SH NAME
|
|
4
|
+
|
|
5
|
+
.PP
|
|
5
6
|
apex\-config \- Apex configuration file format
|
|
7
|
+
|
|
6
8
|
.SH DESCRIPTION
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
still allowing per\-document and per\-invocation overrides.
|
|
9
|
+
|
|
10
|
+
.PP
|
|
11
|
+
Apex supports flexible configuration through metadata files that allow you to define defaults once and reuse them across many documents, while still allowing per\-document and per\-invocation overrides.
|
|
12
|
+
|
|
10
13
|
.PP
|
|
11
14
|
Configuration can come from three main sources:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
\f[
|
|
15
|
-
|
|
16
|
-
.IP "2."
|
|
17
|
-
\f[B]External metadata files\f[
|
|
18
|
-
|
|
19
|
-
.IP "3."
|
|
20
|
-
\f[B]Per\-document metadata\f[
|
|
21
|
-
|
|
15
|
+
|
|
16
|
+
.IP "1." 4
|
|
17
|
+
\f[B]Global configuration file\f[] \- \fR$XDG_CONFIG_HOME/apex/config.yml\f[] or \fR~/.config/apex/config.yml\f[]
|
|
18
|
+
|
|
19
|
+
.IP "2." 4
|
|
20
|
+
\f[B]External metadata files\f[] \- Any file passed via \fR\-\-meta\-file\f[]
|
|
21
|
+
|
|
22
|
+
.IP "3." 4
|
|
23
|
+
\f[B]Per\-document metadata\f[] \- YAML, MultiMarkdown, or Pandoc\-style metadata in the document
|
|
24
|
+
|
|
22
25
|
.PP
|
|
23
26
|
Command\-line flags always override configuration file settings.
|
|
27
|
+
|
|
24
28
|
.SH GLOBAL CONFIG FILE
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
configuration file:
|
|
29
|
+
|
|
30
|
+
.PP
|
|
31
|
+
When you run \f[B]apex\f[](1) without an explicit \fR\-\-meta\-file\f[], Apex automatically checks for a global configuration file:
|
|
32
|
+
|
|
28
33
|
.IP \(bu 2
|
|
29
|
-
If \
|
|
30
|
-
|
|
34
|
+
If \fR$XDG_CONFIG_HOME\f[] is set: \fR$XDG_CONFIG_HOME/apex/config.yml\f[]
|
|
35
|
+
|
|
31
36
|
.IP \(bu 2
|
|
32
|
-
Otherwise: \
|
|
37
|
+
Otherwise: \fR~/.config/apex/config.yml\f[]
|
|
38
|
+
|
|
33
39
|
.PP
|
|
34
|
-
If the file exists, Apex loads it as if you had passed it via
|
|
35
|
-
|
|
36
|
-
any \f[CR]\-\-meta\f[R] command\-line metadata.
|
|
40
|
+
If the file exists, Apex loads it as if you had passed it via \fR\-\-meta\-file\f[], and merges its metadata with the document and any \fR\-\-meta\f[] command\-line metadata.
|
|
41
|
+
|
|
37
42
|
.PP
|
|
38
|
-
This makes \
|
|
39
|
-
|
|
43
|
+
This makes \fRconfig.yml\f[] ideal for defining project\-agnostic defaults such as:
|
|
44
|
+
|
|
40
45
|
.IP \(bu 2
|
|
41
|
-
Default \
|
|
42
|
-
|
|
46
|
+
Default \fRmode\f[] (e.g. \fRunified\f[], \fRgfm\f[], \fRmmd\f[])
|
|
47
|
+
|
|
43
48
|
.IP \(bu 2
|
|
44
|
-
Default \
|
|
49
|
+
Default \fRlanguage\f[] and \fRquoteslanguage\f[]
|
|
50
|
+
|
|
45
51
|
.IP \(bu 2
|
|
46
|
-
Common feature flags (\f[
|
|
47
|
-
|
|
52
|
+
Common feature flags (\fRpretty\f[], \fRstandalone\f[], \fRindices\f[], \fRwikilinks\f[], etc.)
|
|
53
|
+
|
|
48
54
|
.IP \(bu 2
|
|
49
55
|
Default bibliography style
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
|
|
56
|
+
|
|
57
|
+
.SS Example \fRconfig.yml\f[]
|
|
58
|
+
|
|
59
|
+
.PP
|
|
60
|
+
.nf
|
|
61
|
+
\fR
|
|
53
62
|
\-\-\-
|
|
54
|
-
|
|
55
|
-
mode
|
|
56
|
-
standalone
|
|
57
|
-
pretty
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
# Default processor mode and output style
|
|
64
|
+
mode: unified
|
|
65
|
+
standalone: true
|
|
66
|
+
pretty: true
|
|
67
|
+
# Locale and quotation style
|
|
68
|
+
language: en
|
|
69
|
+
quoteslanguage: english
|
|
70
|
+
# Common feature flags
|
|
71
|
+
autolink: true
|
|
72
|
+
includes: true
|
|
73
|
+
relaxed\-tables: true
|
|
74
|
+
sup\-sub: true
|
|
75
|
+
# Index and bibliography defaults
|
|
76
|
+
indices: true
|
|
77
|
+
group\-index\-by\-letter: true
|
|
78
|
+
bibliography: references.bib
|
|
79
|
+
csl: apa.csl
|
|
80
|
+
# Syntax highlighting (optional)
|
|
81
|
+
code\-highlight: pygments
|
|
82
|
+
code\-line\-numbers: true
|
|
83
|
+
highlight\-language\-only: true
|
|
74
84
|
\-\-\-
|
|
75
|
-
|
|
85
|
+
|
|
86
|
+
\f[]
|
|
87
|
+
.fi
|
|
88
|
+
|
|
76
89
|
.SH EXTERNAL METADATA FILES
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
|
|
91
|
+
.PP
|
|
92
|
+
For project\-specific or task\-specific configurations, use \fR\-\-meta\-file\f[] to point to a reusable metadata file:
|
|
93
|
+
|
|
94
|
+
.PP
|
|
95
|
+
.nf
|
|
96
|
+
\fR
|
|
81
97
|
apex document.md \-\-meta\-file project\-defaults.yml
|
|
82
|
-
|
|
98
|
+
|
|
99
|
+
\f[]
|
|
100
|
+
.fi
|
|
101
|
+
|
|
83
102
|
.PP
|
|
84
|
-
These files use the same metadata keys as \
|
|
85
|
-
|
|
103
|
+
These files use the same metadata keys as \fRconfig.yml\f[] and document front matter.
|
|
104
|
+
|
|
86
105
|
.SS Example project config
|
|
87
|
-
|
|
88
|
-
.
|
|
106
|
+
|
|
107
|
+
.PP
|
|
108
|
+
.nf
|
|
109
|
+
\fR
|
|
110
|
+
\-\-\-
|
|
111
|
+
mode: unified
|
|
112
|
+
standalone: true
|
|
113
|
+
pretty: true
|
|
114
|
+
# Project\-specific bibliography
|
|
115
|
+
bibliography: project\-refs.bib
|
|
116
|
+
csl: chicago\-note\-bibliography.csl
|
|
117
|
+
# Enable wiki links and relaxed tables for this project
|
|
118
|
+
wikilinks: true
|
|
119
|
+
relaxed\-tables: true
|
|
89
120
|
\-\-\-
|
|
90
|
-
mode\f[B]:\f[R] unified
|
|
91
|
-
standalone\f[B]:\f[R] true
|
|
92
|
-
pretty\f[B]:\f[R] true
|
|
93
121
|
|
|
94
|
-
\f[
|
|
95
|
-
|
|
96
|
-
csl\f[B]:\f[R] chicago\-note\-bibliography.csl
|
|
122
|
+
\f[]
|
|
123
|
+
.fi
|
|
97
124
|
|
|
98
|
-
\f[I]# Enable wiki links and relaxed tables for this project\f[R]
|
|
99
|
-
wikilinks\f[B]:\f[R] true
|
|
100
|
-
relaxed\-tables\f[B]:\f[R] true
|
|
101
|
-
\-\-\-
|
|
102
|
-
.EE
|
|
103
125
|
.SH PER\-DOCUMENT METADATA
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Apex extracts this metadata before processing, merges it with any
|
|
107
|
-
|
|
126
|
+
|
|
127
|
+
.PP
|
|
128
|
+
Each document can define its own metadata in YAML, MultiMarkdown, or Pandoc formats. Apex extracts this metadata before processing, merges it with any file/config metadata, and then applies it to options.
|
|
129
|
+
|
|
108
130
|
.SS YAML front matter example
|
|
109
|
-
.IP
|
|
110
|
-
.EX
|
|
111
|
-
\f[I]\-\-\-\f[R]
|
|
112
|
-
\f[BI]title:\f[R]\f[I] My Research Paper\f[R]
|
|
113
|
-
\f[BI]author:\f[R]\f[I] Jane Doe\f[R]
|
|
114
|
-
\f[BI]mode:\f[R]\f[I] unified\f[R]
|
|
115
|
-
\f[BI]standalone:\f[R]\f[I] true\f[R]
|
|
116
|
-
\f[BI]pretty:\f[R]\f[I] true\f[R]
|
|
117
|
-
\f[BI]indices:\f[R]\f[I] false\f[R]
|
|
118
|
-
\f[BI]wikilinks:\f[R]\f[I] true\f[R]
|
|
119
|
-
\f[BI]bibliography:\f[R]\f[I] references.bib\f[R]
|
|
120
|
-
\f[BI]language:\f[R]\f[I] en\f[R]
|
|
121
|
-
\f[BI]quoteslanguage:\f[R]\f[I] english\f[R]
|
|
122
|
-
\f[I]\-\-\-\f[R]
|
|
123
131
|
|
|
132
|
+
.PP
|
|
133
|
+
.nf
|
|
134
|
+
\fR
|
|
135
|
+
\-\-\-
|
|
136
|
+
title: My Research Paper
|
|
137
|
+
author: Jane Doe
|
|
138
|
+
mode: unified
|
|
139
|
+
standalone: true
|
|
140
|
+
pretty: true
|
|
141
|
+
indices: false
|
|
142
|
+
wikilinks: true
|
|
143
|
+
bibliography: references.bib
|
|
144
|
+
language: en
|
|
145
|
+
quoteslanguage: english
|
|
146
|
+
\-\-\-
|
|
124
147
|
# Introduction
|
|
125
148
|
\&...
|
|
126
|
-
|
|
149
|
+
|
|
150
|
+
\f[]
|
|
151
|
+
.fi
|
|
152
|
+
|
|
127
153
|
.SS MultiMarkdown metadata example
|
|
128
|
-
.IP
|
|
129
|
-
.EX
|
|
130
|
-
\f[BI]Title:\f[R]\f[I] My Research Paper\f[R]
|
|
131
|
-
\f[BI]Author:\f[R]\f[I] Jane Doe\f[R]
|
|
132
|
-
\f[BI]Mode:\f[R]\f[I] unified\f[R]
|
|
133
|
-
\f[BI]Standalone:\f[R]\f[I] true\f[R]
|
|
134
|
-
\f[BI]Pretty:\f[R]\f[I] true\f[R]
|
|
135
|
-
\f[BI]Indices:\f[R]\f[I] false\f[R]
|
|
136
|
-
\f[BI]WikiLinks:\f[R]\f[I] true\f[R]
|
|
137
|
-
\f[BI]Bibliography:\f[R]\f[I] references.bib\f[R]
|
|
138
|
-
\f[BI]Language:\f[R]\f[I] en\f[R]
|
|
139
|
-
\f[BI]Quotes Language:\f[R]\f[I] english\f[R]
|
|
140
154
|
|
|
155
|
+
.PP
|
|
156
|
+
.nf
|
|
157
|
+
\fR
|
|
158
|
+
Title: My Research Paper
|
|
159
|
+
Author: Jane Doe
|
|
160
|
+
Mode: unified
|
|
161
|
+
Standalone: true
|
|
162
|
+
Pretty: true
|
|
163
|
+
Indices: false
|
|
164
|
+
WikiLinks: true
|
|
165
|
+
Bibliography: references.bib
|
|
166
|
+
Language: en
|
|
167
|
+
Quotes Language: english
|
|
141
168
|
# Introduction
|
|
142
169
|
\&...
|
|
143
|
-
|
|
170
|
+
|
|
171
|
+
\f[]
|
|
172
|
+
.fi
|
|
173
|
+
|
|
144
174
|
.PP
|
|
145
|
-
Apex normalizes keys (case\-insensitive, ignores spaces and dashes), so
|
|
146
|
-
|
|
147
|
-
\f[CR]quotes\-language\f[R] are treated equivalently.
|
|
175
|
+
Apex normalizes keys (case\-insensitive, ignores spaces and dashes), so \fRQuotes Language\f[], \fRquoteslanguage\f[], and \fRquotes\-language\f[] are treated equivalently.
|
|
176
|
+
|
|
148
177
|
.SH PRECEDENCE AND MERGING
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
.
|
|
178
|
+
|
|
179
|
+
.PP
|
|
180
|
+
When Apex builds the final configuration for a run, it merges all sources in this order:
|
|
181
|
+
|
|
182
|
+
.IP "1." 4
|
|
183
|
+
\f[B]File metadata\f[] (lowest precedence)
|
|
184
|
+
|
|
154
185
|
.IP \(bu 2
|
|
155
|
-
Global \
|
|
156
|
-
|
|
186
|
+
Global \fRconfig.yml\f[] if present and no explicit \fR\-\-meta\-file\f[] was given
|
|
187
|
+
|
|
157
188
|
.IP \(bu 2
|
|
158
|
-
Any metadata file provided via \
|
|
159
|
-
|
|
160
|
-
.IP "2."
|
|
161
|
-
\f[B]Document metadata\f[
|
|
162
|
-
|
|
189
|
+
Any metadata file provided via \fR\-\-meta\-file\f[]
|
|
190
|
+
|
|
191
|
+
.IP "2." 4
|
|
192
|
+
\f[B]Document metadata\f[]
|
|
193
|
+
|
|
163
194
|
.IP \(bu 2
|
|
164
195
|
YAML/MultiMarkdown/Pandoc metadata inside the document
|
|
165
|
-
|
|
166
|
-
.IP "3."
|
|
167
|
-
\f[B]Command\-line metadata\f[
|
|
168
|
-
|
|
169
|
-
.IP \(bu 2
|
|
170
|
-
Values passed via \
|
|
171
|
-
|
|
172
|
-
.IP "4."
|
|
173
|
-
\f[B]Command\-line flags\f[
|
|
174
|
-
|
|
175
|
-
.IP \(bu 2
|
|
176
|
-
Flags like \
|
|
177
|
-
|
|
178
|
-
.RE
|
|
196
|
+
|
|
197
|
+
.IP "3." 4
|
|
198
|
+
\f[B]Command\-line metadata\f[]
|
|
199
|
+
|
|
200
|
+
.IP \(bu 2
|
|
201
|
+
Values passed via \fR\-\-meta KEY=VALUE\f[]
|
|
202
|
+
|
|
203
|
+
.IP "4." 4
|
|
204
|
+
\f[B]Command\-line flags\f[]
|
|
205
|
+
|
|
206
|
+
.IP \(bu 2
|
|
207
|
+
Flags like \fR\-\-mode\f[], \fR\-\-pretty\f[], \fR\-\-no\-tables\f[], etc.
|
|
208
|
+
|
|
179
209
|
.PP
|
|
180
|
-
Later sources override earlier ones.
|
|
181
|
-
|
|
210
|
+
Later sources override earlier ones. In practice:
|
|
211
|
+
|
|
182
212
|
.IP \(bu 2
|
|
183
|
-
A document can override defaults from \
|
|
184
|
-
|
|
213
|
+
A document can override defaults from \fRconfig.yml\f[] or \fR\-\-meta\-file\f[]
|
|
214
|
+
|
|
185
215
|
.IP \(bu 2
|
|
186
|
-
\
|
|
216
|
+
\fR\-\-meta\f[] values can override both document and file metadata
|
|
217
|
+
|
|
187
218
|
.IP \(bu 2
|
|
188
219
|
Explicit CLI flags still behave as final overrides where applicable
|
|
220
|
+
|
|
189
221
|
.PP
|
|
190
|
-
\f[B]Note:\f[
|
|
191
|
-
|
|
192
|
-
applying other metadata keys, so the mode behaves as if you had passed
|
|
193
|
-
it on the command line first.
|
|
222
|
+
\f[B]Note:\f[] If \fRmode\f[] is specified in metadata (file or document), Apex resets options to that mode’s defaults before applying other metadata keys, so the mode behaves as if you had passed it on the command line first.
|
|
223
|
+
|
|
194
224
|
.SH CONFIGURATION KEYS
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
\f[
|
|
225
|
+
|
|
226
|
+
.PP
|
|
227
|
+
Configuration keys correspond closely to Apex command\-line options. Most options can be controlled via metadata in \fRconfig.yml\f[], \fR\-\-meta\-file\f[] files, or per\-document metadata.
|
|
228
|
+
|
|
198
229
|
.SS Boolean options
|
|
230
|
+
|
|
231
|
+
.PP
|
|
199
232
|
Boolean keys accept any of the following values (case\-insensitive):
|
|
233
|
+
|
|
200
234
|
.IP \(bu 2
|
|
201
|
-
\
|
|
235
|
+
\fRtrue\f[] / \fRfalse\f[]
|
|
236
|
+
|
|
202
237
|
.IP \(bu 2
|
|
203
|
-
\
|
|
238
|
+
\fRyes\f[] / \fRno\f[]
|
|
239
|
+
|
|
204
240
|
.IP \(bu 2
|
|
205
|
-
\
|
|
241
|
+
\fR1\f[] / \fR0\f[]
|
|
242
|
+
|
|
206
243
|
.PP
|
|
207
|
-
\f[B]Supported boolean keys include:\f[
|
|
244
|
+
\f[B]Supported boolean keys include:\f[]
|
|
245
|
+
|
|
208
246
|
.IP \(bu 2
|
|
209
|
-
\
|
|
247
|
+
\fRindices\f[] \- Enable index processing
|
|
248
|
+
|
|
249
|
+
.IP \(bu 2
|
|
250
|
+
\fRwikilinks\f[] \- Enable wiki link syntax (\fR[[Page]]\f[])
|
|
251
|
+
|
|
252
|
+
.IP \(bu 2
|
|
253
|
+
\fRwikilink\-sanitize\f[] \- Sanitize wiki link URLs (lowercase, remove apostrophes, clean non\-alphanumeric)
|
|
254
|
+
|
|
210
255
|
.IP \(bu 2
|
|
211
|
-
\
|
|
256
|
+
\fRincludes\f[] \- Enable file inclusion
|
|
257
|
+
|
|
212
258
|
.IP \(bu 2
|
|
213
|
-
\
|
|
259
|
+
\fRrelaxed\-tables\f[] \- Enable relaxed table parsing
|
|
260
|
+
|
|
214
261
|
.IP \(bu 2
|
|
215
|
-
\
|
|
262
|
+
\fRalpha\-lists\f[] \- Enable alphabetic list markers
|
|
263
|
+
|
|
264
|
+
.IP \(bu 2
|
|
265
|
+
\fRmixed\-lists\f[] \- Allow mixing list marker types at the same level
|
|
266
|
+
|
|
216
267
|
.IP \(bu 2
|
|
217
|
-
\
|
|
268
|
+
\fRsup\-sub\f[] \- Enable MultiMarkdown\-style superscript/subscript
|
|
269
|
+
|
|
218
270
|
.IP \(bu 2
|
|
219
|
-
\
|
|
220
|
-
|
|
271
|
+
\fRautolink\f[] \- Enable automatic URL/email linking
|
|
272
|
+
|
|
221
273
|
.IP \(bu 2
|
|
222
|
-
\
|
|
274
|
+
\fRtransforms\f[] \- Enable metadata transforms (\fR[%key:transform]\f[])
|
|
275
|
+
|
|
223
276
|
.IP \(bu 2
|
|
224
|
-
\
|
|
277
|
+
\fRunsafe\f[] \- Allow raw HTML in output
|
|
278
|
+
|
|
225
279
|
.IP \(bu 2
|
|
226
|
-
\
|
|
227
|
-
|
|
280
|
+
\fRtables\f[] \- Enable/disable table support
|
|
281
|
+
|
|
228
282
|
.IP \(bu 2
|
|
229
|
-
\
|
|
283
|
+
\fRfootnotes\f[] \- Enable/disable footnote support
|
|
284
|
+
|
|
230
285
|
.IP \(bu 2
|
|
231
|
-
\
|
|
286
|
+
\fRsmart\f[] \- Enable/disable smart typography
|
|
287
|
+
|
|
232
288
|
.IP \(bu 2
|
|
233
|
-
\
|
|
289
|
+
\fRmath\f[] \- Enable/disable math support
|
|
290
|
+
|
|
234
291
|
.IP \(bu 2
|
|
235
|
-
\
|
|
292
|
+
\fRids\f[] \- Enable/disable automatic header IDs
|
|
293
|
+
|
|
236
294
|
.IP \(bu 2
|
|
237
|
-
\f[
|
|
295
|
+
\fRheader\-anchors\f[] \- Use \fR<a>\f[] anchors instead of plain \fRid\f[] attributes
|
|
296
|
+
|
|
238
297
|
.IP \(bu 2
|
|
239
|
-
\
|
|
298
|
+
\fRembed\-images\f[] \- Enable base64 image embedding
|
|
299
|
+
|
|
240
300
|
.IP \(bu 2
|
|
241
|
-
\
|
|
242
|
-
|
|
301
|
+
\fRlink\-citations\f[] \- Link citations to bibliography entries
|
|
302
|
+
|
|
243
303
|
.IP \(bu 2
|
|
244
|
-
\
|
|
304
|
+
\fRshow\-tooltips\f[] \- Add tooltips to citations
|
|
305
|
+
|
|
245
306
|
.IP \(bu 2
|
|
246
|
-
\
|
|
307
|
+
\fRsuppress\-bibliography\f[] \- Suppress bibliography output
|
|
308
|
+
|
|
247
309
|
.IP \(bu 2
|
|
248
|
-
\
|
|
310
|
+
\fRsuppress\-index\f[] \- Suppress index output while still creating markers
|
|
311
|
+
|
|
249
312
|
.IP \(bu 2
|
|
250
|
-
\
|
|
313
|
+
\fRgroup\-index\-by\-letter\f[] \- Group index entries alphabetically
|
|
314
|
+
|
|
251
315
|
.IP \(bu 2
|
|
252
|
-
\f[
|
|
253
|
-
|
|
316
|
+
\fRobfuscate\-emails\f[] \- Hex\-encode \fRmailto:\f[] links and visible email addresses
|
|
317
|
+
|
|
254
318
|
.IP \(bu 2
|
|
255
|
-
\
|
|
256
|
-
|
|
319
|
+
\fRpretty\f[] \- Pretty\-print HTML
|
|
320
|
+
|
|
257
321
|
.IP \(bu 2
|
|
258
|
-
\f[
|
|
259
|
-
|
|
322
|
+
\fRstandalone\f[] \- Generate a full HTML document (\fR<html>\f[], \fR<head>\f[], \fR<body>\f[])
|
|
323
|
+
|
|
260
324
|
.IP \(bu 2
|
|
261
|
-
\
|
|
325
|
+
\fRhardbreaks\f[] \- Treat newlines as \fR<br>\f[]
|
|
326
|
+
|
|
262
327
|
.IP \(bu 2
|
|
263
|
-
\
|
|
264
|
-
|
|
328
|
+
\fRplugins\f[] \- Enable plugin processing (see \f[B]apex\-plugins\f[](7))
|
|
329
|
+
|
|
265
330
|
.IP \(bu 2
|
|
266
|
-
\
|
|
331
|
+
\fRcode\-line\-numbers\f[] \- Include line numbers in syntax\-highlighted code blocks
|
|
332
|
+
|
|
267
333
|
.IP \(bu 2
|
|
268
|
-
\
|
|
269
|
-
|
|
334
|
+
\fRhighlight\-language\-only\f[] \- Only highlight code blocks that have a language specified
|
|
335
|
+
|
|
270
336
|
.SS String options
|
|
271
|
-
|
|
272
|
-
|
|
337
|
+
|
|
338
|
+
.PP
|
|
339
|
+
String keys take a free\-form string value (sometimes with a constrained set of options):
|
|
340
|
+
|
|
273
341
|
.IP \(bu 2
|
|
274
|
-
\
|
|
275
|
-
|
|
342
|
+
\fRmode\f[]
|
|
343
|
+
|
|
276
344
|
.IP \(bu 2
|
|
277
|
-
Values: \f[
|
|
278
|
-
|
|
279
|
-
\f[CR]unified\f[R]
|
|
280
|
-
.RE
|
|
345
|
+
Values: \fRcommonmark\f[], \fRgfm\f[], \fRmmd\f[]/\fRmultimarkdown\f[], \fRkramdown\f[], \fRunified\f[]
|
|
346
|
+
|
|
281
347
|
.IP \(bu 2
|
|
282
|
-
\
|
|
283
|
-
|
|
348
|
+
\fRid\-format\f[]
|
|
349
|
+
|
|
284
350
|
.IP \(bu 2
|
|
285
|
-
Values: \
|
|
286
|
-
|
|
351
|
+
Values: \fRgfm\f[], \fRmmd\f[], \fRkramdown\f[]
|
|
352
|
+
|
|
287
353
|
.IP \(bu 2
|
|
288
|
-
\
|
|
289
|
-
|
|
354
|
+
\fRtitle\f[]
|
|
355
|
+
|
|
290
356
|
.IP \(bu 2
|
|
291
357
|
Document title (used especially in standalone mode)
|
|
292
|
-
|
|
358
|
+
|
|
293
359
|
.IP \(bu 2
|
|
294
|
-
\
|
|
295
|
-
|
|
360
|
+
\fRstyle\f[] / \fRcss\f[]
|
|
361
|
+
|
|
296
362
|
.IP \(bu 2
|
|
297
363
|
Stylesheet path for standalone documents
|
|
298
|
-
|
|
364
|
+
|
|
299
365
|
.IP \(bu 2
|
|
300
|
-
\
|
|
301
|
-
|
|
366
|
+
\fRbase\-dir\f[]
|
|
367
|
+
|
|
302
368
|
.IP \(bu 2
|
|
303
|
-
Base directory used for resolving relative paths (images, includes,
|
|
304
|
-
|
|
305
|
-
.RE
|
|
369
|
+
Base directory used for resolving relative paths (images, includes, etc.)
|
|
370
|
+
|
|
306
371
|
.IP \(bu 2
|
|
307
|
-
\
|
|
308
|
-
|
|
372
|
+
\fRbibliography\f[]
|
|
373
|
+
|
|
309
374
|
.IP \(bu 2
|
|
310
|
-
Path to a bibliography file (\f[
|
|
311
|
-
|
|
312
|
-
.RE
|
|
375
|
+
Path to a bibliography file (\fR.bib\f[], \fR.json\f[], \fR.yml\f[], \fR.yaml\f[])
|
|
376
|
+
|
|
313
377
|
.IP \(bu 2
|
|
314
|
-
\
|
|
315
|
-
|
|
378
|
+
\fRcsl\f[]
|
|
379
|
+
|
|
316
380
|
.IP \(bu 2
|
|
317
381
|
Path to a CSL style file
|
|
318
|
-
|
|
382
|
+
|
|
319
383
|
.IP \(bu 2
|
|
320
|
-
\
|
|
321
|
-
|
|
384
|
+
\fRlanguage\f[]
|
|
385
|
+
|
|
386
|
+
.IP \(bu 2
|
|
387
|
+
BCP 47 or similar language tag (e.g. \fRen\f[], \fRen\-US\f[], \fRfr\f[]); sets the HTML \fRlang\f[] attribute
|
|
388
|
+
|
|
389
|
+
.IP \(bu 2
|
|
390
|
+
\fRquoteslanguage\f[] / \fRQuotes Language\f[]
|
|
391
|
+
|
|
322
392
|
.IP \(bu 2
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
.RE
|
|
393
|
+
Human\-readable language name used for quote styling (e.g. \fRenglish\f[], \fRfrench\f[], \fRgerman\f[])
|
|
394
|
+
|
|
326
395
|
.IP \(bu 2
|
|
327
|
-
\
|
|
328
|
-
|
|
396
|
+
\fRcode\-highlight\f[]
|
|
397
|
+
|
|
329
398
|
.IP \(bu 2
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
.RE
|
|
399
|
+
External syntax highlighting tool: \fRpygments\f[] (or \fRp\f[]/\fRpyg\f[]), \fRskylighting\f[] (or \fRs\f[]/\fRsky\f[]), or \fRfalse\f[]/\fRnone\f[] to disable
|
|
400
|
+
|
|
333
401
|
.PP
|
|
334
|
-
You can also use arbitrary keys for your own templates and transforms;
|
|
335
|
-
|
|
336
|
-
referenced via \f[CR][%key]\f[R] and \f[CR][%key:transform]\f[R].
|
|
402
|
+
You can also use arbitrary keys for your own templates and transforms; Apex simply passes them through to the metadata system so they can be referenced via \fR[%key]\f[] and \fR[%key:transform]\f[].
|
|
403
|
+
|
|
337
404
|
.SH EXAMPLES
|
|
405
|
+
|
|
406
|
+
.PP
|
|
338
407
|
A typical setup might look like this:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
writing style and locale.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
bibliography and project\-specific settings.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
to the defaults.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
(e.g
|
|
408
|
+
|
|
409
|
+
.IP "1." 4
|
|
410
|
+
\f[B]Global defaults\f[] in \fRconfig.yml\f[] for your overall writing style and locale.
|
|
411
|
+
|
|
412
|
+
.IP "2." 4
|
|
413
|
+
\f[B]Project config\f[] via \fR\-\-meta\-file project.yml\f[] for bibliography and project\-specific settings.
|
|
414
|
+
|
|
415
|
+
.IP "3." 4
|
|
416
|
+
\f[B]Per\-document metadata\f[] for title, author, and any exceptions to the defaults.
|
|
417
|
+
|
|
418
|
+
.IP "4." 4
|
|
419
|
+
Occasional \f[B]CLI overrides\f[] for ad\-hoc one\-off changes (e.g. \fR\-\-mode gfm\f[] for a specific run).
|
|
420
|
+
|
|
351
421
|
.PP
|
|
352
|
-
Because all three configuration layers use the same metadata keys, you
|
|
353
|
-
|
|
422
|
+
Because all three configuration layers use the same metadata keys, you can gradually refine behavior without repeating yourself:
|
|
423
|
+
|
|
354
424
|
.IP \(bu 2
|
|
355
|
-
Put long\-lived, cross\-project settings in \
|
|
425
|
+
Put long\-lived, cross\-project settings in \fRconfig.yml\f[]
|
|
426
|
+
|
|
356
427
|
.IP \(bu 2
|
|
357
|
-
Put project\-scoped settings in \
|
|
428
|
+
Put project\-scoped settings in \fR\-\-meta\-file\f[] configs
|
|
429
|
+
|
|
358
430
|
.IP \(bu 2
|
|
359
431
|
Put document\-specific settings in front matter
|
|
432
|
+
|
|
360
433
|
.SH SEE ALSO
|
|
361
|
-
|
|
434
|
+
|
|
435
|
+
.PP
|
|
436
|
+
\f[B]apex\f[](1), \f[B]apex\-plugins\f[](7)
|
|
437
|
+
|
|
362
438
|
.PP
|
|
363
|
-
For complete documentation, see the
|
|
364
|
-
|
|
365
|
-
Apex Wiki
|
|
366
|
-
.UE \c
|
|
367
|
-
\&.
|
|
439
|
+
For complete documentation, see the Apex Wiki (https://github.com/ttscoff/apex/wiki).
|
|
440
|
+
|
|
368
441
|
.SH AUTHOR
|
|
442
|
+
|
|
443
|
+
.PP
|
|
369
444
|
Brett Terpstra
|
|
445
|
+
|
|
370
446
|
.SH COPYRIGHT
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
.
|
|
374
|
-
Brett Terpstra.
|
|
447
|
+
|
|
448
|
+
.PP
|
|
449
|
+
Copyright (c) 2025 Brett Terpstra. Licensed under MIT License.
|