Difference between revisions of "Command/setupheadnumber"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=setupheadnumber
 
|name=setupheadnumber
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setupheadnumber</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 22: Line 23:
  
  
== Description ==  
+
== Description ==
 +
Allows manipulation of the current heading counters.
 +
The first argument determines which heading is to
 +
be changed, e.g. <tt>section</tt>, <tt>chapter</tt>.
 +
The second argument takes an integer; if unsigned, the
 +
section number will be <em>set</em> to this value.
 +
Nota bene: with the next call to the heading the number
 +
will be incremented again.
 +
Thus, in order for the next heading to carry a specific
 +
number <em>n</em> it would be necessary to set its
 +
number to <em>n-1</em>.
 +
 
 +
If the second argument is signed, the heading’s number
 +
will be <em>increased</em> or <em>decreased</em> by
 +
the specified amount instead.
 +
 
 +
== Example ==
 +
<context source="yes">
 +
\starttext
 +
\section{First}
  
 +
\setupheadnumber[section][+4]
 +
\section{Second?}
  
 +
\setupheadnumber[section][-5]
 +
\section{Second!}
  
== Example ==
+
\setupheadnumber[section][41]
<!-- Please fill in an example if you can -->
+
\section{Forty-second}
 +
\stoptext
 +
</context>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
<!-- something like {{cmd|goto}} -->
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Reference/en|setupheadnumber]]
+
[[Category:Command/Numbers|setupheadnumber]]

Latest revision as of 13:50, 18 November 2019

\setupheadnumber

Syntax (autogenerated)

\setupheadnumber[...][...]
[...]section
[...][+-]number


Syntax

\setupheadnumber[...][...]
[...] section
[...] number +number -number


Description

Allows manipulation of the current heading counters. The first argument determines which heading is to be changed, e.g. section, chapter. The second argument takes an integer; if unsigned, the section number will be set to this value. Nota bene: with the next call to the heading the number will be incremented again. Thus, in order for the next heading to carry a specific number n it would be necessary to set its number to n-1.

If the second argument is signed, the heading’s number will be increased or decreased by the specified amount instead.

Example

\starttext
\section{First}

\setupheadnumber[section][+4]
\section{Second?}

\setupheadnumber[section][-5]
\section{Second!}

\setupheadnumber[section][41]
\section{Forty-second}
\stoptext

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: