Difference between revisions of "Command/processblocks"
< Command
Jump to navigation
Jump to search
(Created page with "Documentation for \processblocks") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 25: | Line 25: | ||
</cd:command> | </cd:command> | ||
</cd:variants> | </cd:variants> | ||
− | <cd:description>Print only the ''block''s with ''tag'', but process them all. This is important when [[Command/defineenumeration|enumerations]] are in play, because items that are not processed don't increment the counter. If no tags are specified, all the ''block''s are printed. | + | <cd:description>Print only the ''block''s with ''tag'', but process them all. This is important when [[Command/defineenumeration|enumerations]] are in play, because items that are not processed don't increment the counter. If no tags are specified, all the ''block''s are printed. |
</cd:description> | </cd:description> | ||
<cd:examples><cd:example title=""><context source="yes" text="gives"> | <cd:examples><cd:example title=""><context source="yes" text="gives"> | ||
+ | \setuppapersize[A7] | ||
\starttext | \starttext | ||
\defineblock[question] | \defineblock[question] | ||
Line 65: | Line 66: | ||
<cd:commandref name="defineblock">to define a new kind of block.</cd:commandref> | <cd:commandref name="defineblock">to define a new kind of block.</cd:commandref> | ||
<cd:commandref name="setupblock">to set up block style.</cd:commandref> | <cd:commandref name="setupblock">to set up block style.</cd:commandref> | ||
− | <cd:commandref name="keepblocks">to start displaying blocks where they are defined.</cd:commandref></cd:seealso> | + | <cd:commandref name="keepblocks">to start displaying blocks where they are defined.</cd:commandref> |
+ | <cd:commandref name="hideblocks">to stop displaying blocks where they are defined.</cd:commandref> | ||
+ | <cd:commandref name="useblocks">to display blocks.</cd:commandref> | ||
+ | <cd:commandref name="selectblocks">to display only blocks mentioned in the current section.</cd:commandref> | ||
+ | <cd:commandref name="forceblocks"></cd:commandref> | ||
+ | <cd:commandref name="nomoreblocks"></cd:commandref></cd:seealso> | ||
</cd:commandgroup> | </cd:commandgroup> |
Latest revision as of 15:31, 18 November 2021
Contents
\processblocks
Summary
The command \processblocks is used to process blocks
Settings
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.
Examples
Example 1
\setuppapersize[A7] \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
Notes
See also
- strc-blk.mkiv
- \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.
- \forceblocks
- \nomoreblocks