On Wed, Jul 27, 2011 at 6:30 AM, John Haltiwanger
On Sat, Jul 23, 2011 at 9:37 AM, Christian
wrote: [^1]: If anyone is interested, I'm thinking I might make a module that sets up the environment according to these conventions.
I like the idea of pre-made styles. I'm not shure if a module would provide the necessary flexibility, though. Maybe a style collection (with commented code and linked sample output PDFs) in the wiki would do the job. Like there is for the biochemistry textbook. From there users could just use it as a whole or adapt it to their needs.
That is certainly one approach. Hoewever, I'd like to make it as easy as possible for people who just want to use defaults to do so. One solution is to have a script that generates a scaffold environment inside a Context source file. Then they do not need to keep multiple templates around or have internet access when creating a document. (I know that for experienced Context users, having some .env files or source templates around is no problem, but I'm thinking of users who are less experienced or just want to typeset Markdown documents without messing with TeX).
./context-style-gen.rb --style=bringhurst --input=myThesis.markdown myThesis.tex
Note: The following is untested. You don't need another script, context can handle this natively. For example, you can write a 'process-markdown' module that directly processes a markdown file: (I haven't looked at the new markdown module. I am assuming that it provides a macro, \inputmarkdown{...} to process a markdown file. \startmodule[process-markdown] \starttext \inputmarkdown{\inputfilename} \stoptext \stopmodule Then, you can call ConTeXt using context --usemodules=tufte,other-style,process-markdown --result=whatever file.markdown I followed a similar approach when I was processing markdown files using the filter module. See http://randomdeterminism.wordpress.com/2011/01/09/markdowntopdf/ I used modes instead of a separate module and an evinronment instead of a module because that fit my workflow better. @Hans: do you think that it is a good idea to include something like this in the m-markdown module so that a user could say context --usemodule=markdown --mode=process file.markdown and get a pdf output. Aditya