(XeTeX) trouble debugging a "Missing number" error
From the above error message I understand the error was detected during
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. <to be read again> \otr:1:27 \OTRSETdoifcellelse ...er #1:\number #2\endcsname \@EA \secondoftwoarguments... \@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell {\global \advance \columnl... \redoloop ->\expandrecursecontent \endofloop <to be read again> { <inserted text> 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.) 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]}]
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. 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. We are heavily invested in XeTeX, so switching to LuaTeX in the near term is not an option. ConTeXt version: ConTeXt ver: 2012.05.30 11:26 MKII fmt: 2012.11.14 int: english/english (From TeX Live 2012) XeTeX version: 3.1415926-2.4-0.9998 (TeX Live 2012) (format=cont-en 2012.11.14) Lars
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. <to be read again> \otr:1:27 \OTRSETdoifcellelse ...er #1:\number #2\endcsname \@EA \secondoftwoarguments...
\@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell {\global \advance \columnl...
\redoloop ->\expandrecursecontent \endofloop <to be read again> { <inserted text> 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Lars Huttar