Difference between revisions of "Command/keepblocks"

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

Latest revision as of 13:24, 13 October 2019

\keepblocks

Syntax (autogenerated)

\keepblocks[...,...][...,...]
[...,...]name
[...,...]name


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 they are recalled. This is on by default in mkii, and off by default in mkiv.

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

This gives:

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: