Am 05.12.2012 um 16:46 schrieb Lars Huttar
/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