Changes

Jump to navigation Jump to search
2,508 bytes added ,  14:30, 3 December 2021
Created page with "Documentation for \typesetbuffer"
<cd:commandgroup name="typesetbuffer" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\typesetbuffer</tt> typesets a buffer verbatim
</cd:shortdesc>
<cd:variants>
<cd:command category="graphics" file="grph-fig.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-graphics.xml" keywords="buffer" level="document" name="typesetbuffer" variantnumber="1">
<cd:arguments>
<cd:keywords optional="yes" ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="*"></cd:constant>
<cd:constant type="cd:buffer"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" optional="yes" ordinal="2">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setupexternalfigure"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>With <code>\typesetbuffer[mybuffer]</code>, ConTeXt typesets the buffer <code>mybuffer</code> (previously defined by command {{cmd|startbuffer}}) as an independent file and it includes it in the document as an external image.

To get back the verbatim content of the buffer use the command {{cmd|typebuffer}}.

When you invoke {{cmd|typesetbuffer}} on a buffer already typeset, the buffer won’t be typeset again, but the requested page(s) will be included in the document as external figures.
</cd:description>
<cd:examples><cd:example title=""><context source="yes">
\startTEXpage

\startbuffer [sample]
\starttext
\startTEXpage[offset=10pt] one \stopTEXpage
\startTEXpage[offset=10pt] two \stopTEXpage
\startTEXpage[offset=10pt] three \stopTEXpage
\stoptext
\stopbuffer

one: \typesetbuffer[sample][frame=on,page=1]

two: \externalfigure[\lasttypesetbuffer][frame=on,page=2]

three: \typesetbuffer[*][frame=on,page=3]

\stopTEXpage
</context>

</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="defineexternalfigure" originator="system"></cd:commandref>
<cd:commandref name="setupexternalfigure" originator="system"></cd:commandref>
<cd:source file="grph-fig.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Graphics"></cd:wikipage>
<cd:wikipage originator="system" page="Keywords:Buffer"></cd:wikipage>
<cd:commandref name="typebuffer"></cd:commandref>
<cd:wikipage page="Verbatim text"></cd:wikipage>
<cd:commandref name="startbuffer"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu