From: Denis Maier via ntg-context <ntg-context@ntg.nl>
To: "'mailing list for ConTeXt users'" <ntg-context@ntg.nl>
Cc: denismaier@mailbox.org
Subject: [NTG-context] Re: Local alternative to \input
Date: Mon, 4 Mar 2024 10:43:07 +0100 [thread overview]
Message-ID: <011e01da6e18$5d2e5940$178b0bc0$@mailbox.org> (raw)
In-Reply-To: <CAPtmdbNE3dpMPqqfjLkMG584J9pQvM8O6AjMKjmfjv7NfrVMtg@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2425 bytes --]
Hi,
Aren’t environments used for setups (and not for textual content). Maybe a buffer may be what you want ?
https://wiki.contextgarden.net/Command/startbuffer
Best,
Denis
Von: Jeroen <contextntg@gmail.com>
Gesendet: Montag, 4. März 2024 06:15
An: mailing list for ConTeXt users <ntg-context@ntg.nl>
Betreff: [NTG-context] Re: Local alternative to \input
With a single environment it seems to work, though when I expand it to multiple, it does not seem to work anymore
\starttext
SomeText \\
\environment aaa \\
SomeText \\
\environment bbb \\
SomeText \\
\startenvironment aaa
\samplefile{lorem}
\stopenvironment
\startenvironment bbb
\samplefile{tufte}
\stopenvironment
\stoptext
Op do 4 jan 2024 om 20:14 schreef Henning Hraban Ramm <texml@fiee.net <mailto:texml@fiee.net> >:
Am 04.01.24 um 18:00 schrieb Jeroen:
> I just would like to have a lot of mark-up for combined figures and
> tables etc moved out of the way, similar to this. I am loosing the
> general documetn flow because of all this markup. Would there be a
> construction similar to this:
>
> \starttext
>
> \environment foo
> \environment bar
>
> \startenvironment foo
> this is a lot of text
> \stopenvironment
>
> \startenvironment bar
> and this is another piece of text
> \stopenvironment
>
> \stoptext
An environment is a separate file.
\environment is like \input with a few more checks, e.g. it loads the
file only once.
e.g.
-- file "env_foo.tex" --
\startenvironment env_foo
% settings
\stopenvironment
--
-- file document.tex --
\environment env_foo
\starttext
% whatever
\stoptext
--
Instead of the call within your document, you can also call
context --environment=env_foo.tex document
(Usually that makes only sense in XML workflows.)
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 5950 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-03-04 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 16:12 [NTG-context] " Jeroen
2024-01-04 16:21 ` [NTG-context] " Wolfgang Schuster
2024-01-04 16:27 ` Henning Hraban Ramm
[not found] ` <b8802a76-0411-427a-932d-59c4e3ae2abb@gmail.com>
2024-01-04 19:12 ` Henning Hraban Ramm
2024-03-04 5:14 ` Jeroen
2024-03-04 9:43 ` Denis Maier via ntg-context [this message]
2024-03-04 15:49 ` Henning Hraban Ramm
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='011e01da6e18$5d2e5940$178b0bc0$@mailbox.org' \
--to=ntg-context@ntg.nl \
--cc=denismaier@mailbox.org \
/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).