Hello all,
I have written simple Pandoc filters that do some modifications on Pandoc's AST -- for example, to generate certain LaTeX environments/constructs when a Div with certain classes is used in the input file. This worked fine.
However I am not sure how to write a filter that will only make some minor changes to the output for a given writer. Here's an example: I would like to write a filter so that if an image link contains a ".framed" class, then if generating LaTeX output, the \includegraphics command should include a [frame] option (this requires the adjustbox package to work).
I am not sure how to do this without replicating all the code Pandoc already uses to write out an image link in LaTeX.
Is there a way to do this?
Best,
Guillermo