ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Adrian Drury" <adrury@gmail.com>
To: ntg-context@ntg.nl
Subject: Best approach for project with three-part headings and table of contents references?
Date: Wed, 1 Oct 2008 21:59:43 -0700	[thread overview]
Message-ID: <af0b241e0810012159u4be063b1o8670c55e269e4677@mail.gmail.com> (raw)


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

                 reply	other threads:[~2008-10-02  4:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=af0b241e0810012159u4be063b1o8670c55e269e4677@mail.gmail.com \
    --to=adrury@gmail.com \
    --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).