1

Possible Duplicate:
How to protect text from being split by a float?

I have this LaTeX like code

\begin{figure}...\end{figure}

[my paragraph text]

The output is

my paragraph 
------ <new page>
[Figure]
text

Essentially because the figure won't fit at the bottom of the page it goes to the top of the next page. BUT latex decides to place half of the paragraph text at the bottom of the page. I want

------ <newpage>
[Figure]
my paragraph text

I do not want the figure to "split" the paragraph in the middle. It looks wrong the way it is. I simply want the paragraph to be below the figure the way I typed it in LaTeX.

  • So you want empty space at the bottom of the preceding page? I can imagine that that will also "look wrong" – Jake Aug 29 '12 at 16:00
  • Sounds like http://tex.stackexchange.com/questions/8625/force-figure-placement-in-text, but as Jake says there are issues placing a large item 'here'. – Joseph Wright Aug 29 '12 at 16:06
  • @jake, it's only 2 lines... so I doubt will look as wrong as it is. My paragraph is 3 lines and the figure is splitting the last line. Anyways, what your saying is you don't know the solution? – AbstractDissonance Aug 29 '12 at 16:10
  • @JosephWright I've tried various things like htb! and H and nothing works. The figure must be placed on the next page else it will be chopped off. The problem is that latex is pushing the next paragraph up to the previous page. – AbstractDissonance Aug 29 '12 at 16:12
  • @Jake Aggressive voice? I was just making it clear you did not have a solution. Your statement was about how wrong the solution would look if it had one... yet you provided no solution to even check and do not know how wrong it looks already. I'd rather have the ability to see if the "wrong solution" was more or less wrong than the way it is. – AbstractDissonance Aug 29 '12 at 16:19
  • sounds to me like you simply want to start a new page. Won't a simple \newpage (or a \clearpage to be sure the float is placed on the next page) work? – cgnieder Aug 29 '12 at 16:20
  • @Jake Yes, but it is not up to you to decide what is wrong or right for me. If you provided me with a solution I would try it and see if it would look right to me. After all, It's my project and I have the right to decide if it looks correct or not, don't I? – AbstractDissonance Aug 29 '12 at 16:21
  • @cgnieder Yes, that would work BUT if I add/enlarge stuff above it then I'll end up with something probably much worse. – AbstractDissonance Aug 29 '12 at 16:22
  • 2
    If you're text/document isn't ready yet why worry about float placement at all? – cgnieder Aug 29 '12 at 16:23
  • @cgnieder lol, well, that might be true but I could fix the problem now too. It may take care of itself in the future IF I add more text BUT if I don't then it will still be wrong. I don't see why it is so hard to prevent the figure from splitting a paragraph. Seems like it would be an easy solution ;/ – AbstractDissonance Aug 29 '12 at 16:25
  • 1
    I really don't see any problem (but I might be blind…): either the issue solves itself because you're adding text, or it doesn't and then you can use \newpage. Or did I get anything wrong? – cgnieder Aug 29 '12 at 16:33
  • 3
    It's not the figure that splits the paragraph: It's the page breaking algorithm. The figure is only there because you allowed figures at the top of the page. So if you want to disallow this you will have to prevent latex from inserting a page break in the paragraph. See http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopagebrk or disallow figures at the top of the page. – Ulrike Fischer Aug 29 '12 at 16:33
  • @AbstractDissonance -- in a comment, you say the split paragraph is only 3 lines. that means you allow widows (and probably club lines, one line of a paragraph at the bottom of a page). to disallow widows, use \widowpenslty=10000; similarly, \clubpwnalty=10000. the default values for both = 150. so you could even set the higher penalties before the paragraph, and reset them to the default later on after the paragraph is safely output. – barbara beeton Aug 30 '12 at 13:39
  • @barbarabeeton What I used was \FloatBarrier which seems to keep my floats in order that they are shown. – AbstractDissonance Aug 30 '12 at 14:06

0 Answers0