* [NTG-context] Local alternative to \input @ 2024-01-04 16:12 Jeroen 2024-01-04 16:21 ` [NTG-context] " Wolfgang Schuster 2024-01-04 16:27 ` Henning Hraban Ramm 0 siblings, 2 replies; 7+ messages in thread From: Jeroen @ 2024-01-04 16:12 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 406 bytes --] I have a document that is getting a lot of mark-up instructions for creating tables and placing figures. I would like to move this out of the main text flow. The easiest way would be using \input, but i rather place all this at the bottom of the file and just refer to it with something like \localinput or so to a textblock at the bottom of the same file. What would be the easiest way to implement this? [-- Attachment #1.2: Type: text/html, Size: 431 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: Local alternative to \input 2024-01-04 16:12 [NTG-context] Local alternative to \input Jeroen @ 2024-01-04 16:21 ` Wolfgang Schuster 2024-01-04 16:27 ` Henning Hraban Ramm 1 sibling, 0 replies; 7+ messages in thread From: Wolfgang Schuster @ 2024-01-04 16:21 UTC (permalink / raw) To: mailing list for ConTeXt users, Jeroen eroen schrieb am 04.01.2024 um 17:12: > I have a document that is getting a lot of mark-up instructions for > creating tables and placing figures. I would like to move this out of > the main text flow. The easiest way would be using \input, but i > rather place all this at the bottom of the file and just refer to it > with something like \localinput or so to a textblock at the bottom of > the same file. What would be the easiest way to implement this? Can you provide a minimal example, natural tables provide a mechanism to separate layout and content but we can't know what you use in your document. Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: Local alternative to \input 2024-01-04 16:12 [NTG-context] Local alternative to \input 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> 1 sibling, 1 reply; 7+ messages in thread From: Henning Hraban Ramm @ 2024-01-04 16:27 UTC (permalink / raw) To: mailing list for ConTeXt users Am 04.01.24 um 17:12 schrieb Jeroen: > I have a document that is getting a lot of mark-up instructions for > creating tables and placing figures. I would like to move this out of > the main text flow. The easiest way would be using \input, but i rather > place all this at the bottom of the file and just refer to it with > something like \localinput or so to a textblock at the bottom of the > same file. What would be the easiest way to implement this? Usually, the best way to load setups is using \environment at the top of your file. I don’t understand the sense in placing this in the bottom, and since it’s against the flow of instructions it would at least involve a second pass, and I don’t see how anything would work without loading it on top. You could load an environment with a command line option, if you must avoid it in your file. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <b8802a76-0411-427a-932d-59c4e3ae2abb@gmail.com>]
* [NTG-context] Re: Local alternative to \input [not found] ` <b8802a76-0411-427a-932d-59c4e3ae2abb@gmail.com> @ 2024-01-04 19:12 ` Henning Hraban Ramm 2024-03-04 5:14 ` Jeroen 0 siblings, 1 reply; 7+ messages in thread From: Henning Hraban Ramm @ 2024-01-04 19:12 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: Local alternative to \input 2024-01-04 19:12 ` Henning Hraban Ramm @ 2024-03-04 5:14 ` Jeroen 2024-03-04 9:43 ` Denis Maier via ntg-context 0 siblings, 1 reply; 7+ messages in thread From: Jeroen @ 2024-03-04 5:14 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1984 bytes --] 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>: > 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 > > ___________________________________________________________________________________ > [-- Attachment #1.2: Type: text/html, Size: 3061 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: Local alternative to \input 2024-03-04 5:14 ` Jeroen @ 2024-03-04 9:43 ` Denis Maier via ntg-context 2024-03-04 15:49 ` Henning Hraban Ramm 0 siblings, 1 reply; 7+ messages in thread From: Denis Maier via ntg-context @ 2024-03-04 9:43 UTC (permalink / raw) To: 'mailing list for ConTeXt users'; +Cc: denismaier [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: Local alternative to \input 2024-03-04 9:43 ` Denis Maier via ntg-context @ 2024-03-04 15:49 ` Henning Hraban Ramm 0 siblings, 0 replies; 7+ messages in thread From: Henning Hraban Ramm @ 2024-03-04 15:49 UTC (permalink / raw) To: ntg-context 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 ? > > https://wiki.contextgarden.net/Command/startbuffer 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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-05 11:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-01-04 16:12 [NTG-context] Local alternative to \input 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 2024-03-04 15:49 ` Henning Hraban Ramm
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).