1

Consider this example:

\definepagebreak
  [saut]
  [yes,header=empty]
  
\setuphead[part][page=saut,numberstyle= ,numbercommand={\uppercase},placehead=yes, alternative=middle,align=middle,
   before=\startstandardmakeup,
   after=\stopstandardmakeup,conversion=Romannumerals,style={\switchtobodyfont[60pt]}]
%
\define[1]\Dot{#1.}

\define[2]\myheadnumber{%
\startframedtext[frame=off,align=middle]
{\bf\ss\switchtobodyfont[30pt] #1 }
\vfill \blank[2cm]
{\switchtobodyfont[20pt] #2 }
\stopframedtext }
 \setuphead[chapter][command=\myheadnumber,align={middle,nothyphenated, verytolerant},header=empty,footer=empty,commandbefore={\blank[0.5em]},
commandafter={\blank[2cm]},alternative=middle]

\setuphead[section][align=middle,style=\bfc ,numbercommand=\Dot]

\starttext
\completecontent[creterium=all]

\startpart[title={My part title}]

\startchapter[title={my chapter title}]
\startsection[title={My section title}]

\dorecurse{5}{\input knuth}
\stopsection
\stopchapter
\stoppart
\startpart[title={My part title}]

\startchapter[title={my chapter title}]
\startsection[title={My section title}]

\dorecurse{5}{\input knuth}
\stopsection
\stopchapter
\stoppart
\stoptext

  1. How to hide section number in body text, and keep it in Toc.
  2. How to get correct chapter numbering (1 instead of 1.1), and center it enter image description here

1 Answer 1

1

Like this?

% ConTeXt either uses assignments or process options
% head=empty will be ignored
\definepagebreak[saut]
    [yes,empty]

%1=on,0=off
% Reset parts
% DON'T reset chapter (so it be 1, 2, 3...)
% Reset sections

\definestructureresetset
    [default][1,0,1][1]

\setuphead
    [sectionresetset=default]

\setuphead[part]
    [page=saut,
    numberstyle=,
    placehead=yes,
    alternative=middle,
    before=\startstandardmakeup,
    after=\stopstandardmakeup,
    conversion=R,
    style={\switchtobodyfont[60pt]}]

\define[2]\myheadnumber%
{\startframedtext
    [location=middle,
    frame=off,
    align={middle,nothyphenated, verytolerant}]
{\bf\ss\switchtobodyfont[30pt]#1}
\blank[2cm]
{\switchtobodyfont[20pt]#2}
\stopframedtext}
\setuphead[chapter]
    [command=\myheadnumber,
    header=empty,
    footer=empty,
    commandbefore={\blank[0.5em]},
    commandafter={\blank[2cm]},
    sectionsegments=chapter, %So it isn't 1.1 but 1
    align=middle]

\setuphead[section]
    [align=middle,
    style=\bfc,
    sectionsegments=chapter:section, %Not 1.1.1, but 1.1
    numbercommand=\gobbleoneargument]

\starttext
\completecontent[criterium=all]

\startpart[title={My part title}]

\startchapter[title={My chapter title}]
\startsection[title={My section title}]

\dorecurse{5}{\input knuth}
\stopsection
\stopchapter
\stoppart
\startpart[title={My part title}]

\startchapter[title={My chapter title}]
\startsection[title={My section title}]

\dorecurse{5}{\input knuth}
\stopsection
\stopchapter
\stoppart
4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .