Maybe since TaskPaper is not necessarily Markdown, you could think about a new Markup language that combines TaskPaper and Markdown. That would be your easiest way to produce something that can be modify through templates or what not while keeping the idea behind TaskPaper working. Right now I just use Markdown markup in my TaskPaper document. I then use the Ruby library to modify TaskPaper into what I think makes sense in MultiMarkdown. I then produce several documents from the MultiMarkdown output using scripts. All of these steps take place with just one command.
-
Query a document and create another one using the results. Since this is a JavaScript, I use the script found in the link but I added a couple of lines of code that call another Ruby script once it is done.
-
Using the TaskPaper Ruby library I create a markdown file using Ruby. I modified this library to produce the Markdown I had on mind. It literally took me 40 min to do this and I have not visited nor modified the library again. Thirty of those minutes were spend figuring out what the library did. Five of them was modifying my code. And the last five minutes were spend testing my code. I really forgot the changes I did since I literally did it once and then forgot about it.
-
The Ruby script then runs MultiMarkdown (MMD) and using one of the MMD templates that I have modified, I create the appropriate XeLaTex file. (I can provide my templates, but it will be better if you see the MMD templates and understand what is going on. Some XeLaTex knowledge is good here.)
-
The same Ruby script runs XeLaTex prints the PDF, files the output into a backup so that I can have a copy of report produced, cleans up the XeLaTex aux files, and deletes the temporary TaskPaper and MMD files used to create this.
Here is the link to the code for the script I use.