Open bpj opened 7 years ago
This is a good suggestion. I can see the reasoning behind it. The main issue is that it isn't trivial to implement (although it is certainly possible). The code can't be reused in the way you suggest (I'd do it differently if I were starting again...). I'll keep this issue open and put it on the todo list.
Yeah, a lot of version 0.001 software would look different if we knew which features will actually be used or wanted in the future. Been there, done that. I guess one should always have one function or method for everything which can conceivably be reused, and make it as general as possible, but that slows down...
Thanks, if I can (magically) free up some time I'll work on this.
I do periodically have free time. Perhaps I'll be able to take this as a chance to hone my Python skills.
Any pull requests are welcome!
I have a directory
~/.pandoc/includes/
and often a directory./includes/
containing reusable header includes files likefancy-headings.ltx
. The irritating thing about this is that when using panzer I still have to supply these as command line options with a full path and without smartness in the lookup:In short I wish I could say
and have panzer look for the files similarly to how it looks for filters and templates,
./fancy-headings.ltx
./includes/fancy-headings.ltx
./includes/fancy-headings/fancy-headings.ltx
~/.panzer/includes/fancy-headings.ltx
~/.panzer/includes/fancy-headings/fancy-headings.ltx
building an includes list for each of the three locations.
Notes:
I only ever use header includes this way, but it seems to make sense to support before/after body includes as well. If they are not included somebody will certainly find a need for them! :-)
I'm not enough of a Python programmer, my language of choice being Perl, to suggest any code for doing this, but hopefully the code for looking up filters, templates etc. can largely be reused.