ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vit Zyka <vit.zyka@seznam.cz>
Subject: Re: float over both text and margin
Date: Mon, 12 Dec 2005 23:02:49 +0100	[thread overview]
Message-ID: <439DF389.6040206@seznam.cz> (raw)
In-Reply-To: <439DBB41.1030401@wxs.nl>

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
     \global\setbox\floatbox\box\voidb@x
   \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
>     \global\setbox\floatbox\box\voidb@x
>   \fi}
> 
> Hans
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2005-12-12 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 22:47 Vit Zyka
2005-12-12 18:02 ` Hans Hagen
2005-12-12 22:02   ` Vit Zyka [this message]
2005-12-12 18:06 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439DF389.6040206@seznam.cz \
    --to=vit.zyka@seznam.cz \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).