From: Wolfgang Schuster <wolfgang.schuster@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: (XeTeX) trouble debugging a "Missing number" error
Date: Wed, 5 Dec 2012 17:22:35 +0100 [thread overview]
Message-ID: <C62E6E6E-3933-41FB-AF17-45BD0D06B531@gmail.com> (raw)
In-Reply-To: <50BF6C60.6000203@sil.org>
Am 05.12.2012 um 16:46 schrieb Lars Huttar <lars_huttar@sil.org>:
> /Hans Hagen wrote (///Wed Dec 5 14:10:12 CET 2012/):/
>>
>>
>> ------------------------------------------------------------------------
>> On 12/5/2012 11:19 AM, Lars Huttar wrote:
>>> / Hi all,
>> />
>
> /...
>
> /
>> /
>> />/
>> />/ % 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]
>
> Thanks, I will try this.
> Is the goal of this change to fix the error? To help diagnose it?
> I don't really understand the use of \unexpanded.
Putting many command and setup in the before and after keys for \definestartstop
isn’t the nicest way to create start/stop command, Hans used a two step method
and put all setups and separate commands which are now used by \definestartstop.
Defining command with \unexpanded\def\…{…} instead of \def\…{…} can prevent
you from unwanted side effects when you use command in headings etc.
> After making this change, the behavior is unaffected... I still get the
> "Missing number" error, etc.
The information you provided aren sufficient to reproduce the error,
according to the message there is a problem with columnsets but there
is no way to tell why you get it.
>> in such case best make a small example, for instance how is abblist used?
>
>
> \startabblist{
> \tab{\ITC{alt.}}\AE{alternate name for}\par
> ...
> \tab{USDS}\AE{US Department of State}\par
> }\stopabblist
>
> where \AE is defined as:
>
> \def\AE#1{\hskip -3mm \SerifL{#1} \vskip 1mm}
Can you provide a working minimal example which does produce the error.
>>> /
>> />/ 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 will try that, but all our font size definitions have always used
> \define, and it used to work fine without errors.
> On http://wiki.contextgarden.net/Command/define it says that \define is
> like the TeX primitive \def, but "will print an error to the log file if
> the new definition overwrites an existing command".
> I checked the log file, and there is no error mentioning XLfontsize.
>
> So the purpose of your suggestion is to remove the possibility of
> reporting a duplicate definition? (There's probably more to it than that
> - I'm just trying to understand.)
>
> I tried changing \define to \def as you suggested. The result was
> unchanged - same error.
There is no difference between \define and \def in MkII but for MkIV
there is a difference because \define is \unexpanded\def and the new
command \defineexpandable corresponds to the normal \def.
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-12-05 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.95.1354702805.2096.ntg-context@ntg.nl>
2012-12-05 15:46 ` Lars Huttar
2012-12-05 16:22 ` Wolfgang Schuster [this message]
[not found] <mailman.104.1354736814.2096.ntg-context@ntg.nl>
2012-12-07 16:05 ` Lars Huttar
2012-12-05 10:19 Lars Huttar
2012-12-05 13:10 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C62E6E6E-3933-41FB-AF17-45BD0D06B531@gmail.com \
--to=wolfgang.schuster@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).