Difference between revisions of "Command/definecounter"
< Command
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: | ||
− | < | + | <texcode> |
− | \definecounter[EventCount][ | + | \definecounter[EventCount] |
− | + | [ | |
− | + | way=bytext, | |
− | ] | + | prefix=no, |
+ | ] | ||
\startTEXpage | \startTEXpage | ||
\incrementcounter[EventCount] | \incrementcounter[EventCount] | ||
− | \externalfigure[{\rawcountervalue[EventCount]}][ | + | \externalfigure[{\rawcountervalue[EventCount]}] |
− | + | [ | |
− | + | height=\paperheight, | |
− | + | orientation=90, | |
+ | ] | ||
\stopTEXpage | \stopTEXpage | ||
− | </ | + | </texcode> |
The pictures are numbered sequentially, starting at 1. | The pictures are numbered sequentially, starting at 1. |
Revision as of 23:02, 26 August 2014
Creates a new numeric counter.
Example
The following partial example adds a picture at the end of each chapter:
\definecounter[EventCount] [ way=bytext, prefix=no, ] \startTEXpage \incrementcounter[EventCount] \externalfigure[{\rawcountervalue[EventCount]}] [ height=\paperheight, orientation=90, ] \stopTEXpage
The pictures are numbered sequentially, starting at 1.
See Also
- \incrementcounter - Increase the counter value
- \decrementcounter - Decrease the counter value
- \rawcounter - Retrieve the unformatted value
- \rawcountervalue - Retrieve the unformatted value
- \convertedcounter - Retrieve the formatted value
Source Code
View the source for more details:
http://source.contextgarden.net/tex/context/base/strc-num.mkiv