Difference between revisions of "Command/setuppagenumber"
< Command
Jump to navigation
Jump to search
m (Text replace - "ConTeXt-Forum " to "Help from ConTeXt-Forum ") |
(some fixes) |
||
(10 intermediate revisions by 6 users not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>setuppagenumber</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
Line 10: | Line 13: | ||
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd">[ | + | <td class="cmd">way</td> |
− | <td> | + | <td>'''bytext''' byblock bychapter ... — ''reset the counter to one at the start of the text / every block/chapter/section/...</td> |
+ | </tr> | ||
+ | <tr valign="top" class="first"> | ||
+ | <td class="cmd">prefix</td> | ||
+ | <td>'''no''' yes — ''add the current [prefixset] number as a prefix</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="first"> | ||
+ | <td class="cmd">prefixset</td> | ||
+ | <td>'''part''' chapter section ... — ''write the part/chapter/... number as a prefix to the page number''</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="first"> | ||
+ | <td class="cmd">prefixconnector</td> | ||
+ | <td>'''\endash''' — ''mark to separate the prefix from the page number''</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="first"> | ||
+ | <td class="cmd">state</td> | ||
+ | <td> | ||
+ | {| class=wikitable | ||
+ | |- style="vertical-align: top" | ||
+ | | '''start''' || start/resume page numbering on this page, at the last counter value | ||
+ | |- style="vertical-align: top" | ||
+ | | stop || stop placing page numbers, and stop incrementing the counter. | ||
+ | |} | ||
+ | </td> | ||
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
− | <td class="cmd"> | + | <td class="cmd">number</td> |
− | <td> | + | <td>1 2 3 ... — ''Set the page number. Mkii only.''</td> |
</tr> | </tr> | ||
</table> | </table> | ||
+ | == Description == | ||
− | + | Setup the way the pages are numbered. | |
+ | To manually set the pagenumber: {{cmd|setcounter|[userpage][4]}}. | ||
+ | In MkII, this was: {{cmd|setuppagenumber|2=[number=4]}}. | ||
== Example == | == Example == | ||
− | < | + | <texcode> |
+ | % mode=mkiv | ||
+ | \setuppagenumber | ||
+ | [way=bytext, | ||
+ | prefix=yes, | ||
+ | prefixset=section, | ||
+ | prefixconnector=\endash, | ||
+ | state=start] | ||
+ | |||
+ | \setuppapersize[A7] | ||
+ | \showframe[] | ||
+ | |||
+ | \starttext | ||
+ | \section{One by one (fragment)} | ||
+ | |||
+ | \startlines | ||
+ | one by one | ||
+ | our friends | ||
+ | filled with joy and quest | ||
+ | begin to arrive | ||
+ | |||
+ | one by one our friends | ||
+ | the worshipers of ecstasy | ||
+ | begin to arrive | ||
+ | |||
+ | more friends and sweethearts | ||
+ | filling you with love | ||
+ | are on their way | ||
+ | \stoplines | ||
+ | |||
+ | \rightaligned{---Rumi, {\it trans.} Nader Khalili} | ||
+ | \stoptext | ||
+ | |||
+ | </texcode> | ||
== See also == | == See also == | ||
− | + | * {{cmd|setuppagenumber}} | |
+ | * {{cmd|setupuserpagenumber}} | ||
+ | * {{cmd|setupsubpagenumber}} | ||
+ | * {{cmd|setuppagenumbering}} | ||
+ | * {{cmd|setupcounter}} | ||
+ | * {{cmd|setcounter}} | ||
− | == Help from ConTeXt-Forum == | + | == Help from ConTeXt-Mailinglist/Forum == |
+ | All issues with: | ||
{{Forum|{{SUBPAGENAME}}}} | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | [[Category:Command/Numbers|setuppagenumber]] |
Latest revision as of 21:53, 28 October 2023
\setuppagenumber
Syntax (autogenerated)
\setuppagenumber[...=...,...] | |
viewerprefix | text |
state | start stop none keep empty |
...=...,... | inherits from \setupcounter |
Syntax
\setuppagenumber[...,...=...,...] | |||||
way | bytext byblock bychapter ... — reset the counter to one at the start of the text / every block/chapter/section/... | ||||
prefix | no yes — add the current [prefixset] number as a prefix | ||||
prefixset | part chapter section ... — write the part/chapter/... number as a prefix to the page number | ||||
prefixconnector | \endash — mark to separate the prefix from the page number | ||||
state |
|
||||
number | 1 2 3 ... — Set the page number. Mkii only. |
Description
Setup the way the pages are numbered.
To manually set the pagenumber: \setcounter[userpage][4].
In MkII, this was: \setuppagenumber[number=4].
Example
% mode=mkiv \setuppagenumber [way=bytext, prefix=yes, prefixset=section, prefixconnector=\endash, state=start] \setuppapersize[A7] \showframe[] \starttext \section{One by one (fragment)} \startlines one by one our friends filled with joy and quest begin to arrive one by one our friends the worshipers of ecstasy begin to arrive more friends and sweethearts filling you with love are on their way \stoplines \rightaligned{---Rumi, {\it trans.} Nader Khalili} \stoptext
See also
- \setuppagenumber
- \setupuserpagenumber
- \setupsubpagenumber
- \setuppagenumbering
- \setupcounter
- \setcounter
Help from ConTeXt-Mailinglist/Forum
All issues with: