Difference between revisions of "Command/nomoreblocks"
< Command
Jump to navigation
Jump to search
(description, category) |
(Add example.) |
||
Line 12: | Line 12: | ||
== Description == | == Description == | ||
− | {{cmd|nomoreblocks}} tells ConTeXt that all blocks have already been defined. If all invocations of the blocks occur after {{cmd|nomoreblocks}}, then giving ConTeXt this hint saves a compilation pass. | + | {{cmd|nomoreblocks}} tells ConTeXt that all blocks have already been defined. If in addition all invocations of the blocks occur after {{cmd|nomoreblocks}}, then giving ConTeXt this hint saves a compilation pass. |
+ | |||
+ | == Example == | ||
+ | <texcode> | ||
+ | \defineblock[question] | ||
+ | \defineblock[answer] | ||
+ | |||
+ | \starttext | ||
+ | |||
+ | \beginquestion | ||
+ | The first question | ||
+ | \endquestion | ||
+ | |||
+ | \beginanswer | ||
+ | The first answer | ||
+ | \endanswer | ||
+ | |||
+ | \nomoreblocks | ||
+ | |||
+ | \section{Questions} | ||
+ | \useblocks[question] | ||
+ | |||
+ | \section{Answers} | ||
+ | \useblocks[answer] | ||
+ | \stoptext | ||
+ | </texcode> | ||
== See also == | == See also == |
Revision as of 15:53, 24 April 2012
\nomoreblocks
Syntax
\nomoreblocks |
Description
\nomoreblocks tells ConTeXt that all blocks have already been defined. If in addition all invocations of the blocks occur after \nomoreblocks, then giving ConTeXt this hint saves a compilation pass.
Example
\defineblock[question] \defineblock[answer] \starttext \beginquestion The first question \endquestion \beginanswer The first answer \endanswer \nomoreblocks \section{Questions} \useblocks[question] \section{Answers} \useblocks[answer] \stoptext
See also
- \defineblock to define a new kind of block.
- \setupblock to set up block style.
- \keepblocks to start displaying blocks where they are defined.
- \hideblocks to stop displaying blocks where they are defined.
- \useblocks to display blocks.
- \selectblocks to display only blocks mentioned in the current section.
- \processblocks to process blocks without printing them.
- \forceblocks
- \nomoreblocks to allow one-pass compilation under certain conditions.
Help from ConTeXt-Mailinglist/Forum
All issues with: