Re: [NTG-context] \not\in doesn't work properly
On 12/4/2012 10:01 PM, Otared Kavian wrote: On 4 déc. 2012, at 17:38, Hans Hagen pra...@wxs.nl wrote: concerning the bug reports … Hi Hans, Thank you for the fixes and adding the commands \notin and \imply: I did some testing with your examples and others of my own, and it seems that some of the issues are fixed. However with \enablemode[lmmath] the command \notin does not work as expected, while when the above command is commented out it does. Afaik \notin works okay. Another issue is that the size of integrals when using palatino, times or termes is the almost the same as the ones in inline maths, and I think that this is not the correct behaviour. I think that depends on how the font defines the steps (if xits does it right, then palatino/termes are wrong). 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 ___
[NTG-context] (XeTeX) trouble debugging a Missing number error
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/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 This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012) (format=cont-en 2012.11.14) 4 DEC 2012 14:17 entering extended mode restricted \write18 enabled. %-line parsing enabled. **country-report-country_id-15.tex (./country-report-country_id-15.tex ConTeXt ver: 2012.05.30 11:26 MKII fmt: 2012.11.14 int: english/english system : cont-new.mkii loaded (/usr/local/texlive/2012/texmf-dist/tex/context/base/cont-new.mkii systems : beware: some patches loaded from cont-new.mkii ) system : cont-sys.rme loaded (/usr/local/texlive/2012/texmf-dist/tex/context/user/cont-sys.rme (/usr/local/texlive/2012/texmf-dist/tex/context/base/type-siz.mkii) (/usr/local/texlive/2012/texmf-dist/tex/context/base/type-otf.mkii) (/usr/local/texlive/2012/texmf-dist/tex/context/base/type-xtx.mkii)) system : country-report-country_id-15.top loaded (./country-report-country_id-15.top) bodyfont: 12pt rm is loaded language: patterns nl-default:default-1-2:2 us-default:default-2- 2:3 de-default:default-3-3:3 da-default:default-4-2:2 sv-default:default -5-2:2 af-default:default-6-2:2 gb-default:default-7-2:2 fr-default:de fault-8-2:2 es-default:default-9-2:2 ca-default:default-10-2:2 it-defa ult:default-11-2:2 la-default:default-12-2:2 pt-default:default-13-2:2 ro-default:default-14-2:2 pl-default:default-15-2:2 cs-default:default- 16-2:2 sk-default:default-17-2:2 hr-default:default-18-2:2 sl-default:d efault-19-2:2 tr-default:default-20-2:2 tk-default:default-21-1:2 lt-d efault:default-22-2:2 agr-default:default-24-2:2 fi-default:default-25- 2:2 hu-default:default-26-2:2 ru-default:default-28-2:2 uk-default:defau lt-29-3:3 loaded specials: dvips loaded \openout3 =
Re: [NTG-context] (XeTeX) trouble debugging a Missing number error
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 - ___ 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
[NTG-context] new
\startsetups math:morespacing \ordordspacing\textstyle 1mu plus .5mu minus .25mu\relax \stopsetups \setupmathematics [setups=math:morespacing] $y=m x+c$ -- - 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 ___
Re: [NTG-context] (XeTeX) trouble debugging a Missing number error
/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. After making this change, the behavior is unaffected... I still get the Missing number error, etc. 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} / // 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. Regards, Lars ___ 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 ___
Re: [NTG-context] \not\in doesn't work properly
Dear Otared, I tested your sample and it works well. \notin also works with \enablemode[lmmath] too. I also agree with your comment on the size of the integrals. Best regards, Dalyoung ___ 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 ___
Re: [NTG-context] (XeTeX) trouble debugging a Missing number error
Am 05.12.2012 um 16:46 schrieb Lars Huttar lars_hut...@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 ___
Re: [NTG-context] new
Hi Hans, This is great news! Thanks for the feature,a nd even more thanks for having made it public… Is there also a way to control the way some signs are more or less close together? For instance in the following example a global way to have a result similar to \int_{0}^1\!\!\!\int_{0}^1 f(x,y)dxdy Best regards: OK begin spacing-math.tex \startsetups math:morespacing \ordordspacing\textstyle 1mu plus .5mu minus .25mu\relax \stopsetups \setupmathematics[integral=nolimits] \setupmathematics [setups=math:morespacing] \starttext $y=m x+c$ \startformula 4a^2 + 9b^2 - 25c^2 = 0. \stopformula \startformula \int_{0}^1\int_{0}^1 f(x,y)dxdy = \int_{[0,1]\times[0,1]} f(z)dz = \int_{0}^1\!\!\!\int_{0}^1 f(x,y)dxdy. \stopformula \stoptext end spacing-math.tex Best regards: OK On 5 déc. 2012, at 15:55, Hans Hagen pra...@wxs.nl wrote: \startsetups math:morespacing \ordordspacing\textstyle 1mu plus .5mu minus .25mu\relax \stopsetups \setupmathematics [setups=math:morespacing] $y=m x+c$ -- - 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 ___ ___ 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 ___
Re: [NTG-context] new
On 12/5/2012 8:46 PM, Otared Kavian wrote: Hi Hans, This is great news! Thanks for the feature,a nd even more thanks for having made it public… Is there also a way to control the way some signs are more or less close together? For instance in the following example a global way to have a result similar to There are 8*8 possibilities. 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 - s-mat-20.pdf Description: Adobe PDF document ___ 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 ___
[NTG-context] Cumulating Numbered Lists
Hi all, I can easily \setupitemgroup to achieve the following: 1. ... a. ... 1. ... b. ... 1. ... 2. ... 2. ... a. ... 1. ... …but I need the numbers/letters to cumulate as follows: 1. ... 1a. ... 1a1. ... 1b. ... 1b1. ... 1b2. ... 2. ... 2a. ... 2a1. ... Can that be done? Thank you, Malte. ___ 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 ___
Re: [NTG-context] Cumulating Numbered Lists
Am 06.12.2012 um 06:55 schrieb Malte Stien ma...@stien.de: Hi all, I can easily \setupitemgroup to achieve the following: 1. ... a. ... 1. ... b. ... 1. ... 2. ... 2. ... a. ... 1. ... …but I need the numbers/letters to cumulate as follows: 1. ... 1a. ... 1a1. ... 1b. ... 1b1. ... 1b2. ... 2. ... 2a. ... 2a1. ... Can that be done? Use the “repeat” keyword. \setupitemgroup[itemize][1][n,repeat][width=1em] \setupitemgroup[itemize][2][a,repeat][width=2em] \setupitemgroup[itemize][3][n] [width=3em] \starttext \startitemize \item … \startitemize \item … \startitemize \item … \stopitemize \item … \startitemize \item … \item … \stopitemize \stopitemize \item … \startitemize \item … \startitemize \item … \stopitemize \stopitemize \stopitemize \stoptext 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 ___