MANUAL.txt: update description of -L
/--lua-filter
.
The example filter was outdated, a reference to the separate Lua filters documentation is added instead.
This commit is contained in:
parent
68fa437999
commit
45174d7385
1 changed files with 10 additions and 18 deletions
28
MANUAL.txt
28
MANUAL.txt
|
@ -588,8 +588,8 @@ header when requesting a document from a URL:
|
||||||
|
|
||||||
3. `$PATH` (executable only)
|
3. `$PATH` (executable only)
|
||||||
|
|
||||||
Filters and Lua-filters are applied in the order specified
|
Filters, Lua-filters, and citeproc processing are applied in
|
||||||
on the command line.
|
the order specified on the command line.
|
||||||
|
|
||||||
`-L` *SCRIPT*, `--lua-filter=`*SCRIPT*
|
`-L` *SCRIPT*, `--lua-filter=`*SCRIPT*
|
||||||
|
|
||||||
|
@ -603,26 +603,17 @@ header when requesting a document from a URL:
|
||||||
The `pandoc` Lua module provides helper functions for element
|
The `pandoc` Lua module provides helper functions for element
|
||||||
creation. It is always loaded into the script's Lua environment.
|
creation. It is always loaded into the script's Lua environment.
|
||||||
|
|
||||||
The following is an example Lua script for macro-expansion:
|
See the [Lua filters documentation] for further details.
|
||||||
|
|
||||||
function expand_hello_world(inline)
|
|
||||||
if inline.c == '{{helloworld}}' then
|
|
||||||
return pandoc.Emph{ pandoc.Str "Hello, World" }
|
|
||||||
else
|
|
||||||
return inline
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {{Str = expand_hello_world}}
|
|
||||||
|
|
||||||
In order of preference, pandoc will look for Lua filters in
|
In order of preference, pandoc will look for Lua filters in
|
||||||
|
|
||||||
1. a specified full or relative path (executable or
|
1. a specified full or relative path
|
||||||
non-executable)
|
|
||||||
|
|
||||||
2. `$DATADIR/filters` (executable or non-executable)
|
2. `$DATADIR/filters` where `$DATADIR` is the user data
|
||||||
where `$DATADIR` is the user data directory (see
|
directory (see `--data-dir`, above).
|
||||||
`--data-dir`, above).
|
|
||||||
|
Filters, Lua filters, and citeproc processing are applied in
|
||||||
|
the order specified on the command line.
|
||||||
|
|
||||||
`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
|
`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
|
||||||
|
|
||||||
|
@ -707,6 +698,7 @@ header when requesting a document from a URL:
|
||||||
[PHP]: https://github.com/vinai/pandocfilters-php
|
[PHP]: https://github.com/vinai/pandocfilters-php
|
||||||
[perl]: https://metacpan.org/pod/Pandoc::Filter
|
[perl]: https://metacpan.org/pod/Pandoc::Filter
|
||||||
[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
|
[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
|
||||||
|
[Lua filters documentation]: https://pandoc.org/lua-filters.html
|
||||||
|
|
||||||
## General writer options {.options}
|
## General writer options {.options}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue