* letter module: File ended while scanning use of \buff_gobble
@ 2013-03-04 13:57 Peter Münster
2013-03-04 19:11 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Peter Münster @ 2013-03-04 13:57 UTC (permalink / raw)
To: ConTeXt users
Hi,
How could I embed \startletter/\stopletter in a macro please?
This does not work:
--8<---------------cut here---------------start------------->8---
\usemodule[letter]
\def\myStartLetter{\startletter}
\def\myStopLetter{\stopletter}
\myStartLetter
\input tufte
\myStopLetter
--8<---------------cut here---------------end--------------->8---
TIA for any hints,
--
Peter
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: letter module: File ended while scanning use of \buff_gobble
2013-03-04 13:57 letter module: File ended while scanning use of \buff_gobble Peter Münster
@ 2013-03-04 19:11 ` Wolfgang Schuster
2013-09-01 11:33 ` Peter Münster
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-03-04 19:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 04.03.2013 um 14:57 schrieb Peter Münster <pmlists@free.fr>:
> Hi,
>
> How could I embed \startletter/\stopletter in a macro please?
>
> This does not work:
>
> --8<---------------cut here---------------start------------->8---
> \usemodule[letter]
> \def\myStartLetter{\startletter}
> \def\myStopLetter{\stopletter}
> \myStartLetter
> \input tufte
> \myStopLetter
> --8<---------------cut here---------------end--------------->8---
The module uses a buffer to store the content of the letter environment.
What you can do is to create a new buffer for your environment and feed
the content of this buffer to the letter module.
\usemodule[letter]
\startsetups[letter:section:content]
\getbuffer[MyLetter]
\stopsetups
\setuplettersection[content][alternative=setups]
\def\StartLetter
{\starttext
\grabbufferdata[MyLetter][StartLetter][StopLetter]}
\def\StopLetter
{\placeletter
\stoptext}
\StartLetter
\input tufte
\StopLetter
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: letter module: File ended while scanning use of \buff_gobble
2013-03-04 19:11 ` Wolfgang Schuster
@ 2013-09-01 11:33 ` Peter Münster
2013-09-01 12:09 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Peter Münster @ 2013-09-01 11:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, Mar 04 2013, Wolfgang Schuster wrote:
> \usemodule[letter]
>
> \startsetups[letter:section:content]
> \getbuffer[MyLetter]
> \stopsetups
>
> \setuplettersection[content][alternative=setups]
>
> \def\StartLetter
> {\starttext
> \grabbufferdata[MyLetter][StartLetter][StopLetter]}
>
> \def\StopLetter
> {\placeletter
> \stoptext}
>
> \StartLetter
> \input tufte
> \StopLetter
Thanks Wolfgang.
How could I add something at the start and at the end of the letter?
This does not work:
--8<---------------cut here---------------start------------->8---
\def\StartLetter
{\starttext
\grabbufferdata[MyLetter][StartLetter][StopLetter]
something at the start of the letter}
\def\StopLetter
{something at the end of the letter
\placeletter
\stoptext}
--8<---------------cut here---------------end--------------->8---
TIA for any help,
--
Peter
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: letter module: File ended while scanning use of \buff_gobble
2013-09-01 11:33 ` Peter Münster
@ 2013-09-01 12:09 ` Wolfgang Schuster
2013-09-01 12:30 ` buffers.prepend() (was: letter module: File ended while scanning use of \buff_gobble) Peter Münster
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-09-01 12:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 01.09.2013 um 13:33 schrieb Peter Münster <pmlists@free.fr>:
> On Mon, Mar 04 2013, Wolfgang Schuster wrote:
>
>> \usemodule[letter]
>>
>> \startsetups[letter:section:content]
>> \getbuffer[MyLetter]
>> \stopsetups
>>
>> \setuplettersection[content][alternative=setups]
>>
>> \def\StartLetter
>> {\starttext
>> \grabbufferdata[MyLetter][StartLetter][StopLetter]}
>>
>> \def\StopLetter
>> {\placeletter
>> \stoptext}
>>
>> \StartLetter
>> \input tufte
>> \StopLetter
>
> Thanks Wolfgang.
>
> How could I add something at the start and at the end of the letter?
>
> This does not work:
>
> --8<---------------cut here---------------start------------->8---
> \def\StartLetter
> {\starttext
> \grabbufferdata[MyLetter][StartLetter][StopLetter]
> something at the start of the letter}
>
> \def\StopLetter
> {something at the end of the letter
> \placeletter
> \stoptext}
> --8<---------------cut here---------------end--------------->8---
\startrawsetups[letter:section:content]
Text before the content of the letter.
\getbuffer[MyLetter]
Text after the content of the letter.
\stoprawsetups
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* buffers.prepend() (was: letter module: File ended while scanning use of \buff_gobble)
2013-09-01 12:09 ` Wolfgang Schuster
@ 2013-09-01 12:30 ` Peter Münster
2013-09-03 9:01 ` buffers.prepend() Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Peter Münster @ 2013-09-01 12:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, Sep 01 2013, Wolfgang Schuster wrote:
> \startrawsetups[letter:section:content]
>
> Text before the content of the letter.
>
> \getbuffer[MyLetter]
>
> Text after the content of the letter.
>
> \stoprawsetups
Yes, thanks! (I forgot about this part, because in my setup it was
hidden in another file...)
In the meantime I've played with the lua buffers functions:
\def\StopLetter{%
\ctxlua{buffers.prepend("MyLetter", "START")}
\ctxlua{buffers.append("MyLetter", "\\relax STOP")}
\placeletter
\stoptext}
This works also quite well.
buffers.prepend() does not yet exist. Hans, could you please add it? It
could be perhaps useful one day.
--
Peter
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: buffers.prepend()
2013-09-01 12:30 ` buffers.prepend() (was: letter module: File ended while scanning use of \buff_gobble) Peter Münster
@ 2013-09-03 9:01 ` Hans Hagen
0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2013-09-03 9:01 UTC (permalink / raw)
To: ntg-context
On 9/1/2013 2:30 PM, Peter Münster wrote:
> On Sun, Sep 01 2013, Wolfgang Schuster wrote:
>
>> \startrawsetups[letter:section:content]
>>
>> Text before the content of the letter.
>>
>> \getbuffer[MyLetter]
>>
>> Text after the content of the letter.
>>
>> \stoprawsetups
>
> Yes, thanks! (I forgot about this part, because in my setup it was
> hidden in another file...)
>
> In the meantime I've played with the lua buffers functions:
>
> \def\StopLetter{%
> \ctxlua{buffers.prepend("MyLetter", "START")}
> \ctxlua{buffers.append("MyLetter", "\\relax STOP")}
> \placeletter
> \stoptext}
>
> This works also quite well.
>
> buffers.prepend() does not yet exist. Hans, could you please add it? It
> could be perhaps useful one day.
ok
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-03 9:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 13:57 letter module: File ended while scanning use of \buff_gobble Peter Münster
2013-03-04 19:11 ` Wolfgang Schuster
2013-09-01 11:33 ` Peter Münster
2013-09-01 12:09 ` Wolfgang Schuster
2013-09-01 12:30 ` buffers.prepend() (was: letter module: File ended while scanning use of \buff_gobble) Peter Münster
2013-09-03 9:01 ` buffers.prepend() Hans Hagen
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).