Difference between revisions of "Command/typebuffer"
< Command
Jump to navigation
Jump to search
m (→See also: : \getbuffer) |
(remove manual syntax, enhance wording) |
||
(17 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
}} | }} | ||
− | == [[Help:Reference|Syntax]] == | + | == [[Help:Reference|Syntax]] (autogenerated) == |
− | < | + | <syntax>typebuffer</syntax> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
+ | <syntax>setuptyping</syntax> | ||
== Description == | == Description == | ||
+ | With <code>\typebuffer[mybuffer]</code> you get the verbatim content of buffer <code>mybuffer</code>, which was previously defined with {{cmd|startbuffer}}. | ||
+ | |||
+ | To typeset the contents of the buffer, use {{cmd|getbuffer}}. | ||
== Example == | == Example == | ||
− | < | + | |
+ | <context source="yes" text="produces"> | ||
+ | \starttext | ||
+ | |||
+ | \startbuffer[mybuffer] | ||
+ | This is a text, which is stored in the buffer with name \quotation{mybuffer}. | ||
+ | \stopbuffer | ||
+ | |||
+ | \typebuffer[mybuffer] | ||
+ | |||
+ | \stoptext | ||
+ | </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 == | ||
− | |||
− | [[Category: | + | * {{cmd|setuptyping}} – setup also for {{cmd|type}} |
+ | * {{cmd|getbuffer}} - Get back the "formatted" content of a buffer. | ||
+ | * {{cmd|input}} - Include the complete content of a text file. | ||
+ | * {{cmd|startbuffer}} - Define the content of a temporary buffer. | ||
+ | |||
+ | == Help from ConTeXt-Mailinglist/Forum == | ||
+ | All issues with: | ||
+ | {{Forum|{{SUBPAGENAME}}}} | ||
+ | |||
+ | [[Category:Command/Buffers|typebuffer]] |
Revision as of 07:41, 1 June 2022
\typebuffer
Syntax (autogenerated)
\typebuffer[...,...][...=...,...] | |
[...,...] | buffer |
...=...,... | inherits from \setuptyping |
\setuptyping[...,...][...=...,...] | |
[...,...] | name |
oddmargin | dimension |
evenmargin | dimension |
margin | yes no standard dimension |
option | mp lua xml parsed-xml nested tex context none name |
style | style command |
color | color |
align | see \setupalign |
lines | yes no normal hyphenated |
space | on off normal fixed stretch |
keeptogether | yes no |
before | command |
after | command |
strip | yes no number |
range | number name |
tab | yes no number |
escape | yes no text processor->text |
indentnext | yes no auto |
continue | yes no |
start | number |
stop | number |
step | number |
numbering | file line no |
blank | see \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
- \setuptyping – setup also for \type
- \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: