Command/setuphead

From ConTeXt wiki
< Command
Revision as of 18:28, 18 January 2013 by Adityam (talk | contribs) (Example of bodypartlabel)

\setuphead

Syntax

\setuphead[...,...,...][...,...=...,...]
[...,...,...] IDENTIFIER
default SECTION
section SECTION
coupling SECTION
sectionnumber yes no
textstyle normal bold slanted boldslanted type cap small... COMMAND
textcolor IDENTIFIER
numberstyle normal bold slanted boldslanted type cap small... COMMAND
numbercolor IDENTIFIER
style normal bold slanted boldslanted type cap small... COMMAND
color IDENTIFIER
beforesection COMMAND
aftersection COMMAND
prefix IDENTIFIER + -
incrementnumber yes no list file
placehead yes no empty hidden
alternative normal paragraph inmargin margin middle top bottom IDENTIFIER TEXT
expansion yes no xml COMMAND
xmlsetup IDENTIFIER
catcodes IDENTIFIER
sectionresetset IDENTIFIER
sectionseparatorset IDENTIFIER
sectionconversionset IDENTIFIER
conversion A conversion; see \convertnumber
sectionstarter TEXT
sectionstopper TEXT
sectionset IDENTIFIER
sectionsegments NUMBER NUMBER:NUMBER SECTION SECTION:SECTION
distance DIMENSION Space after head
before COMMAND
inbetween COMMAND
after COMMAND
page inherits from \page
marking page reset
number yes no
continue yes no
aligntitle yes no float
interlinespace inherits from \setupinterlinespace
ownnumber yes no
commandbefore COMMAND
commandafter COMMAND
deeptextcommand \...#1
numbercommand \...#1
deepnumbercommand \...#1
command \...#1#2
interaction list reference
internalgrid normal standard yes strict tolerant top bottom both broad fit first last high low line strut max min IDENTIFIER
align inherits from \setupalign left right middle normal
tolerance inherits from \setuptolerance
strut yes no
hang none lines broad fit NUMBER line
grid normal standard yes strict tolerant top bottom both broad fit first last high low line strut max min IDENTIFIER
indentnext yes no auto
width DIMENSION
numberwidth DIMENSION
textwidth DIMENSION
margintext yes no
margin DIMENSION
frontpartlabel IDENTIFIER
bodypartlabel IDENTIFIER
appendixlabel IDENTIFIER
backpartlabel IDENTIFIER
header none empty high nomarking
text none empty high nomarking
footer none empty high nomarking
textcommand \...#1
resetnumber yes no
file IDENTIFIER
[...,...=...,...] inherits from \setupheads

Description

  • style: See manual "Context: an excursion" section 31.3 Style and size switch in commands, e.g. for large, bold, sans serif section headers use 'style=\tfa\bf\ss'.
  • page
    • yes: The section header must be on the top of a new page
    • left: The section header must be on the top of an even page
    • right: The section header must be on the top of an odd page
  • continue
    • yes: If the section immeadiately follows a chapter it will be on the same page even though page=yes.
    • no: If the section immeadiately follows a chapter it will start on a new page.
  • header/footer: Set a particular header style, see \setupheader.


Example

\setuppapersize[A5]
\setuplabeltext[chapter=CHAPTER~]

\setuphead[chapter][
	header=empty,
	alternative=middle,
	style=bold,
	numbercommand=\groupedcommand{}{\blank[2cm]},
	after={\blank[3cm]},
	]

\starttext

\chapter{Title of chapter}

The first paragraph begins 3 cm below the title. In this chapter, we will discuss...

\stoptext

produces

Setting label of a new section head

\definehead[mychapter][chapter][bodypartlabel=mychapter]

\setuplabeltext[en][mychapter=My Chapter~]

\starttext
\mychapter{Animals}
\stoptext

produces

Example of hidden sections

\setupheadnumber[section]      [8]
\setupheadnumber[subsection]   [3]
\setupheadnumber[subsubsection][5]

\setuphead[section,subsection][placehead=hidden]
\setuphead[subsubsection]     [placehead=yes]

\starttext

\section{} % hidden 8th section

\subsection{} % hidden 3rd section

\subsubsection{This is complete numbering of subsubsection} % view 9.4.6 subsubsection

\stoptext

produces

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: