ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Different counters for titles
Date: Tue, 03 Sep 2013 09:36:30 +0200	[thread overview]
Message-ID: <5225917E.5070806@wxs.nl> (raw)
In-Reply-To: <52257E51.5040203@mmnetz.de>

On 9/3/2013 8:14 AM, "H. Özoguz" wrote:
> To solve my last asked question, I chose a somewhat easiert way and
> defined an own chapter-title, which is unnumbered.
>
> Here is my Minexample:
>
> \definehead[mychapter][chapter]
> \setuphead[mychapter][number=no]
> \setupcombinedlist[content]
> [list={mychapter, chapter, section}]
>
> \starttext
> \completecontent
> \mychapter{Vorwort}
> \chapter{First Chapter}
> \section{Some section in the first chapter}
> \chapter{Second chapter}
> \section{Some section in the second chapter}
> \stoptext
>
> The problem is now: Obviously the counter of mychapter and chapter is
> the same. Because "first chapter" begins with number 2, but should with
> 1 – that was the intention of this new chapter style, which is nothing
> but a unnumbered copy of the default chapter. Was that idea wrong? How
> to give chapter and mychapter their own counters, to achieve this result
> – or any other way to let "first chapter" begin with 1 (but not subtract
> 1 from the numbers, because that ends up in the first section "1.0". The
> first section of the first chapter should be numbered with "1.1", as
> usual).

Indeed they are clones and the main reason is that you can use different 
rendering. In fact the topmost levels are :

\definesection[section-1] % part
\definesection[section-2] % chapter
\definesection[section-3] % section
\definesection[section-4] % subsection
\definesection[section-5] % subsubsection
\definesection[section-6] % subsubsubsection
\definesection[section-7] % subsubsubsubsection

There's a lot going on with section heading so having a copy of the same 
is non trivial as one should decide what gets copied (think of all kind 
of references).

Here's a cheat:

\starttext
     \placelist[chapter][criterium=all]

     \startchapter[ownnumber=1,title=chap 1] \startsection[title=sec 
1]\input ward \stopsection \stopchapter
     \startchapter[ownnumber=1,title=chap 1] \startsection[title=sec 
1]\input ward \stopsection \stopchapter
\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:[~2013-09-03  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  6:14 "H. Özoguz"
2013-09-03  7:36 ` Hans Hagen [this message]
2013-09-03  8:24 "H. Özoguz"

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=5225917E.5070806@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).