From: Wolfgang Schuster <wolfgang.schuster@gmail.com>
To: erik.margraf@gmail.com,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: "verbatim boxes"
Date: Mon, 26 Nov 2012 22:35:11 +0100 [thread overview]
Message-ID: <D2AA55EA-5C88-4DF4-8AA6-A146757BA4CE@gmail.com> (raw)
In-Reply-To: <CAAaWjtFjRyzdxYpDtnEGBg+HmC+0ajLUVRJSv4VN=YQRzh5iEg@mail.gmail.com>
Am 26.11.2012 um 21:42 schrieb Erik Margraf <erik.margraf@gmail.com>:
> Dear List,
>
> is there a Context function/macro which enables me to set
> a box with verbatim file input. I.e. something
> similar to :
>
> \setbox\scratchbox\hbox{\verbatimfileinput{FileName}}
You have to use a \vbox because a \hbox would put everything in a single line.
The important question is why do you want to store the text in a box.
When you plan to frame the text something like this can be used:
\definetyping
[framedfile]
[file]
[before={\startframedtext[width=max]},
after=\stopframedtext]
\starttext
\typefile[framedfile]{knuth.tex}
\stoptext
To store text and reuse it buffers are the best tool:
\startbuffer[ward]
The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
whether humans had ever evolved or not. But our presence is
like the effect of an old-age patient who smokes many packs
of cigarettes per day – and we humans are the cigarettes.
\stopbuffer
\starttext
\typebuffer[ward]
\getbuffer[ward]
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2012-11-26 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 20:42 Erik Margraf
2012-11-26 21:35 ` Wolfgang Schuster [this message]
[not found] ` <CAAaWjtHh2X9Xm+FO5etsBLQ_uNca35GaxYDqfyd0vUDUPoBNFQ@mail.gmail.com>
2012-11-26 22:32 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D2AA55EA-5C88-4DF4-8AA6-A146757BA4CE@gmail.com \
--to=wolfgang.schuster@gmail.com \
--cc=erik.margraf@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).