typesetters / p5-App-pandoc-preprocess

Preprocess Pandoc before Processing Pandoc
8 stars 2 forks source link

Prequesites #1

Closed nichtich closed 10 years ago

nichtich commented 10 years ago

Thanks for this package! I would not add ditaa etc. as prequesites but make it optional. One can happily use ppp with documents that don't include ditaa-sections, so why adding a prequesites. All processing formats (ditaa, rdfdot, GraphViz...) should be optional - just emit an error message if it is not available. This way ppp can be extended with even more ASCII-based formats without having too many dependencies.

xdbr commented 10 years ago

You're absolutely right @nichtich, that's just what I thought about this morning :)

and thank you for the original idea – I will give credits for it wherever I can!

nichtich commented 10 years ago

By the way see https://github.com/jgm/pandoc/issues/553 (below) for another use case that could be added:

~~~ {.include}
filename.md
~~~
xdbr commented 10 years ago

nice hint!

for my use case though, I use sort of the following pipeline for including files (and the typesetting itself of course):

cat main.pandoc | gpp -x -U "<#" ">" "\B" "|" ">" "<" ">" "#" ""  -DDEFINITION1 | ppp | pandoc --pandoc-options

Then, for example, I include files inside main.pandoc using gpp like this:

<#include chapters/chapter1.pandoc>

Maybe I'll write all that up as a blog post some day...

For now though I wouldn't want to mix the two include-strategies...

As a bonus, with gpp you are free to whip up some more definitions of your own which can come in quite handy at times!

xdbr commented 10 years ago

@nichtich: you might want to take a look at my typesetting template here: https://github.com/xdbr/stub-template-typesetting.

This template is to be used and "stubbed out" using this piece: https://github.com/xdbr/stub

In the template you can find the typesetting pipeline described above in all its gory glory ;)

These things are still really new and -- at times -- a little rough around the edges so please be patient :) !

xdbr commented 10 years ago

Since the renderers are not 'prerequisites' per se, closing as not applicable. Please re-open if necessary.