ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Dynamic headings & query heading information
Date: Fri, 7 Feb 2014 16:00:56 +0100	[thread overview]
Message-ID: <D200A2C7-52EB-4135-8F58-DB6F4E809D73@gmail.com> (raw)
In-Reply-To: <52909930.20140207154501@gmx.de>


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


Am 07.02.2014 um 15:45 schrieb Andreas Schneider <aksdb@gmx.de>:

> Hello,
> 
> again I'm working on a technical manual and decided to use ConTeXt to do the job. Since I'm a developer, I always try to do things as flexible as possible.
> 
> I'm currently struggling to achieve two things:
> 
> 1) a macro (that will print a list) should also add a heading. However, the heading should always be one level beneath the current heading and without numbering. Example: within a \section it should be a \subsubject, within a \chapter it should be a \subject, and so on.

\definesectionlevels[extra][title,subject,subsubject,subsubsubject]

\setuphead[chapter][color=red]
\setuphead[section][color=green]
\setuphead[subsection][color=blue]

\define\PlaceList
  {\startsectionlevel[extra][title=List]
   %
   \stopsectionlevel}

\starttext

\startsectionlevel[title=Chapter 1]

\PlaceList

\startsectionlevel[title=Section 1.1]

\startsectionlevel[title=Subsection 1.1.1]
\stopsectionlevel

\startsectionlevel[title=Subsection 1.1.2]
\stopsectionlevel

\stopsectionlevel

\startsectionlevel[title=Section 1.2]
\stopsectionlevel

\stopsectionlevel

\startsectionlevel[title=Chapter 2]

\startsectionlevel[title=Section 2.1]

\PlaceList

\startsectionlevel[title=Subsection 2.1.1]
\stopsectionlevel

\startsectionlevel[title=Subsection 2.1.2]
\stopsectionlevel

\stopsectionlevel

\startsectionlevel[title=Section 2.2]
\stopsectionlevel

\stopsectionlevel

\stoptext

Wolfgang


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

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2014-02-07 15:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 14:45 Andreas Schneider
2014-02-07 15:00 ` Wolfgang Schuster [this message]
2014-02-07 17:12 ` Wolfgang Schuster
2014-02-08  9:25   ` Andreas Schneider

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=D200A2C7-52EB-4135-8F58-DB6F4E809D73@gmail.com \
    --to=schuster.wolfgang@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).