aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine
AgeCommit message (Collapse)Author
2025-12-01pandoc-lua-engine: bump to 0.5.0.2.John MacFarlane
2025-11-30pandoc-lua-engine: allow citeproc 0.12.John MacFarlane
2025-11-19Lua: preserve common state of custom Lua readersAlbert Krewinkel
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.
2025-10-20Bump pandoc-lua-engine to 0.5.0.1John MacFarlane
2025-10-19pandoc-lua-engine: allow citeproc 0.11.John MacFarlane
2025-09-06Bump pandoc-lua-engine to 0.5.John MacFarlane
2025-09-06pandoc-lua-engine: change pandoc dependency bounds.John MacFarlane
2025-09-04Bump version bound for citeproc in pandoc-lua-engine.John MacFarlane
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-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-09Lua: require hslua-module-system 1.2.3Albert Krewinkel
This provides List methods to the value returned by `pandoc.system.list_directory`. Closes: #11032
2025-08-06Add `smart_quotes` and `special_strings` extensions for OrgAlbert Krewinkel
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.
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-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-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-25pandoc-lua-engine: Allow hslua-2.4.0 in the testsAlbert Krewinkel
2025-06-23pandoc-lua-engine: Allow hslua-2.4.Albert Krewinkel
2025-05-28Bump pandoc-lua-engine to 0.4.3.John MacFarlane
2025-05-28doc/lua-filters.md: add missing docs for `pandoc.Caption`Albert Krewinkel
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-14pandoc-lua-engine: bump to 0.4.2, bump pandoc bounds.John MacFarlane
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-13pandoc-lua-engine: add all test files to the cabal fileAlbert Krewinkel
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-12Use citeproc-0.9. Bump citeproc bounds for pandoc, pandoc-lua-engine.John MacFarlane
2025-03-16pandoc-lua-engine to 0.4.1.1, allow latest containersJohn MacFarlane
2024-12-23pandoc-lua-engine: bump to 0.4.1.John MacFarlane
2024-12-10Lua: support more elements as input to `pandoc.utils.stringify`.Albert Krewinkel
Elements of type Caption, Cell, TableHead, and TableFoot can now be stringified. Fixes: #10450
2024-12-10Lua: add `Caption` constructor to `pandoc` module.Albert Krewinkel
2024-12-07Depend on typst 0.6.1John MacFarlane
2024-12-07Depend on released pandoc-lua-marshal 0.3.0.John MacFarlane
2024-12-07Bump pandoc-lua-engine to 0.4 and depend on it in pandoc-cli.John MacFarlane
2024-11-06Fix typos (#10349)Andreas Deininger
2024-10-28Bump upper bound for data-default.John MacFarlane
2024-10-14Lua: Remove prefixes from Lua type namesAlbert Krewinkel
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
2024-10-05Depend on latest pandoc-lua-marshall.John MacFarlane
2024-10-05Bump pandoc-lua-engine to 0.3.3.John MacFarlane
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-29Stop depending on package SHAAlbert Krewinkel
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.
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-09Bump pandoc-lua-engine to 0.3.2.John MacFarlane
2024-09-09Depend on doclayout 0.5.John MacFarlane
2024-09-08pandoc-lua-engine: marshall list_tables, epub_title_page writer options.John MacFarlane
2024-09-08Finishing touches on `--link-images`:John MacFarlane
- Document in defaults file section of MANUAL. - Add to pandoc-lua-engine writer option marshalling. - Add to pandoc-server initialization of writer options.