pandoc-mode
pandoc-mode copied to clipboard
[new feature] process some directives after pandoc run
One issue I have is that I'd like to use pandoc-mode to create some custom markup allowing me to have more complex documents. So for instance, let's say I want to create a custom latex environment called “bloi”.
I would like to be able to write in markdown:
@@bloi{
> This is some *markdown* formatted text.
}
Now I'll define in ~/.emacs
((string= ofmt "latex")
(format "\\begin{bloi}%s\\end{bloi}" text))
However, if I do that, I end up with
\begin{bloi}
> This is some *markdown* formatted text.
\end{bloi}
Instead of
\begin{bloi}
\begin{quote}This is some \emph{markdown} formatted text.\end{quote}
\end{bloi}
Is there some way to fix that or to allow some pandoc-mode directives to apply to the output given by pandoc rather than before the output is given to process by pandoc?
Let me know your thoughts on this :)
Thanks
Yes, I can understand you'd want to do this... Currently it's not possible to fix that, because @@-directives are run before the buffer is passed to pandoc and there's no way to change that. Perhaps what you want is possible using a pandoc filter, if you're willing and able to write one.
Of course it's technically possible to apply directives to the output of the pandoc process, and if I find some time, I'd be willing to implement that. Though I can't promise it'll be done soon.
That would be awesome.
Until then, I indeed have some custom pandoc filters so I'll try to update them. Do you also have some examples of filters of your own?
Thanks again for pandoc-mode, this is very useful.
Hugo Roy – Free Software Foundation Europe https://fsfe.org/about/roy
Please use cryptography for email: see https://emailselfdefense.fsf.org/en/ Merci d’utiliser la cryptographie pour l’email : voir https://emailselfdefense.fsf.org/fr/