* Floating error
@ 2003-04-10 11:47 Nagy Bence
2003-04-10 17:37 ` Hans Hagen
2003-04-10 21:29 ` Patrick Gundlach
0 siblings, 2 replies; 5+ messages in thread
From: Nagy Bence @ 2003-04-10 11:47 UTC (permalink / raw)
I have a small problem with ConTeXt's floating meachnism. There are two
wide pictures and other narrow pictures in columns, ConTeXt breaks the
first page after the first wide picture.
\midaligned{\framed[frame=off]{\externalfigure[p1_7.pdf][factor=fit]}}
\midaligned{\framed[frame=off]{\externalfigure[p2_1.pdf][factor=fit]}}
\startcolumns[n=3,distance=4mm,balance=no]
\midaligned{\framed[frame=off]{\externalfigure[p2_2.pdf]}}
\midaligned{\framed[frame=off]{\externalfigure[p2_3.pdf]}}
\midaligned{\framed[frame=off]{\externalfigure[p2_4.pdf]}}
\stopcolumns
In this situation the first wide picture goes to the first page, the
second to the second page and the rest to the third page (th second
picture is just 2cm tall, the columns 10cm on an A4 page). When I
inserted the \page command after the first picture, the second picture
and the columns are placed well on the second page. If I use the
\placefigure[here,force,none] statement, the second picture goes to the
third page.
It seems to be a ConTeXt-error(?)
Greetings
Bence
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Floating error
2003-04-10 11:47 Floating error Nagy Bence
@ 2003-04-10 17:37 ` Hans Hagen
2003-04-11 8:10 ` Nagy Bence
2003-04-10 21:29 ` Patrick Gundlach
1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2003-04-10 17:37 UTC (permalink / raw)
At 13:47 10/04/2003 +0200, you wrote:
>I have a small problem with ConTeXt's floating meachnism. There are two
>wide pictures and other narrow pictures in columns, ConTeXt breaks the
>first page after the first wide picture.
>
>\midaligned{\framed[frame=off]{\externalfigure[p1_7.pdf][factor=fit]}}
>\midaligned{\framed[frame=off]{\externalfigure[p2_1.pdf][factor=fit]}}
>\startcolumns[n=3,distance=4mm,balance=no]
>\midaligned{\framed[frame=off]{\externalfigure[p2_2.pdf]}}
>\midaligned{\framed[frame=off]{\externalfigure[p2_3.pdf]}}
>\midaligned{\framed[frame=off]{\externalfigure[p2_4.pdf]}}
>\stopcolumns
>
>In this situation the first wide picture goes to the first page, the
>second to the second page and the rest to the third page (th second
>picture is just 2cm tall, the columns 10cm on an A4 page). When I inserted
>the \page command after the first picture, the second picture and the
>columns are placed well on the second page. If I use the
>\placefigure[here,force,none] statement, the second picture goes to the
>third page.
(1) no need for framed here (now you get funny margins)
(2) factor is fit uses the current hsize and available vertical space, and
since you don't use a par after midaligned, the available space is not
calculated as you expect; (tex only updates pagetotal/goal after a par
normally the factor=fit is used in combination with \placefigure
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Floating error
2003-04-10 11:47 Floating error Nagy Bence
2003-04-10 17:37 ` Hans Hagen
@ 2003-04-10 21:29 ` Patrick Gundlach
2003-04-11 7:49 ` Nagy Bence
1 sibling, 1 reply; 5+ messages in thread
From: Patrick Gundlach @ 2003-04-10 21:29 UTC (permalink / raw)
Nagy Bence <gimb@freemail.hu> writes:
> I have a small problem with ConTeXt's floating meachnism. There are
> two wide pictures and other narrow pictures in columns, ConTeXt breaks
> the first page after the first wide picture.
>
> \midaligned{\framed[frame=off]{\externalfigure[p1_7.pdf][factor=fit]}}
Hello,
how should we be able to reproduce the problem? There is no way for
us to see how large the figures are? Please use something like
\midaligned{\framed[width=10cm,height=5cm]{XYZ}}
or \blackrule[...] or...
and repost your problem. And please a complete but minimal file so we
can see what is wrong. Perhaps Hans knows what is going on whithout
an example, but I guess that for most other people that are not
"thinking in ConTeXt" it is impossible to make a wild guess.
Patrick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: Floating error
2003-04-10 21:29 ` Patrick Gundlach
@ 2003-04-11 7:49 ` Nagy Bence
0 siblings, 0 replies; 5+ messages in thread
From: Nagy Bence @ 2003-04-11 7:49 UTC (permalink / raw)
> Hello,
>
> how should we be able to reproduce the problem? There is no way for
> us to see how large the figures are? Please use something like
>
> \midaligned{\framed[width=10cm,height=5cm]{XYZ}}
>
> or \blackrule[...] or...
>
> and repost your problem.
Thanks, so I made a complete example just with \framed. Because I am
using the large pictures with the option factor=fit, the width and
height values are recalculated.
\setuplayout[%
topspace=10mm,
backspace=10mm,
header=15mm,
footer=0mm,
width=middle,
height=middle,
location=middle]
\setuppagenumbering[location={}]
\setupframedtexts[%
width=broad,
frame=off,
bottomframe=on,
offset=4pt]
\setupbodyfont[pos,10pt]
\setupheadertexts[\startframedtext\vbox{{\bf Newspaper}\hfill
--}\vbox{2003. március 20.\hfill \pagenumber}\stopframedtext]
\starttext
\midaligned{\framed[frame=on,width=broad,height=40.41818182mm]{picture}}
\midaligned{\framed[frame=on,width=broad,height=23.26530612mm]{picture}}
\startcolumns[n=3,distance=4mm,balance=no]
\midaligned{\framed[frame=on,width=54.32777778mm,height=115.3583333mm]{picture}}
\midaligned{\framed[frame=on,width=53.975mm,height=114.3mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=114.6527778mm]{picture}}
\midaligned{\framed[frame=on,width=55.03333333mm,height=113.9472222mm]{picture}}
\stopcolumns
\midaligned{\framed[frame=on,width=broad,height=133.7147335mm]{picture}}
\midaligned{\framed[frame=on,width=broad,height=15.13674197mm]{picture}}
\startcolumns[n=3,distance=4mm,balance=no]
\midaligned{\framed[frame=on,width=53.62222222mm,height=49.03611111mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=48.33055556mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=48.33055556mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=48.68333333mm]{picture}}
\midaligned{\framed[frame=on,width=53.975mm,height=47.97777778mm]{picture}}
\midaligned{\framed[frame=on,width=56.44444444mm,height=29.28055556mm]{picture}}
\midaligned{\framed[frame=on,width=40.21666667mm,height=45.15555556mm]{picture}}
\midaligned{\framed[frame=on,width=40.56944444mm,height=95.60277778mm]{picture}}
\midaligned{\framed[frame=on,width=39.86388889mm,height=86.43055556mm]{picture}}
\stopcolumns
\stoptext
And a small part from the log:
{/usr/local/teTeX/texmf-local/dvips/base/ec.enc}</usr/local/teTeX/texmf/fonts
/type1/urw/times/utmr8a.pfb></usr/local/teTeX/texmf/fonts/type1/urw/times/utmb8
a.pfb>
Output written on p.pdf (4 pages, 23683 bytes).
The difference (just a \page) in the corrected file:
...
\starttext
\midaligned{\framed[frame=on,width=broad,height=40.41818182mm]{picture}}
\midaligned{\framed[frame=on,width=broad,height=23.26530612mm]{picture}}
\startcolumns[n=3,distance=4mm,balance=no]
\midaligned{\framed[frame=on,width=54.32777778mm,height=115.3583333mm]{picture}}
\midaligned{\framed[frame=on,width=53.975mm,height=114.3mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=114.6527778mm]{picture}}
\midaligned{\framed[frame=on,width=55.03333333mm,height=113.9472222mm]{picture}}
\stopcolumns
\midaligned{\framed[frame=on,width=broad,height=133.7147335mm]{picture}}
\page
\midaligned{\framed[frame=on,width=broad,height=15.13674197mm]{picture}}
\startcolumns[n=3,distance=4mm,balance=no]
\midaligned{\framed[frame=on,width=53.62222222mm,height=49.03611111mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=48.33055556mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=48.33055556mm]{picture}}
\midaligned{\framed[frame=on,width=54.68055556mm,height=48.68333333mm]{picture}}
\midaligned{\framed[frame=on,width=53.975mm,height=47.97777778mm]{picture}}
\midaligned{\framed[frame=on,width=56.44444444mm,height=29.28055556mm]{picture}}
\midaligned{\framed[frame=on,width=40.21666667mm,height=45.15555556mm]{picture}}
\midaligned{\framed[frame=on,width=40.56944444mm,height=95.60277778mm]{picture}}
\midaligned{\framed[frame=on,width=39.86388889mm,height=86.43055556mm]{picture}}
\stopcolumns
\stoptext
And its log:
{/usr/local/teTeX/texmf-local/dvips/base/ec.enc}</usr/local/teTeX/texmf/fonts
/type1/urw/times/utmr8a.pfb></usr/local/teTeX/texmf/fonts/type1/urw/times/utmb8
a.pfb>
Output written on p0.pdf (3 pages, 22942 bytes).
This TeX-file is an outcome of a script, so I can not include the \page
command. Without this problem the script works fine with ConTeXt.
Greetings
Bence
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Floating error
2003-04-10 17:37 ` Hans Hagen
@ 2003-04-11 8:10 ` Nagy Bence
0 siblings, 0 replies; 5+ messages in thread
From: Nagy Bence @ 2003-04-11 8:10 UTC (permalink / raw)
> (1) no need for framed here (now you get funny margins)
\framed is just for testing here. Without \framed is there a same problem.
> (2) factor is fit uses the current hsize and available vertical space,
> and since you don't use a par after midaligned, the available space is
> not calculated as you expect; (tex only updates pagetotal/goal after a par
I tested it with \par after \midaligned, I got the same error. My
problem is: TeX floats a low picture to a new page and puts a pagebreak
after that picture.
> normally the factor=fit is used in combination with \placefigure
Some pictures are wider then the pagewidth, I used both factor=fit and
factor=max, and I got everytime the correct size.
The threecolumn layout works just without \placefigure. I posted an
example, please, look it closer.
Greetings
Bence
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-11 8:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-10 11:47 Floating error Nagy Bence
2003-04-10 17:37 ` Hans Hagen
2003-04-11 8:10 ` Nagy Bence
2003-04-10 21:29 ` Patrick Gundlach
2003-04-11 7:49 ` Nagy Bence
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).