Open main menu

Changes

no edit summary
Using <tt>\iftrialtypesetting</tt> as a test for non-final typesetting passes is especially useful inside TABLEs. If a counter is incremented inside of a TABLE cell, it may be incremented multiple times accidentally while TABLE tries to figure out the required column widths.
There are other situations where a conditional of the form <tt>\iftrialtypesetting\else... \fi</tt> is useful, but TABLE making sure counters are not incremented too often is the most common casea typical application.
</cd:description>
<cd:examples><cd:example title="Simple example"><context source="yes">\definecounter[EventCount]
EventBefore table: \rawcountervalue[EventCount]
\startTABLE[|p|]
\NC Event: \rawcountervalue[EventCount] (table here)\incrementcounter[EventCount]\NC\NR\NC Event: \rawcountervalue[EventCount] \iftrialtypesetting\else\incrementcounter[EventCount]\fi \NC\NR
\stopTABLE
 After table: \rawcountervalue[EventCount] \blankBefore table: \rawcountervalue[EventCount]\\ \startTABLE[|p|]\NC (table here)\iftrialtypesetting\else\incrementcounter[EventCount]\fi \NC\NR\stopTABLE After table: \rawcountervalue[EventCount]</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>