Age | Commit message (Collapse) | Author | Files | Lines |
|
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)
|
|
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.
|
|
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
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
* 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.
|
|
|
|
Make ListAttributes a datatype. The type is similar to Attr.
|
|
|
|
Closes #4874.
|
|
Exposes a function converting which flattenes a list of blocks into a
list of inlines. An example use case would be the conversion of Note
elements into other inlines.
|
|
|
|
|
|
|
|
Runs a JSON filter on a Pandoc document.
|
|
Change: minor
|
|
All "helper functions" are not part of the Lua code for module pandoc,
but are added in Haskell. The respective documentation section must
therefore be excluded from automatic regeneration.
|
|
The function `global_filter` was used internally to get the implicitly
defined global filter. It was of little value to end-users, but caused
unnecessary code duplication in pandoc. The function has hence been
dropped. Internally, the global filter is now received by interpreting
the global table as lua filter.
This is a Lua API change.
|
|
These docs are dropped, as the functions are no longer part of
data/pandoc.lua, from which this section is generated. This is only a
temporary fix: a proper fix will have to re-think how this section is
updated.
|
|
|
|
|
|
|
|
|
|
Convert list of Pandoc blocks into (hierarchical) list of Elements.
|
|
The function parses a date and converts it (if possible) to "YYYY-MM-DD"
format.
|
|
The function allows conversion of numbers below 4000 into roman
numerals.
|
|
Change: minor
|
|
A new module `pandoc.utils` has been created. It holds utility functions
like `sha1`, which was moved from the main `pandoc` module.
|
|
The file `init.lua` is used to initialize the Lua interpreter which is
used in Lua filters. This gives users the option to require libraries
which they want to use in all of their filters, and to extend default
modules.
|
|
Pandoc and Meta elements are now pushed by calling the respective
constructor functions of the pandoc Lua module. This makes serialization
consistent with the way blocks and inlines are pushed to lua and allows
to use List methods with the `blocks` value.
|
|
|
|
|
|
|
|
See #4077.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Refactored some code from Text.Pandoc.Lua.PandocModule
into new internal module Text.Pandoc.Lua.Filter.
Add `walk_inline` and `walk_block` in pandoc lua module.
|