Difference between revisions of "Command/definecounter"

From Wiki
Jump to navigation Jump to search
m
m
Line 5: Line 5:
 
The following partial example adds a picture at the end of each chapter:
 
The following partial example adds a picture at the end of each chapter:
  
<code>
+
<source>
 
\definecounter[EventCount][
 
\definecounter[EventCount][
 
   way=bytext,
 
   way=bytext,
Line 18: Line 18:
 
   ]
 
   ]
 
\stopTEXpage
 
\stopTEXpage
</code>
+
</source>
  
 
The pictures are numbered sequentially, starting at 1.
 
The pictures are numbered sequentially, starting at 1.

Revision as of 18:04, 25 August 2014

Creates a new numeric counter.

Example

The following partial example adds a picture at the end of each chapter:

<source> \definecounter[EventCount][

 way=bytext,
 prefix=no

]

\startTEXpage

 \incrementcounter[EventCount]
 \externalfigure[{\rawcountervalue[EventCount]}][
   height=\paperheight,
   orientation=90,
 ]

\stopTEXpage </source>

The pictures are numbered sequentially, starting at 1.

See Also

Source Code

View the source for more details:

http://source.contextgarden.net/tex/context/base/strc-num.mkiv