0

I'm writing some text, with a float at some point. I don't mind where my float is placed exactly, but - I do mind if it breaks up individual paragraphs into two pieces, before and after the float.

I just read this:

How to protect text from being split by a float?

where the (single and accepted) answer suggests some measure of clearing floats, or postponing the presentation of any floats (using placeins or flafter). But - that's not what I want; I'm ok with floats either appearing or not-appearing after or earlier than this point - I just want paragraphs to remain intact. What should I use instead?

einpoklum
  • 12,311
  • 2
    put samepage around every paragraph to prevent that they get split over pages. – Ulrike Fischer Nov 28 '23 at 14:18
  • 2
    Duplicate of https://tex.stackexchange.com/questions/246155/how-to-place-floats-between-paragraphs/246315#246315 – David Carlisle Nov 28 '23 at 14:22
  • 2
    You really have to disable the entire float mechanism, see the answer to the duplicate question. – David Carlisle Nov 28 '23 at 14:23
  • https://tex.stackexchange.com/questions/507528/using-flushhere-for-table-figure-position#comment1282529_507532 – David Carlisle Nov 28 '23 at 14:33
  • You could ignore the float system and use something based on \everypar. The tricky bit would be near the bottom of the page. It might be easier just to place everyhing by hand, possibly using \raggedbottom for the occasional gaps. – John Kormylo Nov 28 '23 at 14:44
  • @JohnKormylo: Where would I put \raggedbottom? Also, manual placemene of figure content may give me trouble with lists-of-figures and such. – einpoklum Nov 28 '23 at 14:55
  • Use the [H] option (float package) for manual placement. \raggedbottom could go in the preamble, or possibly \AtBeginDocumant. – John Kormylo Nov 28 '23 at 15:01
  • @JohnKormylo at paragraph breaks (so \everypar) you can get reliable \pagegoal and \pagetotal values to check whether your current float fits. Then you'd have different options for the placement (greedy vs not more than n floats; prefer top/bottom of page over midpage; etc.) – Skillmon Nov 28 '23 at 15:10
  • @Skillmon - I was thinking one float between paragraphs until \@deferlist is empty of [p] floats. – John Kormylo Nov 28 '23 at 15:20

0 Answers0