Difference between revisions of "Command/typebuffer"

From Wiki
Jump to navigation Jump to search
(remove manual syntax, enhance wording)
Line 6: Line 6:
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
<syntax>typebuffer</syntax>
 
<syntax>typebuffer</syntax>
== [[Help:Reference|Syntax]] ==
+
 
<table cellspacing="4" cellpadding="2" class="cmd">
+
<syntax>setuptyping</syntax>
  <tr>
 
    <td colspan="2" class="cmd">\typebuffer<span class="first" >[buffer]</span><span class="second" >[...,...=...,...]</span></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[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">numbering</td>
 
    <td>file, ...?</td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">range</td>
 
    <td>{label,label}</td>
 
  </tr>
 
</table>
 
  
 
== Description ==  
 
== Description ==  
  
With <code>\typebuffer[mybuffer]</code> you can get back the verbatim content of buffer <code>mybuffer</code>, which was previously defined by command {{cmd|startbuffer}}.
+
With <code>\typebuffer[mybuffer]</code> you get the verbatim content of buffer <code>mybuffer</code>, which was previously defined with {{cmd|startbuffer}}.
  
To get back the non-verbatim content of the buffer use the command {{cmd|getbuffer}}.
+
To typeset the contents of the buffer, use {{cmd|getbuffer}}.
  
 
== Example ==
 
== Example ==

Revision as of 07:41, 1 June 2022

\typebuffer

Syntax (autogenerated)

\typebuffer[...,...][...=...,...]
[...,...]buffer
...=...,...inherits from \setuptyping


\setuptyping[...,...][...=...,...]
[...,...]name
oddmargindimension
evenmargindimension
marginyes no standard dimension
optionmp lua xml parsed-xml nested tex context none name
stylestyle command
colorcolor
alignsee \setupalign
linesyes no normal hyphenated
spaceon off normal fixed stretch
keeptogetheryes no
beforecommand
aftercommand
stripyes no number
rangenumber name
tabyes no number
escapeyes no text processor->text
indentnextyes no auto
continueyes no
startnumber
stopnumber
stepnumber
numberingfile line no
blanksee \blank


Description

With \typebuffer[mybuffer] you get the verbatim content of buffer mybuffer, which was previously defined with \startbuffer.

To typeset the contents of the buffer, use \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

Help from ConTeXt-Mailinglist/Forum

All issues with: