From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65244 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Bad interaction between new interpretation of underscore and modules Date: Fri, 14 Jan 2011 10:32:20 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294997569 18880 80.91.229.12 (14 Jan 2011 09:32:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2011 09:32:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 14 10:32:43 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pdg1S-0007uE-6q for gctc-ntg-context-518@m.gmane.org; Fri, 14 Jan 2011 10:32:42 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A6771CA98D; Fri, 14 Jan 2011 10:32:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uOxE5a0ILM+w; Fri, 14 Jan 2011 10:32:37 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 635E7CA9A8; Fri, 14 Jan 2011 10:32:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6C70ACA9A8 for ; Fri, 14 Jan 2011 10:32:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8FUNEIyLuuXu for ; Fri, 14 Jan 2011 10:32:25 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id F138BCA98D for ; Fri, 14 Jan 2011 10:32:24 +0100 (CET) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0E9WOUu018151 for ; Fri, 14 Jan 2011 10:32:24 +0100 Original-Received: by fxm12 with SMTP id 12so2544553fxm.14 for ; Fri, 14 Jan 2011 01:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=UC0mZ+sTsJra1a8rqX3LeqBzfLqmpw9HiIKfbIqMBBQ=; b=AjLps+hsYmbir9rtm6ckxp6MH0p9oGaD/BSDH4Q1ZSoPDgxKrDXRY0CyfGs7UN9AHA sR8wFkNromx9YCvGNAE2UxxmAgNV5jc7aM9L4gGCHef3nJK8FZgE1KuQtYITcvHAK5Bw 3LHW5nyQwt44Pv0Ytw5KWKtzXfMUvKCzRLsgc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=EW1FiStrkSQRjZfnJs3W1EkQzNiIx3JVMtyVNXMz7Tt4u+U+HrXNQLjYprgCH2Ab+6 n3OgMYZFGTFF8rdSU27fJW9o2l3HvLwH8R2NJRs6O+6SkeobM5nrfMmNWhXyva3UogiI DyGrenuH9OggECapBu75NbSyr/BjgJZghwaQU= Original-Received: by 10.223.101.199 with SMTP id d7mr461026fao.149.1294997544061; Fri, 14 Jan 2011 01:32:24 -0800 (PST) Original-Received: from [192.168.2.23] (p5B294CB3.dip.t-dialin.net [91.41.76.179]) by mx.google.com with ESMTPS id e17sm376381fak.34.2011.01.14.01.32.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 Jan 2011 01:32:23 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=209.85.161.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rDTlwoh5 - 5dc4cdb3eaf2 - 20110114 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:65244 Archived-At: Am 14.01.2011 um 10:15 schrieb Mathieu Boespflug: > Thank you for the solution, Wolfgang. But it seems rather painful to > have to replace every occurrence of _ in my definitions module with > the very verbose \normalsubscript just because it's a module. The new > default catcode for _ introduces extra difficulty when defining math > macros. Would it be possible to at least have a macro to revert to the > old behaviour? Also, I'm still stumped as to why modules make any > difference here. I would have expected this problem to also show up if > the definitions were made inline at the top of the source file for the > document. When you write a module you put \unprotect and \protect at the begin and end of the file because they make @, !, ? and _ to a normal letter like abc which can be used in macros. When you load a file with \usemodule or \environment this isn=92t necessary because context adds already calls both commands when the file is opened and closed for reading and this mechanism is used even if you aren=92t aware of this. PS For \environment this is only true when you use it in a document with \starttext or when you write it before \startproduct, \startcomponent = etc. PPS You can abuse \nonknuthmode to make your module to work \startbuffer[definitions] \pushcatcodes\nonknuthmode % \startnonknuthmode \def\lambdax{\lambda_x} \popcatcodes % \stopnonknuthmode \stopbuffer \savebuffer[definitions][p-definitions.tex] \startbuffer[more] \def\morex{\more_x} \stopbuffer \savebuffer[more][p-more.tex] \usemodule[definitions,more] \starttext blah $\lambdax$ blah. \morex \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________