Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lua]: Enhance functionality to run filters in a Lua filter #6830

Open
gabyx opened this issue Nov 11, 2020 · 1 comment
Open

[Lua]: Enhance functionality to run filters in a Lua filter #6830

gabyx opened this issue Nov 11, 2020 · 1 comment

Comments

@gabyx
Copy link

gabyx commented Nov 11, 2020

Currently there is only the option pandoc.utils.run_json_filter which is kind of limited. It needs the full path to the filter or it is found in PATH. Also we cannot run Lua filters.

I would like to have functionality to run all kinds of filters in a Lua filter, basically giving the function run_filter(doc, path, args...)
a path or filename like anything which can also be defined in the meta data such as:

---
filters:
  - bla.lua
  - blub.lua
  - oh.py
  - pandoc-crossref
---

For example run_filter(doc, "blub.lua", FORMAT) would resolve the filter path as pandoc does it the normal way (by examining the current resource-path, etc)

@gabyx gabyx changed the title [Lua filters]: Enhange functionality to run filters in a Lua filter [Lua]: Enhange functionality to run filters in a Lua filter Nov 11, 2020
@gabyx gabyx changed the title [Lua]: Enhange functionality to run filters in a Lua filter [Lua]: Enhance functionality to run filters in a Lua filter Nov 12, 2020
@wenbopeng
Copy link

pandoc 3.1.2 solves this problem perfectly: Add running additional filters in include-files.lua · Issue #140 · pandoc/lua-filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants