aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2020-08-07doc/lua-filters.md: add missing Link.title fieldAlbert Krewinkel1-0/+3
2020-07-29doc/lua-filters.md: add missing header attributeAlbert Krewinkel1-1/+1
2020-07-28Lua filter docs: remove link table exampleAlbert Krewinkel1-36/+0
The example is outdated and requires a complete overhaul.
2020-07-25doc/lua-filters.md: document `body` fieldAlbert Krewinkel1-3/+6
2020-07-25Lua filters: make attr argument optional in Table constructorAlbert Krewinkel1-6/+15
This changes the Lua API. It is highly unlikely for this change to affect existing filters, since the documentation for the new Table constructor (and type) was incomplete and partly wrong before. The Lua API is now more consistent, as all constructors for elements with attributes now take attributes as the last parameter.
2020-07-25doc/lua-filters.md: fix documentation for tablesAlbert Krewinkel1-20/+123
2020-07-21Update using-the-pandoc-api.mdfavonia1-1/+2
2020-07-09Fix Typos in Lua Filters Doctajmone1-4/+4
2020-06-29Org reader: unify keyword handlingAlbert Krewinkel1-4/+4
Handling of export settings and other keywords (like `#+LINK`) has been combined and unified.
2020-06-29Org reader: support LATEX_HEADER_EXTRA and HTML_HEAD_EXTRA settingsAlbert Krewinkel1-6/+7
These export settings are treated like their non-extra counterparts, i.e., the values are added to the `header-includes` metadata list.
2020-06-29Org reader: allow multiple #+SUBTITLE export settingsAlbert Krewinkel1-1/+4
The values of all lines are read as inlines and collected in the `subtitle` metadata field.
2020-06-28doc/org.md: document behavior of `smart` extensionAlbert Krewinkel1-0/+27
See discussion in #4788. Closes: #4387
2020-06-28Org reader: read `#+INSTITUTE` values as text with markupAlbert Krewinkel1-0/+5
The value is stored in the `institute` metadata field and used in the default beamer presentation template.
2020-06-27doc/org.md: describe all supported export options in detailAlbert Krewinkel1-0/+57
2020-05-25lua-filters.md: use pandoc.system module in TikZ exampleAlbert Krewinkel1-39/+48
Showcase temporary directory handling with `with_temporary_directory` and `with_working_directory`.
2020-04-01Fix description of BulletList Lua typeLevi Gruspe1-5/+5
Change description of BulletList parameter from 'List of Blocks' to 'List of List of Blocks'.
2020-03-15Update filter code in doc/filters.md...John MacFarlane1-7/+21
so it works with latest pandoc. Closes #6185.
2020-01-18doc/lua-filters.md: fix copy-paste mistakeAlbert Krewinkel1-1/+1
Closes: #6040
2020-01-15Lua filters: allow filtering of element lists (#6040)Albert Krewinkel1-1/+71
Lists of Inline and Block elements can now be filtered via `Inlines` and `Blocks` functions, respectively. This is helpful if a filter conversion depends on the order of elements rather than a single element. For example, the following filter can be used to remove all spaces before a citation: function isSpaceBeforeCite (spc, cite) return spc and spc.t == 'Space' and cite and cite.t == 'Cite' end function Inlines (inlines) for i = #inlines-1,1,-1 do if isSpaceBeforeCite(inlines[i], inlines[i+1]) then inlines:remove(i) end end return inlines end Closes: #6038
2020-01-14Update filters doc with better cabal v2 instructions.John MacFarlane1-3/+3
2020-01-14Update filter documentation.John MacFarlane1-142/+84
Remove example using pandoc API directly (we have other docs for that and it was outdated). Closes #6065.
2020-01-12docs: capitalize Lua where it refers to the programming language nameAlbert Krewinkel1-15/+15
This follows the advise on the Lua website (https://www.lua.org/about.html#name): > […] "Lua" is a name, the name of the Earth's moon and the name of the > language. Like most names, it should be written in lower case with an > initial capital, that is, "Lua".
2020-01-11Lua filter docs: cross-link constructors and typesAlbert Krewinkel1-62/+281
Thanks to @bpj for the idea.
2020-01-11Lua: add methods `insert`, `remove`, and `sort` to pandoc.ListAlbert Krewinkel1-0/+59
The functions `table.insert`, `table.remove`, and `table.sort` are added to pandoc.List elements. They can be used as methods, e.g. local numbers = pandoc.List {2, 3, 1} numbers:sort() -- numbers is now {1, 2, 3}
2020-01-11doc/lua-filters.md: sort pandoc.List methods alphabeticallyAlbert Krewinkel1-34/+34
2020-01-11doc/lua-filters.md: unify, fix anchors and internal links (#6061)Albert Krewinkel1-362/+334
Links and anchors now follow consistent conventions, like lowercase-only anchor names. This breaks some links to specific sections in the document, but will make it much easier to link documentation in the future.
2020-01-11pandoc.List.lua: make `pandoc.List` a callable constructorAlbert Krewinkel1-1/+23
It is now possible to construct a new List via `pandoc.List()` instead of `pandoc.List:new()`.
2020-01-10docs/lua-filters.md: clarify filter function execution order (#6059)Albert Krewinkel1-2/+30
2019-12-22doc/lua-filters.md: replace metadata example with image centering (#6004)Albert Krewinkel1-22/+23
Metadata defaults can be given via the command line `--metadata-file`. Adding raw format snippets is a common use case for Lua filters, so it seems sensible to provide an example. Thanks to @efx for proposing this filter. Closes: pandoc/lua-filters#70
2019-12-17lua-filters.md remove spurious dot in title (#5996)Mauro Bieg1-1/+1
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)