ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Best approach for project with three-part headings and table of contents references?
@ 2008-10-02  4:59 Adrian Drury
  0 siblings, 0 replies; only message in thread
From: Adrian Drury @ 2008-10-02  4:59 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2866 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 3202 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-02  4:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-02  4:59 Best approach for project with three-part headings and table of contents references? Adrian Drury

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).