At 02:58 AM 2/10/2003 +0000, you wrote:
I'm typesetting some XML text with comments in and for the working
version the comments are to go in the margin. For the final version the
comments are simply to be ignored.
In the end result there is a noticeably larger space between the words
where the comma had been. Apparently more than one space is reaching
TeX's stomach, though it's beyond me to work out how.
I suppose I need a more sophisticated \gobble definition than the
simple TeXbook one, yes?
----file minimal.tex
%now we will map XML arguments to context ones.
\defineXMLargument [title] \title
\defineXMLargument [footnote] \footnote
\defineXMLargument [section] \section % et cetera....
% this definition for drafts where comments are printed
%in the margin
%\defineXMLargument [comment] \inmargin
%this definition for the final version where the
% remaining comments are ignored
\def\gobble#1{}
\defineXMLargument [comment] \gobble
you can use \gobbleoneargument here
the next solution may help:
\defineXMLargument [comment] \XMLhideelement
\long\def\XMLhideelement#1%
{\futurelet\nexttoken\doXMLhideelement}
\def\doXMLhideelement
{\ifx\nexttoken\blankspace\removeunwantedspaces\fi}
maybe i will add something \defineXMLhide; will think about it
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context