I've been playing around with the float placement options in ConTeXt, but I could find no way to enable "float pages". If you're not familiar with float pages, here's a quick blurb: "If there are too many floats to fit on a page, LaTeX pushes them on to the next page, and the next; eventually, floats may end up at the end of the document. If the [p] option has been provided to individual figures and tables, they may be pushed together onto a float page that has no text." - http://mintaka.sdsu.edu/GF/bibliog/latex/floats.html I'm not interested in using \setupfloat[figure][default=page]. It forces all figures to a float page with one picture per page. In latex, the behavior that I desire can be specified with: \begin{figure}[htbp] \includegraphics[width=5.0in, height=3.0in]{myfile.jpg} \caption{Blah} \end{figure} Cheers, Mike
On Wed, 12 Dec 2007, Santy, Michael wrote:
I've been playing around with the float placement options in ConTeXt, but I could find no way to enable "float pages". If you're not familiar with float pages, here's a quick blurb:
"If there are too many floats to fit on a page, LaTeX pushes them on to the next page, and the next; eventually, floats may end up at the end of the document. If the [p] option has been provided to individual figures and tables, they may be pushed together onto a ?float page? that has no text." - http://mintaka.sdsu.edu/GF/bibliog/latex/floats.html
I'm not interested in using \setupfloat[figure][default=page]. It forces all figures to a float page with one picture per page. In latex, the behavior that I desire can be specified with:
\begin{figure}[htbp] \includegraphics[width=5.0in, height=3.0in]{myfile.jpg} \caption{Blah} \end{figure}
IIUC, ConTeXt float mechanism if significantly different from LaTeX's. In particular it has no qualms about placing floats on a page of their own. For example \def\test{ \input knuth \endgraf \dorecurse{20}{ \placefigure{Random figure}{}} \input knuth \endgraf} \starttext \title{Here} \setupfloat[figure][default=here] \test % Multiple figures get placed on a page of their own \title{Top} \setupfloat[figure][default=top] \test % A long standing misfeature that top forces floats to % float on top of a title. \title{Bottom} \setupfloat[figure][default=bottom] \test % Again we can have multiple floats placed on a page of their own. \title{Page} \setupfloat[figure][default=page] \test % Only a single float per page \title{All} \setupfloat[figure][default=here,top,bottom,page] \test % If this makes you feel any better. \stoptext Aditya
Thanks, Aditya. However, I'm don't think that \setupfloat[figure][default=here,top,bottom,page] addresses my need for float pages. If you compile the document below, you'll notice that the figures at the end of the first section are floated throughout sections 2-4. I would like the rendering of the floats to catch up by placing the floats on float pages, before moving on to other text. Is this possible in ConTeXt? \setupfloat[figure][default=here,top,bottom,page] \def\ipsum{% \par Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. } \starttext \section{First Section} \ipsum \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=5.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \section{Second Section} \ipsum \ipsum \ipsum \section{Third Section} \ipsum \ipsum \section{Third Section} \ipsum \ipsum \stoptext
Hi Michael, maybe this is a help http://archive.contextgarden.net/message/20070221.092820.718b7eb5.en.html untested, as I have no time.. Best wishes, Peter Santy, Michael schrieb:
Thanks, Aditya. However, I'm don't think that \setupfloat[figure][default=here,top,bottom,page] addresses my need for float pages. If you compile the document below, you'll notice that the figures at the end of the first section are floated throughout sections 2-4. I would like the rendering of the floats to catch up by placing the floats on float pages, before moving on to other text. Is this possible in ConTeXt?
\setupfloat[figure][default=here,top,bottom,page]
\def\ipsum{% \par Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. }
\starttext
\section{First Section}
\ipsum
\placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=5.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]}
\section{Second Section} \ipsum \ipsum \ipsum
\section{Third Section} \ipsum \ipsum
\section{Third Section} \ipsum \ipsum
\stoptext
------------------------------------------------------------------------
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
2007/12/12, Santy, Michael
Thanks, Aditya. However, I'm don't think that \setupfloat[figure][default=here,top,bottom,page] addresses my need for float pages. If you compile the document below, you'll notice that the figures at the end of the first section are floated throughout sections 2-4. I would like the rendering of the floats to catch up by placing the floats on float pages, before moving on to other text. Is this possible in ConTeXt?
\setupfloat[figure][default=here,top,bottom,page]
\setupfloat[figure][default={here,top,bottom,page}] don't forget the braces for more values to one key. Wolfgang
\def\ipsum{% \par Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. }
\starttext
\section{First Section}
\ipsum
\placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=5.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]} \placefigure {Blah} {\externalfigure[figurename][width=5.0in, height=3.0in]}
\section{Second Section} \ipsum \ipsum \ipsum
\section{Third Section} \ipsum \ipsum
\section{Third Section} \ipsum \ipsum
\stoptext
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Willi Egger wrote:
Hi, just found this question intriguing ...
When changing Wolgangs suggestion into:
\setupfloat[figure][default={force,top,page}]
in this case top is used, not page or just feed 'page' to \placefigure ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
2007/12/13, Hans Hagen
Willi Egger wrote:
Hi, just found this question intriguing ...
When changing Wolgangs suggestion into:
\setupfloat[figure][default={force,top,page}]
in this case top is used, not page
or just feed 'page' to \placefigure
but he want to "collect" the figures on one page and not every on a new page. Wolfgang
Wolfgang Schuster wrote:
but he want to "collect" the figures on one page and not every on a new page.
That's part of the issue, but not the entire issue. Attached is the equivalent LaTeX source and the resultant PDF (both gzipped due to ridiculously low 40k email limit). LaTeX appears to float a series of figures placed with the "htbp" as follows: 1) Try to float the figures on the current page. They can be "here", or at the top or bottom of the page. 2) If the figures weren't placed on the current page, finish out the current page with content (see pdf page 1), unlike ConTeXt's "force" option. Start a new page containing only floats and keep doing so until all floats are flushed. (pages 2-4 of the PDF) 3) Try to place content on what would be the last float page (see page 5 of the PDF). The closest analog that I can see in ConTeXt is the "force" placement option for floats, which is mean to ensure strict ordering. The main difference is that the LaTeX "htbp" placement option will fill the remaining vertical whitespace with content before starting a float page. Cheers, Mike
Santy, Michael wrote:
Wolfgang Schuster wrote:
but he want to "collect" the figures on one page and not every on a new page.
in addition to default=, there is a fallback= option ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 13 Dec 2007, Santy, Michael wrote:
Wolfgang Schuster wrote:
but he want to "collect" the figures on one page and not every on a new page.
That's part of the issue, but not the entire issue. Attached is the equivalent LaTeX source and the resultant PDF (both gzipped due to ridiculously low 40k email limit). LaTeX appears to float a series of figures placed with the "htbp" as follows:
Only the tex file was attached, no pdf. When I compile the latex file, it doesn't work propoerly. I set all figures as (boxed [)width=5.0in, height=3.0in] I think that this is because \fbox in latex does not take an optional argument. Aditya
participants (6)
-
Aditya Mahajan
-
Hans Hagen
-
Peter Rolf
-
Santy, Michael
-
Willi Egger
-
Wolfgang Schuster