New-style custom Lua writers can now define an alternative entry function
`BinaryWriter`. If a function with that name is defined, then pandoc
will treat the returned string as binary output. This allows to generate
formats like docx and odt with custom writers.
The `T.P.Lua.writeCustom` function changed to allow either a TextWriter
or ByteStringWriter to be returned. The global variables
`PANDOC_DOCUMENT` and `PANDOC_WRITER_OPTIONS` are no longer set when the
writer script is loaded. Both variables are still set in classic writers
before the conversion is started, so they can be used when they are
wrapped in functions.
The function can be used to convert a classic writer into a new-style
writer by setting it as the value of `Writer`:
``` lua
Writer = pandoc.write_classic
```
or to fully restore the old behavior:
``` lua
function Writer (doc, opts)
PANDOC_DOCUMENT = doc
PANDOC_WRITER_OPTIONS = opts
load(PANDOC_SCRIPT_FILE)()
return pandoc.write_classic(doc, opts)
end
```
This exports `toName`, which previously had been part of
T.P.Citeproc.BibTeX. T.P.Readers.RIS,EndNote can now depend on
this module without transitively depending on the LaTeX reader,
which is used in T.P.Citeproc.BibTeX.
Closes#8345.
E.g. what depends on Text.Pandoc.Parsing?
make modules.pdf ROOTNODE=T.P.Parsing
This is helpful for figuring out what we can split out as separate
packages.
Print flag settings (lua, server) and versions of all relevant packages.
Add suffix for nightly builds.
Move `nightly` flag from pandoc to pandoc-cli.
Closes#8339.
The module Text.Pandoc.Filter.Lua has been merged into Text.Pandoc.Lua.
The function `applyFilter` now has type
``` haskell
applyFilter :: (PandocMonad m, MonadIO m)
=> Environment-> [String]-> FilePath-> Pandoc-> m Pandoc
```
where `Environment` is defined in Text.Pandoc.Filter.Environment.
and add a new `pandocVersion` value with type `Version`. This is
consistent with the type used for `pandocTypesVersion` and allows to use
the value where a Version type is required.
[API change] Add writerListTables to WriterOptions.
RST writer: Remove sensitivity to "list-table" class in table attributes.
Instead, just check `writerListTables` in writer options.
See #4564.