Difference between revisions of "Command/typebuffer"
< Command
Jump to navigation
Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}") |
(add options) |
||
Line 7: | Line 7: | ||
<table cellspacing="4" cellpadding="2" class="cmd"> | <table cellspacing="4" cellpadding="2" class="cmd"> | ||
<tr> | <tr> | ||
− | <td colspan="2" class="cmd">\typebuffer<span class="first" >[buffer]</span></td> | + | <td colspan="2" class="cmd">\typebuffer<span class="first" >[buffer]</span><span class="second" >[...,...=...,...]</span></td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
<td class="cmd">[buffer]</td> | <td class="cmd">[buffer]</td> | ||
<td>name of the buffer</td> | <td>name of the buffer</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="second"> | ||
+ | <td class="cmd">option</td> | ||
+ | <td>tex, ...?</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="second"> | ||
+ | <td class="cmd">range</td> | ||
+ | <td>{label,label}</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 22: | Line 30: | ||
== Example == | == Example == | ||
− | |||
<context source="yes" text="produces"> | <context source="yes" text="produces"> | ||
Line 35: | Line 42: | ||
\stoptext | \stoptext | ||
</context> | </context> | ||
+ | |||
+ | You can show only a part of a source: | ||
+ | |||
+ | <texcode> | ||
+ | \startbuffer[BB] | ||
+ | \setupsomething[] | ||
+ | \starttext | ||
+ | % begin | ||
+ | Do something interesting. | ||
+ | %end | ||
+ | \stoptext | ||
+ | \stopbuffer | ||
+ | |||
+ | \typebuffer[BB][option=tex,range={begin,end}] | ||
+ | </texcode> | ||
== See also == | == See also == |
Revision as of 14:14, 27 July 2018
\typebuffer
Syntax
\typebuffer[buffer][...,...=...,...] | |
[buffer] | name of the buffer |
option | tex, ...? |
range | {label,label} |
Description
With \typebuffer[mybuffer]
you can get back the verbatim content of buffer mybuffer
, which was previously defined by command \startbuffer.
To get back the non-verbatim content of the buffer use the command \getbuffer.
Example
\starttext \startbuffer[mybuffer] This is a text, which is stored in the buffer with name \quotation{mybuffer}. \stopbuffer \typebuffer[mybuffer] \stoptext
produces
You can show only a part of a source:
\startbuffer[BB] \setupsomething[] \starttext % begin Do something interesting. %end \stoptext \stopbuffer \typebuffer[BB][option=tex,range={begin,end}]
See also
- \getbuffer - Get back the "formatted" content of a buffer.
- \input - Include the complete content of a text file.
- \startbuffer - Define the content of a temporary buffer.
Help from ConTeXt-Mailinglist/Forum
All issues with: