Difference between revisions of "Command/getmarking"
< Command
Jump to navigation
Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}") |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>getmarking</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
Line 15: | Line 18: | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[...]</td> | <td class="cmd">[...]</td> | ||
− | <td>first last top bottom previous both all | + | <td>first last top bottom previous next both all </td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 34: | Line 37: | ||
first : first not top in sync | first : first not top in sync | ||
last : last not bottom in sync | last : last not bottom in sync | ||
+ | |||
+ | both : equivalent to first + last | ||
+ | all : equivalent to previous + first + last | ||
+ | |||
+ | current : ? | ||
When the chain is to be ignored, one can append ":nocheck" to the keyword. There’s also a 'current' method. | When the chain is to be ignored, one can append ":nocheck" to the keyword. There’s also a 'current' method. |
Latest revision as of 22:20, 14 November 2019
\getmarking
Syntax (autogenerated)
\getmarking[...][...][...] | |
[...] | mark |
[...] | page name number |
[...] | first last current previous next top bottom default both all first:nocheck last:nocheck previous:nocheck next:nocheck top:nocheck bottom:nocheck |
Syntax
\getmarking[...][...] | |
[...] | name |
[...] | first last top bottom previous next both all |
Description
Marks are somewhat special in the sense that they can be loners or part of a chain (chapter-section-...) with special reset requirements.
As TeX’s natural model has some limitations, in mkIV we do things a bit different (but rather well defined). When a set of marks on a page is identified, the following keywords can be used:
previous : last before sync next : first after sync
top : first in sync bottom : last in sync
first : first not top in sync last : last not bottom in sync
both : equivalent to first + last all : equivalent to previous + first + last
current : ?
When the chain is to be ignored, one can append ":nocheck" to the keyword. There’s also a 'current' method.
Example
Example of usage for each column in columnsets:
\startsetups S [p=(\getmarking[M][1][previous]) f=(\getmarking[M][1][first]) l=(\getmarking[M][1][last])]\quad [p=(\getmarking[M][2][previous]) f=(\getmarking[M][2][first]) l=(\getmarking[M][2][last])]\quad [p=(\getmarking[M][3][previous]) f=(\getmarking[M][3][first]) l=(\getmarking[M][3][last])] \global\mofcolumns\plusone \stopsetups \setupheadertexts[\setups{S}] \definecolumnset[C][n=3] \definemarking[M] \startbuffer \section{Knuth} [k1]\marking[M]{k1} [k2]\marking[M]{k2} \input knuth \section{Zapf} [z]\marking[M]{z} \input zapf \stopbuffer \starttext \startcolumnset[C] \dorecurse{10}{\getbuffer} \stopcolumnset \stoptext
Example
\definemarking[M] \startsetups S default=(\getmarking[M])~ first=(\getmarking[M][first])~ last=(\getmarking[M][last])~ previous=(\getmarking[M][previous])~ both=(\getmarking[M][both])~ all=(\getmarking[M][all])~ current=(\getmarking[M][current]) \stopsetups \setupheadertexts[text] [\setups{S}][] [\setups{S}][] \setuppagenumbering[location=footer] \starttext \startbuffer \section{Knuth} [k1]\marking[M]{k1}[k2]\marking[M]{k2} \input knuth \section{Zapf} [z]\marking[M]{z} \input zapf \stopbuffer \dorecurse{10}{\getbuffer} \stoptext
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: