Hi all... I would like to report a weird behavior when compiling the attached tex file... If I put the background layer definitions before the columnset definitions everything works well. \useexternalfigure[test][buttons][frame=true] \definelayer[graphics][x=0.5cm,y=2cm,width=\paperwidth,height=\paperheight] \setupbackgrounds[page][background=graphics] \definelayerpreset[lefttop][corner={left,top},location={right,bottom}] \setlayer[graphics][preset=lefttop]{\externalfigure[test]} \definecolumnset[threecolumns][n=3,distance=12pt] \definecolumnsetspan[spantwo][n=2] \definecolumnsetspan[spanthree][n=3] \definecolumnsethsize{threecolumns}{1}{1}\OneColumn \definecolumnsethsize{threecolumns}{1}{2}\TwoColumns \definecolumnsethsize{threecolumns}{1}{3}\ThreeColumns If I put them after then I get an "ERROR: Bad character code (648)" \definecolumnset[threecolumns][n=3,distance=12pt] \definecolumnsetspan[spantwo][n=2] \definecolumnsetspan[spanthree][n=3] \definecolumnsethsize{threecolumns}{1}{1}\OneColumn \definecolumnsethsize{threecolumns}{1}{2}\TwoColumns \definecolumnsethsize{threecolumns}{1}{3}\ThreeColumns \useexternalfigure[test][buttons][frame=true] \definelayer[graphics][x=0.5cm,y=2cm,width=\paperwidth,height=\paperheight] \setupbackgrounds[page][background=graphics] \definelayerpreset[lefttop][corner={left,top},location={right,bottom}] \setlayer[graphics][preset=lefttop]{\externalfigure[test]} I have spent one hour trying to figure out what was wrong with my file and only by hasard, after having done some experiments, I put the things in the "working" order. Why this happens? See you, Fabio
Fabio Mancinelli wrote:
Why this happens?
Because an interal ConTeXt macro (\dododosetlayer) is calling a TeX primitive (\chardef) with a number that is higher than 256. That number has become so high because of the columnset definitions, which is why changing the ordering fixed it. A full fix of the bug requires some work, simply changing that one \chardef didn't cut it (the 'bad character code' moves elsewhere). Cheers, Taco
Taco Hoekwater wrote:
Fabio Mancinelli wrote:
Why this happens?
Because an interal ConTeXt macro (\dododosetlayer) is calling a TeX primitive (\chardef) with a number that is higher than 256. That number has become so high because of the columnset definitions, which is why changing the ordering fixed it.
A full fix of the bug requires some work, simply changing that one \chardef didn't cut it (the 'bad character code' moves elsewhere).
it's in the \layerbox and \pagelayerbox ... (speedups and convenience) (i wonder if i have more of such errors) Hans
Taco Hoekwater wrote:
Fabio Mancinelli wrote:
Why this happens?
Because an interal ConTeXt macro (\dododosetlayer) is calling a TeX primitive (\chardef) with a number that is higher than 256. That number has become so high because of the columnset definitions, which is why changing the ordering fixed it.
A full fix of the bug requires some work, simply changing that one \chardef didn't cut it (the 'bad character code' moves elsewhere).
another one: \mathchardef\collectorbox\csname\@@collectorbox#1\endcsname two times in core-box Hans
Fabio Mancinelli wrote:
Hi all...
I would like to report a weird behavior when compiling the attached tex file...
ah. that one took me a while .. in page-lyr.tex, \chardef\layerpagebox\csname\@@layerbox#2\currentlayer\layerpage\endcsname \chardef\layerbox\csname\@@layerbox#3\endcsname should be: \mathchardef\layerpagebox\csname\@@layerbox#2\currentlayer\layerpage\endcsname \mathchardef\layerbox\csname\@@layerbox#3\endcsname (column sets need lots of boxes in etex mode and then the layer box ends up > 255 and using a chardef here is not working any more) [you need to remake the format] Hans
participants (3)
-
Fabio Mancinelli
-
Hans Hagen
-
Taco Hoekwater