From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10917 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Extraneous spaces in XML documents Date: Mon, 10 Feb 2003 10:26:53 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20030210101155.027637a8@server-1> References: <20030210025825.F22427%05570575@gmx.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1044869498 3037 80.91.224.249 (10 Feb 2003 09:31:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 10 Feb 2003 09:31:38 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18iAHm-0000mb-00 for ; Mon, 10 Feb 2003 10:31:34 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id E4AE310B67; Mon, 10 Feb 2003 10:33:42 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id 7F5C610B6E for ; Mon, 10 Feb 2003 10:28:48 +0100 (MET) Original-Received: from server-1.pragma-ade.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.5/pre1.0-MySQL/8.12.5) with ESMTP id h1A9Sheb024535 for ; Mon, 10 Feb 2003 10:28:44 +0100 Original-Received: from LAPTOP-3.wxs.nl (laptop-3 [10.100.1.191]) by server-1.pragma-ade.nl (8.12.2/8.12.2) with ESMTP id h1A9Sigo002786 for ; Mon, 10 Feb 2003 10:28:45 +0100 X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: ntg-context@ntg.nl In-Reply-To: <20030210025825.F22427%05570575@gmx.de> X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:10917 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10917 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 | pragma@wxs.nl 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 -------------------------------------------------------------------------