Hello, A follow-up on the solution \startpostponing [+0] \startplacefigure … \stopplacefigure \stoppostponing As a side effect, one then needs to be careful to surround ALL placefigures with \startpostponing[+0]\stoppostponing, even those that occur after a paragraph end (where one is not concerned about adding a paragraph break), else the floating figures may get placed out of order, e.g. figure 4 before figure 3. As this makes for somewhat sloppy tex files, should not placefigure/table/other get FIXED so as not to introduce a paragraph break? Alan On Thu Apr 5 15:38:05 CEST 2012 Alan BRASLAU wrote:
On Thu, 5 Apr 2012 13:39:42 +0200 Steffen Wolfrum <context at st.estfiles.de> wrote:
Am 05.04.2012 um 13:25 schrieb luigi scarso:
On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan <adityam at umich.edu> wrote:
(Untested)
\startpostponing[+1] \placefigure[top]{}{...} \stoppostponing
Rest of the text
Aditya \starttext
\switchtobodyfont[rm,10pt]
\input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte \input ward % \input zapf \input tufte \input ward % \input zapf HERE% \startpostponing[+1] \placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]} \stoppostponing% AND HERE \input tufte \input ward % \input zapf \input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte % \input ward \input zapf \input tufte \input ward \input zapf
\stoptext
seems ok
indeed, a great result. (searching for this command now, I saw that it's a quite old command ... only I never knew it)
thanks a lot Aditya and Luigi!
I have been looking for a trick to place figures near their reference in the text, without imposing a paragraph break. This trick works (so thanks again to Aditya and Luigi):
\starttext
Some text is described \in{figure}[fig:reference]. \startpostponing[+0] \startplacefigure[location=here,reference=fig:reference, title={This figure gets placed somewhere near its reference.}] \externalfigure[cow][width=\textwidth] \stopplacefigure \stoppostponing The text continues here without a paragraph break.
\stoptext
A few comments:
1. The \startpostponing...\stoppostponing is necessary, although some other wrapper around the placefigure might also work.
2. The % at the end of the lines in the above examples is not necessary unless one seeks to kill the spacing between {HERE}{AND HERE}.
3. One should preferably be using \startplacefigure\stopplacefigure (rather than \placefigure). Besides being cleaner, as a bonus one gets to use title={},list={} for the figure caption and list of figure entry.
Should placefigure be "fixed" somehow so as to hide its paragraph break itself?