ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* TOC  chapter and section numbering
@ 2020-08-18  4:40 Adrian
  2020-08-18  7:01 ` Taco Hoekwater
  2020-08-19 14:44 ` Wolfgang Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian @ 2020-08-18  4:40 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1615 bytes --]

Hello,

I'm attempting to typeset a short book using ConTeXt (current version: 2020.08.09 22:03).

EXAMPLE:

\setuplist[content][alternative=c]

\setuphead[title][alternative=middle,style=cap]

\setuphead[chapter][number=no]

\setuphead[section][sectionsegments=section]

\setuplist[section][width=1.5em,margin=3em]

\starttext
\title{contents}
\placecontent

\startchapter[title={Introductory}]
\startsection[title={The concept of a function}]
\stopsection
\startsection[title={Extension and intension}]
\stopsection
\startsection[title={Functions of several variables}]
\stopsection
\startsection[title={Abstraction}]
\stopsection
\stopchapter

\startchapter[title={Lambda-Conversion}]

\startsection[title={Primitive symbols, and formulas}]
\stopsection
\startsection[title={Conversion}]
\stopsection
\startsection[title={Fundamental theorems on well-formed formulas and on the normal form}]
\stopsection
\stopchapter

\stoptext

I would like all the chapters to be prefixed with "Chapter RN." and the sections to keep a single count,
for example:

Chapter I. Introductory .....
1. The concept of a function
2. Extension and intension
3. Functions of several variables
4. Abstraction
Chapter II. Lambda Conversion .....
5. Primitive symbols and formulas
6. Conversion
7. Fundamental theorems on well-formed formulas and on the normal form

I tried to the following for the chapters:

\defineconversion[church][Chapter \Romannumerals.\quad]

\setuphead[chapter][conversion=church]

Which appeared to generate the prefix correctly but it overlapped the title.

Any help would be greatly appreciated. Thanks

Adrian

[-- Attachment #1.2: Type: text/html, Size: 8832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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] 4+ messages in thread

* Re: TOC  chapter and section numbering
  2020-08-18  4:40 TOC chapter and section numbering Adrian
@ 2020-08-18  7:01 ` Taco Hoekwater
  2020-08-19 14:44 ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Taco Hoekwater @ 2020-08-18  7:01 UTC (permalink / raw)
  To: Adrian, mailing list for ConTeXt users



> On 18 Aug 2020, at 06:40, Adrian <metabind@protonmail.ch> wrote:
> 
> 
> I would like all the chapters to be prefixed with "Chapter RN." and the sections to keep a single count,
> for example:
> 

\setuplabeltext[chapter=Chapter~]

\definestructureresetset[default][1,1,0][1] % reset part, chapter, but not section
\setupheads[sectionresetset=default]

\setuphead[section][sectionsegments=section:*]

Mostly copied from the wiki page about titles:

  https://wiki.contextgarden.net/Titles

Best wishes,
Taco
___________________________________________________________________________________
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] 4+ messages in thread

* Re: TOC chapter and section numbering
  2020-08-18  4:40 TOC chapter and section numbering Adrian
  2020-08-18  7:01 ` Taco Hoekwater
@ 2020-08-19 14:44 ` Wolfgang Schuster
  2020-08-19 17:59   ` Adrian
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2020-08-19 14:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Adrian schrieb am 18.08.2020 um 06:40:
> Hello,
> 
> I'm attempting to typeset a short book using ConTeXt 
> (current version: 2020.08.09 22:03).
> 
> *EXAMPLE*:
> 
> [...]
> 
> I would like all the chapters to be prefixed with "Chapter RN." and the 
> sections to keep a single count,
> for example:
> 
> *Chapter I. Introductory .....*
>     1. The concept of a function
>     2. Extension and intension
>     3. Functions of several variables
>     4. Abstraction
> *Chapter II. Lambda Conversion .....*
>     5. Primitive symbols and formulas
>     6. Conversion
>     7. Fundamental theorems on well-formed formulas and on the normal form
> 
> I tried to the following for the chapters:
> 
> \defineconversion[church][Chapter \Romannumerals.\quad]
> \setuphead[chapter][conversion=church]
> 
> Which appeared to generate the prefix correctly but it overlapped the 
> title.

\setuplabeltext
   [en] [chapter=Chapter ]

\defineresetset
   [default] [0,0,0] [1]

\defineconversionset
   [section] [n,R,n] [n]

\setuphead
   [chapter]
   [sectionconversionset=section,
    sectionstopper=.]

\setuphead
   [section]
   [sectionsegments=section,
    sectionconversionset=section,
    sectionstopper=.]

\setuphead
   [title]
   [alternative=middle,
    style=WORD]

\setuplist
   [chapter]
   [label=yes,
    style=bold,
    width=fit,
    distance=\spaceamount]

\setuplist
   [section]
   [margin=3em,
    width=1.5em]

\starttext

\completecontent

...

\stoptext

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

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

* Re: TOC chapter and section numbering
  2020-08-19 14:44 ` Wolfgang Schuster
@ 2020-08-19 17:59   ` Adrian
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian @ 2020-08-19 17:59 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Excellent, this was the solution.  I'm certain to learn a great
deal from it.

Thanks again,

Adrian


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, August 19, 2020 9:44 AM, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> Adrian schrieb am 18.08.2020 um 06:40:
>
> > Hello,
> > I'm attempting to typeset a short book using ConTeXt
> > (current version: 2020.08.09 22:03).
> > EXAMPLE:
> > [...]
> > I would like all the chapters to be prefixed with "Chapter RN." and the
> > sections to keep a single count,
> > for example:
> > Chapter I. Introductory .....
> >    1. The concept of a function
> >    2. Extension and intension
> >    3. Functions of several variables
> >    4. Abstraction
> > Chapter II. Lambda Conversion .....
> >    5. Primitive symbols and formulas
> >    6. Conversion
> >    7. Fundamental theorems on well-formed formulas and on the normal form
> > I tried to the following for the chapters:
> > \defineconversion[church][Chapter \Romannumerals.\quad]
> > \setuphead[chapter][conversion=church]
> > Which appeared to generate the prefix correctly but it overlapped the
> > title.
>
> \setuplabeltext
> [en] [chapter=Chapter ]
>
> \defineresetset
> [default] [0,0,0] [1]
>
> \defineconversionset
> [section] [n,R,n] [n]
>
> \setuphead
> [chapter]
> [sectionconversionset=section,
> sectionstopper=.]
>
> \setuphead
> [section]
> [sectionsegments=section,
> sectionconversionset=section,
> sectionstopper=.]
>
> \setuphead
> [title]
> [alternative=middle,
> style=WORD]
>
> \setuplist
> [chapter]
> [label=yes,
> style=bold,
> width=fit,
> distance=\spaceamount]
>
> \setuplist
> [section]
> [margin=3em,
> width=1.5em]
>
> \starttext
>
> \completecontent
>
> ...
>
> \stoptext
>
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-08-19 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18  4:40 TOC chapter and section numbering Adrian
2020-08-18  7:01 ` Taco Hoekwater
2020-08-19 14:44 ` Wolfgang Schuster
2020-08-19 17:59   ` Adrian

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