aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2023-02-14Lua: add new function pandoc.system.cputime.Albert Krewinkel
The function returns the CPU time consumed by pandoc and can be used to benchmark Lua computations.
2023-02-12docs/custom-readers.md: Update JSON parsing exampleAlbert Krewinkel
The example now uses the built-in `pandoc.json` library to parse the API output.
2023-02-11Lua: add module `pandoc.json` to handle JSON encodingAlbert Krewinkel
Closes: #8605
2023-02-09Lua: add field `chunk_template` to WriterOptions objects [API change]Albert Krewinkel
The PathTemplate type exported from Text.Pandoc.Chunks is now an instance of the ToJSON and FromJSON classes. Closes: #8607
2023-02-07Fix typosMartin Joerg
2023-01-28doc/lua-filters.md: document 'Figure' type and constructorAlbert Krewinkel
2023-01-23Fix typoCarlos Scheidegger
`#types-chunkeddoc` -> `#type-chunkeddoc`
2023-01-20fix formatting of link in pandoc-server.mdJames Scott-Brown
2023-01-18Lua: add function pandoc.format.extensions.Albert Krewinkel
This simplifies the creation of custom readers and writers that are based on built-in formats.
2023-01-18doc/custom-reader.md: rewrite BytestringReader paragraphIlona Silverwood
2023-01-17Add FAQ on producing pdf/a.John MacFarlane
See #3215.
2023-01-16Lua: Add function `pandoc.mediabag.write`.Albert Krewinkel
Allows to write the complete mediabag or just a specific file to a given directory.
2023-01-15Lua: add module `pandoc.structure`.Albert Krewinkel
Adds support for table of contents and chunks handling. The function `make_sections` has been given a friendlier interface and was moved to the new module; the old `pandoc.utils.make_sections` has been deprecated.
2023-01-14Remove Null constructor from docsAlbert Krewinkel
2023-01-12Replace `--epub-chapter-level` with `--split-level`.John MacFarlane
Rationale: we need this splitting level now not just in EPUB but in chunked HTML. `--epub-chapter-level` will still function as a deprecated synonynm. `epub-chapter-level` will also continue to work in defaults files, ande `epub_chapter_level` will still work for Lua marshalling. [API changes] Text.Pandoc.App.Opt: remove `optEpubChapterLevel`, add `optSplitLevel`. Text.Pandoc.Options: remove `writerEpubChapterLevel`, add `writerSplitLevel`.
2023-01-11Updated some references to master -> main.John MacFarlane
2023-01-10Add missing backtick in filters.mdR. N. West
2023-01-03Lua: add functions `pandoc.text.toencoding`, `pandoc.text.fromencoding`.Albert Krewinkel
Closes: #8512
2022-12-20Shared: use LineBreak as default block sep in blocksToInlinesAlbert Krewinkel
This change also affects the `pandoc.utils.blocks_to_inlines` Lua function. Closes: #8499
2022-12-16Lua: allow table structure as format spec.Albert Krewinkel
This allows to pass structured values as format specifiers to `pandoc.write` and `pandoc.read`.
2022-12-12Lua: add pandoc.cli moduleAlbert Krewinkel
Allow processing of CLI options in Lua.
2022-12-07Fix a tiny typo in lua-filters.mdTomBen
2022-12-08Shared: change defaultBlocksSeparator to PARAGRAPH SEPARATORAlbert Krewinkel
This Unicode char (U+2029) is intended as a semantic separator between paragraphs; it is cleaner and less intrusive than the pilcrow sign that we used before. This also changes the default `sep` value used in the `pandoc.utils.blocks_to_inlines` Lua function.
2022-12-03doc/lua-filters.md: add documentation for pandoc.formatAlbert Krewinkel
2022-11-16Update epub.mdVladimir Alexiev
minor typo s/above/about/
2022-10-25Lua: rename `reader_extensions`/`writer_extensions` globals...John MacFarlane
...as `Extensions`. Update documnetation. Include a custom extension in the documentation example. See #8390.
2022-10-24Remove sample.lua from data files (#8397)Albert Krewinkel
The file is kept around in the pandoc-lua-engine test-suite. Closes: #8356
2022-10-21Lua: add pandoc.scaffolding.Writer (#8377)Albert Krewinkel
This can be used to reduce boilerplate in custom writers.
2022-10-20Lua: add new module `pandoc.zip`Albert Krewinkel
Allows to handle docx and epub files.
2022-10-14Lua: Support built-in default templates for custom writersAlbert Krewinkel
Custom writers can define a default template via a global `Template` function; the data directory is no longer searched for a default template. Writer authors can restore the old lookup behavior with ``` lua Template = function () local template return template.compile(template.default(PANDOC_SCRIPT_FILE)) end ```
2022-10-14doc/custom-writers.md: fix formattingAlbert Krewinkel
2022-10-14doc/custom-writers.md: Rephrase paragraph on format extensions (#8375)Ilona
2022-10-12Lua: add function `pandoc.template.meta_to_context`.Albert Krewinkel
The functions converts Meta values to template contexts; the intended use is in combination with `pandoc.template.apply`.
2022-10-12Lua: support extensions in custom readers.Albert Krewinkel
Like custom readers, like writers, can define the set of supported extensions by setting a global. E.g.: ``` lua reader_extensions = { smart = true, citations = false, } ```
2022-10-11Lua: add function `pandoc.template.apply`Albert Krewinkel
The new function applies a context, containing variable assignments, to a template.
2022-10-10Lua: support extensions in custom writersAlbert Krewinkel
Custom writers can define the extensions that they support via the global `writer_extensions`. The variable's value must be a table with all supported extensions as keys, and their default status as values. E.g., the below specifies that the writer support the extensions `smart` and `sourcepos`, but only the `smart` extension is enabled by default: writer_extensions = { smart = true, sourcepos = false, }
2022-10-10doc/libraries.md: add hslua-cli and the hslua-module-* packagesAlbert Krewinkel
2022-10-10doc/lua-filters.md: deprecate PANDOC_WRITER_OPTIONS in custom writersAlbert Krewinkel
2022-10-10Lua: support custom bytestring readers.Albert Krewinkel
2022-10-09doc/lua-filters.md: fix typosAlbert Krewinkel
2022-10-08Update Lua filter doc: modify Zerobrane instructions to use Lua 5.4 (#8353)Ian Max Andolina
2022-10-03doc/lua-filters.md: fix documentation of PANDOC_WRITER_OPTIONS.Albert Krewinkel
2022-10-03doc/lua-filters.md: document pandoc.write_classic.Albert Krewinkel
2022-10-03[API Change] Support bytestring custom writers.Albert Krewinkel
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.
2022-10-03Lua: deprecate classic custom writers.Albert Krewinkel
2022-10-03[API Change] Base custom writers on Writer type.Albert Krewinkel
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.
2022-09-26pandoc-lua: support more command line flagsAlbert Krewinkel
2022-09-25doc: use cabal's --package-env more (#8317)Artem Pelenitsyn
2022-09-22Make pandoc behave like a Lua interpreter when called as `pandoc-lua`. (#8311)Albert Krewinkel
2022-08-29PandocServer: return error in JSON object if response is JSON.John MacFarlane