apex-ruby 1.0.6 → 1.0.8
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,678 +1,748 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.TH "APEX" "1" "December 2025" ""
|
|
1
|
+
.TH "NAME" "1" "1 January 1970" ""
|
|
2
|
+
|
|
4
3
|
.SH NAME
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
.PP
|
|
6
|
+
apex \- Unified Markdown processor supporting CommonMark, GFM, MultiMarkdown, and Kramdown
|
|
7
|
+
|
|
7
8
|
.SH SYNOPSIS
|
|
8
|
-
|
|
9
|
+
|
|
9
10
|
.PP
|
|
10
|
-
\f[B]apex\f[
|
|
11
|
+
\f[B]apex\f[] [\f[I]options\f[]] [\f[I]file\f[]]
|
|
12
|
+
|
|
11
13
|
.PP
|
|
12
|
-
\f[B]apex\f[
|
|
14
|
+
\f[B]apex\f[] \-\-combine [\f[I]files\f[]…]
|
|
15
|
+
|
|
16
|
+
.PP
|
|
17
|
+
\f[B]apex\f[] \-\-mmd\-merge [\f[I]index files\f[]…]
|
|
18
|
+
|
|
13
19
|
.SH DESCRIPTION
|
|
14
|
-
|
|
15
|
-
from CommonMark, GitHub Flavored Markdown (GFM), MultiMarkdown,
|
|
16
|
-
Kramdown, and Marked.
|
|
17
|
-
One processor to rule them all.
|
|
20
|
+
|
|
18
21
|
.PP
|
|
19
|
-
|
|
22
|
+
Apex is a unified Markdown processor that combines the best features from CommonMark, GitHub Flavored Markdown (GFM), MultiMarkdown, Kramdown, and Marked. One processor to rule them all.
|
|
23
|
+
|
|
24
|
+
.PP
|
|
25
|
+
If no file is specified, \f[B]apex\f[] reads from stdin.
|
|
26
|
+
|
|
20
27
|
.SH OPTIONS
|
|
28
|
+
|
|
21
29
|
.SS Processing Modes
|
|
30
|
+
|
|
22
31
|
.TP
|
|
23
|
-
\f[B]\-m\f[
|
|
24
|
-
Processor mode: \f[B]commonmark\f[
|
|
25
|
-
\f[B]multimarkdown\f[
|
|
26
|
-
|
|
27
|
-
Each mode enables different features and syntax compatibility.
|
|
32
|
+
\f[B]\-m\f[] MODE, \f[B]\-\-mode\f[] MODE
|
|
33
|
+
Processor mode: \f[B]commonmark\f[], \f[B]gfm\f[], \f[B]mmd\f[] (or
|
|
34
|
+
\f[B]multimarkdown\f[]), \f[B]kramdown\f[], or \f[B]unified\f[] (default). Each mode enables different features and syntax compatibility.
|
|
35
|
+
|
|
28
36
|
.SS Input/Output
|
|
37
|
+
|
|
29
38
|
.TP
|
|
30
|
-
\f[B]\-o\f[
|
|
31
|
-
Write output to
|
|
39
|
+
\f[B]\-o\f[] FILE, \f[B]\-\-output\f[] FILE
|
|
40
|
+
Write output to FILE instead of stdout.
|
|
41
|
+
|
|
32
42
|
.TP
|
|
33
|
-
\f[B]\-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
\f[B]\-t\f[] FORMAT, \f[B]\-\-to\f[] FORMAT
|
|
44
|
+
Output format: \f[B]html\f[] (default), \f[B]json\f[] (before filters), \f[B]json\-filtered\f[]/\f[B]ast\-json\f[]/\f[B]ast\f[] (after filters), \f[B]markdown\f[]/\f[B]md\f[], \f[B]mmd\f[], \f[B]commonmark\f[]/\f[B]cmark\f[], \f[B]kramdown\f[], \f[B]gfm\f[], \f[B]terminal\f[]/\f[B]cli\f[], \f[B]terminal256\f[], \f[B]man\f[], \f[B]man\-html\f[].
|
|
45
|
+
|
|
46
|
+
.TP
|
|
47
|
+
\f[B]\-s\f[], \f[B]\-\-standalone\f[]
|
|
48
|
+
Generate complete HTML document with \fR<html>\f[], \fR<head>\f[],
|
|
49
|
+
and \fR<body>\f[] tags.
|
|
50
|
+
|
|
36
51
|
.TP
|
|
37
|
-
\f[B]\
|
|
52
|
+
\f[B]\-\-style\f[] FILE, \f[B]\-\-css\f[] FILE
|
|
38
53
|
Link to CSS file(s) in document head (requires
|
|
39
|
-
\f[B]\(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
\f[
|
|
43
|
-
|
|
44
|
-
.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.TP
|
|
51
|
-
\f[B]
|
|
54
|
+
\f[B]\-\-standalone\f[]). Can be used multiple times or accept comma\-separated list (e.g., \fR\-\-css style.css \-\-css syntax.css\f[] or \fR\-\-css style.css,syntax.css\f[]). Overrides CSS metadata if specified.
|
|
55
|
+
|
|
56
|
+
.TP
|
|
57
|
+
\f[B]\-\-embed\-css\f[]
|
|
58
|
+
When used with \f[B]\-\-css FILE\f[], read the CSS file(s) and embed
|
|
59
|
+
their contents into \fR<style>\f[] tags in the document head instead of emitting \fR<link rel="stylesheet">\f[] tags. All specified stylesheets are embedded.
|
|
60
|
+
|
|
61
|
+
.TP
|
|
62
|
+
\f[B]\-\-width\f[] N
|
|
63
|
+
Hard\-wrap terminal/terminal256 output at N visible columns.
|
|
64
|
+
|
|
65
|
+
.TP
|
|
66
|
+
\f[B]\-p\f[], \f[B]\-\-paginate\f[]
|
|
67
|
+
Page terminal/cli/terminal256 output through a pager (\fR$APEX_PAGER\f[], then \fR$PAGER\f[], then \fRless \-R\f[]).
|
|
68
|
+
|
|
69
|
+
.TP
|
|
70
|
+
\f[B]\-\-theme\f[] NAME
|
|
71
|
+
Terminal theme name for \f[B]\-t terminal\f[]/\f[B]\-t terminal256\f[].
|
|
72
|
+
|
|
73
|
+
.TP
|
|
74
|
+
|
|
75
|
+
.TP
|
|
76
|
+
\f[B]\-\-code\-highlight\f[] TOOL
|
|
52
77
|
Use external tool for syntax highlighting of code blocks.
|
|
53
|
-
\f[I]TOOL\f[
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
.TP
|
|
60
|
-
\f[B]
|
|
78
|
+
\f[I]TOOL\f[] must be \f[B]pygments\f[] (or \f[B]p\f[], \f[B]pyg\f[]) or \f[B]skylighting\f[] (or \f[B]s\f[], \f[B]sky\f[]). Code blocks are sent to the external tool with their language specifier (if present) or with auto\-detection enabled. The highlighted HTML output replaces the original code block in the document.
|
|
79
|
+
|
|
80
|
+
.TP
|
|
81
|
+
\f[B]\-\-code\-highlight\-theme\f[] THEME
|
|
82
|
+
Theme/style name for external syntax highlighters (\f[B]pygments\f[], \f[B]skylighting\f[], \f[B]shiki\f[]).
|
|
83
|
+
|
|
84
|
+
.TP
|
|
85
|
+
\f[B]\-\-code\-hilight\-theme\f[] THEME
|
|
86
|
+
Legacy alias for \f[B]\-\-code\-highlight\-theme\f[].
|
|
87
|
+
|
|
88
|
+
.TP
|
|
89
|
+
\f[B]\-\-list\-themes\f[]
|
|
90
|
+
List available syntax highlighting themes for supported external highlighters.
|
|
91
|
+
|
|
92
|
+
.TP
|
|
93
|
+
\f[B]\-\-code\-line\-numbers\f[]
|
|
61
94
|
Include line numbers in syntax\-highlighted code blocks.
|
|
62
|
-
Requires \f[B]
|
|
63
|
-
|
|
64
|
-
When used with Skylighting, adds \f[CR]\-n\f[R] flag.
|
|
95
|
+
Requires \f[B]\-\-code\-highlight\f[]. When used with Pygments, adds \fRlinenos=1\f[] option. When used with Skylighting, adds \fR\-n\f[] flag.
|
|
96
|
+
|
|
65
97
|
.TP
|
|
66
|
-
\f[B]
|
|
98
|
+
\f[B]\-\-highlight\-language\-only\f[]
|
|
67
99
|
Only apply syntax highlighting to code blocks that have a language
|
|
68
|
-
specified (via \
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
\f[
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
\f[
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
\f[CR]\-\-script mermaid,mathjax\f[R]).
|
|
82
|
-
.TP
|
|
83
|
-
\f[B]\(entitle\f[R] \f[I]TITLE\f[R]
|
|
84
|
-
Document title (requires \f[B]\(enstandalone\f[R], default:
|
|
85
|
-
\(lqDocument\(rq).
|
|
86
|
-
.TP
|
|
87
|
-
\f[B]\(enpretty\f[R]
|
|
100
|
+
specified (via \fR```language\f[] or IAL). Code blocks without a language will be left unhighlighted. Requires \f[B]\-\-code\-highlight\f[].
|
|
101
|
+
|
|
102
|
+
.TP
|
|
103
|
+
\f[B]\-\-script\f[] VALUE
|
|
104
|
+
Inject \fR<script>\f[] tags either before \fR</body>\f[] in standalone mode or at the end of the HTML fragment in snippet mode. VALUE can be a path, a URL, or one of the following shorthands: \fRmermaid\f[], \fRmathjax\f[], \fRkatex\f[], \fRhighlightjs\f[], \fRhighlight.js\f[], \fRprism\f[], \fRprismjs\f[], \fRhtmx\f[], \fRalpine\f[], \fRalpinejs\f[]. Can be used multiple times or with a comma\-separated list (e.g., \fR\-\-script mermaid,mathjax\f[]).
|
|
105
|
+
|
|
106
|
+
.TP
|
|
107
|
+
\f[B]\-\-title\f[] TITLE
|
|
108
|
+
Document title (requires \f[B]\-\-standalone\f[], default:
|
|
109
|
+
"Document").
|
|
110
|
+
|
|
111
|
+
.TP
|
|
112
|
+
\f[B]\-\-pretty\f[]
|
|
88
113
|
Pretty\-print HTML with indentation and whitespace.
|
|
114
|
+
|
|
89
115
|
.TP
|
|
90
|
-
\f[B]\
|
|
91
|
-
Add ARIA labels and accessibility attributes to HTML
|
|
92
|
-
When enabled, adds:
|
|
116
|
+
\f[B]\-\-aria\f[]
|
|
117
|
+
Add ARIA labels and accessibility attributes to HTML
|
|
118
|
+
output. When enabled, adds:
|
|
119
|
+
|
|
93
120
|
.PP
|
|
94
|
-
\
|
|
95
|
-
elements (\f[CR]<nav class=\(dqtoc\(dq>\f[R])
|
|
96
|
-
.IP
|
|
97
|
-
.EX
|
|
98
|
-
\- \(garole=\(dqfigure\(dq\(ga to \(ga<figure>\(ga elements
|
|
99
|
-
\- \(garole=\(dqtable\(dq\(ga to \(ga<table>\(ga elements
|
|
100
|
-
\- \(gaid\(ga attributes to \(ga<figcaption>\(ga elements within
|
|
121
|
+
\fRaria\-label="Table of contents"\f[] to TOC navigation elements (\fR<nav class="toc">\f[])
|
|
101
122
|
|
|
123
|
+
.PP
|
|
124
|
+
.nf
|
|
125
|
+
\fR
|
|
126
|
+
\- `role="figure"` to `<figure>` elements
|
|
127
|
+
\- `role="table"` to `<table>` elements
|
|
128
|
+
\- `id` attributes to `<figcaption>` elements within
|
|
102
129
|
table figures (if missing)
|
|
130
|
+
\- `aria\-describedby` attributes to tables linking them
|
|
131
|
+
to their captions
|
|
103
132
|
|
|
104
|
-
|
|
133
|
+
\f[]
|
|
134
|
+
.fi
|
|
105
135
|
|
|
106
|
-
to their captions
|
|
107
|
-
.EE
|
|
108
136
|
.PP
|
|
109
|
-
This enhances screen reader support and makes the HTML output more
|
|
110
|
-
|
|
111
|
-
|
|
137
|
+
This enhances screen reader support and makes the HTML output more accessible. Default: disabled.
|
|
138
|
+
|
|
139
|
+
.TP
|
|
140
|
+
|
|
112
141
|
.SS Feature Flags
|
|
142
|
+
|
|
113
143
|
.TP
|
|
114
|
-
\f[B]\
|
|
144
|
+
\f[B]\-\-accept\f[]
|
|
115
145
|
Accept all Critic Markup changes (apply edits).
|
|
146
|
+
|
|
116
147
|
.TP
|
|
117
|
-
\f[B]\
|
|
148
|
+
\f[B]\-\-reject\f[]
|
|
118
149
|
Reject all Critic Markup changes (revert edits).
|
|
150
|
+
|
|
119
151
|
.TP
|
|
120
|
-
\f[B]
|
|
152
|
+
\f[B]\-\-code\-highlight\f[] TOOL
|
|
121
153
|
Use external tool for syntax highlighting of code blocks.
|
|
122
|
-
\f[I]TOOL\f[
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
(if present) or with auto\-detection enabled.
|
|
127
|
-
The highlighted HTML output replaces the original code block in the
|
|
128
|
-
document.
|
|
129
|
-
.TP
|
|
130
|
-
\f[B]\(encode\-line\-numbers\f[R]
|
|
154
|
+
\f[I]TOOL\f[] must be \f[B]pygments\f[] (or abbreviations \f[B]p\f[], \f[B]pyg\f[]) or \f[B]skylighting\f[] (or abbreviations \f[B]s\f[], \f[B]sky\f[]). Code blocks are sent to the external tool with their language specifier (if present) or with auto\-detection enabled. The highlighted HTML output replaces the original code block in the document.
|
|
155
|
+
|
|
156
|
+
.TP
|
|
157
|
+
\f[B]\-\-code\-line\-numbers\f[]
|
|
131
158
|
Include line numbers in syntax\-highlighted code blocks.
|
|
132
|
-
Requires \f[B]
|
|
133
|
-
|
|
134
|
-
When used with Skylighting, adds \f[CR]\-n\f[R] flag.
|
|
159
|
+
Requires \f[B]\-\-code\-highlight\f[]. When used with Pygments, adds \fRlinenos=1\f[] option. When used with Skylighting, adds \fR\-n\f[] flag.
|
|
160
|
+
|
|
135
161
|
.TP
|
|
136
|
-
\f[B]
|
|
162
|
+
\f[B]\-\-highlight\-language\-only\f[]
|
|
137
163
|
Only apply syntax highlighting to code blocks that have a language
|
|
138
|
-
specified (via \
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.
|
|
146
|
-
\f[B]\
|
|
147
|
-
disable metadata variable transforms (\
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Metadata from the file is merged with document metadata, with document
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
\f[CR]\-\-meta\-file\f[R].
|
|
166
|
-
.TP
|
|
167
|
-
\f[B]\(enmeta\f[R] \f[I]KEY=VALUE\f[R]
|
|
168
|
-
Set a metadata key\-value pair.
|
|
169
|
-
Can be used multiple times.
|
|
170
|
-
Supports comma\-separated pairs (e.g.,
|
|
171
|
-
\f[CR]\-\-meta KEY1=value1,KEY2=value2\f[R]).
|
|
172
|
-
Values can be quoted to include spaces and special characters.
|
|
173
|
-
Command\-line metadata takes precedence over both file and document
|
|
174
|
-
metadata.
|
|
175
|
-
Metadata can also control command\-line options (see METADATA CONTROL OF
|
|
176
|
-
OPTIONS below).
|
|
177
|
-
.TP
|
|
178
|
-
\f[B]\(enhardbreaks\f[R]
|
|
164
|
+
specified (via \fR```language\f[] or IAL). Code blocks without a language will be left unhighlighted. Requires \f[B]\-\-code\-highlight\f[].
|
|
165
|
+
|
|
166
|
+
.TP
|
|
167
|
+
\f[B]\-\-includes\f[], \f[B]\-\-no\-includes\f[]
|
|
168
|
+
Enable or disable file inclusion. Enabled by default in
|
|
169
|
+
unified mode.
|
|
170
|
+
|
|
171
|
+
.TP
|
|
172
|
+
\f[B]\-\-transforms\f[], \f[B]\-\-no\-transforms\f[]
|
|
173
|
+
Enable or disable metadata variable transforms (\fR[%key:transform]\f[]).
|
|
174
|
+
|
|
175
|
+
.TP
|
|
176
|
+
\f[B]\-\-one\-line\-definitions\f[], \f[B]\-\-no\-one\-line\-definitions\f[]
|
|
177
|
+
Enable or disable one\-line definition list syntax (\fRTerm :: Definition\f[]).
|
|
178
|
+
|
|
179
|
+
.TP
|
|
180
|
+
|
|
181
|
+
.TP
|
|
182
|
+
\f[B]\-\-meta\-file\f[] FILE
|
|
183
|
+
Load metadata from an external file. Auto\-detects format: YAML (starts with \fR\-\-\-\f[]), MultiMarkdown (key: value pairs), or Pandoc (starts with \fR%\f[]). Metadata from the file is merged with document metadata, with document metadata taking precedence. Metadata can also control command\-line options (see METADATA CONTROL OF OPTIONS below). If no \fR\-\-meta\-file\f[] is provided, Apex will automatically load \fR$XDG_CONFIG_HOME/apex/config.yml\f[] (or \fR~/.config/apex/config.yml\f[] when \fRXDG_CONFIG_HOME\f[] is not set) if it exists, as if it were passed via \fR\-\-meta\-file\f[].
|
|
184
|
+
|
|
185
|
+
.TP
|
|
186
|
+
\f[B]\-\-meta\f[] KEY=VALUE
|
|
187
|
+
Set a metadata key\-value pair. Can be used multiple times. Supports comma\-separated pairs (e.g., \fR\-\-meta KEY1=value1,KEY2=value2\f[]). Values can be quoted to include spaces and special characters. Command\-line metadata takes precedence over both file and document metadata. Metadata can also control command\-line options (see METADATA CONTROL OF OPTIONS below).
|
|
188
|
+
|
|
189
|
+
.TP
|
|
190
|
+
\f[B]\-\-hardbreaks\f[]
|
|
179
191
|
Treat newlines as hard breaks.
|
|
192
|
+
|
|
180
193
|
.TP
|
|
181
|
-
\f[B]\
|
|
194
|
+
\f[B]\-\-widont\f[]
|
|
182
195
|
Prevent short widows in headings by inserting non\-breaking spaces
|
|
183
|
-
(
|
|
184
|
-
|
|
185
|
-
|
|
196
|
+
(` `) between trailing words when their combined length is 10
|
|
197
|
+
characters or less. Applies to h1\-h6 headings.
|
|
198
|
+
|
|
199
|
+
|
|
186
200
|
.TP
|
|
187
|
-
\f[B]
|
|
188
|
-
Treat code blocks without a language as poetry by adding the
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
\f[B]\-\-code\-is\-poetry\f[]
|
|
202
|
+
Treat code blocks without a language as poetry by adding the \fRpoetry\f[]
|
|
203
|
+
class. Automatically enables **\-\-highlight\-language\-only**.
|
|
204
|
+
|
|
205
|
+
|
|
191
206
|
.TP
|
|
192
|
-
\f[B]
|
|
207
|
+
\f[B]\-\-markdown\-in\-html\f[], \f[B]\-\-no\-markdown\-in\-html\f[]
|
|
193
208
|
Enable or disable markdown processing inside HTML blocks with
|
|
194
|
-
|
|
195
|
-
|
|
209
|
+
`markdown` attributes. Enabled by default in unified mode.
|
|
210
|
+
|
|
211
|
+
|
|
196
212
|
.TP
|
|
197
|
-
\f[B]
|
|
198
|
-
Use hash\-based footnote IDs (e.g., \
|
|
199
|
-
|
|
213
|
+
\f[B]\-\-random\-footnote\-ids\f[]
|
|
214
|
+
Use hash\-based footnote IDs (e.g., \fRfn\-a7b3c9d2\-1\f[]) instead of
|
|
215
|
+
sequential IDs to avoid collisions when combining multiple documents.
|
|
216
|
+
|
|
217
|
+
|
|
200
218
|
.TP
|
|
201
|
-
\f[B]\
|
|
202
|
-
Convert \
|
|
203
|
-
|
|
219
|
+
\f[B]\-\-hashtags\f[]
|
|
220
|
+
Convert \fR#tags\f[] into span\-wrapped hashtags with the \fRmkhashtag\f[] class.
|
|
221
|
+
|
|
204
222
|
.TP
|
|
205
|
-
\f[B]
|
|
206
|
-
Use the \
|
|
207
|
-
hashtags
|
|
208
|
-
|
|
223
|
+
\f[B]\-\-style\-hashtags\f[]
|
|
224
|
+
Use the \fRmkstyledtag\f[] class instead of \fRmkhashtag\f[] for hashtags.
|
|
225
|
+
Requires **\-\-hashtags**.
|
|
226
|
+
|
|
227
|
+
|
|
209
228
|
.TP
|
|
210
|
-
\f[B]\
|
|
211
|
-
Treat \
|
|
212
|
-
|
|
213
|
-
|
|
229
|
+
\f[B]\-\-proofreader\f[]
|
|
230
|
+
Treat \fR==highlight==\f[] and \fR~~delete~~\f[] as CriticMarkup highlight and
|
|
231
|
+
deletion syntax. Automatically enables CriticMarkup processing.
|
|
232
|
+
|
|
233
|
+
|
|
214
234
|
.TP
|
|
215
|
-
\f[B]
|
|
216
|
-
Replace \
|
|
235
|
+
\f[B]\-\-hr\-page\-break\f[]
|
|
236
|
+
Replace \fR<hr>\f[] elements with Marked\-style page break divs.
|
|
237
|
+
|
|
217
238
|
.TP
|
|
218
|
-
\f[B]
|
|
239
|
+
\f[B]\-\-title\-from\-h1\f[]
|
|
219
240
|
Use the first H1 heading as the document title when no title is
|
|
220
|
-
specified via
|
|
221
|
-
|
|
241
|
+
specified via **\-\-title** or metadata. Requires **\-\-standalone**.
|
|
242
|
+
|
|
243
|
+
|
|
222
244
|
.TP
|
|
223
|
-
\f[B]
|
|
245
|
+
\f[B]\-\-page\-break\-before\-footnotes\f[]
|
|
224
246
|
Insert a page break before the footnotes section.
|
|
247
|
+
|
|
225
248
|
.TP
|
|
226
|
-
\f[B]
|
|
249
|
+
\f[B]\-\-no\-footnotes\f[]
|
|
227
250
|
Disable footnote support.
|
|
251
|
+
|
|
228
252
|
.TP
|
|
229
|
-
\f[B]
|
|
253
|
+
\f[B]\-\-no\-math\f[]
|
|
230
254
|
Disable math support.
|
|
255
|
+
|
|
231
256
|
.TP
|
|
232
|
-
\f[B]
|
|
257
|
+
\f[B]\-\-no\-smart\f[]
|
|
233
258
|
Disable smart typography.
|
|
259
|
+
|
|
234
260
|
.TP
|
|
235
|
-
\f[B]
|
|
261
|
+
\f[B]\-\-no\-tables\f[]
|
|
236
262
|
Disable table support.
|
|
263
|
+
|
|
237
264
|
.TP
|
|
238
|
-
\f[B]
|
|
265
|
+
\f[B]\-\-no\-ids\f[]
|
|
239
266
|
Disable automatic header ID generation.
|
|
267
|
+
|
|
240
268
|
.TP
|
|
241
|
-
\f[B]
|
|
242
|
-
Generate \
|
|
269
|
+
\f[B]\-\-header\-anchors\f[]
|
|
270
|
+
Generate \fR<a>\f[] anchor tags instead of header IDs.
|
|
271
|
+
|
|
243
272
|
.TP
|
|
244
|
-
\f[B]\
|
|
245
|
-
Enable wiki link syntax \
|
|
246
|
-
|
|
273
|
+
\f[B]\-\-wikilinks\f[], \f[B]\-\-no\-wikilinks\f[]
|
|
274
|
+
Enable wiki link syntax \fR[[PageName]]\f[]. Default: disabled.
|
|
275
|
+
|
|
247
276
|
.SS Header ID Format
|
|
277
|
+
|
|
248
278
|
.TP
|
|
249
|
-
\f[B]
|
|
250
|
-
Header ID format: \f[B]gfm\f[
|
|
251
|
-
\f[B]kramdown\f[
|
|
252
|
-
|
|
279
|
+
\f[B]\-\-id\-format\f[] FORMAT
|
|
280
|
+
Header ID format: \f[B]gfm\f[] (default), \f[B]mmd\f[], or
|
|
281
|
+
\f[B]kramdown\f[]. Modes auto\-set format; use this to override in unified mode.
|
|
282
|
+
|
|
253
283
|
.SS List Options
|
|
284
|
+
|
|
254
285
|
.TP
|
|
255
|
-
\f[B]
|
|
256
|
-
Support alpha list markers (a., b., c
|
|
286
|
+
\f[B]\-\-alpha\-lists\f[], \f[B]\-\-no\-alpha\-lists\f[]
|
|
287
|
+
Support alpha list markers (a., b., c. and A., B., C.).
|
|
288
|
+
|
|
257
289
|
.TP
|
|
258
|
-
\f[B]
|
|
259
|
-
Allow mixed list markers at same level (inherit type from
|
|
290
|
+
\f[B]\-\-mixed\-lists\f[], \f[B]\-\-no\-mixed\-lists\f[]
|
|
291
|
+
Allow mixed list markers at same level (inherit type from
|
|
292
|
+
first item).
|
|
293
|
+
|
|
260
294
|
.SS Table Options
|
|
295
|
+
|
|
261
296
|
.TP
|
|
262
|
-
\f[B]
|
|
297
|
+
\f[B]\-\-relaxed\-tables\f[], \f[B]\-\-no\-relaxed\-tables\f[]
|
|
263
298
|
Enable relaxed table parsing (no separator rows required).
|
|
299
|
+
|
|
264
300
|
.TP
|
|
265
|
-
\f[B]
|
|
266
|
-
Enable per\-cell alignment markers in tables.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
\f[
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
.TP
|
|
275
|
-
\f[B]\(encaptions\f[R] \f[I]POSITION\f[R]
|
|
276
|
-
Table caption position: \f[B]above\f[R] or \f[B]below\f[R] (default:
|
|
277
|
-
\f[B]below\f[R]).
|
|
278
|
-
Controls where table captions appear relative to the table.
|
|
301
|
+
\f[B]\-\-per\-cell\-alignment\f[], \f[B]\-\-no\-per\-cell\-alignment\f[]
|
|
302
|
+
Enable per\-cell alignment markers in tables. When enabled, cells
|
|
303
|
+
starting with a colon (\fR:\f[]) are left\-aligned, ending with a colon (\fR:\f[]) are right\-aligned, or both (\fR:tent:\f[]) are center\-aligned. The colons are stripped from the output and replaced with \fRstyle="text\-align: ..."\f[] attributes. Default: enabled in unified mode, disabled in commonmark, gfm, mmd, and kramdown modes.
|
|
304
|
+
|
|
305
|
+
.TP
|
|
306
|
+
\f[B]\-\-captions\f[] POSITION
|
|
307
|
+
Table caption position: \f[B]above\f[] or \f[B]below\f[] (default:
|
|
308
|
+
\f[B]below\f[]). Controls where table captions appear relative to the table.
|
|
309
|
+
|
|
279
310
|
.SS HTML and Links
|
|
311
|
+
|
|
280
312
|
.TP
|
|
281
|
-
\f[B]\
|
|
282
|
-
Allow raw HTML in output.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
.TP
|
|
286
|
-
\f[B]\
|
|
287
|
-
Enable autolinking of URLs and email addresses.
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
.TP
|
|
291
|
-
\f[B]
|
|
292
|
-
Obfuscate email links and text using HTML entities
|
|
293
|
-
.
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
\f[B]
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
\f[
|
|
321
|
-
.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
313
|
+
\f[B]\-\-unsafe\f[], \f[B]\-\-no\-unsafe\f[]
|
|
314
|
+
Allow raw HTML in output. Default: true for
|
|
315
|
+
unified/mmd/kramdown modes, false for commonmark/gfm modes.
|
|
316
|
+
|
|
317
|
+
.TP
|
|
318
|
+
\f[B]\-\-autolink\f[], \f[B]\-\-no\-autolink\f[]
|
|
319
|
+
Enable autolinking of URLs and email addresses. Default:
|
|
320
|
+
enabled in GFM, MultiMarkdown, Kramdown, and unified modes; disabled in CommonMark mode.
|
|
321
|
+
|
|
322
|
+
.TP
|
|
323
|
+
\f[B]\-\-obfuscate\-emails\f[]
|
|
324
|
+
Obfuscate email links and text using HTML entities
|
|
325
|
+
(hex\-encoded).
|
|
326
|
+
|
|
327
|
+
.TP
|
|
328
|
+
\f[B]\-\-wikilink\-space\f[] MODE
|
|
329
|
+
Space replacement mode for wiki links:
|
|
330
|
+
|
|
331
|
+
.PP
|
|
332
|
+
\fRdash\f[] \- Convert spaces to dashes: \fR[[Home Page]]\f[] → \fRhref="Home\-Page"\f[]
|
|
333
|
+
|
|
334
|
+
.PP
|
|
335
|
+
\fRnone\f[] \- Remove spaces: \fR[[Home Page]]\f[] → \fRhref="HomePage"\f[]
|
|
336
|
+
|
|
337
|
+
.PP
|
|
338
|
+
\fRunderscore\f[] \- Convert spaces to underscores: \fR[[Home Page]]\f[] → \fRhref="Home_Page"\f[]
|
|
339
|
+
|
|
340
|
+
.PP
|
|
341
|
+
\fRspace\f[] \- Keep spaces (rendered as \fR%%20\f[] in HTML): \fR[[Home Page]]\f[] → \fRhref="Home%20Page"\f[]
|
|
342
|
+
|
|
343
|
+
.PP
|
|
344
|
+
.nf
|
|
345
|
+
\fR
|
|
346
|
+
Default: `dash`.
|
|
347
|
+
|
|
348
|
+
\f[]
|
|
349
|
+
.fi
|
|
350
|
+
|
|
351
|
+
.TP
|
|
352
|
+
\f[B]\-\-wikilink\-extension\f[] EXT
|
|
353
|
+
File extension to append to wiki link URLs (e.g. \fRhtml\f[], \fRmd\f[]).
|
|
354
|
+
|
|
355
|
+
.TP
|
|
356
|
+
\f[B]\-\-wikilink\-sanitize\f[], \f[B]\-\-no\-wikilink\-sanitize\f[]
|
|
357
|
+
Sanitize wiki link URLs for cleaner, more compatible links. When enabled:
|
|
358
|
+
|
|
325
359
|
.IP \(bu 2
|
|
326
|
-
Removes apostrophes and quotation marks (i.e
|
|
327
|
-
|
|
360
|
+
Removes apostrophes and quotation marks (i.e. removes \fR"'\e\f[]´‘’“”`)
|
|
361
|
+
|
|
328
362
|
.IP \(bu 2
|
|
329
|
-
Converts select latin\-1 characters to ASCII (e.g
|
|
363
|
+
Converts select latin\-1 characters to ASCII (e.g. e\-acute \-> e)
|
|
364
|
+
|
|
330
365
|
.IP \(bu 2
|
|
331
366
|
Converts uppercase to lowercase
|
|
367
|
+
|
|
332
368
|
.IP \(bu 2
|
|
333
|
-
Replaces non\-ascii and any non\-alphanumeric ascii characters with the
|
|
334
|
-
|
|
369
|
+
Replaces non\-ascii and any non\-alphanumeric ascii characters with the space\-mode character (except \fR/\f[] and \fR.\f[])
|
|
370
|
+
|
|
335
371
|
.IP \(bu 2
|
|
336
372
|
Removes duplicate space\-mode characters
|
|
373
|
+
|
|
337
374
|
.IP \(bu 2
|
|
338
375
|
Removes leading and trailing space\-mode characters
|
|
376
|
+
|
|
339
377
|
.PP
|
|
340
|
-
For example, with
|
|
341
|
-
|
|
378
|
+
For example, with \fR\-\-wikilink\-sanitize \-\-wikilink\-space dash\f[]:
|
|
379
|
+
|
|
342
380
|
.PP
|
|
343
|
-
\
|
|
344
|
-
|
|
381
|
+
\fR[[O'Brien's Page]]\f[] → \fRhref="obriens\-page"\f[]
|
|
382
|
+
|
|
345
383
|
.PP
|
|
346
|
-
\
|
|
384
|
+
\fR[[Hello World!!!]]\f[] → \fRhref="hello\-world"\f[]
|
|
385
|
+
|
|
347
386
|
.PP
|
|
348
|
-
\
|
|
387
|
+
\fR[[path/to/FILE.MD]]\f[] → \fRhref="path/to/file.md"\f[]
|
|
388
|
+
|
|
349
389
|
.PP
|
|
350
390
|
Default: disabled.
|
|
391
|
+
|
|
351
392
|
.SS Image Embedding
|
|
393
|
+
|
|
394
|
+
.TP
|
|
395
|
+
\f[B]\-\-embed\-images\f[]
|
|
396
|
+
Embed local images as base64 data URLs in HTML output. Only local images (file paths) are embedded; remote images (http://, https://) are not processed. Images are read from the filesystem and encoded as base64 data URLs (e.g., \fRdata:image/png;base64,...\f[]). Relative paths are resolved using the base directory (see \f[B]\-\-base\-dir\f[]).
|
|
397
|
+
|
|
398
|
+
.TP
|
|
399
|
+
\f[B]\-\-image\-captions\f[], \f[B]\-\-no\-image\-captions\f[]
|
|
400
|
+
Wrap images with title or alt text in \fR<figure>\f[] elements with \fR<figcaption>\f[]. Default: enabled in unified and MultiMarkdown modes; disabled in commonmark, gfm, and kramdown modes.
|
|
401
|
+
|
|
402
|
+
.TP
|
|
403
|
+
\f[B]\-\-title\-captions\-only\f[], \f[B]\-\-no\-title\-captions\-only\f[]
|
|
404
|
+
Only add image captions when a title attribute is present (do not use alt text as caption fallback).
|
|
405
|
+
|
|
352
406
|
.TP
|
|
353
|
-
\f[B]\
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
https://) are not processed.
|
|
357
|
-
Images are read from the filesystem and encoded as base64 data URLs
|
|
358
|
-
(e.g., \f[CR]data:image/png;base64,...\f[R]).
|
|
359
|
-
Relative paths are resolved using the base directory (see
|
|
360
|
-
\f[B]\(enbase\-dir\f[R]).
|
|
361
|
-
.TP
|
|
362
|
-
\f[B]\(enimage\-captions\f[R], \f[B]\(enno\-image\-captions\f[R]
|
|
363
|
-
Wrap images with title or alt text in \f[CR]<figure>\f[R] elements with
|
|
364
|
-
\f[CR]<figcaption>\f[R].
|
|
365
|
-
Default: enabled in unified and MultiMarkdown modes; disabled in
|
|
366
|
-
commonmark, gfm, and kramdown modes.
|
|
367
|
-
.TP
|
|
368
|
-
\f[B]\(enemoji\-autocorrect\f[R], \f[B]\(enno\-emoji\-autocorrect\f[R]
|
|
369
|
-
Convert emoji names (e.g., \f[CR]:rocket:\f[R]) to Unicode emoji
|
|
370
|
-
characters.
|
|
371
|
-
Default: enabled in unified mode; disabled in other modes.
|
|
407
|
+
\f[B]\-\-emoji\-autocorrect\f[], \f[B]\-\-no\-emoji\-autocorrect\f[]
|
|
408
|
+
Convert emoji names (e.g., \fR:rocket:\f[]) to Unicode emoji characters. Default: enabled in unified mode; disabled in other modes.
|
|
409
|
+
|
|
372
410
|
.SS Path Resolution
|
|
411
|
+
|
|
373
412
|
.TP
|
|
374
|
-
\f[B]
|
|
375
|
-
Base directory for resolving relative paths.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
.RS 2
|
|
385
|
-
.PP
|
|
386
|
-
when the working directory differs from the document location
|
|
387
|
-
.RE
|
|
388
|
-
.RE
|
|
413
|
+
\f[B]\-\-base\-dir\f[] DIR
|
|
414
|
+
Base directory for resolving relative paths. Used for:
|
|
415
|
+
\- Image embedding (with **\-\-embed\-images**)
|
|
416
|
+
\- File includes/transclusions
|
|
417
|
+
\- Relative path resolution when reading from stdin or
|
|
418
|
+
|
|
419
|
+
when the working directory differs from the document
|
|
420
|
+
location
|
|
421
|
+
|
|
422
|
+
|
|
389
423
|
.PP
|
|
390
|
-
If not specified and reading from a file, the base directory is
|
|
391
|
-
|
|
392
|
-
When reading from stdin, this flag must be used to resolve relative
|
|
393
|
-
paths.
|
|
424
|
+
If not specified and reading from a file, the base directory is automatically set to the input file’s directory. When reading from stdin, this flag must be used to resolve relative paths.
|
|
425
|
+
|
|
394
426
|
.SS Superscript/Subscript
|
|
427
|
+
|
|
395
428
|
.TP
|
|
396
|
-
\f[B]
|
|
397
|
-
Enable MultiMarkdown\-style superscript and subscript syntax.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
.
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
Default: enabled in GFM and unified modes; disabled in commonmark, mmd,
|
|
412
|
-
and kramdown modes.
|
|
413
|
-
.TP
|
|
414
|
-
\f[B]\(endivs\f[R], \f[B]\(enno\-divs\f[R]
|
|
415
|
-
Enable or disable Pandoc fenced divs syntax
|
|
416
|
-
(\f[CR]::::: {#id .class} ... :::::\f[R]).
|
|
417
|
-
Fenced divs allow you to create HTML block elements with attributes
|
|
418
|
-
using a special fence syntax.
|
|
419
|
-
By default, fenced divs create \f[CR]<div>\f[R] elements, but you can
|
|
420
|
-
specify different block types using the \f[CR]>blocktype\f[R] syntax
|
|
421
|
-
(e.g., \f[CR]::: >aside {.sidebar} ... :::\f[R] creates an
|
|
422
|
-
\f[CR]<aside>\f[R] element instead).
|
|
423
|
-
Opening fences must have at least 3 colons and attributes; closing
|
|
424
|
-
fences need at least 3 colons.
|
|
425
|
-
Fenced divs can be nested, including different block types.
|
|
426
|
-
Default: enabled in unified mode only.
|
|
427
|
-
.TP
|
|
428
|
-
\f[B]\(enspans\f[R], \f[B]\(enno\-spans\f[R]
|
|
429
|
-
Enable or disable Pandoc\-style bracketed spans syntax
|
|
430
|
-
(\f[CR][text]{#id .class key=\(dqval\(dq}\f[R]).
|
|
431
|
-
Bracketed spans allow you to create HTML \f[CR]<span>\f[R] elements with
|
|
432
|
-
attributes.
|
|
433
|
-
The text inside the brackets is processed as markdown.
|
|
434
|
-
If the bracketed text matches a reference link definition, it will be
|
|
435
|
-
treated as a link instead of a span.
|
|
436
|
-
Default: enabled in unified mode only.
|
|
429
|
+
\f[B]\-\-sup\-sub\f[], \f[B]\-\-no\-sup\-sub\f[]
|
|
430
|
+
Enable MultiMarkdown\-style superscript and subscript syntax. The \fR<sup>\f[] character creates superscript for the text immediately following it (stops at space or punctuation). The \fR~\f[] character creates subscript when used within a word/identifier (e.g., \fRH~2~O\f[] creates H₂O). When tildes are at word boundaries (e.g., \fR~text~\f[]), they create underline instead. Default: enabled in unified and MultiMarkdown modes.
|
|
431
|
+
|
|
432
|
+
.TP
|
|
433
|
+
\f[B]\-\-strikethrough\f[], \f[B]\-\-no\-strikethrough\f[]
|
|
434
|
+
Enable or disable GFM\-style strikethrough processing (\fR~~text~~\f[]). When enabled, \fR~~text~~\f[] renders as \fR<del>text</del>\f[]. Default: enabled in GFM and unified modes; disabled in commonmark, mmd, and kramdown modes.
|
|
435
|
+
|
|
436
|
+
.TP
|
|
437
|
+
\f[B]\-\-divs\f[], \f[B]\-\-no\-divs\f[]
|
|
438
|
+
Enable or disable Pandoc fenced divs syntax (\fR::::: {#id .class} ... :::::\f[]). Fenced divs allow you to create HTML block elements with attributes using a special fence syntax. By default, fenced divs create \fR<div>\f[] elements, but you can specify different block types using the \fR>blocktype\f[] syntax (e.g., \fR::: >aside {.sidebar} ... :::\f[] creates an \fR<aside>\f[] element instead). Opening fences must have at least 3 colons and attributes; closing fences need at least 3 colons. Fenced divs can be nested, including different block types. Default: enabled in unified mode only.
|
|
439
|
+
|
|
440
|
+
.TP
|
|
441
|
+
\f[B]\-\-spans\f[], \f[B]\-\-no\-spans\f[]
|
|
442
|
+
Enable or disable Pandoc\-style bracketed spans syntax (\fR[text]{#id .class key="val"}\f[]). Bracketed spans allow you to create HTML \fR<span>\f[] elements with attributes. The text inside the brackets is processed as markdown. If the bracketed text matches a reference link definition, it will be treated as a link instead of a span. Default: enabled in unified mode only.
|
|
443
|
+
|
|
437
444
|
.SS Citations and Bibliography
|
|
445
|
+
|
|
438
446
|
.TP
|
|
439
|
-
\f[B]\
|
|
447
|
+
\f[B]\-\-bibliography\f[] FILE
|
|
440
448
|
Bibliography file in BibTeX, CSL JSON, or CSL YAML format.
|
|
441
|
-
Can be specified multiple times to load multiple bibliography files.
|
|
442
|
-
|
|
443
|
-
Bibliography can also be specified in document metadata.
|
|
449
|
+
Can be specified multiple times to load multiple bibliography files. Citations are automatically enabled when this option is used. Bibliography can also be specified in document metadata.
|
|
450
|
+
|
|
444
451
|
.TP
|
|
445
|
-
\f[B]\
|
|
446
|
-
Citation Style Language (CSL) file for formatting
|
|
447
|
-
bibliography.
|
|
448
|
-
|
|
449
|
-
CSL file can also be specified in document metadata.
|
|
452
|
+
\f[B]\-\-csl\f[] FILE
|
|
453
|
+
Citation Style Language (CSL) file for formatting
|
|
454
|
+
citations and bibliography. Citations are automatically enabled when this option is used. CSL file can also be specified in document metadata.
|
|
455
|
+
|
|
450
456
|
.TP
|
|
451
|
-
\f[B]
|
|
452
|
-
Suppress bibliography output even when citations are
|
|
457
|
+
\f[B]\-\-no\-bibliography\f[]
|
|
458
|
+
Suppress bibliography output even when citations are
|
|
459
|
+
present.
|
|
460
|
+
|
|
453
461
|
.TP
|
|
454
|
-
\f[B]
|
|
455
|
-
Link citations to their corresponding bibliography
|
|
456
|
-
Citations will include \
|
|
457
|
-
|
|
462
|
+
\f[B]\-\-link\-citations\f[]
|
|
463
|
+
Link citations to their corresponding bibliography
|
|
464
|
+
entries. Citations will include \fRhref\f[] attributes pointing to the bibliography entry.
|
|
465
|
+
|
|
458
466
|
.TP
|
|
459
|
-
\f[B]
|
|
460
|
-
Show tooltips on citations when hovering (requires CSS
|
|
467
|
+
\f[B]\-\-show\-tooltips\f[]
|
|
468
|
+
Show tooltips on citations when hovering (requires CSS
|
|
469
|
+
support).
|
|
470
|
+
|
|
461
471
|
.PP
|
|
462
472
|
Citation syntax is supported in MultiMarkdown and unified modes:
|
|
473
|
+
|
|
463
474
|
.IP \(bu 2
|
|
464
|
-
Pandoc: \
|
|
465
|
-
|
|
475
|
+
Pandoc: \fR[@key]\f[], \fR[@key1; @key2]\f[], \fR@key\f[]
|
|
476
|
+
|
|
466
477
|
.IP \(bu 2
|
|
467
|
-
MultiMarkdown: \
|
|
478
|
+
MultiMarkdown: \fR[#key]\f[]
|
|
479
|
+
|
|
468
480
|
.IP \(bu 2
|
|
469
|
-
mmark: \
|
|
481
|
+
mmark: \fR[@RFC1234]\f[]
|
|
482
|
+
|
|
470
483
|
.PP
|
|
471
|
-
Bibliography is inserted at the \
|
|
472
|
-
|
|
484
|
+
Bibliography is inserted at the \fR<!\-\- REFERENCES \-\->\f[] marker or appended to the end of the document if no marker is found.
|
|
485
|
+
|
|
473
486
|
.SS Indices
|
|
487
|
+
|
|
474
488
|
.TP
|
|
475
|
-
\f[B]\
|
|
476
|
-
Enable index processing.
|
|
477
|
-
|
|
478
|
-
|
|
489
|
+
\f[B]\-\-indices\f[]
|
|
490
|
+
Enable index processing. Supports both mmark and TextIndex
|
|
491
|
+
syntax. Default: enabled in MultiMarkdown and unified modes.
|
|
492
|
+
|
|
479
493
|
.TP
|
|
480
|
-
\f[B]
|
|
494
|
+
\f[B]\-\-no\-indices\f[]
|
|
481
495
|
Disable index processing.
|
|
496
|
+
|
|
482
497
|
.TP
|
|
483
|
-
\f[B]
|
|
498
|
+
\f[B]\-\-no\-index\f[]
|
|
484
499
|
Suppress index generation at the end of the document.
|
|
485
|
-
Index markers are still created in the document, but the index section
|
|
486
|
-
|
|
500
|
+
Index markers are still created in the document, but the index section is not generated.
|
|
501
|
+
|
|
487
502
|
.PP
|
|
488
503
|
Index syntax is supported in MultiMarkdown and unified modes:
|
|
504
|
+
|
|
489
505
|
.IP \(bu 2
|
|
490
|
-
\f[B]mmark syntax\f[
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
.PP
|
|
494
|
-
subitem)\(ga for primary entries
|
|
495
|
-
.RE
|
|
506
|
+
\f[B]mmark syntax\f[]: \fR(!item)\f[], \fR(!item, subitem)\f[], `(!!item,
|
|
507
|
+
subitem)` for primary entries
|
|
508
|
+
|
|
496
509
|
.IP \(bu 2
|
|
497
|
-
\f[B]TextIndex syntax\f[
|
|
498
|
-
|
|
510
|
+
\f[B]TextIndex syntax\f[]: \fRword{^}\f[], \fR[term]{^}\f[], \fR{^params}\f[]
|
|
511
|
+
|
|
499
512
|
.PP
|
|
500
|
-
The index is automatically generated at the end of the document or at
|
|
501
|
-
|
|
502
|
-
|
|
513
|
+
The index is automatically generated at the end of the document or at the \fR<!\-\-INDEX\-\->\f[] marker if present. Entries are sorted alphabetically and can be grouped by first letter.
|
|
514
|
+
|
|
515
|
+
.SS AST Filters
|
|
516
|
+
|
|
517
|
+
.TP
|
|
518
|
+
\f[B]\-\-filter\f[] NAME
|
|
519
|
+
Run a single AST filter from the user filters directory
|
|
520
|
+
(\fR$XDG_CONFIG_HOME/apex/filters\f[] or \fR~/.config/apex/filters\f[]). \f[I]NAME\f[] is the basename of an executable that reads Pandoc JSON from stdin and writes Pandoc JSON to stdout.
|
|
521
|
+
|
|
522
|
+
.TP
|
|
523
|
+
\f[B]\-\-filters\f[]
|
|
524
|
+
Run all executable files in the user filters directory, in sorted
|
|
525
|
+
filename order. Directory filters run first if \f[B]\-\-filter\f[] is also used.
|
|
526
|
+
|
|
527
|
+
.TP
|
|
528
|
+
\f[B]\-\-lua\-filter\f[] FILE
|
|
529
|
+
Run a Lua script as an AST filter. Apex invokes the system \f[B]lua\f[]
|
|
530
|
+
interpreter with \f[I]FILE\f[]. The script reads a Pandoc JSON document from stdin and must write a Pandoc JSON document to stdout. A JSON library (e.g. dkjson) is required; see the Filters documentation for details.
|
|
531
|
+
|
|
532
|
+
.TP
|
|
533
|
+
\f[B]\-\-no\-strict\-filters\f[]
|
|
534
|
+
Do not abort when a filter fails or returns invalid JSON; log a
|
|
535
|
+
warning and continue with the previous AST. Default: abort on error.
|
|
536
|
+
|
|
537
|
+
.TP
|
|
538
|
+
\f[B]\-\-list\-filters\f[]
|
|
539
|
+
List installed filters and available filters from the central
|
|
540
|
+
apex\-filters directory. Shows filter IDs; available filters show title, author, description, and homepage.
|
|
541
|
+
|
|
542
|
+
.TP
|
|
543
|
+
\f[B]\-\-install\-filter\f[] ID\-or\-URL
|
|
544
|
+
Install an AST filter into the user filters directory. ID\-or\-URL
|
|
545
|
+
may be a filter ID from the central apex\-filters directory (e.g. \f[B]unwrap\f[]) or a Git URL / GitHub shorthand. When installing from a URL, Apex may prompt for confirmation.
|
|
546
|
+
|
|
547
|
+
.TP
|
|
548
|
+
\f[B]\-\-uninstall\-filter\f[] ID
|
|
549
|
+
Uninstall a filter by ID. Removes the filter (file or directory)
|
|
550
|
+
from the user filters directory. Apex prompts for confirmation.
|
|
551
|
+
|
|
503
552
|
.SS Plugins
|
|
553
|
+
|
|
504
554
|
.TP
|
|
505
|
-
\f[B]\
|
|
506
|
-
Enable or disable external/plugin processing.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
installation from the Apex plugin directory.
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
shorthand (user/repo).
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
\f[B]\(enuninstall\-plugin\f[R] \f[I]ID\f[R]
|
|
524
|
-
Uninstall a plugin by ID.
|
|
525
|
-
Removes the plugin directory from the plugins folder.
|
|
526
|
-
Apex will prompt for confirmation before removing the plugin.
|
|
555
|
+
\f[B]\-\-plugins\f[], \f[B]\-\-no\-plugins\f[]
|
|
556
|
+
Enable or disable external/plugin processing. Plugins
|
|
557
|
+
extend Apex with custom processing capabilities.
|
|
558
|
+
|
|
559
|
+
.TP
|
|
560
|
+
\f[B]\-\-list\-plugins\f[]
|
|
561
|
+
List installed plugins and available plugins from the
|
|
562
|
+
remote directory. Shows both locally installed plugins and plugins available for installation from the Apex plugin directory.
|
|
563
|
+
|
|
564
|
+
.TP
|
|
565
|
+
\f[B]\-\-install\-plugin\f[] ID
|
|
566
|
+
Install a plugin by ID from the remote directory, or by Git URL/GitHub shorthand (user/repo). Plugins are installed to \fR$XDG_CONFIG_HOME/apex/plugins\f[] (or \fR~/.config/apex/plugins\f[] when \fRXDG_CONFIG_HOME\f[] is not set). When installing from a URL or GitHub shorthand, Apex will prompt for confirmation since plugins execute unverified code.
|
|
567
|
+
|
|
568
|
+
.TP
|
|
569
|
+
\f[B]\-\-uninstall\-plugin\f[] ID
|
|
570
|
+
Uninstall a plugin by ID. Removes the plugin directory
|
|
571
|
+
from the plugins folder. Apex will prompt for confirmation before removing the plugin.
|
|
572
|
+
|
|
527
573
|
.SS General Options
|
|
574
|
+
|
|
528
575
|
.TP
|
|
529
|
-
\f[B]\-h\f[
|
|
576
|
+
\f[B]\-h\f[], \f[B]\-\-help\f[]
|
|
530
577
|
Show help message and exit.
|
|
578
|
+
|
|
531
579
|
.TP
|
|
532
|
-
\f[B]\-v\f[
|
|
580
|
+
\f[B]\-v\f[], \f[B]\-\-version\f[]
|
|
533
581
|
Show version information and exit.
|
|
582
|
+
|
|
534
583
|
.TP
|
|
535
|
-
\f[B]\
|
|
536
|
-
Show progress indicator during processing.
|
|
537
|
-
|
|
584
|
+
\f[B]\-\-progress\f[], \f[B]\-\-no\-progress\f[]
|
|
585
|
+
Show progress indicator during processing. Default: enabled when stderr is a TTY.
|
|
586
|
+
|
|
538
587
|
.SS Multi\-file Utilities
|
|
588
|
+
|
|
589
|
+
.TP
|
|
590
|
+
\f[B]\-\-combine\f[] files…
|
|
591
|
+
Concatenate one or more Markdown files into a single
|
|
592
|
+
Markdown stream, expanding all supported include syntaxes. When a \fRSUMMARY.md\f[] file is provided, Apex treats it as a GitBook\-style index and combines the linked files in order. Output is raw Markdown suitable for piping back into Apex.
|
|
593
|
+
|
|
539
594
|
.TP
|
|
540
|
-
\f[B]\
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
GitBook\-style index and combines the linked files in order.
|
|
545
|
-
Output is raw Markdown suitable for piping back into Apex.
|
|
546
|
-
.TP
|
|
547
|
-
\f[B]\(enmmd\-merge\f[R] \f[I]index files\&...\f[R]
|
|
548
|
-
Merge files from one or more MultiMarkdown \f[CR]mmd_merge\f[R]\-style
|
|
549
|
-
index files into a single Markdown stream.
|
|
550
|
-
Each non\-empty, non\-comment line in an index file specifies a document
|
|
551
|
-
to include.
|
|
552
|
-
Lines whose first non\-whitespace character is \f[CR]#\f[R] are treated
|
|
553
|
-
as comments and ignored.
|
|
554
|
-
Indentation (tabs or groups of four spaces) before the filename
|
|
555
|
-
increases the header level of the included document (each indent level
|
|
556
|
-
shifts all Markdown headings in that file down one level).
|
|
557
|
-
Output is raw Markdown suitable for piping into Apex, for example:
|
|
558
|
-
.PP
|
|
559
|
-
apex \(enmmd\-merge index.txt | apex \(enmode mmd \(enstandalone \-o
|
|
560
|
-
book.html
|
|
595
|
+
\f[B]\-\-mmd\-merge\f[] index files…
|
|
596
|
+
Merge files from one or more MultiMarkdown \fRmmd_merge\f[]\-style index files into a single Markdown stream. Each non\-empty, non\-comment line in an index file specifies a document to include. Lines whose first non\-whitespace character is \fR#\f[] are treated as comments and ignored. Indentation (tabs or groups of four spaces) before the filename increases the header level of the included document (each indent level shifts all Markdown headings in that file down one level). Output is raw Markdown suitable for piping into Apex, for example:
|
|
597
|
+
apex \-\-mmd\-merge index.txt | apex \-\-mode mmd \-\-standalone \-o book.html
|
|
598
|
+
|
|
561
599
|
.SH EXAMPLES
|
|
600
|
+
|
|
601
|
+
.PP
|
|
562
602
|
Process a markdown file:
|
|
563
|
-
|
|
564
|
-
.
|
|
603
|
+
|
|
604
|
+
.PP
|
|
605
|
+
.nf
|
|
606
|
+
\fR
|
|
565
607
|
apex input.md
|
|
566
|
-
|
|
608
|
+
|
|
609
|
+
\f[]
|
|
610
|
+
.fi
|
|
611
|
+
|
|
567
612
|
.PP
|
|
568
613
|
Output to a file:
|
|
569
|
-
|
|
570
|
-
.
|
|
614
|
+
|
|
615
|
+
.PP
|
|
616
|
+
.nf
|
|
617
|
+
\fR
|
|
571
618
|
apex input.md \-o output.html
|
|
572
|
-
|
|
619
|
+
|
|
620
|
+
\f[]
|
|
621
|
+
.fi
|
|
622
|
+
|
|
573
623
|
.PP
|
|
574
624
|
Generate standalone HTML document:
|
|
575
|
-
|
|
576
|
-
.
|
|
577
|
-
|
|
578
|
-
|
|
625
|
+
|
|
626
|
+
.PP
|
|
627
|
+
.nf
|
|
628
|
+
\fR
|
|
629
|
+
apex input.md \-\-standalone \-\-title "My Document"
|
|
630
|
+
|
|
631
|
+
\f[]
|
|
632
|
+
.fi
|
|
633
|
+
|
|
579
634
|
.PP
|
|
580
635
|
Pretty\-print HTML output:
|
|
581
|
-
|
|
582
|
-
.
|
|
636
|
+
|
|
637
|
+
.PP
|
|
638
|
+
.nf
|
|
639
|
+
\fR
|
|
583
640
|
apex input.md \-\-pretty
|
|
584
|
-
|
|
641
|
+
|
|
642
|
+
\f[]
|
|
643
|
+
.fi
|
|
644
|
+
|
|
585
645
|
.PP
|
|
586
646
|
Use GFM mode:
|
|
587
|
-
|
|
588
|
-
.
|
|
647
|
+
|
|
648
|
+
.PP
|
|
649
|
+
.nf
|
|
650
|
+
\fR
|
|
589
651
|
apex input.md \-\-mode gfm
|
|
590
|
-
|
|
652
|
+
|
|
653
|
+
\f[]
|
|
654
|
+
.fi
|
|
655
|
+
|
|
591
656
|
.PP
|
|
592
657
|
Process document with citations and bibliography:
|
|
593
|
-
|
|
594
|
-
.
|
|
658
|
+
|
|
659
|
+
.PP
|
|
660
|
+
.nf
|
|
661
|
+
\fR
|
|
595
662
|
apex document.md \-\-bibliography refs.bib
|
|
596
|
-
|
|
663
|
+
|
|
664
|
+
\f[]
|
|
665
|
+
.fi
|
|
666
|
+
|
|
597
667
|
.PP
|
|
598
668
|
Use metadata to specify bibliography:
|
|
599
|
-
|
|
600
|
-
.
|
|
669
|
+
|
|
670
|
+
.PP
|
|
671
|
+
.nf
|
|
672
|
+
\fR
|
|
601
673
|
apex document.md
|
|
602
|
-
|
|
674
|
+
|
|
675
|
+
\f[]
|
|
676
|
+
.fi
|
|
677
|
+
|
|
603
678
|
.PP
|
|
604
679
|
(With bibliography specified in YAML front matter)
|
|
680
|
+
|
|
605
681
|
.PP
|
|
606
682
|
Use Kramdown mode with relaxed tables:
|
|
607
|
-
|
|
608
|
-
.
|
|
683
|
+
|
|
684
|
+
.PP
|
|
685
|
+
.nf
|
|
686
|
+
\fR
|
|
609
687
|
apex input.md \-\-mode kramdown
|
|
610
|
-
|
|
688
|
+
|
|
689
|
+
\f[]
|
|
690
|
+
.fi
|
|
691
|
+
|
|
611
692
|
.PP
|
|
612
693
|
Process from stdin:
|
|
613
|
-
|
|
614
|
-
.
|
|
615
|
-
|
|
616
|
-
|
|
694
|
+
|
|
695
|
+
.PP
|
|
696
|
+
.nf
|
|
697
|
+
\fR
|
|
698
|
+
echo "# Hello" | apex
|
|
699
|
+
|
|
700
|
+
\f[]
|
|
701
|
+
.fi
|
|
702
|
+
|
|
617
703
|
.SH PROCESSING MODES
|
|
704
|
+
|
|
618
705
|
.TP
|
|
619
|
-
\f[B]commonmark\f[
|
|
620
|
-
Pure CommonMark specification.
|
|
621
|
-
|
|
706
|
+
\f[B]commonmark\f[]
|
|
707
|
+
Pure CommonMark specification. Minimal features, maximum
|
|
708
|
+
compatibility.
|
|
709
|
+
|
|
622
710
|
.TP
|
|
623
|
-
\f[B]gfm\f[
|
|
624
|
-
GitHub Flavored Markdown.
|
|
625
|
-
|
|
711
|
+
\f[B]gfm\f[]
|
|
712
|
+
GitHub Flavored Markdown. Includes tables, strikethrough,
|
|
713
|
+
task lists, autolinks, and more.
|
|
714
|
+
|
|
626
715
|
.TP
|
|
627
|
-
\f[B]mmd\f[
|
|
628
|
-
MultiMarkdown compatibility.
|
|
629
|
-
|
|
716
|
+
\f[B]mmd\f[], \f[B]multimarkdown\f[]
|
|
717
|
+
MultiMarkdown compatibility. Includes metadata, definition
|
|
718
|
+
lists, footnotes, and more.
|
|
719
|
+
|
|
630
720
|
.TP
|
|
631
|
-
\f[B]kramdown\f[
|
|
632
|
-
Kramdown compatibility.
|
|
633
|
-
|
|
634
|
-
|
|
721
|
+
\f[B]kramdown\f[]
|
|
722
|
+
Kramdown compatibility. Includes relaxed tables, IAL
|
|
723
|
+
(Inline Attribute Lists) for adding HTML attributes to elements, and more.
|
|
724
|
+
|
|
635
725
|
.TP
|
|
636
|
-
\f[B]unified\f[
|
|
637
|
-
All features enabled.
|
|
638
|
-
|
|
726
|
+
\f[B]unified\f[] (default)
|
|
727
|
+
All features enabled. Combines features from all modes.
|
|
728
|
+
|
|
639
729
|
.SH METADATA CONTROL OF OPTIONS
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
processing batches.
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
.
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
.PP
|
|
651
|
-
\f[B]Supported
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
\
|
|
656
|
-
\f[CR]autolink\f[R], \f[CR]transforms\f[R], \f[CR]unsafe\f[R],
|
|
657
|
-
\f[CR]tables\f[R], \f[CR]footnotes\f[R], \f[CR]smart\f[R],
|
|
658
|
-
\f[CR]math\f[R], \f[CR]ids\f[R], \f[CR]header\-anchors\f[R],
|
|
659
|
-
\f[CR]embed\-images\f[R], \f[CR]image\-captions\f[R],
|
|
660
|
-
\f[CR]link\-citations\f[R], \f[CR]show\-tooltips\f[R],
|
|
661
|
-
\f[CR]suppress\-bibliography\f[R], \f[CR]suppress\-index\f[R],
|
|
662
|
-
\f[CR]group\-index\-by\-letter\f[R], \f[CR]obfuscate\-emails\f[R],
|
|
663
|
-
\f[CR]pretty\f[R], \f[CR]standalone\f[R], \f[CR]hardbreaks\f[R],
|
|
664
|
-
\f[CR]plugins\f[R], \f[CR]emoji\-autocorrect\f[R],
|
|
665
|
-
\f[CR]code\-line\-numbers\f[R], \f[CR]highlight\-language\-only\f[R],
|
|
666
|
-
\f[CR]markdown\-in\-html\f[R]
|
|
667
|
-
.PP
|
|
668
|
-
\f[B]Supported string options:\f[R] \f[CR]bibliography\f[R],
|
|
669
|
-
\f[CR]csl\f[R], \f[CR]title\f[R], \f[CR]style\f[R] (or \f[CR]css\f[R]),
|
|
670
|
-
\f[CR]id\-format\f[R], \f[CR]base\-dir\f[R], \f[CR]mode\f[R],
|
|
671
|
-
\f[CR]wikilink\-space\f[R], \f[CR]wikilink\-extension\f[R]
|
|
672
|
-
.PP
|
|
673
|
-
\f[B]Example YAML front matter:\f[R]
|
|
674
|
-
.IP
|
|
675
|
-
.EX
|
|
730
|
+
|
|
731
|
+
.PP
|
|
732
|
+
Most command\-line options can be controlled via document metadata, allowing different files to be processed with different settings when processing batches. This enables per\-document configuration without needing separate command\-line invocations.
|
|
733
|
+
|
|
734
|
+
.PP
|
|
735
|
+
\f[B]Boolean options\f[] accept \fRtrue\f[]/\fRfalse\f[], \fRyes\f[]/\fRno\f[], or \fR1\f[]/\fR0\f[] (case\-insensitive). \f[B]String options\f[] use the value directly.
|
|
736
|
+
|
|
737
|
+
.PP
|
|
738
|
+
\f[B]Supported boolean options:\f[] \fRindices\f[], \fRwikilinks\f[], \fRwikilink\-sanitize\f[], \fRincludes\f[], \fRrelaxed\-tables\f[], \fRper\-cell\-alignment\f[], \fRalpha\-lists\f[], \fRmixed\-lists\f[], \fRsup\-sub\f[], \fRstrikethrough\f[], \fRautolink\f[], \fRtransforms\f[], \fRunsafe\f[], \fRtables\f[], \fRfootnotes\f[], \fRsmart\f[], \fRmath\f[], \fRids\f[], \fRheader\-anchors\f[], \fRembed\-images\f[], \fRimage\-captions\f[], \fRlink\-citations\f[], \fRshow\-tooltips\f[], \fRsuppress\-bibliography\f[], \fRsuppress\-index\f[], \fRgroup\-index\-by\-letter\f[], \fRobfuscate\-emails\f[], \fRpretty\f[], \fRstandalone\f[], \fRhardbreaks\f[], \fRplugins\f[], \fRemoji\-autocorrect\f[], \fRcode\-line\-numbers\f[], \fRhighlight\-language\-only\f[], \fRmarkdown\-in\-html\f[]
|
|
739
|
+
|
|
740
|
+
.PP
|
|
741
|
+
\f[B]Supported string options:\f[] \fRbibliography\f[], \fRcsl\f[], \fRtitle\f[], \fRstyle\f[] (or \fRcss\f[]), \fRid\-format\f[], \fRbase\-dir\f[], \fRmode\f[], \fRwikilink\-space\f[], \fRwikilink\-extension\f[]
|
|
742
|
+
|
|
743
|
+
.PP
|
|
744
|
+
.nf
|
|
745
|
+
\fR
|
|
676
746
|
\-\-\-
|
|
677
747
|
indices: false
|
|
678
748
|
wikilinks: true
|
|
@@ -681,148 +751,121 @@ title: My Research Paper
|
|
|
681
751
|
pretty: true
|
|
682
752
|
standalone: true
|
|
683
753
|
\-\-\-
|
|
684
|
-
|
|
754
|
+
|
|
755
|
+
\f[]
|
|
756
|
+
.fi
|
|
757
|
+
|
|
685
758
|
.PP
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
.EX
|
|
759
|
+
.nf
|
|
760
|
+
\fR
|
|
689
761
|
indices: false
|
|
690
762
|
wikilinks: true
|
|
691
763
|
bibliography: references.bib
|
|
692
764
|
title: My Research Paper
|
|
693
|
-
|
|
765
|
+
|
|
766
|
+
\f[]
|
|
767
|
+
.fi
|
|
768
|
+
|
|
694
769
|
.PP
|
|
695
|
-
When processing multiple files with \
|
|
696
|
-
|
|
697
|
-
You can also use \f[CR]\-\-meta\-file\f[R] to specify a shared
|
|
698
|
-
configuration file that applies to all processed files.
|
|
770
|
+
When processing multiple files with \fRapex *.md\f[], each file can use its own configuration via metadata. You can also use \fR\-\-meta\-file\f[] to specify a shared configuration file that applies to all processed files.
|
|
771
|
+
|
|
699
772
|
.PP
|
|
700
|
-
\f[B]Note:\f[
|
|
701
|
-
|
|
702
|
-
options.
|
|
773
|
+
\f[B]Note:\f[] If \fRmode\f[] is specified in metadata, it resets all options to that mode’s defaults before applying other metadata options.
|
|
774
|
+
|
|
703
775
|
.SH FEATURES
|
|
776
|
+
|
|
777
|
+
.PP
|
|
704
778
|
Apex supports a wide range of Markdown extensions:
|
|
779
|
+
|
|
705
780
|
.IP \(bu 2
|
|
706
|
-
\f[B]Tables\f[
|
|
781
|
+
\f[B]Tables\f[]: GFM\-style tables with alignment
|
|
782
|
+
|
|
707
783
|
.IP \(bu 2
|
|
708
|
-
\f[B]Strikethrough\f[
|
|
709
|
-
|
|
784
|
+
\f[B]Strikethrough\f[]: GFM\-style \fR~~text~~\f[] (controlled by \f[B]\-\-strikethrough\f[])
|
|
785
|
+
|
|
710
786
|
.IP \(bu 2
|
|
711
|
-
\f[B]Footnotes\f[
|
|
787
|
+
\f[B]Footnotes\f[]: Reference\-style footnotes
|
|
788
|
+
|
|
712
789
|
.IP \(bu 2
|
|
713
|
-
\f[B]Math\f[
|
|
714
|
-
(\f[CR]$$...$$\f[R]) math
|
|
715
|
-
.RS 2
|
|
716
|
-
.PP
|
|
790
|
+
\f[B]Math\f[]: Inline (\fR$...$\f[]) and display (\fR$$...$$\f[]) math
|
|
717
791
|
with LaTeX
|
|
718
|
-
|
|
792
|
+
|
|
719
793
|
.IP \(bu 2
|
|
720
|
-
\f[B]Wiki Links\f[
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
\f[CR][[Page#Section]]\f[R]
|
|
724
|
-
.RE
|
|
794
|
+
\f[B]Wiki Links\f[]: \fR[[Page]]\f[], \fR[[Page|Display]]\f[],
|
|
795
|
+
\fR[[Page#Section]]\f[]
|
|
796
|
+
|
|
725
797
|
.IP \(bu 2
|
|
726
|
-
\f[B]Critic Markup\f[
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
{[STRIKEOUT:sub]}, {==mark==}, {>>comment<<})
|
|
730
|
-
.RE
|
|
798
|
+
\f[B]Critic Markup\f[]: All 5 types (add, del,
|
|
799
|
+
sub, mark, comment)
|
|
800
|
+
|
|
731
801
|
.IP \(bu 2
|
|
732
|
-
\f[B]Smart Typography\f[
|
|
802
|
+
\f[B]Smart Typography\f[]: Smart quotes, dashes, ellipsis
|
|
803
|
+
|
|
733
804
|
.IP \(bu 2
|
|
734
|
-
\f[B]Definition Lists\f[
|
|
805
|
+
\f[B]Definition Lists\f[]: MultiMarkdown\-style definition lists
|
|
806
|
+
|
|
735
807
|
.IP \(bu 2
|
|
736
|
-
\f[B]Task Lists\f[
|
|
808
|
+
\f[B]Task Lists\f[]: GFM\-style task lists
|
|
809
|
+
|
|
737
810
|
.IP \(bu 2
|
|
738
|
-
\f[B]Metadata\f[
|
|
739
|
-
.RS 2
|
|
740
|
-
.PP
|
|
811
|
+
\f[B]Metadata\f[]: YAML front matter, MultiMarkdown metadata,
|
|
741
812
|
Pandoc title blocks
|
|
742
|
-
|
|
813
|
+
|
|
743
814
|
.IP \(bu 2
|
|
744
|
-
\f[B]Metadata Transforms\f[
|
|
745
|
-
.
|
|
746
|
-
|
|
747
|
-
\f[CR][%key:transform]\f[R] syntax (case conversion, string
|
|
748
|
-
manipulation, regex replacement, date formatting, etc.)
|
|
749
|
-
.RE
|
|
815
|
+
\f[B]Metadata Transforms\f[]: Transform metadata values with
|
|
816
|
+
\fR[%key:transform]\f[] syntax (case conversion, string manipulation, regex replacement, date formatting, etc.)
|
|
817
|
+
|
|
750
818
|
.IP \(bu 2
|
|
751
|
-
\f[B]Metadata Control of Options\f[
|
|
752
|
-
.RS 2
|
|
753
|
-
.PP
|
|
819
|
+
\f[B]Metadata Control of Options\f[]: Control command\-line
|
|
754
820
|
options via metadata for per\-document configuration
|
|
755
|
-
|
|
821
|
+
|
|
756
822
|
.IP \(bu 2
|
|
757
|
-
\f[B]Header IDs\f[
|
|
758
|
-
.RS 2
|
|
759
|
-
.PP
|
|
823
|
+
\f[B]Header IDs\f[]: Automatic or manual header IDs with
|
|
760
824
|
multiple format options
|
|
761
|
-
|
|
825
|
+
|
|
762
826
|
.IP \(bu 2
|
|
763
|
-
\f[B]Relaxed Tables\f[
|
|
764
|
-
|
|
765
|
-
Enabled by default in unified and Kramdown modes.
|
|
827
|
+
\f[B]Relaxed Tables\f[]: Support for tables without separator rows (Kramdown\-style). Enabled by default in unified and Kramdown modes.
|
|
828
|
+
|
|
766
829
|
.IP \(bu 2
|
|
767
|
-
\f[B]Per\-Cell Alignment\f[
|
|
768
|
-
colons at the start and/or end of table cells.
|
|
769
|
-
Enabled by default in unified mode only.
|
|
770
|
-
.RS 2
|
|
771
|
-
.PP
|
|
830
|
+
\f[B]Per\-Cell Alignment\f[]: Support for alignment markers using colons at the start and/or end of table cells. Enabled by default in unified mode only.
|
|
772
831
|
rows (Kramdown\-style)
|
|
773
|
-
|
|
832
|
+
|
|
774
833
|
.IP \(bu 2
|
|
775
|
-
\f[B]Inline Tables from CSV/TSV\f[
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
.
|
|
780
|
-
|
|
781
|
-
\f[B]Superscript/Subscript\f[R]: MultiMarkdown\-style superscript
|
|
782
|
-
(\f[CR]\(hatext\f[R]) and subscript (\f[CR]\(titext\(ti\f[R] within
|
|
783
|
-
words) syntax.
|
|
784
|
-
Subscript uses paired tildes within word boundaries (e.g.,
|
|
785
|
-
\f[CR]H\(ti2\(tiO\f[R]), while tildes at word boundaries create
|
|
786
|
-
underline
|
|
834
|
+
\f[B]Inline Tables from CSV/TSV\f[]: Convert inline CSV/TSV
|
|
835
|
+
text to tables using ```table fences or \fR<!\-\-TABLE\-\->\f[] markers
|
|
836
|
+
|
|
837
|
+
.PP
|
|
838
|
+
\f[B]Superscript/Subscript\f[]: MultiMarkdown\-style superscript (\fR^text\f[]) and subscript (\fR~text~\f[] within words) syntax. Subscript uses paired tildes within word boundaries (e.g., \fRH~2~O\f[]), while tildes at word boundaries create underline
|
|
839
|
+
|
|
787
840
|
.IP \(bu 2
|
|
788
|
-
\f[B]Image Embedding\f[
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
.
|
|
793
|
-
|
|
794
|
-
\f[B]Inline Attribute Lists (IAL)\f[R]: Kramdown\-style syntax for
|
|
795
|
-
adding HTML attributes (IDs, classes, key\-value pairs) to block\-level
|
|
796
|
-
and inline elements.
|
|
797
|
-
Supports Attribute List Definitions (ALDs) for reusable attribute sets.
|
|
798
|
-
Available in kramdown and unified modes.
|
|
799
|
-
See \c
|
|
800
|
-
.UR https://github.com/ttscoff/apex/wiki/Inline-Attribute-Lists
|
|
801
|
-
Inline Attribute Lists
|
|
802
|
-
.UE \c
|
|
803
|
-
\ for complete documentation
|
|
841
|
+
\f[B]Image Embedding\f[]: Embed local images as base64 data
|
|
842
|
+
URLs with \fR\-\-embed\-images\f[] flag
|
|
843
|
+
|
|
844
|
+
.PP
|
|
845
|
+
\f[B]Inline Attribute Lists (IAL)\f[]: Kramdown\-style syntax for adding HTML attributes (IDs, classes, key\-value pairs) to block\-level and inline elements. Supports Attribute List Definitions (ALDs) for reusable attribute sets. Available in kramdown and unified modes. See Inline Attribute Lists (https://github.com/ttscoff/apex/wiki/Inline\-Attribute\-Lists) for complete documentation
|
|
846
|
+
|
|
804
847
|
.SH SEE ALSO
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
.
|
|
810
|
-
Apex Wiki
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
.
|
|
814
|
-
|
|
815
|
-
.UR https://github.com/ApexMarkdown/apex
|
|
816
|
-
.UE \c
|
|
848
|
+
|
|
849
|
+
.PP
|
|
850
|
+
\f[B]apex\-config\f[](5), \f[B]apex\-plugins\f[](7), \f[B]pandoc\f[](1), \f[B]markdown\f[](7)
|
|
851
|
+
|
|
852
|
+
.PP
|
|
853
|
+
For complete documentation, see the Apex Wiki (https://github.com/ttscoff/apex/wiki).
|
|
854
|
+
|
|
855
|
+
.PP
|
|
856
|
+
Project homepage: https://github.com/ApexMarkdown/apex (https://github.com/ApexMarkdown/apex)
|
|
857
|
+
|
|
817
858
|
.SH AUTHOR
|
|
859
|
+
|
|
860
|
+
.PP
|
|
818
861
|
Brett Terpstra
|
|
862
|
+
|
|
819
863
|
.SH COPYRIGHT
|
|
820
|
-
|
|
821
|
-
|
|
864
|
+
|
|
865
|
+
.PP
|
|
866
|
+
Copyright (c) 2025 Brett Terpstra. Licensed under MIT License.
|
|
867
|
+
|
|
822
868
|
.SH BUGS
|
|
823
|
-
|
|
824
|
-
.
|
|
825
|
-
.
|
|
826
|
-
\&.
|
|
827
|
-
.SH AUTHORS
|
|
828
|
-
Brett Terpstra.
|
|
869
|
+
|
|
870
|
+
.PP
|
|
871
|
+
Report bugs at https://github.com/ttscoff/apex/issues (https://github.com/ttscoff/apex/issues).
|