ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startplacefigure breaking paragraph flow
@ 2013-02-09  3:15 Marcin Borkowski
  2013-02-10 17:33 ` Alan BRASLAU
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Borkowski @ 2013-02-09  3:15 UTC (permalink / raw)
  To: ConTeXt mailing list

Hi all,

when I issue a \startplacefigure, it breaks the flow of the paragraph.
Normally, it is not a problem (I can use 2*hang anyway), but I have a
one-paragraph enumeration (made by \defineenumeration), and if I give
the figure at its beginning, the "label" is on a line by its own; the
problem is, I want the enumeration typeset by a block, and that's why I
don't want to give the figure *before* the block.  Here's a MWE:

\defineenumeration[question][
  text={\llap{$\blacktriangleright$~}Question},
  right={.},
  before={\blank[small]},
  after={},
  distance=0.5em,
  alternative=serried,
  width=fit,
]

\defineblock[question]
\defineblock[answer]

\keepblocks[question]
\hideblocks[answer]

\setupblock[question][before=\startquestion,after=\stopquestion]
\setupblock[answer][before=\startanswer,after=\stopanswer]
\def\noanswer{\incrementnumber[answer]}

\starttext
\beginquestion
  This looks good. \input knuth
\endquestion

\beginquestion
  \startplacefigure[location={none,right,2*hang}]
    \framed{\tfd My figure}
  \stopplacefigure
  This looks bad. \input knuth
\endquestion
\stoptext

Any suggestions?

-- 
Marcin Borkowski
room B3-46, phone no +48 61 829 5375
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___________________________________________________________________________________
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] 2+ messages in thread

* Re: \startplacefigure breaking paragraph flow
  2013-02-09  3:15 \startplacefigure breaking paragraph flow Marcin Borkowski
@ 2013-02-10 17:33 ` Alan BRASLAU
  0 siblings, 0 replies; 2+ messages in thread
From: Alan BRASLAU @ 2013-02-10 17:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: mbork

On Sat, 9 Feb 2013 04:15:34 +0100
Marcin Borkowski <mbork@amu.edu.pl> wrote:

> when I issue a \startplacefigure, it breaks the flow of the paragraph.

I systematically use

\startpostponing [+0]
\startplacefigure
...
\stopplacefigure
\stoppostponing

to prevent the paragraph break of \startplacefigure

Alan
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2013-02-10 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-09  3:15 \startplacefigure breaking paragraph flow Marcin Borkowski
2013-02-10 17:33 ` Alan BRASLAU

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