From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24008 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: extra space after variant Date: Fri, 02 Dec 2005 14:57:01 +0100 Message-ID: <439052AD.8020000@wxs.nl> References: <403A1895-626A-4617-94A7-784685A4765D@science.uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133531993 3245 80.91.229.2 (2 Dec 2005 13:59:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2005 13:59:53 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 02 14:59:44 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EiBPQ-0006aW-Rl for gctc-ntg-context-518@m.gmane.org; Fri, 02 Dec 2005 14:57:10 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AEF5212853; Fri, 2 Dec 2005 14:57:07 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12813-08-4; Fri, 2 Dec 2005 14:57:03 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8DB6E127E4; Fri, 2 Dec 2005 14:57:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0A4BF127E4 for ; Fri, 2 Dec 2005 14:57:02 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12813-08-3 for ; Fri, 2 Dec 2005 14:57:01 +0100 (CET) Original-Received: from controller-1 (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id 1B7DD12799 for ; Fri, 2 Dec 2005 14:57:00 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 6013 for ; Fri, 02 Dec 2005 15:02:18 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <403A1895-626A-4617-94A7-784685A4765D@science.uva.nl> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24008 Archived-At: Hans van der Meer wrote: > When I code: > abc {\variant[xyz] pqr} > I find extra space typeset between "abc" and "pqr". > > This extra space is absent when I code > abc {\variant[xyz]pqr} > Thus the space in the source between ] and pqr makes a difference in > the result. > > Clearly visible in: > abc {\variant[xyz] pqr} abc {\variant[xyz]pqr}\crlf > abc {\Var[xyz]pqr} abc {\Var[xyz] pqr}\crlf > > I would think that this should not happen. > > The whitespace goes away by inserting an \ignorespaces in the variant- > definition. > \def\variant[#1]% slow > {\dosetscaledfont > \expanded{\definedfont > [\truefontname{\fontstringA\fontstylesuffix\fontvariant > \fontstringA{#1}} > at \scaledfont]}\ignorespaces} > > > Still using version 2005-11-14, forget this if already corrected in > the latest version of the 30th. before we do that ... do others agree (taco, adam ...)? we don't want compatibility issues -) btw, a better sulution is to use \ignoreimplicitspaces: \def\ignoreimplicitspaces {\doifnextcharelse\relax\relax\relax} abc {x\variant[xyz]\space pqr} abc {\variant[xyz]pqr}\crlf abc {\variant[xyz]\space pqr} abc {\variant[xyz]pqr}\crlf abc {\variant[xyz] pqr} abc {\variant[xyz]pqr}\crlf abc {\variant[xyz]{x} pqr} abc {\variant[xyz]pqr}\crlf otherwise you run into problems with macros that want to insert a space explicitly Hans Hans