Re: Local alternative to \input
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
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
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 / 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
___________________________________________________________________________________
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
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 ___________________________________________________________________________________
Am 04.03.24 um 10:43 schrieb Denis Maier via ntg-context:
Hi,
Aren’t environments used for setups (and not for textual content). Maybe a buffer may be what you want ?
Yes, buffers are the way to go for (textual) contents, while setups or environments are for settings – they handle whitespace differently. Apparently I misunderstood the intention when I gave the answer about environments, sorry! Hraban
participants (3)
-
denismaier@mailbox.org
-
Henning Hraban Ramm
-
Jeroen