Command/getmarking

From Wiki
< Command
Revision as of 17:04, 11 April 2010 by Patrick Gundlach (talk | contribs) (cleanup)
Jump to navigation Jump to search

\getmarking

Syntax

\getmarking[...][...]
[...] name
[...] first last previous both all current


Description

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