ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Float placement problem
@ 2011-09-25  9:03 Pontus Lurcock
  2011-09-29  7:36 ` Pontus Lurcock
  2011-10-01  5:59 ` Wolfgang Schuster
  0 siblings, 2 replies; 10+ messages in thread
From: Pontus Lurcock @ 2011-09-25  9:03 UTC (permalink / raw)
  To: ConTeXt list

Hello,

I've recently updated my standalone (32-bit Linux) ConTeXT from
2011.02.25 to 2011.09.20, and I'm now having some trouble with float
placement. I'm using MkIV. I'm trying to have figures protruding into
the outer margins with a double-sided layout, as described here:

http://wiki.contextgarden.net/Floating_Objects#Protruding_Floats_in_Double-Sided_Documents

Here is my minimal example:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided,location={margin,header}]
\setupfloat[figure][location=inner]
\showframe
\starttext
% An extra page. \page[yes]
\dorecurse{4}{
\placefigure[]{caption}{\externalfigure[cow.pdf][width=17cm]}}
\stoptext

With version 2011.02.25 this produces the desired result; with
2011.09.20, the first figure is placed correctly, and all subsequent
figures protrude in the same direction, whether they're on an even or
odd page. So in the given example they all protrude to the right. If
an extra page is inserted at the start so that the first figure is on
an even page, they all protrude to the left.

Does anyone have any ideas or insights?

Thanks in advance,

Pont
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-09-25  9:03 Float placement problem Pontus Lurcock
@ 2011-09-29  7:36 ` Pontus Lurcock
  2011-09-29  7:53   ` luigi scarso
  2011-10-01  5:59 ` Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: Pontus Lurcock @ 2011-09-29  7:36 UTC (permalink / raw)
  To: ntg-context

On Sun 25 Sep 2011, Pontus Lurcock wrote:

> I've recently updated my standalone (32-bit Linux) ConTeXT from
> 2011.02.25 to 2011.09.20, and I'm now having some trouble with float
> placement. I'm using MkIV. I'm trying to have figures protruding into
> the outer margins with a double-sided layout
  ...
> Does anyone have any ideas or insights?

Hmm, I guess not. I will put a note on the wiki page and revert to my
old ConTeXt version for now. If anyone has an idea for a workaround I
would be glad to know of it.

Regards,

Pont
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-09-29  7:36 ` Pontus Lurcock
@ 2011-09-29  7:53   ` luigi scarso
  2011-09-29  8:32     ` Pontus Lurcock
  0 siblings, 1 reply; 10+ messages in thread
From: luigi scarso @ 2011-09-29  7:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Sep 29, 2011 at 9:36 AM, Pontus Lurcock <pont@talvi.net> wrote:
> On Sun 25 Sep 2011, Pontus Lurcock wrote:
>
>> I've recently updated my standalone (32-bit Linux) ConTeXT from
>> 2011.02.25 to 2011.09.20, and I'm now having some trouble with float
>> placement. I'm using MkIV. I'm trying to have figures protruding into
>> the outer margins with a double-sided layout
>  ...
>> Does anyone have any ideas or insights?
>
> Hmm, I guess not. I will put a note on the wiki page and revert to my
> old ConTeXt version for now. If anyone has an idea for a workaround I
> would be glad to know of it.
>
> Regards,

hm , it looks like a bad match with  between width=17cm and textwidth
This extreme example seems to works
\setuplayout[location=doublesided,width=20pc]
\setuppagenumbering[alternative=doublesided,location={margin,header}]
\setupfloat[figure][location=inner]
\showframe
\starttext
% An extra page. \page[yes]
\dorecurse{4}{
\placefigure[]{caption}{\externalfigure[cow.pdf][width=30pc]}\page}
\stoptext


-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-09-29  7:53   ` luigi scarso
@ 2011-09-29  8:32     ` Pontus Lurcock
  2011-09-29  8:39       ` luigi scarso
  0 siblings, 1 reply; 10+ messages in thread
From: Pontus Lurcock @ 2011-09-29  8:32 UTC (permalink / raw)
  To: ntg-context

On Thu 29 Sep 2011, luigi scarso wrote:

> hm , it looks like a bad match with  between width=17cm and textwidth
> This extreme example seems to works
> \setuplayout[location=doublesided,width=20pc]
> \setuppagenumbering[alternative=doublesided,location={margin,header}]
> \setupfloat[figure][location=inner]
> \showframe
> \starttext
> % An extra page. \page[yes]
> \dorecurse{4}{
> \placefigure[]{caption}{\externalfigure[cow.pdf][width=30pc]}\page}
> \stoptext

Thanks! The \page after the figure certainly seems to fix it.
Unfortunately a page break after every figure is impractical in my
real document, but this might put me on the track of a solution (once
I've read the layout manual a couple more times).

Pont
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-09-29  8:32     ` Pontus Lurcock
@ 2011-09-29  8:39       ` luigi scarso
  2011-09-29 21:56         ` Pontus Lurcock
  0 siblings, 1 reply; 10+ messages in thread
From: luigi scarso @ 2011-09-29  8:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Sep 29, 2011 at 10:32 AM, Pontus Lurcock <pont@talvi.net> wrote:
> On Thu 29 Sep 2011, luigi scarso wrote:
>
>> hm , it looks like a bad match with  between width=17cm and textwidth
>> This extreme example seems to works
>> \setuplayout[location=doublesided,width=20pc]
>> \setuppagenumbering[alternative=doublesided,location={margin,header}]
>> \setupfloat[figure][location=inner]
>> \showframe
>> \starttext
>> % An extra page. \page[yes]
>> \dorecurse{4}{
>> \placefigure[]{caption}{\externalfigure[cow.pdf][width=30pc]}\page}
>> \stoptext
>
> Thanks! The \page after the figure certainly seems to fix it.
> Unfortunately a page break after every figure is impractical in my
> real document, but this might put me on the track of a solution (once
> I've read the layout manual a couple more times).
I 've put \page just to show quickly the effect, but maybe there are
still problems

\setuplayout[location=doublesided,width=20pc]
\setuppagenumbering[alternative=doublesided,location={margin,header}]
\setupfloat[figure][location=inner]
\showframe
\starttext
% An extra page. \page[yes]
\dorecurse{40}{
\placefigure[here]{caption}{\externalfigure[cow.pdf][width=30pc]}}
\stoptext
-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-09-29  8:39       ` luigi scarso
@ 2011-09-29 21:56         ` Pontus Lurcock
  0 siblings, 0 replies; 10+ messages in thread
From: Pontus Lurcock @ 2011-09-29 21:56 UTC (permalink / raw)
  To: ntg-context

On Thu 29 Sep 2011, luigi scarso wrote:

> I 've put \page just to show quickly the effect, but maybe there are
> still problems
> 
> \setuplayout[location=doublesided,width=20pc]
> \setuppagenumbering[alternative=doublesided,location={margin,header}]
> \setupfloat[figure][location=inner]
> \showframe
> \starttext
> % An extra page. \page[yes]
> \dorecurse{40}{
> \placefigure[here]{caption}{\externalfigure[cow.pdf][width=30pc]}}
> \stoptext

Yes, that's pretty bad... in subsequent tests I've found that
‘diluting’ the figures with sufficient text (like adding \page) fixes
the problem -- unfortunately mixing [here] and [page] placement (as I
need to do in my document) messes it up again. In addition, several of
my tests crash ConTeXt with the error ‘Argument of \rootfloatparameter
has an extra }’, for example:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided,location={margin,header}]
\setupfloat[figure][location=inner]
\showframe
\starttext
\input knuth
\dorecurse{4}{
\placefigure[here]{caption}{\externalfigure[cow.pdf][width=17cm]}
\input knuth
\placefigure[page]{caption}{\externalfigure[cow.pdf][width=17cm]}
\input knuth
% \input knuth % uncomment this line to make the file work
}
\stoptext

Again, this works with v2011.02.25 (although figure numbers are mixed
up).

I think I'll have to give up on this now and revert to the old version,
but I'll put a pointer to this thread on the Wiki in case anyone else
runs into similar problems.

Pont
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-09-25  9:03 Float placement problem Pontus Lurcock
  2011-09-29  7:36 ` Pontus Lurcock
@ 2011-10-01  5:59 ` Wolfgang Schuster
  2011-10-02  8:39   ` Pontus Lurcock
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2011-10-01  5:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 25.09.2011 um 11:03 schrieb Pontus Lurcock:

> Hello,
> 
> I've recently updated my standalone (32-bit Linux) ConTeXT from
> 2011.02.25 to 2011.09.20, and I'm now having some trouble with float
> placement. I'm using MkIV. I'm trying to have figures protruding into
> the outer margins with a double-sided layout, as described here:
> 
> http://wiki.contextgarden.net/Floating_Objects#Protruding_Floats_in_Double-Sided_Documents
> 
> Here is my minimal example:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided,location={margin,header}]
> \setupfloat[figure][location=inner]
> \showframe
> \starttext
> % An extra page. \page[yes]
> \dorecurse{4}{
> \placefigure[]{caption}{\externalfigure[cow.pdf][width=17cm]}}
> \stoptext
> 
> With version 2011.02.25 this produces the desired result; with
> 2011.09.20, the first figure is placed correctly, and all subsequent
> figures protrude in the same direction, whether they're on an even or
> odd page. So in the given example they all protrude to the right. If
> an extra page is inserted at the start so that the first figure is on
> an even page, they all protrude to the left.
> 
> Does anyone have any ideas or insights?

Should be fixed in the next beta.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-10-01  5:59 ` Wolfgang Schuster
@ 2011-10-02  8:39   ` Pontus Lurcock
  2011-10-02  9:03     ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: Pontus Lurcock @ 2011-10-02  8:39 UTC (permalink / raw)
  To: ConTeXt list

On Sat 01 Oct 2011, Wolfgang Schuster wrote:

> > I've recently updated my standalone (32-bit Linux) ConTeXT from
> > 2011.02.25 to 2011.09.20, and I'm now having some trouble with
> > float placement. I'm using MkIV. I'm trying to have figures
> > protruding into the outer margins with a double-sided layout, as
> > described here:
> > ...
> > 
> > Does anyone have any ideas or insights?
> 
> Should be fixed in the next beta.

Many thanks! I confirm that my original example works as expected with
ConTeXt 2011.10.01. However, for certain files (including my
dissertation) ConTeXt stops with the error ‘Argument of
\rootfloatparameter has an extra }’. Here's a minimal example which
causes the problem:

\starttext
\dorecurse{3}{
\placefigure[]{}{\externalfigure[cow.pdf]}
\input knuth
\placefigure[]{}{\externalfigure[cow.pdf]}
}
\stoptext

The example works if I comment out any of the three lines in the
\dorecurse, or if I change \dorecurse{3} to \dorecurse{2}. The example
also fails with 2011.09.20, but works with 2011.02.25.

Pont
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-10-02  8:39   ` Pontus Lurcock
@ 2011-10-02  9:03     ` Wolfgang Schuster
  2011-10-02 23:59       ` Pontus Lurcock
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2011-10-02  9:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 02.10.2011 um 10:39 schrieb Pontus Lurcock:

> On Sat 01 Oct 2011, Wolfgang Schuster wrote:
> 
>>> I've recently updated my standalone (32-bit Linux) ConTeXT from
>>> 2011.02.25 to 2011.09.20, and I'm now having some trouble with
>>> float placement. I'm using MkIV. I'm trying to have figures
>>> protruding into the outer margins with a double-sided layout, as
>>> described here:
>>> ...
>>> 
>>> Does anyone have any ideas or insights?
>> 
>> Should be fixed in the next beta.
> 
> Many thanks! I confirm that my original example works as expected with
> ConTeXt 2011.10.01. However, for certain files (including my
> dissertation) ConTeXt stops with the error ‘Argument of
> \rootfloatparameter has an extra }’. Here's a minimal example which
> causes the problem:
> 
> \starttext
> \dorecurse{3}{
> \placefigure[]{}{\externalfigure[cow.pdf]}
> \input knuth
> \placefigure[]{}{\externalfigure[cow.pdf]}
> }
> \stoptext
> 
> The example works if I comment out any of the three lines in the
> \dorecurse, or if I change \dorecurse{3} to \dorecurse{2}. The example
> also fails with 2011.09.20, but works with 2011.02.25.

page-one.mkiv:

\def\OTRONEdosettopinserts
  {\bgroup
   \ifsomefloatwaiting
     \noffloatinserts\zerocount
     \let\totaltopinserted\!!zeropoint
     \OTRONEdodosettopinserts
     \ifnum\rootfloatparameter\c!nbottom=\zerocount
       \ifnum\rootfloatparameter\c!nlines>\zerocount
         \ifdim\totaltopinserted>\zeropoint\relax
           \ifdim\dimexpr\rootfloatparameter\c!nlines\lineheight+\totaltopinserted\relax>\textheight
-            \showmessage\m!floatblocks8\rootfloatparameter\c!nlines
+            \showmessage\m!floatblocks8{\rootfloatparameter\c!nlines}%
             \vfilll\eject
           \fi
         \fi
       \fi
     \fi
   \fi
   \egroup}

\def\OTRONEdosetbothinserts
  {\global\topinserted\zeropoint
   \global\botinserted\zeropoint
   \ifflushingfloats \else
     \OTRONEdosettopinserts
     \OTRONEdosetbotinserts
     \ifsomefloatwaiting
-       \doif\rootfloatparameter\c!cache\v!no\doflushfloats
+       \doif{\rootfloatparameter\c!cache}\v!no\doflushfloats
     \fi
   \fi}

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Float placement problem
  2011-10-02  9:03     ` Wolfgang Schuster
@ 2011-10-02 23:59       ` Pontus Lurcock
  0 siblings, 0 replies; 10+ messages in thread
From: Pontus Lurcock @ 2011-10-02 23:59 UTC (permalink / raw)
  To: ntg-context

On Sun 02 Oct 2011, Wolfgang Schuster wrote:

> > The example works if I comment out any of the three lines in the
> > \dorecurse, or if I change \dorecurse{3} to \dorecurse{2}. The
> > example also fails with 2011.09.20, but works with 2011.02.25.
> 
> page-one.mkiv:
> ...

Thank you once more; this now works as expected for me, both on the
example and on my dissertation.

Pont
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-10-02 23:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-25  9:03 Float placement problem Pontus Lurcock
2011-09-29  7:36 ` Pontus Lurcock
2011-09-29  7:53   ` luigi scarso
2011-09-29  8:32     ` Pontus Lurcock
2011-09-29  8:39       ` luigi scarso
2011-09-29 21:56         ` Pontus Lurcock
2011-10-01  5:59 ` Wolfgang Schuster
2011-10-02  8:39   ` Pontus Lurcock
2011-10-02  9:03     ` Wolfgang Schuster
2011-10-02 23:59       ` Pontus Lurcock

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).