Difference between revisions of "Command/getbuffer"

From Wiki
Jump to navigation Jump to search
m (→‎See also: : \typebuffer)
(Filled this empty page with a description, an example and links to related ConTeXt commands.)
Line 15: Line 15:
 
</table>
 
</table>
  
 +
== Description ==
  
== Description ==
+
With <code>\getbuffer[mybuffer]</code> you can get back the "formatted" content of buffer <code>mybuffer</code>, which was previously defined by command [[cmd:startbuffer|\startbuffer]].
 +
 
 +
To get back the verbatim content of the buffer use the command [[cmd:typebuffer|\typebuffer]].
  
 
== Example ==
 
== Example ==
 
<!-- Please fill in an example if you can -->
 
<!-- Please fill in an example if you can -->
 +
 +
<context source="yes" text="produces">
 +
\starttext
 +
 +
\startbuffer[mybuffer]
 +
This is a text, which is stored in the buffer with name \quotation{mybuffer}.
 +
\stopbuffer
 +
 +
\getbuffer[mybuffer]
 +
 +
\stoptext
 +
</context>
  
 
== See also ==
 
== See also ==
[[cmd:startbuffer|\startbuffer]], [[cmd:typebuffer|\typebuffer]]
+
 
 +
* [[cmd:input|\input]] - Include the complete content of a text file (with extension .tex).
 +
* [[cmd:startbuffer|\startbuffer]] - Define the content of a temporarily buffer.
 +
* [[cmd:typebuffer|\typebuffer]] - Get back the content of a buffer as verbatim text.
  
 
[[Category:Reference/en|getbuffer]]
 
[[Category:Reference/en|getbuffer]]

Revision as of 11:30, 2 July 2011

\getbuffer

Syntax

\getbuffer[...]
[...] name

Description

With \getbuffer[mybuffer] you can get back the "formatted" content of buffer mybuffer, which was previously defined by command \startbuffer.

To get back the verbatim content of the buffer use the command \typebuffer.

Example

\starttext

\startbuffer[mybuffer]
This is a text, which is stored in the buffer with name \quotation{mybuffer}.
\stopbuffer

\getbuffer[mybuffer]

\stoptext

produces

See also

  • \input - Include the complete content of a text file (with extension .tex).
  • \startbuffer - Define the content of a temporarily buffer.
  • \typebuffer - Get back the content of a buffer as verbatim text.