From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: toc and macro
Date: Fri, 29 May 2015 02:38:51 +0200 [thread overview]
Message-ID: <06D8DE3B-DD91-4B8A-8232-4D1EBBE794C5@gmail.com> (raw)
In-Reply-To: <556783B8.4070207@gmx.de>
> Am 28.05.2015 um 23:08 schrieb Harry <irgksjd@gmx.de>:
>
> What I want to do is something like this:
>
> _______________________
>
> \starttext
>
> \completecontent[criterium=all]
>
> % how i have to do it
> \startchapter[colors][Colors]
> \startsection,[black][Black]
> black is a dark color
> \stopsection,
> \startsection[white][White]
> white is light color
> \stopsection
> \stopchapter
>
> % how i want it to write (with the same result of the code above)
> \startSameCommand[colors][Colors]
> \startSameCommand[black][Black]
> black is a dark color
> \stopSameCommand
> \startSameCommand[white][White]
> white is light color
> \stopSameCommand
> \stopSameCommand
>
> \stoptext
>
> _______________________
>
> The \startSameCommand finds itself out (by the nesting of the command)
> if its behave
> as \startpart or \startchapter or \startsection or \startsubsection or
> \startsubsubsection …
You’re looking for the \startsectionlevel command.
%\definesectionlevels[default][part,chapter,section,subsection]
\starttext
\completecontent[criterium=all]
\startsectionlevel[title=Colors,reference=colors]
\startsectionlevel[title=Black,reference=black]
black is a dark color
\stopsectionlevel
\startsectionlevel[title=White,reference=white]
white is light color
\stopsectionlevel
\stopsectionlevel
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2015-05-29 0:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 18:13 Harry
2015-05-28 10:47 ` Wolfgang Schuster
2015-05-28 21:08 ` Harry
2015-05-29 0:38 ` Wolfgang Schuster [this message]
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=06D8DE3B-DD91-4B8A-8232-4D1EBBE794C5@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).