Difference between revisions of "Command/getmarking"
< Command
Jump to navigation
Jump to search
m (flagged a few keywords that need to be explained) |
(Description for both and all; current doesn't exist (anymore?)) |
||
Line 15: | Line 15: | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[...]</td> | <td class="cmd">[...]</td> | ||
− | <td>first last top bottom previous next both all | + | <td>first last top bottom previous next both all </td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 35: | Line 35: | ||
last : last not bottom in sync | last : last not bottom in sync | ||
− | both : | + | both : equivalent to first + last |
− | all : | + | all : equivalent to previous + first + last |
− | |||
− | |||
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. |
Revision as of 02:37, 2 July 2017
\getmarking
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
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: