first steps with \dosingleempty
Hi, Regarding the following example I've got two questions. (1) Why don't I ever see the argument #2 in the output? (2) What do I have to do to suppress the unwanted space after the end of the output of this macro (as can be seen in the result before the following comma)? Regards, Juergen \def\Geb{\dosingleempty\doMyGeb} \def\doMyGeb[#1]#2#3{, x % \iffirstargument% Aha \else \ifsecondargument% #2 \else% ... %C% \fi \fi \ifthirdargument% #3% \else% ...% \fi} \starttext \Geb{Ulm}{11. 9. 2008} % should deliver x Ulm 11. 9. 2008 \Geb[Ulm]{Ulm}{11. 9. 2008} % should deliver x Aha Ulm 11. 9. 2008 \Geb{}{11. 9. 2008} % should deliver x ... 11. 9. 2008 \Geb{Ulm}{} % should deliver x Ulm ... \Geb{}{} % should deliver x ... \stoptext
Goebel, Juergen wrote:
Hi,
Regarding the following example I've got two questions.
(1) Why don't I ever see the argument #2 in the output? (2) What do I have to do to suppress the unwanted space after the end of the output of this macro (as can be seen in the result before the following comma)?
Regards,
Juergen
\def\Geb{\dosingleempty\doMyGeb} \def\doMyGeb[#1]#2#3{, x % \iffirstargument% Aha \else \ifsecondargument% #2 \else% ... %C% \fi \fi \ifthirdargument% #3% \else% ...% \fi}
\starttext
\Geb{Ulm}{11. 9. 2008} % should deliver x Ulm 11. 9. 2008 \Geb[Ulm]{Ulm}{11. 9. 2008} % should deliver x Aha Ulm 11. 9. 2008 \Geb{}{11. 9. 2008} % should deliver x ... 11. 9. 2008 \Geb{Ulm}{} % should deliver x Ulm ... \Geb{}{} % should deliver x ...
\stoptext
\unexpanded\def\Geb{\dosingleempty\doMyGeb} \def\doMyGeb[#1]#2#3% {, x \iffirstargument Aha \fi \doifsomethingelse{#2}{#2}{...}\space \doifsomethingelse{#3}{#3}{...}% \par} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
\unexpanded\def\Geb{\dosingleempty\doMyGeb}
\def\doMyGeb[#1]#2#3% {, x \iffirstargument Aha \fi \doifsomethingelse{#2}{#2}{...}\space \doifsomethingelse{#3}{#3}{...}% \par}
Thanks a lot, elegant and much shorter. But, alas, I can't test it yet since the \doifsomethingelse seems to be somewhat newer. My oldtimer (according to Hraban) shall really be updated during the next days or weeks ... Does anyone know when the TL 2008 will be distributed to the DANTE-members? Juergen
Hi,
Does anyone know when the TL 2008 will be distributed to the DANTE-members?
very likely, but you should consider trying out the official context distribution: http://distribution.contextgarden.net/ Patrick -- ConTeXt wiki and more: http://contextgarden.net
Patrick Gundlach wrote:
Hmm, is there a zip-file or something like this, which I can download via http or ftp for use with windows? I think of something like context-setup-mswin.zip, only not minimal. I would very much appreciated a link to this resource. TIA, Juergen
On Thu, Sep 11, 2008 at 12:28 PM, Goebel, Juergen
Patrick Gundlach wrote:
Hmm, is there a zip-file or something like this, which I can download via http or ftp for use with windows? I think of something like context-setup-mswin.zip, only not minimal. I would very much appreciated a link to this resource.
http://www.pragma-ade.com/download-1.htm mswincontext.zip Wolfgang
On Thu, Sep 11, 2008 at 9:56 AM, Goebel, Juergen
Hans Hagen wrote:
\unexpanded\def\Geb{\dosingleempty\doMyGeb}
\def\doMyGeb[#1]#2#3% {, x \iffirstargument Aha \fi \doifsomethingelse{#2}{#2}{...}\space \doifsomethingelse{#3}{#3}{...}% \par}
Thanks a lot, elegant and much shorter. But, alas, I can't test it yet since the \doifsomethingelse seems to be somewhat newer. My oldtimer (according to Hraban) shall really be updated during the next days or weeks ...
You could use \doifelsenothing with reverse order for the second and third argument, \doifsomethingelse was included after the TL 2008 ConTeXt release. Wolfgang
participants (4)
-
Goebel, Juergen
-
Hans Hagen
-
Patrick Gundlach
-
Wolfgang Schuster