From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using defaults and indexes
Date: Wed, 21 Jan 2009 20:12:53 +0100 [thread overview]
Message-ID: <F5305E45-5C85-4128-B9D1-C310F62832CC@gmail.com> (raw)
In-Reply-To: <bb8b59590901211028u36852196m550ba4dd61463067@mail.gmail.com>
Am 21.01.2009 um 19:28 schrieb Cecil Westerhof:
> 2009/1/21 Wolfgang Schuster <schuster.wolfgang@googlemail.com>:
>>>>> When the first parameter is filled, but not with a recognized
>>>>> value,
>>>>> then the second parameter should be filled. If not, the
>>>>> compilation of
>>>>> the file should generate an error.
>>
>> I did only what you wrote.
>
> I was not clear enough again.
> What I mend was that when there is not a recognized value, then the
> output file should not be generated. When you give a return the file
> is still generated. But that is only a minor. (Maybe what I want is
> not possible.)
\long\def\letterbody#1%
{\def\@@letterbody{{\blank[line]\setupindenting[yes,medium]#1\par}}}
\def\letterclosing
{\dodoublegroupempty\doletterclosing}
\def\doletterclosing#1#2%
{\ifsecondargument
\dodoletterclosing{#1}{#2}%
\else
\doifelsenothing{#1}
{\dodoletterclosing{Hoogachtend,}{Cecil Westerhof}}%
{\processaction
[#1]
[ family=>{\dodoletterclosing{Informal closing,}{Cecil
Westerhof}},
business=>{\dodoletterclosing{Formal closing}{Cecil
Westerhof}},
unknown=>{\message{Warning: Wrong keyword for \string
\letterclosing.}}]}%
\fi}
\def\dodoletterclosing#1#2%
{\@@letterbody
\blank[line]#1\blank[3*line]#2}
\starttext
\letterbody{\dorecurse{2}{\input knuth\par}}
\letterclosing{unknown}
\stoptext
Best wishes
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2009-01-21 19:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 15:02 Cecil Westerhof
2009-01-21 15:36 ` Wolfgang Schuster
2009-01-21 17:11 ` Cecil Westerhof
2009-01-21 17:44 ` Wolfgang Schuster
2009-01-21 18:28 ` Cecil Westerhof
2009-01-21 19:12 ` Wolfgang Schuster [this message]
2009-01-21 17:59 ` Tad Ashlock
2009-01-21 18:18 ` Wolfgang Schuster
2009-01-21 18:30 ` Cecil Westerhof
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=F5305E45-5C85-4128-B9D1-C310F62832CC@gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.nl \
/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).