From Wiki
< Command
Revision as of 17:44, 6 September 2020 by Taco (talk | contribs) (Created page with "Documentation for \startbuffer ... \stopbuffer")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

\startbuffer ... \stopbuffer


The environment \startbuffer ... \stopbuffer is used for temporarily storing content.


\startbuffer[...] ... \stopbuffer

You can give a name to the buffer if you want.


You can store information temporarily for future use in your document with:
If you want to see what Hasselt has in store you should come and visit it
some time.



you recall the stored text. The logical name is optional. With


you get back the verbatim contents of the buffer, typeset as though inside \starttyping...\stoptyping.

Buffers are set up with:


You can also create your own named buffers as an instance of startbuffer by using \definebuffer.

Note that the default \startbuffer is not an instance of startbuffer; it has its own (equivalent) definition.


Example 1


\getbuffer[buffer-name]    % insert content of \startbuffer ... \stopbuffer

\typebuffer[buffer-name]   % type content in verbatim mode


  • By Benjamin on 2021-08-02T20:37:54+0200:
To test if a (potentially empty) buffer exists: \doifelsebuffer{buffername}{yes}{no}

To test if a buffer has content (more than blank lines): \doiftextelse{\getbuffer[buffername]}{yes}{no}

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: