Re: [NTG-context] float over both text and margin

2005-12-12 Thread Vit Zyka

Hans Hagen wrote:

Vit Zyka wrote:


Hi.

1) I am unsuccessfully solving the problem of making float spanning 
both text and margin. More over, it is inside columnset... Example 
follows. Is there some solution?


2) As a side effect I discover that in the following example the float 
is over the text (so some text is disappeared).


don't use \placefloat.

\definefloat
 [pagefigure]
 [figure]
\setupfloat
 [pagefigure]
 [default={page,none},
  location=inner]


OK, I thought \placefloat[page] is defined like this, but now I see this 
is more flexible.


Thank you for your patch it behaves better but still the float is over 
the text, see page 2 in the example. I also do not see the influence of 
location argument.


Vit

-
\showframe
\setupcolors[state=start]
\setuplayout[margin=0pt,rightmargin=1.5cm,width=13cm]
\setuppagenumbering[alternative=doublesided]

\definefloat
 [pagefigure]
 [figure]
\setupfloat
 [pagefigure]
 [default={page,none},
  location=outer]

\unprotect
\def\dogetfloat{
  \ifsomefloatwaiting
\global\setbox\floatlist\vbox{%
   \unvbox\floatlist
   \global\setbox\globalscratchbox\lastbox
}%
\ifcenterfloatbox
  \ifdim\wd\globalscratchbox<\hsize
\setbox\floatbox\hbox to \hsize{\hss\box\globalscratchbox\hss}%
  \else
\setbox\floatbox\box\globalscratchbox % local !
\wd\floatbox\makeupwidth
  \fi
\else
  \setbox\floatbox\box\globalscratchbox % local !
\fi
\global\advance\savednoffloats \minusone
\ifcase\savednoffloats
  \global\somefloatwaitingfalse
\fi
  \else
\global\savednoffloats\zerocount
[EMAIL PROTECTED]
  \fi}
\protect

\starttext
\startcolumnset
  \dorecurse{2}{\input knuth \endgraf\blank}
  \placepagefigure{none}
{\framed

[width=\dimexpr\makeupwidth+\rightmarginwidth+\rightmargindistance\relax,height=\textheight]
   {Here I would like to be a float over both text and margin. How?}
}
  \dorecurse{10}{\input knuth \endgraf\blank}
\stopcolumnset

\stoptext
-



 \dorecurse{3}{\input knuth \endgraf\blank}
 \placepagefigure
 {}
{...}

etc

maybe the next helps, but i hesitate to include this patch too fast

def\dogetfloat
 {\ifsomefloatwaiting
\global\setbox\floatlist\vbox
  {\unvbox\floatlist
   \global\setbox\globalscratchbox\lastbox}%
\ifcenterfloatbox
  \ifdim\wd\globalscratchbox<\hsize
\setbox\floatbox\hbox to \hsize{\hss\box\globalscratchbox\hss}%
  \else
\setbox\floatbox\box\globalscratchbox % local !
\wd\floatbox\makeupwidth
  \fi
\else
  \setbox\floatbox\box\globalscratchbox % local !
\fi
\global\advance\savednoffloats \minusone
\ifcase\savednoffloats
  \global\somefloatwaitingfalse
\fi
  \else
\global\savednoffloats\zerocount
[EMAIL PROTECTED]
  \fi}

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] float over both text and margin

2005-12-12 Thread Hans Hagen

Vit Zyka wrote:


Hi.

1) I am unsuccessfully solving the problem of making float spanning 
both text and margin. More over, it is inside columnset... Example 
follows. Is there some solution?



or maybe:


\def\dogetfloat
 {\ifsomefloatwaiting
\global\setbox\floatlist\vbox
  {\unvbox\floatlist
   \global\setbox\globalscratchbox\lastbox}%
\ifcenterfloatbox
  \ifdim\wd\globalscratchbox<\hsize
\setbox\floatbox\hbox to \hsize{\hss\box\globalscratchbox\hss}%
  \else
\setbox\floatbox\box\globalscratchbox % local !
\ifinsidecolumns
   % retain special alignments
   \ifdim\wd\floatbox>\makeupwidth
   \wd\floatbox\makeupwidth
   \fi
\fi
  \fi
\else
  \setbox\floatbox\box\globalscratchbox % local !
\fi
\global\advance\savednoffloats \minusone
\ifcase\savednoffloats
  \global\somefloatwaitingfalse
\fi
  \else
\global\savednoffloats\zerocount
[EMAIL PROTECTED]
  \fi}


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] float over both text and margin

2005-12-12 Thread Hans Hagen

Vit Zyka wrote:


Hi.

1) I am unsuccessfully solving the problem of making float spanning 
both text and margin. More over, it is inside columnset... Example 
follows. Is there some solution?

-
\showframe
\setupcolors[state=start]
\setuplayout[margin=0pt,rightmargin=1.5cm,width=middle]

\starttext
\startcolumnset
  \dorecurse{2}{\input knuth \endgraf\blank}
  \placefloat[page]{none}
{\framed
 [width=\dimexpr\makeupwidth+\rightmarginwidth+
\rightmargindistance\relax,
  height=\textheight]
 {Here I would like to be a float over both text and margin. How?}
}
  \dorecurse{10}{\input knuth \endgraf\blank}
\stopcolumnset

\stoptext
-

2) As a side effect I discover that in the following example the float 
is over the text (so some text is disappeared).

-
\showframe
\setupcolors[state=start]
\setuplayout[margin=0pt,rightmargin=1.5cm,width=middle]

\starttext
\startcolumnset
  \dorecurse{2}{\input knuth \endgraf}
  \placefloat[page]{none}
{\framed
   [width=\makeupwidth,height=\textheight,background=screen]
   {Here I would like to be a float over both text and margin. How?}
}
  \dorecurse{10}{\input knuth \endgraf}
\stopcolumnset

\stoptext
---


don't use \placefloat.

\definefloat
 [pagefigure]
 [figure]
\setupfloat
 [pagefigure]
 [default={page,none},
  location=inner]

 \dorecurse{3}{\input knuth \endgraf\blank}
 \placepagefigure
 {}
{...}

etc

maybe the next helps, but i hesitate to include this patch too fast

def\dogetfloat
 {\ifsomefloatwaiting
\global\setbox\floatlist\vbox
  {\unvbox\floatlist
   \global\setbox\globalscratchbox\lastbox}%
\ifcenterfloatbox
  \ifdim\wd\globalscratchbox<\hsize
\setbox\floatbox\hbox to \hsize{\hss\box\globalscratchbox\hss}%
  \else
\setbox\floatbox\box\globalscratchbox % local !
\wd\floatbox\makeupwidth
  \fi
\else
  \setbox\floatbox\box\globalscratchbox % local !
\fi
\global\advance\savednoffloats \minusone
\ifcase\savednoffloats
  \global\somefloatwaitingfalse
\fi
  \else
\global\savednoffloats\zerocount
[EMAIL PROTECTED]
  \fi}

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] float over both text and margin

2005-12-08 Thread Vit Zyka

Hi.

1) I am unsuccessfully solving the problem of making float spanning both 
text and margin. More over, it is inside columnset... Example follows. 
Is there some solution?

-
\showframe
\setupcolors[state=start]
\setuplayout[margin=0pt,rightmargin=1.5cm,width=middle]

\starttext
\startcolumnset
  \dorecurse{2}{\input knuth \endgraf\blank}
  \placefloat[page]{none}
{\framed
 [width=\dimexpr\makeupwidth+\rightmarginwidth+
\rightmargindistance\relax,
  height=\textheight]
 {Here I would like to be a float over both text and margin. How?}
}
  \dorecurse{10}{\input knuth \endgraf\blank}
\stopcolumnset

\stoptext
-

2) As a side effect I discover that in the following example the float 
is over the text (so some text is disappeared).

-
\showframe
\setupcolors[state=start]
\setuplayout[margin=0pt,rightmargin=1.5cm,width=middle]

\starttext
\startcolumnset
  \dorecurse{2}{\input knuth \endgraf}
  \placefloat[page]{none}
{\framed
   [width=\makeupwidth,height=\textheight,background=screen]
   {Here I would like to be a float over both text and margin. How?}
}
  \dorecurse{10}{\input knuth \endgraf}
\stopcolumnset

\stoptext
---

Vit
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context