ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Trouble with customising section heads
@ 2010-08-10 15:02 Elias Oltmanns
  2010-08-10 17:23 ` Wolfgang Schuster
  2010-08-17  7:29 ` Elias Oltmanns
  0 siblings, 2 replies; 7+ messages in thread
From: Elias Oltmanns @ 2010-08-10 15:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi again,

sorry for bothering you so persistently, but I really did try to hard to
find a solution -- and failed:
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
. For the purposes of testing, I've installed a current minimals
distribution. 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;
MkIV \currentheadnumber seems to be 0 all the time.

There is a possibility, of course, that something is wrong with my setup
of ConTeXt. But I just did another
% ./first-setup.sh --context=current

Thanks in advance for any hint,

Elias


%%%%%%%%%%
\setuphead[section][textcommand=\Myhead,numbercommand=\Mynum]
\def\Myhead#1{%
    Sect \currentheadnumber}
\def\Mynum#1{}
\starttext
\completecontent
\chapter{First chapter}
\section{First section}
Some text.

\chapter{Second chapter}
Introductory text.

\section{First section}
More text.

\section{Second section}
The end.
\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with customising section heads
  2010-08-10 15:02 Trouble with customising section heads 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
  1 sibling, 2 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2010-08-10 17:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

  Am 10.08.10 17:02, schrieb Elias Oltmanns:
> Hi again,
>
> sorry for bothering you so persistently, but I really did try to hard to
> find a solution -- and failed:
> 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
> . For the purposes of testing, I've installed a current minimals
> distribution. 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;
> MkIV \currentheadnumber seems to be 0 all the time.
>
> There is a possibility, of course, that something is wrong with my setup
> of ConTeXt. But I just did another
> % ./first-setup.sh --context=current
>
> Thanks in advance for any hint,
>
> Elias
>
>
> %%%%%%%%%%
> \setuphead[section][textcommand=\Myhead,numbercommand=\Mynum]

\setuphead[section][textcommand=\gobbleoneargument,numbercommand=\groupedcommand{Sect 
}{}]

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with customising section heads
  2010-08-10 17:23 ` Wolfgang Schuster
@ 2010-08-10 22:00   ` Elias Oltmanns
  2010-08-15 13:35   ` Elias Oltmanns
  1 sibling, 0 replies; 7+ messages in thread
From: Elias Oltmanns @ 2010-08-10 22:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>  Am 10.08.10 17:02, schrieb Elias Oltmanns:
>> Hi again,
>
>>
>> sorry for bothering you so persistently, but I really did try to hard to
>> find a solution -- and failed:
>> 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
>> . For the purposes of testing, I've installed a current minimals
>> distribution. 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;
>> MkIV \currentheadnumber seems to be 0 all the time.
>>
>> There is a possibility, of course, that something is wrong with my setup
>> of ConTeXt. But I just did another
>> % ./first-setup.sh --context=current
>>
>> Thanks in advance for any hint,
>>
>> Elias
>>
>>
>> %%%%%%%%%%
>> \setuphead[section][textcommand=\Myhead,numbercommand=\Mynum]
>
> \setuphead[section][textcommand=\gobbleoneargument,numbercommand=\groupedcommand{Sect
> }{}]

I see. Well, this seems to fix the issue with MkIV at least.

Thanks,

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with customising section heads
  2010-08-10 17:23 ` Wolfgang Schuster
  2010-08-10 22:00   ` Elias Oltmanns
@ 2010-08-15 13:35   ` Elias Oltmanns
  1 sibling, 0 replies; 7+ messages in thread
From: Elias Oltmanns @ 2010-08-15 13:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>  Am 10.08.10 17:02, schrieb Elias Oltmanns:
>> 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
>> . For the purposes of testing, I've installed a current minimals
>> distribution. 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;
>> MkIV \currentheadnumber seems to be 0 all the time.
[...]
>>
>> %%%%%%%%%%
>> \setuphead[section][textcommand=\Myhead,numbercommand=\Mynum]
>
> \setuphead[section][textcommand=\gobbleoneargument,numbercommand=\groupedcommand{Sect
> }{}]

Since I need customised headings like above in the same document that
also features footnotes in the margin, I'm wedged now. As explained in
http://archive.contextgarden.net/message/20100812.153552.6606809c.en.html
, I'm forced to use MkII to get footnote ordering right. On the other
hand, only MkIV produces a complete table of contents when I customise
the headings in that document.

Is there any chance to get one of those bugs fixed or to find a suitable
workaround in either of the two versions of ConTeXt?

Thank you ever so much for any help,

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with customising section heads
  2010-08-10 15:02 Trouble with customising section heads Elias Oltmanns
  2010-08-10 17:23 ` Wolfgang Schuster
@ 2010-08-17  7:29 ` Elias Oltmanns
  2010-08-17  9:53   ` Elias Oltmanns
  1 sibling, 1 reply; 7+ messages in thread
From: Elias Oltmanns @ 2010-08-17  7:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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}

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with customising section heads
  2010-08-17  7:29 ` Elias Oltmanns
@ 2010-08-17  9:53   ` Elias Oltmanns
  2010-08-17 10:28     ` Cedric Mauclair
  0 siblings, 1 reply; 7+ messages in thread
From: Elias Oltmanns @ 2010-08-17  9:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with customising section heads
  2010-08-17  9:53   ` Elias Oltmanns
@ 2010-08-17 10:28     ` Cedric Mauclair
  0 siblings, 0 replies; 7+ messages in thread
From: Cedric Mauclair @ 2010-08-17 10:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-17 10:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10 15:02 Trouble with customising section heads 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 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).