Difference between revisions of "Command/processblocks"

From ConTeXt wiki
 
Line 4: Line 4:
 
}}
 
}}
  
== [[Help:Reference|Syntax]] (autogenerated)] ==
+
== [[Help:Reference|Syntax]] (autogenerated) ==
 
<syntax>processblocks</syntax>
 
<syntax>processblocks</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==

Latest revision as of 13:24, 13 October 2019

\processblocks

Syntax (autogenerated)

\processblocks[...,...][...,...][...=...,...]
[...,...]name
[...,...]name
criteriumtext section


Syntax

\processblocks[...,...,...][...,...,...]
[...,...,...] block
[...,...,...] tag

Description

Print only the blocks with tag, but process them all. This is important when enumerations are in play, because items that are not processed don't increment the counter. If no tags are specified, all the blocks are printed.

Example

\starttext
\defineblock[question]
\defineenumeration[Q][text=Q]

\subject{These are the questions}

\beginquestion[first]
\Q This should be number 1
\endquestion

\beginquestion[last]
\Q This should be number 2
\endquestion

\subject{Useblocks only processes the blocks you ask for}

(Reset the \type{question} counter)
\resetQ

\useblocks[question][last]

\subject{Processblocks prints the blocks you ask for, but processes them all}

(Reset the \type{question} counter.)
\resetQ

\processblocks[question][last]

\stoptext

gives

See also


Help from ConTeXt-Mailinglist/Forum

All issues with: