Simon Pepping wrote:
On Mon, Feb 10, 2003 at 02:58:25AM +0000, Robbie Pickering 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.
\defineXMLargument [comment] \gobble
You should use \ignorespaces in the end tag. Unfortunately, \defineXMLargument does not allow you to define the action for the end tag. This would work:
\defineXMLenvironmentsave [comment] {} {\ignorespaces}
The save action gobbles the content as well.
Regards, Simon
Thanks. Is this conceptually different to writing \def\gobble#1{\ignorespaces} \defineXMLargument [comment] \gobble ? It seems to have the effect of also devouring the necessary space after a full stop, if the comment tag comes directly after it in the source: Makes complicated pages by starting.<comment>This is not a proper sentence.</comment> With simple ... The space after the comment, before "With" should get into the final document, but doesn't make it. (on the other hand, this also happens when the comments are shown with \defineXMLargument [comment] \inmargin cheers, robbie