Skip to content

Commit c977079

Browse files
committed
README: add installation instructions
1 parent 470fdaf commit c977079

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

README.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,30 @@ is no guarantee that filters will work with older versions, but
2020
many do.
2121

2222
Some filters depend on external programs, which must be installed
23-
separately. Refer to the filters' README for detailed
24-
requirements; the filter READMEs are not included in the release
25-
archives, but available online at
26-
<https://github.com/pandoc/lua-filters>.
23+
separately. Refer to the filters' documentations for detailed
24+
requirements.
25+
26+
Installation
27+
------------
28+
29+
All filters can be used without special installation, just by
30+
passing the respective `.lua` file path to pandoc via
31+
`--lua-filter`/`-L`.
32+
33+
User-global installation is possible by placing a filter in within
34+
the `filters` directory of pandoc's user data directory. This
35+
allows to use the filters just by using the filename, without
36+
having to specify the full file path.
37+
38+
On mac and Linux, the filters can be installed by extracting the
39+
archive with
40+
41+
RELEASE_URL=https://github.com/pandoc/lua-filters/releases/latest
42+
curl -LSs $RELEASE_URL/download/lua-filters.tar.gz | \
43+
tar --strip-components=1 --one-top-level=$PANDOC_DIR -zvxf -
44+
45+
where `$PANDOC_DIR` is a user directory as listed in the output of
46+
`pandoc -v`.
2747

2848
Contributing
2949
------------

0 commit comments

Comments
 (0)