From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/19831 Path: news.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.comp.tex.context Subject: \definetype[...][option=...] problems Date: Thu, 14 Apr 2005 00:46:51 +0200 Message-ID: <20050413224651.GD5903@puritan.pcp.ath.cx> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113432269 23584 80.91.229.2 (13 Apr 2005 22:44:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2005 22:44:29 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 14 00:44:24 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 1DLqaB-0008Cz-0z for gctc-ntg-context-518@m.gmane.org; Thu, 14 Apr 2005 00:43:39 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5813D128CF; Thu, 14 Apr 2005 00:46:56 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29997-05-3; Thu, 14 Apr 2005 00:46:53 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 20354128C9; Thu, 14 Apr 2005 00:46:53 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 406C4128C9 for ; Thu, 14 Apr 2005 00:46:51 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29997-05-2 for ; Thu, 14 Apr 2005 00:46:50 +0200 (CEST) Original-Received: from mxfep02.bredband.com (mxfep02.bredband.com [195.54.107.73]) by ronja.ntg.nl (Postfix) with ESMTP id 70F1B128C8 for ; Thu, 14 Apr 2005 00:46:50 +0200 (CEST) Original-Received: from puritan.pcp.ath.cx ([213.112.43.228] [213.112.43.228]) by mxfep02.bredband.com with ESMTP id <20050413224650.XWEZ22685.mxfep02.bredband.com@puritan.pcp.ath.cx> for ; Thu, 14 Apr 2005 00:46:50 +0200 Original-Received: by puritan.pcp.ath.cx (Postfix, from userid 1000) id 4464EADFEA; Thu, 14 Apr 2005 00:46:51 +0200 (CEST) Original-To: NTG-context List Mail-Followup-To: NTG-context List Content-Disposition: inline User-Agent: Mutt/1.5.8i X-Virus-Scanned: by 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: by amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:19831 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:19831 Try running \setupcolors[state=start] \definetype[JS][option=JS] \starttext \JS{function}\par \JS{function }\par \JS{ function}\par \JS{ function } \stoptext The first paragraph will only be the first character, f, the reason is made clear from the following two paragraphs. In the second paragraph, function comes out, but it isn't highlighted as a keyword, as the initial f has been consumed and thus the "unction" part doesn't match any keywords. I guess this is due to the type-handling checking for double characters, like in \type<< ... >>? In the third paragraph, only the initial space is output. The rest will never be output, as \PLsequence never gets a chance to be printed. Only in the fourth paragraph is "function" output correctly, although it is now surrounded by two spaces. Any suggestions on possible solutions, other than removing the option=JS?, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}