Talk:Document structure and headlines/Headlines formatting

From Wiki
Jump to navigation Jump to search

ConTeXt MkIV Sectioning

I’ve started the task of documenting the new \startchapter, \startsection etc. commands, based on my own experimenting and the email thread starting at http://www.mail-archive.com/ntg-context@ntg.nl/msg66341.html. These still don’t appear to be documented anywhere easy to find.

Please correct any inaccuracies or omissions; I’m new to ConTeXt and Wiki-editing. GKCJ 01:35, 18 June 2013 (CEST)


start/stop sectioning (maybe not useful nowadays)

Besides the traditional \chapter, \section etc. you can also use the more verbose, but also more flexible version of sectioning commands, these support tagged-PDF, XML and ePUB output better and also allow to insert code at the end of these sections.

Traditional Start/Stop
\part \startpart
\chapter \startchapter
\section \startsection
\subsection \startsubsection
\subsubsection \startsubsubsection
\title \starttitle
\subject \startsubject
... ...

Each of these start-commands has a corresponding stop-command to be used at the end of the section. For example:

  • \setuppapersize[A8]
    \starttext
    \section[sec:old]{Old Section}
    
    This is an old-style \ConTeXt\ section.
    
    \startsection
      [title={New Section},
       reference={sec:new},]
    
    This is a new-style section.
    
    \stopsection
    \stoptext
    

    produces