[XeTeX] (ConTeXt) trouble debugging a "Missing number" error

Mojca Miklavec mojca.miklavec.lists at gmail.com
Tue Dec 4 22:45:27 CET 2012


Dear Lars,

If you are willing to ignore the "please consider switching to LuaTeX"
;) replies, I would recommend you to send this question to the NTG
ConTeXt mailing list instead. There are more people there who can help
you diagnose the problem and possibly release a fix in case of a
recently introduced bug in ConTeXt. The error you saw is strictly
ConTeXt-specific.

Please specify exactly which version of ConTeXt you are using, but
it's suggested that you try TeX Live 2012 and/or the standalone
context distribution with
    rsync -av rsync://contextgarden.net/distribution/setup/first-setup.sh .
    ./first-setup.sh
    export PATH=/path/to/distribution/files/texmf-linux/bin:$PATH
and that you send as minimal example as possible (a tex file) that
triggers the problem. It might also help if you could replace
definitions like
    \definefont[SerifXXL][name:GentiumBookBasic at 12pt]
with
    \definefont[SerifXXL][file:lmroman10-regular.otf at 12pt]
(provided that it still fails to work) to make sure that users will be
able to run your example out-of-the-box without installing the latest
Gentium fonts.

Mojca


On Tue, Dec 4, 2012 at 8:32 PM, 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]}]
>
> >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 to tell me more about what's going on. I realize that as
> a macro language, this is inherently difficult with TeX.
>
> Lars


More information about the XeTeX mailing list