ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: idea: titles in tocs, menues, headers and footers
Date: Tue, 19 Dec 2000 12:34:14 +0100	[thread overview]
Message-ID: <3.0.6.32.20001219123414.0174c3e0@pop.wxs.nl> (raw)
In-Reply-To: <00121822152101.01990@bilbo>

At 10:15 PM 12/18/00 +0100, Uwe Koloska wrote:
>Hello happy contextuals,

glad that you're happy 

>while making a document to an interactive one, I thougt about titles.  One 
>of the main advantages (between many, many others ;-)) of (La/Con)TeX(t) is 
>the easy way to table of contents, menues and living page titles (1). But 
>these have different requirements:
>
>1. titles should be verbose and explanatory and so are often long
>2. toc lines should be like titles but not too long
>3. page titles must fit into one line
>4. menu entries have to be short

For this we often set [maxwidth=...] in menus or lists. 

>So the ConTeXt way of discarding some part of the title with \nomarking is 
>in my eyes not suited for page titles and menu entries.
>
>What about different (configurable) levels of title names?  Maybe with a 
>fixed structure like:
>  \title[short="Menues",middle="Menues explained"]{How to make interactive
>     menues"}
>or with configurable levels
>  \newtitlelevel{veryshort,long}
>
>And then when you place your toc (or lof, lot) you can give the level that 
>should be used for it.
>
>What do you think about this feature?  Or is there an easy way to achieve 
>this with the present commands?

\unexpanded\def\titles%
  {\doquintuplegroupempty\dotitles}

\def\dotitles#1#2#3#4#5%
  {\ifcase\titlelevel\or
     #1\or#2\or#3\or#4\or#5\else wrong level%
   \fi}

\def\titlelevel{1}

\starttext

{\def\titlelevel{2}\placelist[section]}
{\def\titlelevel{3}\placelist[section]}

\section{\titles{one}{first}{dit is de eerste}}
\section{\titles{two}{second}{en dit de tweede}}
\section{\titles{three}{third}{vooruit, een derde}}

\stoptext

I can think of cooking this into the head mechanism [a similar mechanism is
present in references, where one can have more that just a simple ref]. 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  reply	other threads:[~2000-12-19 11:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-18 21:15 Uwe Koloska
2000-12-19 11:34 ` Hans Hagen [this message]
2000-12-19 19:49 ` Hraban

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=3.0.6.32.20001219123414.0174c3e0@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --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).