aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2022-01-30Fix identifier in lua-filters doc.John MacFarlane
2022-01-30lua-filters: put all parameters in code font.John MacFarlane
2022-01-25Add metadata file paragraph to Pandoc API doc (#7865)Even Brenden
2022-01-24Fix div position in faqs.John MacFarlane
2022-01-24Fix lua-filters documentation for table column widths.John MacFarlane
See #7864.
2022-01-22epub.doc: Update links to KindleGen (#7846)Benson Muite
KindleGen has been deprecated and we need to link to archived versions. Co-authored-by: Mauro Bieg <[email protected]>
2022-01-16Fix pattern syntax in sample readability custom reader.John MacFarlane
2022-01-16Minor edits to new custom reader example.John MacFarlane
2022-01-16doc/custom-readers.lua: add example for "readable HTML."John MacFarlane
2022-01-14Add FAQ on images in ipynb containers.John MacFarlane
Closes #7749.
2022-01-10doc/jats.md: link JATSMartin Fischer
2022-01-09Docs: document `fancy_lists` in doc/org.md (#7820)Lucas Viana
Document the changes introduced in #7812
2022-01-07Further improvements to doc/lua-filters.md.John MacFarlane
2022-01-07lua-filters.doc: use header attributes, not spans.John MacFarlane
2022-01-07lua-filters.doc: use headings instead of nested def lists.John MacFarlane
See #7807.
2022-01-04Lua: add `pandoc.template` moduleAlbert Krewinkel
The module provides a `compile` function to use strings as templates.
2022-01-04Lua: marshal templates as opaque userdata valuesAlbert Krewinkel
2022-01-04Lua: add `pandoc.WriterOptions` constructorAlbert Krewinkel
2022-01-04Lua: add function `pandoc.write`Albert Krewinkel
2022-01-02Lua writer: allow variables to be set via second return value of `Doc`Albert Krewinkel
New templates variables can be added by giving variable-value pairs as a second return value of the global function `Doc`. Example: function Doc (body, meta, vars) vars.date = vars.date or os.date '%B %e, %Y' return body, vars end Closes: #6731
2022-01-02doc/lua-filters.md: fix and improve documentationAlbert Krewinkel
2022-01-02Lua writer: provide global `PANDOC_WRITER_OPTIONS`Albert Krewinkel
Closes: #6731
2022-01-01Lua: provide global `PANDOC_WRITER_OPTIONS` [API change]Albert Krewinkel
API changes: - The function T.P.Filter.applyFilters now takes a filter environment of type `Environment`, instead of a ReaderOptions value. The `Environment` type is exported from `T.P.Filter` and allows to combine ReaderOptions and WriterOptions in a single value. - Global, exported from T.P.Lua, has a new type constructor `PANDOC_WRITER_OPTIONS`. Closes: #5221
2022-01-01Lua: marshal ReaderOptions field `extensions`, `track_changes` via JSONAlbert Krewinkel
Extensions are now available as a list of strings; the track-changes settings are given as the kebab-case representation used in JSON.
2021-12-31Lua: use global state when parsing documents in `pandoc.read`Albert Krewinkel
The function `pandoc.read` is updated to use the same state that was used while parsing the main input files. This ensures that log messages are preserved and that images embedded in the input are added to the mediabag.
2021-12-28doc/lua-filters.md: improve documentation of `make_sections`Albert Krewinkel
2021-12-23Lua: use released pandoc-lua-marshal-0.1.3.Albert Krewinkel
Inlines, Blocks, and List objects now have an `__eq` metamethod, testing equality by comparing two lists element-wise.
2021-12-23JATS templates: fix affiliation tagging in articleauthoring outputAlbert Krewinkel
Affiliations were `xlink`ed even in the articleauthoring tag set, but `<aff>` are not allowed as children of `contrib-group` elements in that tag set. Each affiliation must be listed directly in the contrib element.
2021-12-23JATS templates: add support for article subtitlesAlbert Krewinkel
2021-12-21Lua: simplify and deprecate function `pandoc.utils.equals`Albert Krewinkel
The function is no longer required for element comparisons; it is now an alias for the `==` operator.
2021-12-21Lua: add new library function `pandoc.utils.type`.Albert Krewinkel
The function behaves like the default `type` function from Lua's standard library, but is aware of pandoc userdata types. A typical use-case would be to determine the type of a metadata value.
2021-12-19doc/lua-filters: numbers are now accepted as MetaValueAlbert Krewinkel
2021-12-19Lua: change representation of TableHead, TableFoot, and Row values.Albert Krewinkel
The objects now also follow the principle that element attributes are accessible through the `.attr` field. Rows in `TableHead` and `TableFoot` are available via the `.rows` field. Row objects have a `.cells` field, containing the list of table cells. Closes: #7718
2021-12-17Lua: add function `pandoc.utils.references`Albert Krewinkel
List with all cited references of a document. Closes: #7752
2021-12-14doc/lua-filters.md: add docs for `Cell` constructorAlbert Krewinkel
2021-12-13doc/lua-filters.md: update description of walk methods, fix typosAlbert Krewinkel
2021-12-13Lua: support topdown traversalsAlbert Krewinkel
The traversal order of filters can now be selected by setting the key `traverse` of the filter to either `'topdown'` or `'typewise'`; the default remains `'typewise'`. Topdown traversals can be cut short by returning `false` as a second value from the filter function. No child-element of the returned element is processed in that case.
2021-12-11Custom reader: ensure old Readers continue to workAlbert Krewinkel
Retry conversion by passing a string instead of sources when the `Reader` fails with a message that hints at an outdated function. A deprecation notice is reported in that case.
2021-12-11Custom reader: pass list of sources instead of concatenated textAlbert Krewinkel
The first argument passed to Lua `Reader` functions is no longer a plain string but a richer data structure. The structure can easily be converted to a string by applying `tostring`, but is also a list with elements that contain each the *text* and *name* of each input source as a property of the respective name. A small example is added to the custom reader documentation, showcasing its use in a reader that creates a syntax-highlighted code block for each source code file passed as input. Existing readers must be updated.
2021-12-10Switch to released pandoc-lua-marshal-0.1.2Albert Krewinkel
Cell values are now marshaled as userdata objects; a constructor function for table cells is provided as `pandoc.Cell`.
2021-12-09Lua: update to latest pandoc-lua-marshal (0.1.1)Albert Krewinkel
- `walk` methods are added to `Block` and `Inline` values; the methods are similar to `pandoc.utils.walk_block` and `pandoc.utils.walk_inline`, but apply to filter also to the element itself, and therefore return a list of element instead of a single element. - Functions of name `Doc` are no longer accepted as alternatives for `Pandoc` filter functions. This functionality was undocumented.
2021-12-06custom-writers.md: use filter to include source of example.John MacFarlane
2021-12-02Suggest VSCode as a possible editor in getting-started.md.John MacFarlane
2021-11-29Lua: remove `pandoc.utils.text` (#7720)Albert Krewinkel
The new `pandoc.Inlines` function behaves identical on string input, but allows other Inlines-like arguments as well. The `pandoc.utils.text` function could be written as function pandoc.utils.text (x) assert(type(x) == 'string') return pandoc.Inlines(x) end
2021-11-29fix typo in custom-readers.md (#7722)Mauro Bieg
2021-11-28doc/lua-filters.md: update docs on Blocks, Inlines, MetaValueAlbert Krewinkel
2021-11-28Lua: add constructors `pandoc.Blocks` and `pandoc.Inlines`Albert Krewinkel
The functions convert their argument into a list of Block and Inline values, respectively.
2021-11-23Simplify sample ris reader in doc/custom-readers.md.John MacFarlane
Made possible by #7712.
2021-11-23Lua: add function `pandoc.utils.text` (#7710)Albert Krewinkel
The function converts a string to `Inlines`, treating interword spaces as `Space`s or `SoftBreak`s. If you want a `Str` with literal spaces, use `pandoc.Str`. Closes: #7709
2021-11-22Add an example to custom-readers.md.John MacFarlane