The article describes Markdown[1], basically. In my opinion, content should be written once and transformed to any format[2], including ConTeXt[3], docx, HTML, EPUB, or plain text. But here's a puzzler.<p>Every software developer defines and uses variables. If variables are so powerful, why do WYSIWYG word processors lack the ability to quickly and easily insert variable definitions?[4] In the screenshot, the left-hand side provides an editable variable definition hierarchy, the middle pane provides a Markdown editor, and the right-hand side provides a real-time HTML preview of the content with variables interpolated and substituted.<p>After variables, programming language integration--such as R[5]--comes naturally. Consider the following syntax (that could be hidden through a UI):<p><pre><code> `r#csv2md('data.csv',totals=TRUE)`
</code></pre>
The function imports data from an external data source and converts it to Markdown. The HTML version can be styled, or piped through pandoc to create beautiful PDF output[6]. In the screenshot, the left-hand side shows the csv2md command (totals are calculated automatically for numeric columns), the middle pane shows an HTML preview (real-time), and the right-hand side shows a PDF produced from the same source document using pandoc and ConTeXt.<p>The CSV file could also be a JSON request over HTTP, or database query, meaning that the document is always up-to-date with the most recent data: a living document. This could be accomplished without having to change the source document, as well:<p><pre><code> `r#import(v$data$source,totals=TRUE)`
</code></pre>
Here, v$data$source is a variable that defines a data source. In this case, the value might be 'data.csv', but could be 'protocol://host/app/api/json'. The variables themselves could be sourced from a YAML file, JSON data stream, or remote database.<p>This is what I've been working towards for the last several months.[7] There's more that this editor can do, but it's still in early beta stages, should anyone care to try it.<p>[1]: <a href="https://github.com/jgm/pandoc/issues/168" rel="nofollow">https://github.com/jgm/pandoc/issues/168</a><p>[2]: <a href="http://pandoc.org/" rel="nofollow">http://pandoc.org/</a><p>[3]: <a href="http://wiki.contextgarden.net/" rel="nofollow">http://wiki.contextgarden.net/</a><p>[4]: <a href="https://raw.githubusercontent.com/DaveJarvis/scrivenvar/master/images/screenshot.png" rel="nofollow">https://raw.githubusercontent.com/DaveJarvis/scrivenvar/mast...</a><p>[5]: <a href="https://github.com/bedatadriven/renjin/" rel="nofollow">https://github.com/bedatadriven/renjin/</a><p>[6]: <a href="http://i.imgur.com/Qe6mTpx.png" rel="nofollow">http://i.imgur.com/Qe6mTpx.png</a><p>[7]: <a href="https://github.com/DaveJarvis/scrivenvar" rel="nofollow">https://github.com/DaveJarvis/scrivenvar</a>