Difference between revisions of "Command/getmarking"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
m (cleanup)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=getmarking
 
|name=getmarking
Line 23: Line 21:
  
 
== Description ==  
 
== Description ==  
== comment ==
+
 
<pre>
+
== Example ==
 +
<texcode>
 
Example of usage for each column in columnsets:
 
Example of usage for each column in columnsets:
  
Line 63: Line 62:
  
 
\stoptext
 
\stoptext
 
+
</texcode>
</pre>
 
  
  
Line 70: Line 68:
 
== Example ==
 
== Example ==
  
<pre class="example">
+
<texcode>
 
\definemarking[M]
 
\definemarking[M]
  
Line 103: Line 101:
  
 
\stoptext
 
\stoptext
 
+
</texcode>
</pre>
 
  
  

Revision as of 17:04, 11 April 2010

\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