Re: [NTG-context] Increment the section counter

2017-09-12 Thread Rik Kabel

On 2017-09-12 11:06, Fabrice Couvreur wrote:

Hello,
The number of the sections is 1 2 3 ...
How to make it 3 5 6 ... ?
Thank you
Fabrice


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


There are at least two ways.

You can create two hidden sections before your first section, 
effectively adding two to the section number, or you can explicitly set 
the section number, which allows increments and decrements.


See Pablo’s reply to a similar query at 
https://www.mail-archive.com/ntg-context@ntg.nl/msg78173.html, and see 
the relevant wiki pages at setupheadnumber 
 and definehead 
.


--
Rik

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Increment the section counter

2017-09-12 Thread Wolfgang Schuster

You can enable manual numbering


\setuphead[section][ownnumber=yes]

\starttext

\section{3}{Section 1}

\section{5}{Section 1}

\section{6}{Section 1}

\stoptext


or use a custom conversion


\defineconversion[drunk][3,5,6]

\setuphead[section][conversion=drunk]

\starttext

\dorecurse{3}{\expanded{\section{Section \recurselevel}}}

\stoptext


Wolfgang


Fabrice Couvreur 
12. September 2017 um 17:06
Hello,
The number of the sections is 1 2 3 ...
How to make it 3 5 6 ... ?
Thank you
Fabrice
___
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Increment the section counter

2017-09-12 Thread Fabrice Couvreur
Hi,
Thank you Wolgang for your solution
Thanks also to Rik
Fabrice

2017-09-12 19:59 GMT+02:00 Wolfgang Schuster :

> You can enable manual numbering
>
>
> \setuphead[section][ownnumber=yes]
>
> \starttext
>
> \section{3}{Section 1}
>
> \section{5}{Section 1}
>
> \section{6}{Section 1}
>
> \stoptext
>
>
> or use a custom conversion
>
>
> \defineconversion[drunk][3,5,6]
>
> \setuphead[section][conversion=drunk]
>
> \starttext
>
> \dorecurse{3}{\expanded{\section{Section \recurselevel}}}
>
> \stoptext
>
>
> Wolfgang
>
> Fabrice Couvreur 
> 12. September 2017 um 17:06
> Hello,
> The number of the sections is 1 2 3 ...
> How to make it 3 5 6 ... ?
> Thank you
> Fabrice
> 
> ___
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Increment the section counter

2017-09-14 Thread Procházka Lukáš Ing .

Hello,

BTW, I needed to add a section numbered by zero some time ago;
there is a solution which uses "conversion" parameter.

When one needs to add a zero based section "manually" (ad hoc), there is 
another solution, too:


\starttext
  \bgroup
\setuphead[section][ownnumber=yes]
\section{0}{Zero}
  \subsection{SSecA}
\setupheadnumber[section][0]
  \egroup
  %
  \section{Sec}
\subsection{SSecB}
  \section{Sec2}
\stoptext


Best regards,

Lukas


On Tue, 12 Sep 2017 19:59:30 +0200, Wolfgang Schuster 
 wrote:


You can enable manual numbering


\setuphead[section][ownnumber=yes]

\starttext

\section{3}{Section 1}

\section{5}{Section 1}

\section{6}{Section 1}

\stoptext


or use a custom conversion


\defineconversion[drunk][3,5,6]

\setuphead[section][conversion=drunk]

\starttext

\dorecurse{3}{\expanded{\section{Section \recurselevel}}}

\stoptext


Wolfgang



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Sec0.mkiv
Description: Binary data


Sec0.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___