diff options
| author | John MacFarlane <[email protected]> | 2022-04-27 10:01:09 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-04-27 10:02:37 -0700 |
| commit | c05f95773d21061f67494511652fe76a4f2708c1 (patch) | |
| tree | c931184376b6a407213cd5a2cd2a9eeb19834cc5 /man | |
| parent | 50c9848c34d220a2c834750c3d28f7c94e8b94a0 (diff) | |
Update manfilter for greater portability.
The tables in our man pages were not rendering correctly
with mandoc, now used by default with macOS. mandoc doesn't
allow man formatting inside table cells.
For maximal portability, we now render the tables in plain
format and include them as code blocks in the man page.
Closes #8045.
Diffstat (limited to 'man')
| -rw-r--r-- | man/manfilter.lua | 38 | ||||
| -rw-r--r-- | man/pandoc.1 | 2419 |
2 files changed, 361 insertions, 2096 deletions
diff --git a/man/manfilter.lua b/man/manfilter.lua index dd1a9ab56..6abd950fc 100644 --- a/man/manfilter.lua +++ b/man/manfilter.lua @@ -11,27 +11,25 @@ function Header(el) end end --- unindent table content +-- For portability with mandoc, which doesn't allow man commands +-- inside table cells, we convert all tables to code blocks. function Table(el) - for _,body in ipairs(el.bodies) do - handleTableBody(body) - end - return el -end - -local function handleCell(el) - if #el.contents > 0 and el.contents[1].t == "CodeBlock" then - table.insert(el.contents, 1, pandoc.RawBlock("man", ".RS -14n")) - table.insert(el.contents, pandoc.RawBlock("man", ".RE")) - end -end - -function handleTableBody(el) - for _,row in ipairs(el.body) do - for _,cell in ipairs(row.cells) do - handleCell(cell) - end - end + local rendered = pandoc.write(pandoc.Pandoc({el}), "plain") + local adjusted = rendered -- tame grid table lines + :gsub("%+([=:][=:]+)", + function(s) + return " " .. string.rep("-", #s - 1) + end) + :gsub("(%+[-:][-:]+)", + function(s) + return "" + end) + :gsub("%+\n","\n") + :gsub("\n| ","\n|") + :gsub("|","") + return { pandoc.RawBlock("man", ".RS -14n"), + pandoc.CodeBlock(adjusted), + pandoc.RawBlock("man", ".RE") } end diff --git a/man/pandoc.1 b/man/pandoc.1 index 05bcfbad1..62f390ed4 100644 --- a/man/pandoc.1 +++ b/man/pandoc.1 @@ -1,4 +1,3 @@ -'\" t .\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats @@ -254,6 +253,8 @@ Specify input format. .IP \[bu] 2 \f[V]csv\f[R] (CSV table) .IP \[bu] 2 +\f[V]tsv\f[R] (TSV table) +.IP \[bu] 2 \f[V]docbook\f[R] (DocBook) .IP \[bu] 2 \f[V]docx\f[R] (Word docx) @@ -1616,167 +1617,45 @@ pandoc -o foo.html -s .PP If pandoc completes successfully, it will return exit code 0. Nonzero exit codes have the following meanings: -.PP -.TS -tab(@); -r l. -T{ -Code -T}@T{ -Error -T} -_ -T{ -1 -T}@T{ -PandocIOError -T} -T{ -3 -T}@T{ -PandocFailOnWarningError -T} -T{ -4 -T}@T{ -PandocAppError -T} -T{ -5 -T}@T{ -PandocTemplateError -T} -T{ -6 -T}@T{ -PandocOptionError -T} -T{ -21 -T}@T{ -PandocUnknownReaderError -T} -T{ -22 -T}@T{ -PandocUnknownWriterError -T} -T{ -23 -T}@T{ -PandocUnsupportedExtensionError -T} -T{ -24 -T}@T{ -PandocCiteprocError -T} -T{ -25 -T}@T{ -PandocBibliographyError -T} -T{ -31 -T}@T{ -PandocEpubSubdirectoryError -T} -T{ -43 -T}@T{ -PandocPDFError -T} -T{ -44 -T}@T{ -PandocXMLError -T} -T{ -47 -T}@T{ -PandocPDFProgramNotFoundError -T} -T{ -61 -T}@T{ -PandocHttpError -T} -T{ -62 -T}@T{ -PandocShouldNeverHappenError -T} -T{ -63 -T}@T{ -PandocSomeError -T} -T{ -64 -T}@T{ -PandocParseError -T} -T{ -65 -T}@T{ -PandocParsecError -T} -T{ -66 -T}@T{ -PandocMakePDFError -T} -T{ -67 -T}@T{ -PandocSyntaxMapError -T} -T{ -83 -T}@T{ -PandocFilterError -T} -T{ -84 -T}@T{ -PandocLuaError -T} -T{ -91 -T}@T{ -PandocMacroLoop -T} -T{ -92 -T}@T{ -PandocUTF8DecodingError -T} -T{ -93 -T}@T{ -PandocIpynbDecodingError -T} -T{ -94 -T}@T{ -PandocUnsupportedCharsetError -T} -T{ -97 -T}@T{ -PandocCouldNotFindDataFileError -T} -T{ -98 -T}@T{ -PandocCouldNotFindMetadataFileError -T} -T{ -99 -T}@T{ -PandocResourceNotFound -T} -.TE +.RS -14n +.IP +.nf +\f[C] + Code Error + ------ ------------------------------------- + 1 PandocIOError + 3 PandocFailOnWarningError + 4 PandocAppError + 5 PandocTemplateError + 6 PandocOptionError + 21 PandocUnknownReaderError + 22 PandocUnknownWriterError + 23 PandocUnsupportedExtensionError + 24 PandocCiteprocError + 25 PandocBibliographyError + 31 PandocEpubSubdirectoryError + 43 PandocPDFError + 44 PandocXMLError + 47 PandocPDFProgramNotFoundError + 61 PandocHttpError + 62 PandocShouldNeverHappenError + 63 PandocSomeError + 64 PandocParseError + 65 PandocParsecError + 66 PandocMakePDFError + 67 PandocSyntaxMapError + 83 PandocFilterError + 84 PandocLuaError + 91 PandocMacroLoop + 92 PandocUTF8DecodingError + 93 PandocIpynbDecodingError + 94 PandocUnsupportedCharsetError + 97 PandocCouldNotFindDataFileError + 98 PandocCouldNotFindMetadataFileError + 99 PandocResourceNotFound +\f[R] +.fi +.RE .SH DEFAULTS FILES .PP The \f[V]--defaults\f[R] option may be used to specify a package of @@ -1843,295 +1722,64 @@ defaults file, rather than replacing them. .PP The following tables show the mapping between the command line and defaults file entries. -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ .RS -14n .IP .nf \f[C] -foo.md -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -input-file: foo.md -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] -foo.md bar.md + + command line defaults file + --------------------------------- ---------------------------------- + foo.md input-file: foo.md + + foo.md bar.md input-files: + - foo.md + - bar.md \f[R] .fi .RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -input-files: - - foo.md - - bar.md -\f[R] -.fi -.RE -T} -.TE .PP The value of \f[V]input-files\f[R] may be left empty to indicate input from stdin, and it can be an empty sequence \f[V][]\f[R] for no input. .SS General options -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ -.RS -14n -.IP -.nf -\f[C] ---from markdown+emoji -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -from: markdown+emoji -\f[R] -.fi -.IP -.nf -\f[C] -reader: markdown+emoji -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---to markdown+hard_line_breaks -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -to: markdown+hard_line_breaks -\f[R] -.fi -.IP -.nf -\f[C] -writer: markdown+hard_line_breaks -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---output foo.pdf -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -output-file: foo.pdf -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---output - -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -output-file: -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---data-dir dir -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -data-dir: dir -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---defaults file -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -defaults: -- file -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---verbose -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -verbosity: INFO -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---quiet -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -verbosity: ERROR -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---fail-if-warnings -\f[R] -.fi -.RE -T}@T{ .RS -14n .IP .nf \f[C] -fail-if-warnings: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---sandbox -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -sandbox: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---log=FILE -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -log-file: FILE + + command line defaults file + --------------------------------- ---------------------------------- + --from markdown+emoji from: markdown+emoji + + reader: markdown+emoji + + to: markdown+hard_line_breaks + --to markdown+hard_line_breaks + + writer: markdown+hard_line_breaks + + --output foo.pdf output-file: foo.pdf + + --output - output-file: + + --data-dir dir data-dir: dir + + --defaults file defaults: + - file + + --verbose verbosity: INFO + + --quiet verbosity: ERROR + + --fail-if-warnings fail-if-warnings: true + + --sandbox sandbox: true + + --log=FILE log-file: FILE + \f[R] .fi .RE -T} -.TE .PP Options specified in a defaults file itself always have priority over those in another file included with a \f[V]defaults:\f[R] entry. @@ -2139,282 +1787,53 @@ those in another file included with a \f[V]defaults:\f[R] entry. \f[V]verbosity\f[R] can have the values \f[V]ERROR\f[R], \f[V]WARNING\f[R], or \f[V]INFO\f[R]. .SS Reader options -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ -.RS -14n -.IP -.nf -\f[C] ---shift-heading-level-by -1 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -shift-heading-level-by: -1 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---indented-code-classes python -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -indented-code-classes: - - python -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---default-image-extension \[dq].jpg\[dq] -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -default-image-extension: \[aq].jpg\[aq] -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---file-scope -\f[R] -.fi -.RE -T}@T{ .RS -14n .IP .nf \f[C] -file-scope: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---filter pandoc-citeproc \[rs] - --lua-filter count-words.lua \[rs] - --filter special.lua + + command line defaults file + --------------------------------- ---------------------------------- + --shift-heading-level-by -1 shift-heading-level-by: -1 + + indented-code-classes: + --indented-code-classes python - python + + + --default-image-extension \[dq].jpg\[dq] default-image-extension: \[aq].jpg\[aq] + + --file-scope file-scope: true + + --filter pandoc-citeproc \[rs] filters: + - pandoc-citeproc + --lua-filter count-words.lua \[rs] - count-words.lua + --filter special.lua - type: json + path: special.lua + + --metadata key=value \[rs] metadata: + --metadata key2 key: value + key2: true + + --metadata-file meta.yaml metadata-files: + - meta.yaml + + metadata-file: meta.yaml + + --preserve-tabs preserve-tabs: true + + --tab-stop 8 tab-stop: 8 + + --track-changes accept track-changes: accept + + --extract-media dir extract-media: dir + + --abbreviations abbrevs.txt abbreviations: abbrevs.txt + + --trace trace: true \f[R] .fi .RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -filters: - - pandoc-citeproc - - count-words.lua - - type: json - path: special.lua -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---metadata key=value \[rs] - --metadata key2 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -metadata: - key: value - key2: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---metadata-file meta.yaml -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -metadata-files: - - meta.yaml -\f[R] -.fi -.IP -.nf -\f[C] -metadata-file: meta.yaml -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---preserve-tabs -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -preserve-tabs: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---tab-stop 8 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -tab-stop: 8 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---track-changes accept -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -track-changes: accept -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---extract-media dir -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -extract-media: dir -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---abbreviations abbrevs.txt -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -abbreviations: abbrevs.txt -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---trace -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -trace: true -\f[R] -.fi -.RE -T} -.TE .PP Metadata values specified in a defaults file are parsed as literal string text, not Markdown. @@ -2426,1059 +1845,166 @@ Filters are run in the order specified. To include the built-in citeproc filter, use either \f[V]citeproc\f[R] or \f[V]{type: citeproc}\f[R]. .SS General writer options -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ -.RS -14n -.IP -.nf -\f[C] ---standalone -\f[R] -.fi -.RE -T}@T{ .RS -14n .IP .nf \f[C] -standalone: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---template letter -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -template: letter -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---variable key=val \[rs] - --variable key2 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -variables: - key: val - key2: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---eol nl -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -eol: nl -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---dpi 300 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -dpi: 300 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---wrap 60 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -wrap: 60 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---columns 72 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -columns: 72 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---table-of-contents -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -table-of-contents: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---toc -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -toc: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---toc-depth 3 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -toc-depth: 3 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---strip-comments -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -strip-comments: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---no-highlight -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -highlight-style: null -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---highlight-style kate -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -highlight-style: kate -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---syntax-definition mylang.xml -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -syntax-definitions: - - mylang.xml -\f[R] -.fi -.IP -.nf -\f[C] -syntax-definition: mylang.xml -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---include-in-header inc.tex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -include-in-header: - - inc.tex -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---include-before-body inc.tex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -include-before-body: - - inc.tex -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---include-after-body inc.tex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -include-after-body: - - inc.tex -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---resource-path .:foo -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -resource-path: [\[aq].\[aq],\[aq]foo\[aq]] -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---request-header foo:bar -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -request-headers: - - [\[dq]User-Agent\[dq], \[dq]Mozilla/5.0\[dq]] -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---no-check-certificate -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -no-check-certificate: true + + command line defaults file + --------------------------------- ---------------------------------- + --standalone standalone: true + + --template letter template: letter + + --variable key=val \[rs] variables: + --variable key2 key: val + key2: true + + --eol nl eol: nl + + --dpi 300 dpi: 300 + + --wrap 60 wrap: 60 + + --columns 72 columns: 72 + + --table-of-contents table-of-contents: true + + --toc toc: true + + --toc-depth 3 toc-depth: 3 + + --strip-comments strip-comments: true + + --no-highlight highlight-style: null + + --highlight-style kate highlight-style: kate + + syntax-definitions: + --syntax-definition mylang.xml - mylang.xml + + syntax-definition: mylang.xml + + --include-in-header inc.tex include-in-header: + - inc.tex + + include-before-body: +--include-before-body inc.tex - inc.tex + + --include-after-body inc.tex include-after-body: + - inc.tex + + --resource-path .:foo resource-path: [\[aq].\[aq],\[aq]foo\[aq]] + + --request-header foo:bar request-headers: + + - [\[dq]User-Agent\[dq], \[dq]Mozilla/5.0\[dq]] + + --no-check-certificate no-check-certificate: true + \f[R] .fi .RE -T} -.TE .SS Options affecting specific writers -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ -.RS -14n -.IP -.nf -\f[C] ---self-contained -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -self-contained: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---html-q-tags -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -html-q-tags: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---ascii -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -ascii: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---reference-links -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -reference-links: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---reference-location block -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -reference-location: block -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---markdown-headings atx -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -markdown-headings: atx -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---top-level-division chapter -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -top-level-division: chapter -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---number-sections -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -number-sections: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---number-offset=1,4 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -number-offset: \[rs][1,4\[rs]] -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---listings -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -listings: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---incremental -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -incremental: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---slide-level 2 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -slide-level: 2 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---section-divs -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -section-divs: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---email-obfuscation references -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -email-obfuscation: references -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---id-prefix ch1 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -identifier-prefix: ch1 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---title-prefix MySite -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -title-prefix: MySite -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---css styles/screen.css \[rs] - --css styles/special.css -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -css: - - styles/screen.css - - styles/special.css -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---reference-doc my.docx -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -reference-doc: my.docx -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---epub-cover-image cover.jpg -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -epub-cover-image: cover.jpg -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---epub-metadata meta.xml -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -epub-metadata: meta.xml -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---epub-embed-font special.otf \[rs] - --epub-embed-font headline.otf -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -epub-fonts: - - special.otf - - headline.otf -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---epub-chapter-level 2 -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -epub-chapter-level: 2 -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---epub-subdirectory=\[dq]\[dq] -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -epub-subdirectory: \[aq]\[aq] -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---ipynb-output best -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -ipynb-output: best -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---pdf-engine xelatex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -pdf-engine: xelatex -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---pdf-engine-opt=--shell-escape -\f[R] -.fi -.RE -T}@T{ .RS -14n .IP .nf \f[C] -pdf-engine-opts: - - \[aq]-shell-escape\[aq] -\f[R] -.fi -.IP -.nf -\f[C] -pdf-engine-opt: \[aq]-shell-escape\[aq] + + command line defaults file + --------------------------------- ---------------------------------- + --self-contained self-contained: true + + --html-q-tags html-q-tags: true + + --ascii ascii: true + + --reference-links reference-links: true + + --reference-location block reference-location: block + + --markdown-headings atx markdown-headings: atx + + --top-level-division chapter top-level-division: chapter + + --number-sections number-sections: true + + --number-offset=1,4 number-offset: \[rs][1,4\[rs]] + + --listings listings: true + + --incremental incremental: true + + --slide-level 2 slide-level: 2 + + --section-divs section-divs: true + + email-obfuscation: references + --email-obfuscation references + + --id-prefix ch1 identifier-prefix: ch1 + + --title-prefix MySite title-prefix: MySite + + --css styles/screen.css \[rs] css: + --css styles/special.css - styles/screen.css + - styles/special.css + + --reference-doc my.docx reference-doc: my.docx + + --epub-cover-image cover.jpg epub-cover-image: cover.jpg + + --epub-metadata meta.xml epub-metadata: meta.xml + + epub-fonts: + --epub-embed-font special.otf \[rs] - special.otf + - headline.otf + --epub-embed-font headline.otf + + --epub-chapter-level 2 epub-chapter-level: 2 + + --epub-subdirectory=\[dq]\[dq] epub-subdirectory: \[aq]\[aq] + + --ipynb-output best ipynb-output: best + + --pdf-engine xelatex pdf-engine: xelatex + + pdf-engine-opts: + --pdf-engine-opt=--shell-escape - \[aq]-shell-escape\[aq] + + + pdf-engine-opt: \[aq]-shell-escape\[aq] + \f[R] .fi .RE -T} -.TE .SS Citation rendering -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ .RS -14n .IP .nf \f[C] ---citeproc -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -citeproc: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---bibliography logic.bib -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -metadata: - bibliography: logic.bib -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---csl ieee.csl -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -metadata: - csl: ieee.csl -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---citation-abbreviations ab.json -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -metadata: - citation-abbreviations: ab.json -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---natbib -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -cite-method: natbib -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---biblatex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -cite-method: biblatex + + command line defaults file + --------------------------------- ---------------------------------- + --citeproc citeproc: true + + --bibliography logic.bib metadata: + bibliography: logic.bib + + --csl ieee.csl metadata: + csl: ieee.csl + + metadata: + --citation-abbreviations ab.json + citation-abbreviations: ab.json + + --natbib cite-method: natbib + + --biblatex cite-method: biblatex + \f[R] .fi .RE -T} -.TE .PP \f[V]cite-method\f[R] can be \f[V]citeproc\f[R], \f[V]natbib\f[R], or \f[V]biblatex\f[R]. @@ -3490,117 +2016,31 @@ If you need control over when the citeproc processing is done relative to other filters, you should instead use \f[V]citeproc\f[R] in the list of \f[V]filters\f[R] (see above). .SS Math rendering in HTML -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ -.RS -14n -.IP -.nf -\f[C] ---mathjax -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -html-math-method: - method: mathjax -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---mathml -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -html-math-method: - method: mathml -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---webtex -\f[R] -.fi -.RE -T}@T{ .RS -14n .IP .nf \f[C] -html-math-method: - method: webtex -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---katex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -html-math-method: - method: katex -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---gladtex -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -html-math-method: - method: gladtex + + command line defaults file + --------------------------------- ---------------------------------- + --mathjax html-math-method: + method: mathjax + + --mathml html-math-method: + method: mathml + + --webtex html-math-method: + method: webtex + + --katex html-math-method: + method: katex + + --gladtex html-math-method: + method: gladtex + \f[R] .fi .RE -T} -.TE .PP In addition to the values listed above, \f[V]method\f[R] can have the value \f[V]plain\f[R]. @@ -3608,55 +2048,20 @@ value \f[V]plain\f[R]. If the command line option accepts a URL argument, an \f[V]url:\f[R] field can be added to \f[V]html-math-method:\f[R]. .SS Options for wrapper scripts -.PP -.TS -tab(@); -lw(34.0n) lw(35.0n). -T{ -command line -T}@T{ -defaults file -T} -_ -T{ -.RS -14n -.IP -.nf -\f[C] ---dump-args -\f[R] -.fi -.RE -T}@T{ -.RS -14n -.IP -.nf -\f[C] -dump-args: true -\f[R] -.fi -.RE -T} -T{ -.RS -14n -.IP -.nf -\f[C] ---ignore-args -\f[R] -.fi -.RE -T}@T{ .RS -14n .IP .nf \f[C] -ignore-args: true + + command line defaults file + --------------------------------- ---------------------------------- + --dump-args dump-args: true + + --ignore-args ignore-args: true + \f[R] .fi .RE -T} -.TE .SH TEMPLATES .PP When the \f[V]-s/--standalone\f[R] option is used, pandoc uses a @@ -4144,7 +2549,7 @@ document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx documents .TP \f[V]abstract\f[R] -document summary, included in LaTeX, ConTeXt, AsciiDoc, and docx +document summary, included in HTML, LaTeX, ConTeXt, AsciiDoc, and docx documents .TP \f[V]abstract-title\f[R] @@ -4349,7 +2754,7 @@ slide aspect ratio (\f[V]43\f[R] for 4:3 [default], \f[V]169\f[R] for 16:9, \f[V]1610\f[R] for 16:10, \f[V]149\f[R] for 14:9, \f[V]141\f[R] for 1.41:1, \f[V]54\f[R] for 5:4, \f[V]32\f[R] for 3:2) .TP -\[ga]\f[V]beameroption\f[R] +\f[V]beameroption\f[R] add extra beamer option with \f[V]\[rs]setbeameroption{}\f[R] .TP \f[V]institute\f[R] @@ -4917,47 +3322,21 @@ a number or punctuation mark). If nothing is left after this, use the identifier \f[V]section\f[R]. .PP Thus, for example, -.PP -.TS -tab(@); -l l. -T{ -Heading -T}@T{ -Identifier -T} -_ -T{ -\f[V]Heading identifiers in HTML\f[R] -T}@T{ -\f[V]heading-identifiers-in-html\f[R] -T} -T{ -\f[V]Ma\[^i]tre d\[aq]h\[^o]tel\f[R] -T}@T{ -\f[V]ma\[^i]tre-dh\[^o]tel\f[R] -T} -T{ -\f[V]*Dogs*?--in *my* house?\f[R] -T}@T{ -\f[V]dogs--in-my-house\f[R] -T} -T{ -\f[V][HTML], [S5], or [RTF]?\f[R] -T}@T{ -\f[V]html-s5-or-rtf\f[R] -T} -T{ -\f[V]3. Applications\f[R] -T}@T{ -\f[V]applications\f[R] -T} -T{ -\f[V]33\f[R] -T}@T{ -\f[V]section\f[R] -T} -.TE +.RS -14n +.IP +.nf +\f[C] + Heading Identifier + ----------------------------- ----------------------------- + Heading identifiers in HTML heading-identifiers-in-html + Ma\[^i]tre d\[aq]h\[^o]tel ma\[^i]tre-dh\[^o]tel + *Dogs*?--in *my* house? dogs--in-my-house + [HTML], [S5], or [RTF]? html-s5-or-rtf + 3. Applications applications + 33 section +\f[R] +.fi +.RE .PP These rules should, in most cases, allow one to determine the identifier from the heading text. @@ -8005,42 +6384,20 @@ If you want to use multiple bibliography files, you can supply multiple \f[V]--bibliography\f[R] arguments or set \f[V]bibliography\f[R] metadata field to YAML array. A bibliography may have any of these formats: -.PP -.TS -tab(@); -l l. -T{ -Format -T}@T{ -File extension -T} -_ -T{ -BibLaTeX -T}@T{ -\&.bib -T} -T{ -BibTeX -T}@T{ -\&.bibtex -T} -T{ -CSL JSON -T}@T{ -\&.json -T} -T{ -CSL YAML -T}@T{ -\&.yaml -T} -T{ -RIS -T}@T{ -\&.ris -T} -.TE +.RS -14n +.IP +.nf +\f[C] + Format File extension + ---------- ---------------- + BibLaTeX .bib + BibTeX .bibtex + CSL JSON .json + CSL YAML .yaml + RIS .ris +\f[R] +.fi +.RE .PP Note that \f[V].bib\f[R] can be used with both BibTeX and BibLaTeX files; use the extension \f[V].bibtex\f[R] to force interpretation as @@ -9127,127 +7484,37 @@ Which will result in: Pandoc will output \f[V]<body epub:type=\[dq]bodymatter\[dq]>\f[R], unless you use one of the following values, in which case either \f[V]frontmatter\f[R] or \f[V]backmatter\f[R] will be output. -.PP -.TS -tab(@); -l l. -T{ -\f[V]epub:type\f[R] of first section -T}@T{ -\f[V]epub:type\f[R] of body -T} -_ -T{ -prologue -T}@T{ -frontmatter -T} -T{ -abstract -T}@T{ -frontmatter -T} -T{ -acknowledgments -T}@T{ -frontmatter -T} -T{ -copyright-page -T}@T{ -frontmatter -T} -T{ -dedication -T}@T{ -frontmatter -T} -T{ -credits -T}@T{ -frontmatter -T} -T{ -keywords -T}@T{ -frontmatter -T} -T{ -imprint -T}@T{ -frontmatter -T} -T{ -contributors -T}@T{ -frontmatter -T} -T{ -other-credits -T}@T{ -frontmatter -T} -T{ -errata -T}@T{ -frontmatter -T} -T{ -revision-history -T}@T{ -frontmatter -T} -T{ -titlepage -T}@T{ -frontmatter -T} -T{ -halftitlepage -T}@T{ -frontmatter -T} -T{ -seriespage -T}@T{ -frontmatter -T} -T{ -foreword -T}@T{ -frontmatter -T} -T{ -preface -T}@T{ -frontmatter -T} -T{ -frontispiece -T}@T{ -frontmatter -T} -T{ -appendix -T}@T{ -backmatter -T} -T{ -colophon -T}@T{ -backmatter -T} -T{ -bibliography -T}@T{ -backmatter -T} -T{ -index -T}@T{ -backmatter -T} -.TE +.RS -14n +.IP +.nf +\f[C] + epub:type of first section epub:type of body + ---------------------------- ------------------- + prologue frontmatter + abstract frontmatter + acknowledgments frontmatter + copyright-page frontmatter + dedication frontmatter + credits frontmatter + keywords frontmatter + imprint frontmatter + contributors frontmatter + other-credits frontmatter + errata frontmatter + revision-history frontmatter + titlepage frontmatter + halftitlepage frontmatter + seriespage frontmatter + foreword frontmatter + preface frontmatter + frontispiece frontmatter + appendix backmatter + colophon backmatter + bibliography backmatter + index backmatter +\f[R] +.fi +.RE .SS Linked media .PP By default, pandoc will download media referenced from any |
