From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6513 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Reimplementing xspace Date: Thu, 17 Jan 2002 13:43:19 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <356831848.20020117134319@bigfoot.com> Reply-To: Giuseppe Bilotta NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035397040 11331 80.91.224.250 (23 Oct 2002 18:17:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:17:20 +0000 (UTC) Original-To: ntg-context@ntg.nl Xref: main.gmane.org gmane.comp.tex.context:6513 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6513 Hello, this is another request from it.comp.software.tex: reimplementing xspace. By itself the thing is pretty easy, you just need the code: \catcode`\@=11 \protected\def\xspace{\futurelet\@let@token\@xspace} \def\@xspace{% \ifx\@let@token\bgroup\else \ifx\@let@token\egroup\else \ifx\@let@token\/\else \ifx\@let@token\ \else \ifx\@let@token~\else \ifx\@let@token.\else \ifx\@let@token!\else \ifx\@let@token,\else \ifx\@let@token:\else \ifx\@let@token;\else \ifx\@let@token?\else \ifx\@let@token/\else \ifx\@let@token'\else \ifx\@let@token)\else \ifx\@let@token-\else %\ifx\@let@token\@xobeysp\else %this would be % %nobreakspace \ifx\@let@token\space\else \ifx\@let@token\blankspace\else \space \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} \catcode`\@=12 so the problem is rather on how to integrate this with the rest of ConTeXt: there are some features of ConTeXt (e.g. logos, abbreviations) for which obeying spaces should be an option. Right now, you have to do something like: \logo[tempTEX]{\TeX} \def\TEX{\tempTEX\xspace} to achieve the same result. Any comments?