Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Pandocomatic is a really cool Pandoc runner that allows you to create recipes that include setup/preproccing/postprocessing/teardown scripts to run as part of a pandoc compile (which still can run filters). You then have the flexibility of just about any operation anywhere in the pipleine... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am learning filters for manipulating md input files. My impression is that the filters are very good in manipulating the AST components, but I can't figure out whether they are also intended for the related tasks of more global operations.
In particular, I am pondering whether a "replace anywhere" need is best addressed via a filter or via a completely external filter:
==highlight me==
turns into\hl{highlight me}
when the output is latex or beamer, and into 'highlight me' when the output is html or epub.I would want this to be executed document wide, even in the YAML. These are not difficult outside pandoc (e.g., s/==(.*?)==/\hl{$1}/g ) and thus may be better kept outside pandoc in a completely external filter. Maybe the nicest way to do this would be to have YAML commands inside md files that invoke external commands:
which would first run
/usr/local/bin/prefilter -FORMAT < mdfile
etc.Or am I thinking about my problems altogether incorrectly?
Beta Was this translation helpful? Give feedback.
All reactions