ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Cedric Mauclair <cedric.mauclair@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Trouble with customising section heads
Date: Tue, 17 Aug 2010 12:28:59 +0200	[thread overview]
Message-ID: <AANLkTikN1vrrenX6T9jHE89ar9YBN14RYO=56X8bYkKy@mail.gmail.com> (raw)
In-Reply-To: <87r5hx4lbt.fsf@denkblock.local>

Hi,

\namedheadnumber{chapter} gives the real number (ie an integer) of the
chapter. Of course, this could be used with other headings.

-- Cédric



On Tue, Aug 17, 2010 at 11:53, Elias Oltmanns <eo@nebensachen.de> wrote:
> Elias Oltmanns <eo@nebensachen.de> wrote:
>> For the record:
>>
>> Elias Oltmanns <eo@nebensachen.de> wrote:
>>> In the attempt to customise my section headings by means of
>>> \setuphead[section][...command=]
>>> I followed the instructions at
>>> http://wiki.contextgarden.net/Figures_in_Headings#Figures_in_Headings
>>> .
>> [...]
>>> As it turns out, neither MkII nor MkIV processes the attached example
>>> as expected:
>>> MkII The table of contents is incomplete, even though the wiki says
>>>      it shouldn't be;
>>
>> The solution seems to be to use deeptextcommand instead of textcommand.
>>
>>> MkIV \currentheadnumber seems to be 0 all the time.
>>
>> Apart from Wolfgang's solution, I have now realised that MkIV allows to
>> use command instead of textcommand / numbercommand and still produces a
>> complete table of contents. Accordingly, the setups look like this:
>> \setuphead[section][command=\Myhead]
>> \def\Myhead#1#2{%
>>     Sect #1}
>
> Well, actually, when I really need just a number as in
> \def\Myhead#1#2{\externalfigure[chapter-\currentheadnumber]}
> I'm still in trouble as far as MkIV is concerned. Can I somehow extract
> that number from the argument? Or can MkIV be changed to provide
> \currentheadnumber as does MkII? Personally, I'm content with using MkII
> right now. So, I'm asking out of curiosity here and for the purpose of
> updating the wiki page referenced above.
>
> Regards,
>
> Elias
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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:[~2010-08-17 10:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 15:02 Elias Oltmanns
2010-08-10 17:23 ` Wolfgang Schuster
2010-08-10 22:00   ` Elias Oltmanns
2010-08-15 13:35   ` Elias Oltmanns
2010-08-17  7:29 ` Elias Oltmanns
2010-08-17  9:53   ` Elias Oltmanns
2010-08-17 10:28     ` Cedric Mauclair [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='AANLkTikN1vrrenX6T9jHE89ar9YBN14RYO=56X8bYkKy@mail.gmail.com' \
    --to=cedric.mauclair@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).