![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
Dear list, I have the following sample and two issues that I must solve: \showframe\setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit] \definelayout[first][topspace=70mm, bottomspace=30mm] \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm, location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40}{\input knuth\par} \stoptext First, the layout is right on the first two pages, but it is wrong from page three. The text doesn’t reach the bottom frame. I have the info on multiple layers from the wiki (it isn’t a complete example, though). After Wolfgang’s reply last Friday, I spend hours searching on the mailing list trying to find relevant information to know what I was doing wrong. If this isn’t a bug, what am I missing here? My second question is about the layer: is there no way to force the text to avoid it as if it were a float? Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On Mon, Oct 21, 2013 at 5:23 PM, Pablo Rodriguez
Dear list,
I have the following sample and two issues that I must solve:
\showframe\setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit] \definelayout[first][topspace=70mm, bottomspace=30mm] \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm, location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40}{\input knuth\par} \stoptext
First, the layout is right on the first two pages, but it is wrong from page three. The text doesn’t reach the bottom frame.
I have the info on multiple layers from the wiki (it isn’t a complete example, though). After Wolfgang’s reply last Friday, I spend hours searching on the mailing list trying to find relevant information to know what I was doing wrong.
If this isn’t a bug, what am I missing here?
from http://wiki.contextgarden.net/Odd,_even_,_first_page_not_working
\showframe %\setuplayout[margin=20mm, width=fit, topspace=45mm, % bottomspace=25mm, % height=fit] \definelayout[1][topspace=120mm, bottomspace=30mm,height=fit] \definelayout[even][margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit] \definelayout[odd][margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit] \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40}{\input knuth\par} \stoptext
My second question is about the layer: is there no way to force the text to avoid it as if it were a float?
Many thanks for your help,
hm what do you want to avoid ? -- luigi
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/21/2013 05:43 PM, luigi scarso wrote:
On Mon, Oct 21, 2013 at 5:23 PM, Pablo Rodriguez wrote: [...] First, the layout is right on the first two pages, but it is wrong from page three. The text doesn’t reach the bottom frame. [...] If this isn’t a bug, what am I missing here?
from http://wiki.contextgarden.net/Odd,_even_,_first_page_not_working
\showframe %\setuplayout[margin=20mm, width=fit, topspace=45mm, % bottomspace=25mm, % height=fit]
\definelayout[1][topspace=120mm, bottomspace=30mm,height=fit]
\definelayout[even][margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit]
\definelayout[odd][margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit]
Many thanks for your reply, Luigi. If I don’t get it wrong, if I define a layout for the first page, I have to define it for even and odd pages, haven’t I?.
My second question is about the layer: is there no way to force the text to avoid it as if it were a float?
hm what do you want to avoid ?
I want the text flow to avoid the layer "avoidasfloat" as it avoids the figures. \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40}{\input knuth\placefigure[right]{}{}\par} \stoptext Layer has text inside in the sample above. I’d like to have it as a float. Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 21.10.2013 um 18:28 schrieb Pablo Rodriguez
I want the text flow to avoid the layer "avoidasfloat" as it avoids the figures.
\definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40}{\input knuth\placefigure[right]{}{}\par} \stoptext
Layer has text inside in the sample above. I’d like to have it as a float.
Many thanks for your help,
You can use positioned layers (mentioned in the metafun manual but currently broken in MkIV) but you have to place the layer with a float to reserve the necessary space. % engine=pdftex \definelayer[avoidasfloat][position=yes] \setupbackgrounds[page][background=avoidasfloat] \starttext \placefigure[right,none]{}{\setlayer[avoidasfloat]{\startMPcode draw unitsquare scaled 4cm ; \stopMPcode}} \input knuth \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/22/2013 12:29 PM, Wolfgang Schuster wrote:
Am 21.10.2013 um 18:28 schrieb Pablo Rodriguez
: [...] Layer has text inside in the sample above. I’d like to have it as a float.
You can use positioned layers (mentioned in the metafun manual but currently broken in MkIV) but you have to place the layer with a float to reserve the necessary space.
% engine=pdftex
\definelayer[avoidasfloat][position=yes]
\setupbackgrounds[page][background=avoidasfloat]
\starttext
\placefigure[right,none]{}{\setlayer[avoidasfloat]{\startMPcode draw unitsquare scaled 4cm ; \stopMPcode}} \input knuth
\stoptext
Many thanks for your reply, Wolfgang. Is there no way to place that layer exactly 8mm from left page border and 110mm from top page border? I really need the layer in that position (otherwise it doesn’t make sense). Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/27c34cb91f1e92bd850fe60b3d9ef336.jpg?s=120&d=mm&r=g)
Am 22.10.2013 um 19:13 schrieb Pablo Rodriguez
On 10/22/2013 12:29 PM, Wolfgang Schuster wrote:
Am 21.10.2013 um 18:28 schrieb Pablo Rodriguez
: [...] Layer has text inside in the sample above. I’d like to have it as a float.
You can use positioned layers (mentioned in the metafun manual but currently broken in MkIV) but you have to place the layer with a float to reserve the necessary space.
% engine=pdftex
\definelayer[avoidasfloat][position=yes]
\setupbackgrounds[page][background=avoidasfloat]
\starttext
\placefigure[right,none]{}{\setlayer[avoidasfloat]{\startMPcode draw unitsquare scaled 4cm ; \stopMPcode}} \input knuth
\stoptext
Many thanks for your reply, Wolfgang.
Is there no way to place that layer exactly 8mm from left page border and 110mm from top page border?
I really need the layer in that position (otherwise it doesn’t make sense).
Remove “position=yes” when you want the layer on a certain position on the page but don’t expect the text to flow around the layer. Wolfgang
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 10/23/2013 02:55 AM, Wolfgang Schuster wrote:
Am 22.10.2013 um 19:13 schrieb Pablo Rodriguez
: On 10/22/2013 12:29 PM, Wolfgang Schuster wrote:
Am 21.10.2013 um 18:28 schrieb Pablo Rodriguez
: [...] Layer has text inside in the sample above. I’d like to have it as a float.
You can use positioned layers (mentioned in the metafun manual but currently broken in MkIV) but you have to place the layer with a float to reserve the necessary space. [...] Is there no way to place that layer exactly 8mm from left page border and 110mm from top page border?
I really need the layer in that position (otherwise it doesn’t make sense).
Remove “position=yes” when you want the layer on a certain position on the page but don’t expect the text to flow around the layer.
Many thanks for your reply, Wolfgang. I’m afraid that I need the layer on that position and text flowing around the layer. Is there no way to do place a MP graphic on a certain position and make the text flow around it? Sorry for insisting, but it surprises me that such a basic need seems impossible with ConTeXt. Many thanks for your help, Pablo -- http://www.ousia.tk
participants (4)
-
luigi scarso
-
Pablo Rodriguez
-
Wolfgang Schuster
-
Wolfgang Schuster