aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
12 daysLua: add function `pandoc.utils.documentation` (#11383)Albert Krewinkel
Closes #10999. This is now used to generate much of the Lua API documentation.
2026-01-09doc/custom-writers.md: Fix typo.John MacFarlane
Closes #11388.
2026-01-02Lua: add function `pandoc.with_state`Albert Krewinkel
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
2025-10-10Correct anchor references to `pandoc.text` module documentation (#11205)Emmanuel Ferdman
Closes #11111.
2025-09-04doc/lua-filters.md: remove outdated notes about `lpeg`/`re` globals.Albert Krewinkel
The globals hold the same values that are returned by `require 'lpeg'` and `require 're'`, respectively. This was changed in pandoc 3.3.
2025-09-02Refactor highlighting options [API Change]Albert Krewinkel
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
2025-08-26doc page: add Baseprinter pandoc wrapper to extrasCastedo Ellerman
2025-08-12Lua: add function `pandoc.structure.unique_identifier`.Albert Krewinkel
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.
2025-08-12Lua: add functions `pandoc.text.superscript` and `subscript`.Albert Krewinkel
The functions convert numbers and parentheses to superscript and subscript, respectively.
2025-08-01Lua: use proper interface functions to access the CommonState.Albert Krewinkel
- 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.
2025-07-29docs: Don't encourage returning tables of filters from Lua filters (#11000)R. N. West (Nat)
See #10995. Use the `Pandoc:walk` method instead.
2025-07-26New `xml` format exactly representing a Pandoc AST.massifrg
This adds a reader and writer for an XML format equivalent to `native` and `json`. XML schemas for validation can be found in `tools/pandoc-xml.*`. The format is documented in `doc/xml.md`. API changes: - Add module Text.Pandoc.Readers.XML, exporting `readXML`. - Add module Text.Pandoc.Writers.XML, exporting `writeXML`. A new unexported module Text.Pandoc.XMLFormat is also added.
2025-07-23Lua: add function `pandoc.path.exists`.Albert Krewinkel
The functions allows to check the existence of file-system objects.
2025-07-19Lua: add `normalize` function to *Pandoc* objectsAlbert Krewinkel
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
2025-07-10doc/lua-filters.md: Add example on using pandoc.Table constructor. (#10956)Sean Soon
2025-06-30Lua: add more UTF-8-aware file operations to `pandoc.system`.Albert Krewinkel
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`.
2025-06-23doc/lua-filters: fix docs for `pandoc.Cite`.Albert Krewinkel
2025-06-16doc/extras.md: Fix link to pandoc-modeErik Post
2025-05-28doc/lua-filters.md: add missing docs for `pandoc.Caption`Albert Krewinkel
2025-05-28doc/lua-filters.md: Re-generate docsAlbert Krewinkel
Pandoc now uses fewer spaces when outputting list items.
2025-05-28Lua: add function `pandoc.mediabag.make_data_uri`.Albert Krewinkel
The function takes a MIME type and raw data from which it creates an RFC 2397 data URI. Closes: #10876
2025-05-14Lua: accept filename-contents pairs as env for `pandoc.read`Albert Krewinkel
Key-value pairs, mapping from filename to contents, can be used to fill the ersatz file system used in the reader sandbox.
2025-05-14Lua: allow to pass files to the `pandoc.read` sandboxAlbert Krewinkel
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.
2025-05-13Lua: support sandboxed parsing with `pandoc.read`.Albert Krewinkel
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
2025-05-07Mention in the docs, that typst:no-figure is a class, not an attribute (#10826)Niklas Eicker
2025-02-24doc/lua-filters.md: Add missing html_math_method 'katex'R. N. West
2025-02-05Add CRediT roles to JATSCharles Tapley Hoyt
Enable annotating author roles using the Contribution Role Taxonomy (CRediT) and export this information in conformant JATS Closes #10152. Co-Authored-By: Jez Cope <[email protected]>
2025-02-04doc/lua-filters: add note about extensions handling in read and writeAlbert Krewinkel
2025-01-31doc/lua-filters.md: Correct luacheck URL (#10589)R. N. West (Nat)
2025-01-30doc/extras.md: Add entry for pandoc-subfigsR. N. West
https://github.com/rnwst/pandoc-subfigs
2025-01-30doc/extras.md: Update diagram Lua filter URL (and description)R. N. West
2025-01-29doc/lua-filters.md: Add static analysis paragraph to debugging section (#10568)R. N. West (Nat)
2025-01-11lua-filters.md: document system.os return values.John MacFarlane
Closes #10523.
2024-12-10doc/lua-filters.md: Fix links to constructors.Albert Krewinkel
This was broken when the respective sections started to be autogenerated.
2024-11-06Fix typos (#10349)Andreas Deininger
2024-10-23doc/libraries.md: Sort list alphabeticallyAlbert Krewinkel
2024-10-23doc/libraries.md: Add newly developed Haskell packagesAlbert Krewinkel
2024-10-14doc/lua-filters.md: document `pandoc.List:iter` methodAlbert Krewinkel
List objects have a new function `iter` that returns an iterator function that returns the next list item on each call.
2024-10-01doc/lua-filters.md: list functions in `pandoc.utils` alphabeticallyAlbert Krewinkel
2024-10-01Lua: allow returning a single filter from filter filesAlbert Krewinkel
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.
2024-09-22Add support for list of figures (lof) and list of tables (lot) (#10029)Akash Patel
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]>
2024-09-21Lua: support character styling via `pandoc.layout`Albert Krewinkel
The `Doc` values produced and handled by the `pandoc.layout` module can now be styled using `bold`, `italic`, `underlined`, or `strikeout`. The style is ignored in normal rendering, but becomes visible when rendering to ANSI output. The `pandoc.layout.render` function now takes a third parameter that defines the output style, either *plain* or *ansi*.
2024-09-21Lua: update List moduleAlbert Krewinkel
The module now comes with a method `:at(index[, def])` that allows to access indices, accepts negative indices to count from the end, and will return the `def` value as a default if the list has no item at the given position. Furthermore, the list constructor `pandoc.List` now accepts iterators. E.g., `pandoc.List(text:gmatch '%S+')` returns the list of words in `text`. Closes: #9835
2024-09-20JATS template: support `floats-group`Albert Krewinkel
The content of the `floats-group` variable is now rendered in a `<floats-group>` element when using the *publishing* or *archiving* tag sets. Discussion: #10196
2024-07-28Update FAQ for converting a directory of files in Windows.John MacFarlane
Use fullname rather than name (#5429 comment).
2024-07-08lua-filters.md: Partially autogenerate docs for module "pandoc"Albert Krewinkel
The documentation system isn't powerful enough to generate the full documentation automatically.
2024-06-18doc/custom-writers.md: document the separator arg of `Writer.Blocks`Albert Krewinkel
Mention that the default `Writer.Blocks` function in `pandoc.scaffolding.Writer` takes a separator as an optional second argument.
2024-06-11doc/lua-filters.md: Fix outdated docsAlbert Krewinkel
Documentation of math and quoting related functions and fields was updated. The docs had been outdated since at least pandoc 2.17.
2024-06-10doc/lua-filters.md: correct return type of `pandoc.layout.render`.Albert Krewinkel
2024-06-10doc/lua-filters.md: Document operators of the "Doc" type.Albert Krewinkel