| Age | Commit message (Collapse) | Author |
|
Closes #10999.
This is now used to generate much of the Lua API documentation.
|
|
|
|
Unknown or unsupported options now cause the `pandoc.with_state`
function to fail.
Closes: #11376
|
|
The function allows to run a callback with a modified pandoc state. This
provides the ability to temporarily modify the resource path, the user
data directory, and the HTTP request headers.
Closes: #10859
|
|
The *LogMessage* type now has the appropriate metamethod.
|
|
The `pandoc.readers` and `pandoc.writers` maps now have string values
instead of boolean values. The string signals the type of the
reader/writer, `"text"` for *TextReader*/*TextWriter* and `"bytestring"`
for *ByteStringReader*/*ByteStringWriter*.
Closes: #11367
|
|
|
|
|
|
The common state is transferred to Lua when calling a custom Lua reader,
and is now also transferred back after the reader has finished. This
ensures that info messages, warnings, and mediabag entries are available
to the main program and all subsequent processing steps.
|
|
|
|
|
|
|
|
|
|
|
|
A new command line option `--syntax-highlighting` is provided; it takes
the values `none`, `default`, `idiomatic`, a style name, or a path to a
theme file. It replaces the `--no-highlighting`, `--highlighting-style`,
and `--listings` options.
The `writerListings` and `writerHighlightStyle` fields of the
`WriterOptions` type are replaced with `writerHighlightStyle`.
Closes: #10525
|
|
The function generates element identifiers based on inlines content.
It's primary use case is the programmatic generation of ID, similar to
what the `auto_identifiers` extension provides for many formats.
|
|
The functions convert numbers and parentheses to superscript and
subscript, respectively.
|
|
This provides List methods to the value returned by
`pandoc.system.list_directory`.
Closes: #11032
|
|
Org mode makes a distinction between smart parsing of quotes, and smart
parsing of special strings like `...`. The finer grained control over
these features is necessary to truthfully reproduce Emacs Org mode
behavior. Special strings are enabled by default, while smart quotes are
disabled.
The behavior of `special_string` is brought closer to the reference
implementation in that `\-` is now treated as a soft hyphen.
|
|
- The `PANDOC_STATE` is no longer a userdata object, but a table that
behaves like the old object.
- Log messages in `PANDOC_STATE.log` are now in temporal order.
|
|
The functions allows to check the existence of file-system objects.
|
|
This function performs a normalization of Pandoc documents. E.g.,
multiple successive spaces are collapsed, and tables are normalized such
that all rows and columns contain the same number of cells.
Closes: #10356
|
|
Functions that expect UTF-8-encoded filenames should make it easier to
write platform-independent scripts, as the encoding of the actual
filename depends on the system.
Additionally, this also adds a generalized method to run commands, and
functions to retrieve XDG directory names.
The new functions are `command`, `copy`, `read_file`, `remove`,
`rename`, `times`, `write_file`, `xdg`.
|
|
|
|
|
|
|
|
|
|
The function takes a MIME type and raw data from which it creates an
RFC 2397 data URI.
Closes: #10876
|
|
|
|
Key-value pairs, mapping from filename to contents, can be used to fill
the ersatz file system used in the reader sandbox.
|
|
The sandbox is now enabled if the fourth parameter is a list of files.
The files are read and then made available in the sandbox via a mock
file system.
|
|
|
|
The function `pandoc.read` is now taking an optional fourth parameter
that specifies the environment in which the parser will be run. Passing
the string `sandbox` as the argument causes the reader to run in a
sandbox, thereby preventing all access to the network and file system.
Closes: #10831
|
|
|
|
|
|
|
|
Elements of type Caption, Cell, TableHead, and TableFoot can now be
stringified.
Fixes: #10450
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lua type names were inconsistent with regard to the use of prefixes; all
prefixes are removed now, and Lua types now have the same name as the
Haskell types.
The use of app-specific prefixes is suggested by the Lua manual to avoid
collisions. However, this shouldn't be a problem with pandoc, as it
cannot be used as a Lua package.
Closes: #8574
|
|
|
|
|
|
|
|
It is now possible to return a single filter from a filter file, e.g.
``` lua
-- Switch single- and double quotes
return {
Quoted = function (q)
elem.quotetype = elem.quotetype == 'SingleQuote'
and 'DoubleQuote' or 'SingleQuote'
return elem
end
}
The filter must not contain numerical indexes, or it might be treated as
a list of filters.
|
|
Pandoc already depends on `crypton-conntection`, and thus transitively
on `crypton`. The latter provides a vast variety of hashing algorithms
and makes the dependency on SHA unnecessary.
|
|
Two new command-line options are added:
`--lof[=true|false]`, `--list-of-figures[=true|false]`
`--lot[=true|false]`, `--list-of-tables[=true|false]`
Only docx, latex, and context are supported at this point.
Setting the `lof` and `lot` variables will also work for the formats that are
currently supported.
[API changes]
+ Lua: `list_of_figures` and `list_of_tables` can now be used in writer options.
+ Text.Pandoc.Options: add `writerListOfFigures` and `writerListOfTables` fields
to `WriterOptions`.
+ Text.Pandoc.App.Opt: add `optListOfFigures` and `optListOfTables` to `Opt`.
Closes #8245.
Co-authored-by: John MacFarlane <[email protected]>
|