From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65238 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Bad interaction between new interpretation of underscore and modules Date: Thu, 13 Jan 2011 17:43:47 -0500 (EST) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1769896538-1294958629=:1271" X-Trace: dough.gmane.org 1294958813 31037 80.91.229.12 (13 Jan 2011 22:46:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Jan 2011 22:46:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 13 23:46:47 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 1PdVwN-0005K8-5z for gctc-ntg-context-518@m.gmane.org; Thu, 13 Jan 2011 23:46:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6D707CA9B3; Thu, 13 Jan 2011 23:46:46 +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 1GMjzWBkr2AJ; Thu, 13 Jan 2011 23:46:43 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6B064CA999; Thu, 13 Jan 2011 23:46:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6270FCA999 for ; Thu, 13 Jan 2011 23:46:42 +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 juyP9BEN27nJ for ; Thu, 13 Jan 2011 23:46:30 +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 C2EB0CA987 for ; Thu, 13 Jan 2011 23:46:30 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0DMhtHW013216 for ; Thu, 13 Jan 2011 23:44:29 +0100 Original-Received: FROM [10.0.2.15] (Unknown [132.206.94.234]) By tombraider.mr.itd.umich.edu ID 4D2F802A.1DE61.26934 ; Authuser adityam; 13 Jan 2011 17:43:54 EST In-Reply-To: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rDTaHUpD - 38cef1015a85 - 20110113 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:65238 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1769896538-1294958629=:1271 Content-Type: TEXT/PLAIN; charset=windows-1252; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 13 Jan 2011, Wolfgang Schuster wrote: > > Am 13.01.2011 um 17:18 schrieb Mathieu Boespflug: > >> Hi all, >> >> today's beta introduced a really strange problem. Consider two source fi= les: >> >> definitions.tex: >> \startmodule[definitions] >> \def\lambdax{\lambda_x} >> \stopmodule[definitions] >> >> main.tex: >> \usemodule[definitions] >> \starttext >> blah $\lambdax$ blah. >> \stoptext >> >> This results in the following compile error: >> >> ! Undefined control sequence. >> \lambdax ->\lambda_x >> >> l.5 blah $\lambdax >> $ blah. >> ? >> >> However, if you change "\usemodule[definitions]" into "\input >> definitions" instead, then there is no compile error! My understanding >> is that the underscore is a valid character for macro names now >> outside of math mode, which is what is causing the problem. But I >> really don't understand what magic is going on in the modules code to >> trigger this. >> >> I would be very interested in an explanation of what is going on. > > You need \normalsubscript in your module. You define a command and > in this case it doesn=92t matter that you plan to use it in math mode, > the _ is now a normal letter like =93a=94 and this won=92t change when yo= u > call \lambdax in your document. > > Write > > \def\lambdax{\lambda\normalsubscript x} > > and it will work again. Untested: \def\lambdax{\math{\lambda_x}} should also work. Aditya --8323328-1769896538-1294958629=:1271 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-1769896538-1294958629=:1271--