On Thu, 5 Apr 2012 13:39:42 +0200
Steffen Wolfrum
Am 05.04.2012 um 13:25 schrieb luigi scarso:
On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan
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? Alan