Difference between revisions of "Command/keepblocks"
< Command
Jump to navigation
Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}") |
(Description, example, category) |
||
Line 11: | Line 11: | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
<td class="cmd">[...,...,...]</td> | <td class="cmd">[...,...,...]</td> | ||
− | <td> | + | <td>''names of block classes (defined with \defineblock)''</td> |
</tr> | </tr> | ||
<tr valign="top" class="second"> | <tr valign="top" class="second"> | ||
<td class="cmd">[...,...,...]</td> | <td class="cmd">[...,...,...]</td> | ||
− | <td>all | + | <td>''tags to keep, or keyword'' all</td> |
</tr> | </tr> | ||
</table> | </table> | ||
Line 21: | Line 21: | ||
== Description == | == Description == | ||
+ | From here on, typeset blocks where they are defined, as well as when recalled. This is on by default in Mk II, and off by default in Mk IV. | ||
+ | == Example == | ||
+ | <context source=yes text=gives> | ||
+ | \starttext | ||
+ | |||
+ | \defineblock[myblock] | ||
+ | |||
+ | |||
+ | \section{Defining blocks} | ||
+ | |||
+ | \beginmyblock | ||
+ | In Mk II, blocks are kept by default; in Mk IV, blocks are hidden by default. | ||
+ | \endmyblock | ||
+ | |||
+ | \hideblocks[myblock] | ||
+ | \beginmyblock | ||
+ | Potato (first, hidden where defined) | ||
+ | \endmyblock | ||
− | + | \keepblocks[myblock] | |
− | < | + | |
+ | \beginmyblock | ||
+ | Tomato (second, shown where defined) | ||
+ | \endmyblock | ||
+ | |||
+ | \section{Recalling blocks} | ||
+ | \useblocks[myblock] | ||
+ | |||
+ | \stoptext | ||
+ | </context> | ||
== See also == | == See also == | ||
− | + | * {{cmd|defineblock}} to define a new kind of block. | |
+ | * {{cmd|setupblock}} to set up block style. | ||
+ | * {{cmd|keepblocks}} to start displaying blocks where they are defined. | ||
+ | * {{cmd|hideblocks}} to stop displaying blocks where they are defined. | ||
+ | * {{cmd|useblocks}} to display blocks. | ||
+ | * {{cmd|selectblocks}} to display only blocks mentioned in the current section. | ||
+ | * {{cmd|processblocks}} to process blocks without printing them. | ||
+ | * {{cmd|forceblocks}} | ||
+ | * {{cmd|nomoreblocks}} to allow one-pass compilation under certain conditions. | ||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == | ||
Line 34: | Line 69: | ||
{{Forum|{{SUBPAGENAME}}}} | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | [[Category:Command/Blocks|keepblocks]] |
Revision as of 07:15, 24 April 2012
\keepblocks
Syntax
\keepblocks[...,...,...][...,...,...] | |
[...,...,...] | names of block classes (defined with \defineblock) |
[...,...,...] | tags to keep, or keyword all |
Description
From here on, typeset blocks where they are defined, as well as when recalled. This is on by default in Mk II, and off by default in Mk IV.
Example
\starttext \defineblock[myblock] \section{Defining blocks} \beginmyblock In Mk II, blocks are kept by default; in Mk IV, blocks are hidden by default. \endmyblock \hideblocks[myblock] \beginmyblock Potato (first, hidden where defined) \endmyblock \keepblocks[myblock] \beginmyblock Tomato (second, shown where defined) \endmyblock \section{Recalling blocks} \useblocks[myblock] \stoptext
gives
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: