aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2019-11-20Fix typos (#5919)Brian Wignall1-2/+2
2019-11-13doc/lua-filters.md: mention which Lua version is shipped with pandocAlbert Krewinkel1-3/+3
See: #5892
2019-11-02Fix metadata replacement example in lua-filters doc.John MacFarlane1-20/+20
Closes #5851. We avoid the failure with a boolean value by simply checking to make sure we have a table before indexing.
2019-10-28Fix capitalization of "Linux" in docs (#5859)Marcus Stollsteimer2-3/+3
2019-10-27doc/lua-filters.md: fix mistakes in mediabag module docsAlbert Krewinkel1-3/+3
See: #5851
2019-09-15Lua filters: allow passing of HTML-like tables instead of Attr (#5750)Albert Krewinkel1-1/+13
Attr values can now be given as normal Lua tables; this can be used as a convenient alternative to define Attr values, instead of constructing values with `pandoc.Attr`. Identifiers are taken from the *id* field, classes must be given as space separated words in the *class* field. All remaining fields are included as misc attributes. With this change, the following lines now create equal elements: pandoc.Span('test', {id = 'test', class = 'a b', check = 1}) pandoc.Span('test', pandoc.Attr('test', {'a','b'}, {check = 1})) This also works when using the *attr* setter: local span = pandoc.Span 'text' span.attr = {id = 'test', class = 'a b', check = 1} Furthermore, the *attributes* field of AST elements can now be a plain key-value table even when using the `attributes` accessor: local span = pandoc.Span 'test' span.attributes = {check = 1} -- works as expected now Closes: #5744
2019-09-08Replace Element and makeHierarchical with makeSections.John MacFarlane1-49/+13
Text.Pandoc.Shared: + Remove `Element` type [API change] + Remove `makeHierarchicalize` [API change] + Add `makeSections` [API change] + Export `deLink` [API change] Now that we have Divs, we can use them to represent the structure of sections, and we don't need a special Element type. `makeSections` reorganizes a block list, adding Divs with class `section` around sections, and adding numbering if needed. This change also fixes some longstanding issues recognizing section structure when the document contains Divs. Closes #3057, see also #997. All writers have been changed to use `makeSections`. Note that in the process we have reverted the change c1d058aeb1c6a331a2cc22786ffaab17f7118ccd made in response to #5168, which I'm not completely sure was a good idea. Lua modules have also been adjusted accordingly. Existing lua filters that use `hierarchicalize` will need to be rewritten to use `make_sections`.
2019-08-08lua-filters - avoid duplicate id element-components.John MacFarlane1-1/+1
2019-08-08Update lua-filters doc from lua sources.John MacFarlane1-678/+710
2019-08-08Fix links to Attr in lua-filters.doc.John MacFarlane1-7/+7
2019-08-08lua-filters.doc: make table narrower so it doesn't crowd out TOC.John MacFarlane1-11/+11
2019-06-12Lua: add a `clone()` method to all AST elements (#5572)Albert Krewinkel1-0/+15
Closes: #5568
2019-06-05Fix typo in lua documentation.John MacFarlane1-1/+1
Closes #5552.
2019-05-30doc/lua-filters.md: fix typos in pandoc.mediabag docsAlbert Krewinkel1-2/+2
2019-05-29pandoc.mediabag module: add function `delete`Albert Krewinkel1-0/+12
Function `pandoc.mediabag.delete` allows to remove a single item of the given name from the media bag.
2019-05-29pandoc.mediabag module: add function `empty`Albert Krewinkel1-1/+6
Function `pandoc.mediabag.empty` was added. It allows to clean-out the media bag, removing all entries.
2019-05-29pandoc.mediabag module: add items function iterating over mediabagAlbert Krewinkel1-0/+27
A new function `pandoc.mediabag.items` was added to Lua module pandoc.mediabag. This allows users to lazily iterate over all media bag items, loading items into Lua one-by-one. Example: for filename, mime_type, content in pandoc.mediabag.items() do -- use media bag item. end This is a convenient alternative to using `mediabag.list` in combination with `mediabag.lookup`.
2019-05-29doc/lua-filters.md: improve docs for Version type/constructorAlbert Krewinkel1-2/+38
2019-05-29Lua: add Version type to simplify comparisonsAlbert Krewinkel1-9/+42
Version specifiers like `PANDOC_VERSION` and `PANDOC_API_VERSION` are turned into `Version` objects. The objects simplify version-appropriate comparisons while maintaining backward-compatibility. A function `pandoc.types.Version` is added as part of the newly introduced module `pandoc.types`, allowing users to create version objects in scripts.
2019-05-04Lua: add `pandoc.system` module (#5468)Albert Krewinkel1-0/+108
The `system` Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or pandoc.system.with_temporary_directory('tikz', function (dir) -- write and compile a TikZ file with pdflatex end)
2019-05-01Fix broken links in documents (#5473)Shim Myeongseob6-40/+40
Fix broken links in doc/epub.md, doc/getting-started.md, doc/customizing-pandoc.md, doc/using-the-pandoc-api.md. Also, use absolute links to pandoc.org when possible, so that the links can be followed by people viewing these documents on GitHub.
2019-04-15Improved sample lua tikz filter in lua-filters docs (#5445)Matthew Doty1-12/+21
There are three changes: - It only processes elements which begin with \begin{tikzpicture} - It uses pdf2svg instead of imagemagick to preserve fidelity - The images produced have transparent backgrounds
2019-02-16doc/lua-filters.md: fixed typos in mediabag docs.Albert Krewinkel1-3/+3
2019-02-09Lua filters: load module `pandoc` before calling `init.lua` (#5287)Albert Krewinkel1-14/+10
The file `init.lua` in pandoc's data directory is run as part of pandoc's Lua initialization process. Previously, the `pandoc` module was loaded in `init.lua`, and the structure for marshaling was set-up after. This allowed simple patching of element marshaling, but made using `init.lua` more difficult: - it encouraged mixing essential initialization with user-defined customization; - upstream changes to init.lua had to be merged manually; - accidentally breaking marshaling by removing required modules was possible; Instead, all required modules are now loaded before calling `init.lua`. The file can be used entirely for user customization. Patching marshaling functions, while discouraged, is still possible via the `debug` module.
2019-02-09data/pandoc.lua: re-export all bundled modulesAlbert Krewinkel1-2/+9
All Lua modules bundled with pandoc, i.e., `pandoc.List`, `pandoc.mediabag`, `pandoc.utils`, and `text` are re-exported from the `pandoc` module. They are assigned to the fields `List`, `mediabag`, `utils`, and `text`, respectively.
2019-02-08Small fix in lua-filters doc.John MacFarlane1-1/+1
2019-02-07data/pandoc.lua: re-export List and utils moduleAlbert Krewinkel1-1/+21
2019-02-01doc/lua-filters.md: fix docs for OrderedList itemsAlbert Krewinkel1-3/+1
2019-01-31More improvements on lua-filters docs.John MacFarlane1-342/+386
2019-01-30doc/lua-filters.md: use 3rd level headers for module fieldsAlbert Krewinkel1-664/+664
2018-12-29doc/org.md: improve documentation of org featuresAlbert Krewinkel1-15/+114
2018-11-29Fix progit book urlJulien Kirch1-2/+2
2018-11-19Lua filters: test AST object equality via HaskellAlbert Krewinkel1-1/+47
Equality of Lua objects representing pandoc AST elements is tested by unmarshalling the objects and comparing the result in Haskell. A new function `equals` which performs this test has been added to the `pandoc.utils` module. Closes: #5092
2018-11-17cusomizing-pandoc.md: streamline template textMauro Bieg1-11/+3
2018-11-17customizing-templates.md: variable options tableMauro Bieg1-2/+21
2018-11-01getting-started.md: Added title to test1.md to avoid warning.John MacFarlane1-0/+4
2018-10-25Lua: allow access to pandoc state (#5015)Albert Krewinkel1-0/+47
* Lua: allow access to pandoc state Lua filters and custom writers now have read-only access to most fields of pandoc's internal state via the global variable `PANDOC_STATE`. * Lua: allow iterating through fields of PANDOC_STATE * Lua filters doc: describe CommonState * Lua filters doc: mention global variable PANDOC_STATE * Lua: add access to logs Log messages can currently only be printed, but not decomposed.
2018-10-19Lua filter doc: merge type references into main documentAlbert Krewinkel2-661/+665
2018-10-18Lua filters doc: fix and add more links to typesAlbert Krewinkel1-45/+48
2018-10-16Added note to customizing-pandoc.John MacFarlane1-0/+4
2018-10-16customizing-pandoc: add suggestion about 'pandoc -t native'.John MacFarlane1-1/+2
2018-10-16Revised customizing-pandoc.md and included TODOs.John MacFarlane1-63/+151
2018-10-16add docs about customizing pandoc (#4972)Mauro Bieg2-2/+66
closes #3288
2018-10-16Lua filter docs: extend description of table fieldsAlbert Krewinkel1-9/+18
2018-10-15Lua filter docs: describe Attr typeAlbert Krewinkel1-13/+28
2018-10-15Lua filter docs: render field names as codeAlbert Krewinkel1-131/+131
2018-10-15Lua filter docs: fix typosAlbert Krewinkel1-5/+5
2018-10-15Lua filter docs: complete, fix MetaValue documentationAlbert Krewinkel1-5/+47
2018-10-15Lua filters doc: add ReaderOptions to list of objectsAlbert Krewinkel1-0/+35
2018-10-13Lua filter docs: add documentation for Element/SecAlbert Krewinkel1-0/+30