ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: [OT] Research into Generative Typesetting
Date: Wed, 27 Jul 2011 18:21:00 -0400	[thread overview]
Message-ID: <CAC8c15QRa3bArtsmCnSEDqoArhURQ-dD+ohFj2=fyYXiUWjAxQ@mail.gmail.com> (raw)
In-Reply-To: <CANenyVPir2BUwj+N_bGyqPdMkF8ZXzz7WXfk4uUXo8uZSxf-Pg@mail.gmail.com>

On Wed, Jul 27, 2011 at 6:30 AM, John Haltiwanger
<john.haltiwanger@gmail.com> wrote:
>
>
> On Sat, Jul 23, 2011 at 9:37 AM, Christian <metan0r@gmx.de> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2011-07-27 22:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 13:14 John Haltiwanger
2011-07-23 16:37 ` Christian
2011-07-27 10:30   ` John Haltiwanger
2011-07-27 22:21     ` Aditya Mahajan [this message]
2011-07-28  8:18       ` Processing markdown (was: Research into Generative Typesetting) Wolfgang Schuster
2011-07-29 18:08         ` Aditya Mahajan
2011-07-29 20:38           ` Processing markdown Hans Hagen
2011-07-30  2:59             ` Aditya Mahajan
2011-07-30  7:37               ` Wolfgang Schuster
2011-07-30 14:03               ` Hans Hagen
2011-07-30 18:22                 ` Aditya Mahajan
2011-07-30 18:15               ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC8c15QRa3bArtsmCnSEDqoArhURQ-dD+ohFj2=fyYXiUWjAxQ@mail.gmail.com' \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).