Difference between revisions of "Command/definestructureconversionset"

From Wiki
Jump to navigation Jump to search
(Complete page)
m (Nicer looking category link)
Line 69: Line 69:
 
== See also ==
 
== See also ==
 
* {{cmd|defineconversion}}
 
* {{cmd|defineconversion}}
* [[:Category:Command/Conversions]]
+
* [[:Category:Command/Conversions|Command/Conversions]]
* [http://www.ntg.nl/pipermail/ntg-context/2012/065245.html Wolfgang's answer in the mail archive]
 
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==

Revision as of 13:58, 3 July 2012

\definestructureconversionset

Syntax

\definestructureconversionset[name][conversion,conversion,...][default]
[name] Name of the conversion set
[conversion,conversion,...] Conversions for \part, \chapter, \section, etc.
[default] Default setting if no explicit conversion is set

Description

The command defines conversion of internal counters.

The first argument is just the name which is used as argument for sectionconversionset in \setuphead, and for prefixconversionset in \setupcaption, \setupenumerations etc. The name of the conversion can be prefixed with the name of a sectionblock, e.g. \definestructureconversionset.

With the second argument you can set a conversion of the counter for the headings. The list always starts at the \part level and continues with \chapter etc. but it’s possible to leave entries empty.

With the third argument one can set a default value which is used when no value for a heading is set with the second argument.

Example

% mode=mkiv

\setuppapersize[A5]

\definestructureconversionset[myconversion]
    [A,   % part: capital letters
     KR,  % chapter: small caps Roman
      ,   % section: none defined (use fallback)
     m,   % subsection: medieaval, a.k.a. oldstyle
     R]   % subsubsection: capital Roman
    [r]

\setupheads
    [part,chapter,section,subsection,subsubsection]
    [before={}, after={}, 
     sectionconversionset=myconversion]

\part{Part}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}

See also

Help from ConTeXt-Mailinglist/Forum

All issues with:

definestructureconversionset