summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-10-04 13:16:03 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2022-10-04 13:16:19 -0700
commitee62618a8030e005542f9a1e1ac269f692fca484 (patch)
tree89ae2df4e6f5fcf8f781c8c78928921dd06dbdcd /man
parent11d010c455d497d3fe5de3f6a03372159122cee1 (diff)
Add pandoc-lua.1 man page.
Diffstat (limited to 'man')
-rw-r--r--man/pandoc-lua.176
-rw-r--r--man/pandoc-server.148
-rw-r--r--man/pandoc.1148
3 files changed, 232 insertions, 40 deletions
diff --git a/man/pandoc-lua.1 b/man/pandoc-lua.1
new file mode 100644
index 000000000..08d7fdfc5
--- /dev/null
+++ b/man/pandoc-lua.1
@@ -0,0 +1,76 @@
+.\" Automatically generated by Pandoc 2.19.2
+.\"
+.\" Define V font for inline verbatim, using C font in formats
+.\" that render this, and otherwise B font.
+.ie "\f[CB]x\f[]"x" \{\
+. ftr V B
+. ftr VI BI
+. ftr VB B
+. ftr VBI BI
+.\}
+.el \{\
+. ftr V CR
+. ftr VI CI
+. ftr VB CB
+. ftr VBI CBI
+.\}
+.TH "pandoc-lua" "1" "September 22, 2022" "pandoc-lua 3.0" ""
+.hy
+.SH SYNOPSIS
+.PP
+\f[V]pandoc-lua\f[R] [\f[I]options\f[R]] [\f[I]script\f[R]
+[\f[I]args\f[R]]]
+.SH DESCRIPTION
+.PP
+\f[V]pandoc-lua\f[R] is a standalone Lua interpreter with behavior
+similar to that of the standard \f[V]lua\f[R] executable, but exposing
+all of pandoc\[cq]s Lua libraries.
+All \f[V]pandoc.*\f[R] packages, as well as the packages \f[V]re\f[R]
+and \f[V]lpeg\f[R], are available via global variables.
+Furthermore, the globals \f[V]PANDOC_VERSION\f[R],
+\f[V]PANDOC_STATE\f[R], and \f[V]PANDOC_API_VERSION\f[R] are set at
+startup.
+.PP
+If no script argument is given, then the script is assumed to be passed
+in via \f[I]stdin\f[R].
+Interactive mode is not supported at this time.
+.PP
+When called without the option \f[V]-E\f[R], the interpreter checks for
+an environment variable \f[V]LUA_INIT\f[R] before running any argument.
+If the variable content has the format
+\f[I]\f[VI]\[at]filename\f[I]\f[R], then \f[V]pandoc-lua\f[R] executes
+the file.
+Otherwise, \f[V]pandoc-lua\f[R] executes the string itself.
+.SH OPTIONS
+.TP
+\f[V]-e stat\f[R]
+Execute statement \f[V]stat\f[R].
+.TP
+\f[V]-l mod\f[R]
+If mod has the pattern \f[V]g=m\f[R], then require library \f[V]m\f[R]
+into global \f[V]g\f[R]; otherwise require library \f[V]mod\f[R] into
+global \f[V]mod\f[R].
+.TP
+\f[V]-v\f[R]
+Show version information.
+.TP
+\f[V]-i\f[R]
+Not supported yet; print a warning to that effect.
+.TP
+\f[V]-E\f[R]
+Ignore environment variables.
+This is not fully implemented yet and only ignores the
+\f[V]LUA_INIT\f[R] variable.
+Other variables like \f[V]LUA_PATH\f[R] and \f[V]LUA_CPATH\f[R] are
+\f[B]not\f[R] ignored.
+.TP
+\f[V]-W\f[R]
+Turn warnings on.
+.SH AUTHORS
+.PP
+Copyright 2022 John MacFarlane (jgm\[at]berkeley.edu) and contributors.
+Released under the GPL, version 2 or later.
+This software carries no warranty of any kind.
+(See COPYRIGHT for full copyright and warranty notices.)
+.PP
+Lua: Copyright 1994-2022 Lua.org, PUC-Rio.
diff --git a/man/pandoc-server.1 b/man/pandoc-server.1
index 15373d35f..988695b9b 100644
--- a/man/pandoc-server.1
+++ b/man/pandoc-server.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pandoc 2.19
+.\" Automatically generated by Pandoc 2.19.2
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
@@ -14,7 +14,7 @@
. ftr VB CB
. ftr VBI CBI
.\}
-.TH "pandoc-server" "1" "August 15, 2022" "pandoc-server 2.19.1" ""
+.TH "pandoc-server" "1" "August 15, 2022" "pandoc-server 3.0" ""
.hy
.SH SYNOPSIS
.PP
@@ -69,19 +69,50 @@ Print version.
.SS Root endpoint
.PP
The root (\f[V]/\f[R]) endpoint accepts only POST requests.
-It returns a converted document in one of the following formats,
-depending on Accept headers:
+.SS Response
+.PP
+It returns a converted document in one of the following formats (in
+order of preference), depending on the \f[V]Accept\f[R] header:
+.IP \[bu] 2
+\f[V]application/octet-stream\f[R]
.IP \[bu] 2
\f[V]text/plain\f[R]
.IP \[bu] 2
\f[V]application/json\f[R]
-.IP \[bu] 2
-\f[V]application/octet-stream\f[R]
.PP
If the result is a binary format (e.g., \f[V]epub\f[R] or
\f[V]docx\f[R]) and the content is returned as plain text or JSON, the
binary will be base64 encoded.
.PP
+If a JSON response is given, it will have one of the following formats.
+If the conversion is not successful:
+.IP
+.nf
+\f[C]
+{ \[dq]error\[dq]: string with the error message }
+\f[R]
+.fi
+.PP
+If the conversion is successful:
+.IP
+.nf
+\f[C]
+{ \[dq]output\[dq]: string with textual or base64-encoded binary output,
+ \[dq]base64\[dq]: boolean (true means the \[dq]output\[dq] is base64-encoded),
+ \[dq]messages\[dq]: array of message objects (see below) }
+\f[R]
+.fi
+.PP
+Each element of the \[lq]messages\[rq] array will have the format
+.IP
+.nf
+\f[C]
+{ \[dq]message\[dq]: string,
+ \[dq]verbosity\[dq]: string (either \[dq]WARNING\[dq] or \[dq]INFO\[dq]) }
+\f[R]
+.fi
+.SS Request
+.PP
The body of the POST request should be a JSON object, with the following
fields.
Only the \f[V]text\f[R] field is required; all of the others can be
@@ -166,7 +197,7 @@ Depth of sections to include in the table of contents.
Causes HTML comments to be stripped in Markdown or Textile source,
instead of being passed through to the output format.
.TP
-\f[V]highlight-style\f[R] (string, default \f[V]\[dq]pygments\[dq]\f[R])
+\f[V]highlight-style\f[R] (string, leave unset for no highlighting)
Specify the style to use for syntax highlighting of code.
Standard styles are \f[V]\[dq]pygments\[dq]\f[R] (the default),
\f[V]\[dq]kate\[dq]\f[R], \f[V]\[dq]monochrome\[dq]\f[R],
@@ -308,8 +339,7 @@ these two points:
It accepts a JSON array, each element of which is a JSON object like the
one expected by the root endpoint.
.IP \[bu] 2
-It returns a JSON array of results.
-(It will not return plain text or octet-stream, like the root endpoint.)
+It returns a JSON array of JSON results.
.PP
This endpoint can be used to convert a sequence of small snippets in one
request.
diff --git a/man/pandoc.1 b/man/pandoc.1
index 928463df8..ec70a04a1 100644
--- a/man/pandoc.1
+++ b/man/pandoc.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pandoc 2.19
+.\" Automatically generated by Pandoc 2.19.2
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
@@ -14,7 +14,7 @@
. ftr VB CB
. ftr VBI CBI
.\}
-.TH "Pandoc User\[cq]s Guide" "" "August 22, 2022" "pandoc 2.19.2" ""
+.TH "Pandoc User\[cq]s Guide" "" "August 22, 2022" "pandoc 3.0" ""
.hy
.SH NAME
pandoc - general markup converter
@@ -580,13 +580,6 @@ pandoc uses a level-1 heading to render the document title.
Use \f[VI]--shift-heading-level-by\f[I]=X instead, where X = NUMBER -
1.\f[R] Specify the base level for headings (defaults to 1).
.TP
-\f[V]--strip-empty-paragraphs\f[R]
-\f[I]Deprecated.
-Use the \f[VI]+empty_paragraphs\f[I] extension instead.\f[R] Ignore
-paragraphs with no content.
-This option is useful for converting word processing documents where
-users have used empty paragraphs to create inter-paragraph space.
-.TP
\f[V]--indented-code-classes=\f[R]\f[I]CLASSES\f[R]
Specify classes to use for indented code blocks\[en]for example,
\f[V]perl,numberLines\f[R] or \f[V]haskell\f[R].
@@ -605,6 +598,19 @@ This will allow footnotes in different files with the same identifiers
to work as expected.
If this option is set, footnotes and links will not work across files.
Reading binary files (docx, odt, epub) implies \f[V]--file-scope\f[R].
+.RS
+.PP
+If two or more files are processed using \f[V]--file-scope\f[R],
+prefixes based on the filenames will be added to identifiers in order to
+disambiguate them, and internal links will be adjusted accordingly.
+For example, a header with identifier \f[V]foo\f[R] in
+\f[V]subdir/file1.txt\f[R] will have its identifier changed to
+\f[V]subdir__file1.txt__foo\f[R].
+.PP
+In addition, a Div with an identifier based on the filename will be
+added around the file\[cq]s content, so that internal links to the
+filename will point to this Div\[cq]s identifier.
+.RE
.TP
\f[V]-F\f[R] \f[I]PROGRAM\f[R], \f[V]--filter=\f[R]\f[I]PROGRAM\f[R]
Specify an executable to be used as a filter transforming the pandoc AST
@@ -1059,8 +1065,8 @@ Specify whether to use ATX-style (\f[V]#\f[R]-prefixed) or Setext-style
ATX-style headings are always used for levels 3+.
This option also affects Markdown cells in \f[V]ipynb\f[R] output.
.TP
-\f[V]--atx-headers\f[R]
-\f[I]Deprecated synonym for \f[VI]--markdown-headings=atx\f[I].\f[R]
+\f[V]--list-tables\f[R]
+Render tables as list tables in RST output.
.TP
\f[V]--top-level-division=default\f[R]|\f[V]section\f[R]|\f[V]chapter\f[R]|\f[V]part\f[R]
Treat top-level headings as the given division type in LaTeX, ConTeXt,
@@ -1660,6 +1666,7 @@ Nonzero exit codes have the following meanings:
67 PandocSyntaxMapError
83 PandocFilterError
84 PandocLuaError
+ 89 PandocNoScriptingEngine
91 PandocMacroLoop
92 PandocUTF8DecodingError
93 PandocIpynbDecodingError
@@ -1939,6 +1946,8 @@ or \f[V]{type: citeproc}\f[R].
--markdown-headings atx markdown-headings: atx
+ --list-tables list-tables: true
+
--top-level-division chapter top-level-division: chapter
--number-sections number-sections: true
@@ -3266,7 +3275,7 @@ covered.
.PP
Note that markdown extensions added to the \f[V]ipynb\f[R] format affect
Markdown cells in Jupyter notebooks (as do command-line options like
-\f[V]--atx-headers\f[R]).
+\f[V]--markdown-headings\f[R]).
.SS Typography
.SS Extension: \f[V]smart\f[R]
.PP
@@ -3952,7 +3961,7 @@ does not produce a nested block quote in pandoc:
.nf
\f[C]
> This is a block quote.
->> Nested.
+>> Not nested, since \[ga]blank_before_blockquote\[ga] is enabled by default
\f[R]
.fi
.SS Verbatim (code) blocks
@@ -4078,6 +4087,26 @@ qsort [] = []
\f[R]
.fi
.PP
+This shortcut form may be combined with attributes:
+.IP
+.nf
+\f[C]
+\[ga]\[ga]\[ga]haskell {.numberLines}
+qsort [] = []
+\[ga]\[ga]\[ga]
+\f[R]
+.fi
+.PP
+Which is equivalent to:
+.IP
+.nf
+\f[C]
+\[ga]\[ga]\[ga] {.haskell .numberLines}
+qsort [] = []
+\[ga]\[ga]\[ga]
+\f[R]
+.fi
+.PP
If the \f[V]fenced_code_attributes\f[R] extension is disabled, but input
contains class attribute(s) for the code block, the first class
attribute will be printed after the opening fence as a bare word.
@@ -4537,7 +4566,7 @@ not require lining up columns.
A caption may optionally be provided with all 4 kinds of tables (as
illustrated in the examples below).
A caption is a paragraph beginning with the string \f[V]Table:\f[R] (or
-just \f[V]:\f[R]), which will be stripped off.
+\f[V]table:\f[R] or just \f[V]:\f[R]), which will be stripped off.
It may appear either before or after the table.
.SS Extension: \f[V]simple_tables\f[R]
.PP
@@ -4677,9 +4706,39 @@ The row of \f[V]=\f[R]s separates the header from the table body, and
can be omitted for a headerless table.
The cells of grid tables may contain arbitrary block elements (multiple
paragraphs, code blocks, lists, etc.).
-Cells that span multiple columns or rows are not supported.
-Grid tables can be created easily using Emacs\[cq] table-mode
-(\f[V]M-x table-insert\f[R]).
+.PP
+Cells can span multiple columns or rows:
+.IP
+.nf
+\f[C]
++---------------------+----------+
+| Property | Earth |
++=============+=======+==========+
+| | min | -89.2 \[de]C |
+| Temperature +-------+----------+
+| 1961-1990 | mean | 14 \[de]C |
+| +-------+----------+
+| | min | 56.7 \[de]C |
++-------------+-------+----------+
+\f[R]
+.fi
+.PP
+A table header may contain more than one row:
+.IP
+.nf
+\f[C]
++---------------------+-----------------------+
+| Location | Temperature 1961-1990 |
+| | in degree Celsius |
+| +-------+-------+-------+
+| | min | mean | max |
++=====================+=======+=======+=======+
+| Antarctica | -89.2 | N/A | 19.8 |
++---------------------+-------+-------+-------+
+| Earth | -89.2 | 14 | 56.7 |
++---------------------+-------+-------+-------+
+\f[R]
+.fi
.PP
Alignments can be specified as with pipe tables, by putting colons at
the boundaries of the separator line after the header:
@@ -4703,15 +4762,28 @@ For headerless tables, the colons go on the top line instead:
+---------------+---------------+--------------------+
\f[R]
.fi
-.SS Grid Table Limitations
.PP
-Pandoc does not support grid tables with row spans or column spans.
-This means that neither variable numbers of columns across rows nor
-variable numbers of rows across columns are supported by Pandoc.
-All grid tables must have the same number of columns in each row, and
-the same number of rows in each column.
-For example, the Docutils sample grid tables will not render as expected
-with Pandoc.
+A table foot can be defined by enclosing it with separator lines that
+use \f[V]=\f[R] instead of \f[V]-\f[R]:
+.IP
+.nf
+\f[C]
+ +---------------+---------------+
+ | Fruit | Price |
+ +===============+===============+
+ | Bananas | $1.34 |
+ +---------------+---------------+
+ | Oranges | $2.10 |
+ +===============+===============+
+ | Sum | $3.44 |
+ +===============+===============+
+\f[R]
+.fi
+.PP
+The foot must always be placed at the very bottom of the table.
+.PP
+Grid tables can be created easily using Emacs\[cq] table-mode
+(\f[V]M-x table-insert\f[R]).
.SS Extension: \f[V]pipe_tables\f[R]
.PP
Pipe tables look like this:
@@ -7299,13 +7371,16 @@ With beamer and reveal.js, the configuration option
\f[V]background-image\f[R] can be used either in the YAML metadata block
or as a command-line variable to get the same image on every slide.
.PP
+Note that for reveal.js, the \f[V]background-image\f[R] will be used as
+a \f[V]parallaxBackgroundImage\f[R] (see below).
+.PP
For pptx, you can use a reference doc in which background images have
been set on the relevant layouts.
.SS \f[V]parallaxBackgroundImage\f[R] (reveal.js)
.PP
For reveal.js, there is also the reveal.js-native option
-\f[V]parallaxBackgroundImage\f[R], which can be used instead of
-\f[V]background-image\f[R] to produce a parallax scrolling background.
+\f[V]parallaxBackgroundImage\f[R], which produces a parallax scrolling
+background.
You must also set \f[V]parallaxBackgroundSize\f[R], and can optionally
set \f[V]parallaxBackgroundHorizontal\f[R] and
\f[V]parallaxBackgroundVertical\f[R] to configure the scrolling
@@ -7729,9 +7804,9 @@ Markdown and ipynb notebooks.
Note that options and extensions that affect reading and writing of
Markdown will also affect Markdown cells in ipynb notebooks.
For example, \f[V]--wrap=preserve\f[R] will preserve soft line breaks in
-Markdown cells; \f[V]--atx-headers\f[R] will cause ATX-style headings to
-be used; and \f[V]--preserve-tabs\f[R] will prevent tabs from being
-turned to spaces.
+Markdown cells; \f[V]--markdown-headings=setext\f[R] will cause
+Setext-style headings to be used; and \f[V]--preserve-tabs\f[R] will
+prevent tabs from being turned to spaces.
.SH SYNTAX HIGHLIGHTING
.PP
Pandoc will automatically highlight syntax in fenced code blocks that
@@ -7963,7 +8038,8 @@ metadata field (see EPUB Metadata, above).
.SH RUNNING PANDOC AS A WEB SERVER
.PP
If you rename (or symlink) the pandoc executable to
-\f[V]pandoc-server\f[R], it will start up a web server with a JSON API.
+\f[V]pandoc-server\f[R], or if you call pandoc with \f[V]server\f[R] as
+the first argument, it will start up a web server with a JSON API.
This server exposes most of the conversion functionality of pandoc.
For full documentation, see the pandoc-server man page.
.PP
@@ -7974,6 +8050,16 @@ the same API as \f[V]pandoc-server\f[R].
\f[V]pandoc-server\f[R] is designed to be maximally secure; it uses
Haskell\[cq]s type system to provide strong guarantees that no I/O will
be performed on the server during pandoc conversions.
+.SH RUNNING PANDOC AS A LUA INTERPRETER
+.PP
+Calling the pandoc executable under the name \f[V]pandoc-lua\f[R] or
+with \f[V]lua\f[R] as the first argument will make it function as a
+standalone Lua interpreter.
+The behavior is mostly identical to that of the standalone \f[V]lua\f[R]
+executable, version 5.4.
+However, there is no REPL yet, and the \f[V]-i\f[R] option has no
+effect.
+For full documentation, see the [pandoc-lua] man page.
.SH A NOTE ON SECURITY
.IP "1." 3
Although pandoc itself will not create or modify any files other than