* \par in command argument
@ 2002-09-04 10:01 Wybo Dekker
2002-09-04 14:40 ` Andres Loeh
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Wybo Dekker @ 2002-09-04 10:01 UTC (permalink / raw)
I'm trying to write a letter style so that I can say:
\input letter.sty
\Address{name\\street\\city}
% ... define several other things...
\Letter{
Dear John,
....
Love, Mary
}
But the paragraphs in \Letter's argument cause trouble:
This is TeX, Version 3.14159 (Web2C 7.3.7x)
(./t.tex
Runaway argument?
{ ....
! Paragraph ended before \Letter was complete.
Is there a solution to this?
--
Wybo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \par in command argument
2002-09-04 10:01 \par in command argument Wybo Dekker
@ 2002-09-04 14:40 ` Andres Loeh
2002-09-04 22:04 ` Wybo Dekker
2002-09-04 14:53 ` Wybo Dekker
2002-09-05 3:42 ` John Culleton
2 siblings, 1 reply; 5+ messages in thread
From: Andres Loeh @ 2002-09-04 14:40 UTC (permalink / raw)
Hi there,
> But the paragraphs in \Letter's argument cause trouble:
>
> This is TeX, Version 3.14159 (Web2C 7.3.7x)
> (./t.tex
> Runaway argument?
> { ....
> ! Paragraph ended before \Letter was complete.
>
> Is there a solution to this?
Yes. Use
\long\def
to define \Letter, or define an environment
\startletter \stopletter
(for instance with \definestartstop) to do the job.
Best,
Andres
--
Andres Loeh, Universiteit Utrecht
mailto:andres@cs.uu.nl mailto:mail@andres-loeh.de
http://www.andres-loeh.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \par in command argument
2002-09-04 14:40 ` Andres Loeh
@ 2002-09-04 22:04 ` Wybo Dekker
0 siblings, 0 replies; 5+ messages in thread
From: Wybo Dekker @ 2002-09-04 22:04 UTC (permalink / raw)
On Wed, 4 Sep 2002, Andres Loeh wrote:
> Hi there,
>
> > But the paragraphs in \Letter's argument cause trouble:
> >
> > This is TeX, Version 3.14159 (Web2C 7.3.7x)
> > (./t.tex
> > Runaway argument?
> > { ....
> > ! Paragraph ended before \Letter was complete.
> >
> > Is there a solution to this?
>
> Yes. Use
>
> \long\def
>
> to define \Letter, or define an environment
>
> \startletter \stopletter
>
> (for instance with \definestartstop) to do the job.
Thank you, that helped a lot. Especially because I didn't know about
\definestartstop as it is not in cont-eni.pdf (via google I found it in
several other pdf files)
--
Wybo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \par in command argument
2002-09-04 10:01 \par in command argument Wybo Dekker
2002-09-04 14:40 ` Andres Loeh
@ 2002-09-04 14:53 ` Wybo Dekker
2002-09-05 3:42 ` John Culleton
2 siblings, 0 replies; 5+ messages in thread
From: Wybo Dekker @ 2002-09-04 14:53 UTC (permalink / raw)
On Wed, 4 Sep 2002, Wybo Dekker wrote:
> I'm trying to write a letter style so that I can say:
>
> \input letter.sty
> \Address{name\\street\\city}
> % ... define several other things...
> \Letter{
> Dear John,
>
> ....
>
> Love, Mary
> }
>
> But the paragraphs in \Letter's argument cause trouble:
I found the solution already: I had to use \long\def instead of \def.
But that introduced another problem: \startlines...\stoplines doesn't work
anymore, for example:
\def\Letter#1{#1}
\starttext
\Letter{
\startlines
abc % these appear
def % on a
ghi % single line
\stoplines
}
\stoptext
--
Wybo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \par in command argument
2002-09-04 10:01 \par in command argument Wybo Dekker
2002-09-04 14:40 ` Andres Loeh
2002-09-04 14:53 ` Wybo Dekker
@ 2002-09-05 3:42 ` John Culleton
2 siblings, 0 replies; 5+ messages in thread
From: John Culleton @ 2002-09-05 3:42 UTC (permalink / raw)
On Wednesday 04 September 2002 06:01 am, Wybo Dekker wrote:
> I'm trying to write a letter style so that I can say:
>
> \input letter.sty
> \Address{name\\street\\city}
> % ... define several other things...
> \Letter{
> Dear John,
>
> ....
>
> Love, Mary
> }
>
> But the paragraphs in \Letter's argument cause trouble:
>
> This is TeX, Version 3.14159 (Web2C 7.3.7x)
> (./t.tex
> Runaway argument?
> { ....
> ! Paragraph ended before \Letter was complete.
>
> Is there a solution to this?
I used the textmerg macro pretty much as is and had success with
creating form letters. See my earlier correspondence under the title
"Textmerg and Context."
Hans Hagen offered workarounds for the few small problems I
encountered.
It isn't necessary to reinvent the wheel in this case. Textmerg.tex
works and I suspect the ancient letterformat.tex could be made to
work. The secret is several related macros and not one
all-encompassing macro call.
HTH
John Culleton
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-09-05 3:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 10:01 \par in command argument Wybo Dekker
2002-09-04 14:40 ` Andres Loeh
2002-09-04 22:04 ` Wybo Dekker
2002-09-04 14:53 ` Wybo Dekker
2002-09-05 3:42 ` John Culleton
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).