ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: How to make the first chapter number 0?
       [not found] <mailman.1725.1517067514.2111.ntg-context@ntg.nl>
@ 2018-01-28  0:29 ` Jeong Dal
  0 siblings, 0 replies; 3+ messages in thread
From: Jeong Dal @ 2018-01-28  0:29 UTC (permalink / raw)
  To: ntg-context

Dear Lukas,

Thank you for the solution.
It works fine for all, definitions, theorems, … except the numbers which I defined for exercise.
I’ll change the number definition of exercise following your example.

Thank you again.

Best regards,

Dalyoung

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: How to make the first chapter number 0?
  2018-01-27 15:08 ` Jeong Dal
@ 2018-01-27 15:38   ` Procházka Lukáš Ing.
  0 siblings, 0 replies; 3+ messages in thread
From: Procházka Lukáš Ing. @ 2018-01-27 15:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

Hello Jeong,

see both solutions attached. Check them in relation to TOC.

Best regards,

Lukas


On Sat, 27 Jan 2018 16:08:03 +0100, Jeong Dal <haksan@me.com> wrote:

> Hi,
>
> I’d like to start the chapter number from 0.
> So I tried “\setcounter[chapter][-1]” or “\setcounter[chapter][0]” to test, but it doesn’t work.
> Is there any good method to make the number of the first chapter 0?
>
> Thank you for reading.
>
> Best regards,
>
> Dalyoung


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

Mob.: +420 702 033 396

[-- Attachment #2: ZeroStart.mkiv --]
[-- Type: application/octet-stream, Size: 419 bytes --]

%D Numbering sections from zero

\defineexpandable[1]\PreviousNumber{\number\numexpr#1-1\relax}

\defineconversion[PreviousNumber][\PreviousNumber]

\defineconversionset[zerostart][n,PreviousNumber][n]

\setuphead[chapter,section][sectionconversionset=zerostart,page=no]

\starttext
  \placecontent

  \chapter{First chapter}
    \section{Sec}

  \chapter{Second chapter}
    \section{Sec}
\stoptext

[-- Attachment #3: ZeroStart.pdf --]
[-- Type: application/pdf, Size: 9450 bytes --]

[-- Attachment #4: Sec0.mkiv --]
[-- Type: application/octet-stream, Size: 232 bytes --]

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

[-- Attachment #5: Sec0.pdf --]
[-- Type: application/pdf, Size: 7058 bytes --]

[-- Attachment #6: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* How to make the first chapter number 0?
       [not found] <mailman.1718.1517049835.2111.ntg-context@ntg.nl>
@ 2018-01-27 15:08 ` Jeong Dal
  2018-01-27 15:38   ` Procházka Lukáš Ing.
  0 siblings, 1 reply; 3+ messages in thread
From: Jeong Dal @ 2018-01-27 15:08 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

Hi, 

I’d like to start the chapter number from 0.
So I tried “\setcounter[chapter][-1]” or “\setcounter[chapter][0]” to test, but it doesn’t work.
Is there any good method to make the number of the first chapter 0?

Thank you for reading.

Best regards,

Dalyoung
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2018-01-28  0:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1725.1517067514.2111.ntg-context@ntg.nl>
2018-01-28  0:29 ` How to make the first chapter number 0? Jeong Dal
     [not found] <mailman.1718.1517049835.2111.ntg-context@ntg.nl>
2018-01-27 15:08 ` Jeong Dal
2018-01-27 15:38   ` Procházka Lukáš Ing.

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).