I am trying to figure out how best to use ConTeXt for a project. Essentially
I want to format postings on a message board for printing in a book, and
provide multiple "tables of contents" for the postings (more information
further down, and questions at the bottom). I'm sure that everything I want
to do can be done with ConTeXt, but I'm a ConTeXt beginner, and it looks as
if there's a lot of complexity to do this.

Each post has a title, an author, a date, and the text of the post. I'd like
to arrange the information roughly like this:

       Title of the post
Author author  - Date date
--------------------------------------
Text of the post... text text text
text text text.

Then I'd like to create a "table of contents" that lists posting titles by
date, like this:
January 1, 2008
 Title title title ........................ 10
 Another title .......................... 11
January 2, 2008
 Yet another title ..................... 12

Putting the author in there also might be nice, like this:
January 1, 2008
 Title title title (John Doe).......... 10
 Another title (Jane Doe)........... 11
January 2, 2008
 Yet another title (John Doe)..... 12

I'd also like to have a "table of contents" that lists posting titles by
author, like this
Jane Doe
 A title ..................................... 14
 Another title .............................45
John Doe
 Title title title ............................ 35
 Another title .............................40

My questions:

1) How complex is this (for a beginner) to do in ConTeXt? I am very
comfortable with Perl, so I thought I could write a Perl script to parse the
posts and generate such tables of contents, with lots of \reference, \at,
and \about commands. If this needs significant complexity to solve, I would
prefer to handle the complexity with Perl, and keep the ConTeXt simple, so I
can understand it.

2) Can I (ab)use the existing heading commands (\title, \subject,
\setuphead, etc) to arrange and reference the title, author, and date? If
so, can anyone provide a hint of how to do the headings and referencing?
Will the existing heading commands let me reference the title, author, and
date values for use in my "table of contents"? It looks as if I would have
to create my own command that formatted the heading information how I wanted
it, and set up the three references. I looked at "Alternative mechanisms" in
the cont-eni.pdf, but that didn't seem to describe this type of flexibility.

3) If I can use the existing heading commands (question 2), can I also use
the existing index and/or table of contents commands (\setuplist,
\placecontent, etc)? And like  question 2, can anyone provide a hint of how
to do it? It looked to me as if a lot of custom ConTeXt code would be
necessary, and that I would have to build my own table of contents entry by
entry.

Thank you very much,
Adrian
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to