From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79757 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: (XeTeX) trouble debugging a "Missing number" error Date: Wed, 05 Dec 2012 14:10:12 +0100 Message-ID: <50BF47B4.2000909@wxs.nl> References: <50BF1FCE.2000605@sil.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354713028 5578 80.91.229.3 (5 Dec 2012 13:10:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2012 13:10:28 +0000 (UTC) Cc: Lars Huttar To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 05 14:10:41 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TgEkK-00079r-0T for gctc-ntg-context-518@m.gmane.org; Wed, 05 Dec 2012 14:10:40 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5AF0010262; Wed, 5 Dec 2012 14:10:27 +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 F-WzfTfoF1Ne; Wed, 5 Dec 2012 14:10:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9537C1020D; Wed, 5 Dec 2012 14:10:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 534CE1020D for ; Wed, 5 Dec 2012 14:10:21 +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 D-B9E2tIpnzG for ; Wed, 5 Dec 2012 14:10:19 +0100 (CET) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id C077A101E9 for ; Wed, 5 Dec 2012 14:10:19 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qB5DAGdM021661 for ; Wed, 5 Dec 2012 14:10:18 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 6280-1713362 for multiple; Wed, 05 Dec 2012 14:10:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: <50BF1FCE.2000605@sil.org> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=16; city=Zeewolde; latitude=52.3302; longitude=5.5364; http://maps.google.com/maps?q=52.3302,5.5364&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04IvNag4p - fb912d4d45ce - 20121205 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:79757 Archived-At: On 12/5/2012 11:19 AM, Lars Huttar wrote: > Hi all, > > I'm working with some code that was developed by someone else. > The document I'm typesetting is now giving the following error: > > ! Missing number, treated as zero. > > \otr:1:27 > \OTRSETdoifcellelse ...er #1:\number #2\endcsname > \@EA > \secondoftwoarguments... > > \@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell > {\global \advance > \columnl... > > \redoloop ->\expandrecursecontent > \endofloop > > { > > 28 > .... > l.12 \startabblist > { > ? > > I haven't been able to figure out what's wrong or how to fix it. > > I had just made changes to refactor the definitions of fonts. (I > confirmed that these changes really are a necessary cause of the error: > when I back out just these changes, the error goes away.) > >>>From the above error message I understand the error was detected during > the expansion of \startabblist. Here's the definition of abblist: > > % Abbreviations > \definestartstop > [abblist] > [before={\setupbackgrounds[text][background=verticalline] > \starttextbackground[text] > \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] > \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]}, > after={\stopalignment \stopcolumnset \stoptextbackground > \setupbackgrounds[text][background=off]}] you can try \unexpanded\def\StartAbbList {\setupbackgrounds[text][background=verticalline] \starttextbackground[text] \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]} \unexpanded\def\StopAbbList {\stopalignment \stopcolumnset \stoptextbackground \setupbackgrounds[text][background=off]} \definestartstop [abblist] [before=\StartAbbList, after=\StopAbbList] in such case best make a small example, for instance how is abblist used? >>>From that, one might guess that the font SansB or the font dimension > \SansBsize were the problem. But those definitions haven't changed > (though I would like to confirm that empirically with a run-time trace > message). > > Here are the font settings changes that did occur: > > E16fonts.tex: > changed this block: > \definefont[SerifXLI][name:GentiumBookBasic-Italic at 10pt] > \definefont[SerifXXL][name:GentiumBookBasic at 12pt] > \definefont[SerifXXLB][name:GentiumBookBasic-Bold at 12pt] > > to use size dimensions defined elsewhere: > \definefont[SerifXLI][name:GentiumBookBasic-Italic at \XLfontsize] > \definefont[SerifXXL][name:GentiumBookBasic at \XXLfontsize] > \definefont[SerifXXLB][name:GentiumBookBasic-Bold at \XXLfontsize] > > E16settings.tex: I added these definitions: > \define\XLfontsize{14pt} > \define\XXLfontsize{16pt} > > There are modes involved, so things are a bit more complicated, but I > believe that is the only effective difference. and how about: \def\XLfontsize{14pt} \def\XXLfontsize{16pt} > I also created a log file, which I'll attach. > There is also a version with \tracingmacros=1, but it's 600K, so I'll > put it at > http://www.huttar.net/tmp/country-report-country_id-15-tracing.log > > Thanks for taking a look. Please let me know what further information I > need to provide. > I can provide the .tex files themselves upon request. > > I would especially like to know better techniques for debugging -- how I > can induce TeX/ConTeXt to tell me more about what's going on. I realize > that as a macro language, this is inherently difficult with TeX. yes, it's not always easy ... best is to make small tests (while developing styles) and test those snippets ... due to tex's expansion there can always be nasty interferences in complex setups > We are heavily invested in XeTeX, so switching to LuaTeX in the near > term is not an option. a pitty as it runs smoother (and context mkiv has some more features) (i never used xetex in production and as in context it used the mkii macros there are not updates, so in principle old runs should still run) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________