11

I'm trying to learn LaTeX. I've been googling this one for a couple days, but I don't speak enough LaTeX to be able to search for it effectively and what documentation I have found is either too simple or goes way over my head (http://www.uoregon.edu/~dspivak/files/multicol.pdf)

I have a document using the multicol package. (I'm actually using multicols* so that the first col fills before the second begins instead of trying to balance them, but I don't think that's relevant here.) The columns output nicely, but I want to be able to indicate that some content won't be broken up into different columns.

For instance,

aaaaaaaa  bbbbbbb  
aaaaaaaa  bbbbbbb  
aaaaaaaa  
          ccccccc  
bbbbbbbb  ccccccc  

That poor attempt at ascii art columns is what's happening. I'd like to indicate that the b block is a whole unit that shouldn't be broken up into different columns. Since it doesn't fit under the a block, the entirety of the b block should be moved to the second column.

Should b be wrapped in something? Is there a block/float/section/box/minipage/paragraph structure I can use? Something specific to multicol? Alternatively is there a way that I can suggest a columnbreak? I'm thinking of something like \- that suggests a hyphenated line break if its convenient, but this would go between blocks.

Thanks!

dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
valadil
  • 1,648
  • 1
  • 14
  • 30
  • AB, Column break will be helpful for fixing up type by hand, but I was hoping there was a more automatic way to indicate that some paragraphs can't be broken. As far as I can tell the widow and orphan penalties only apply to the first and last line. What if an 8 line paragraph tries to split in the middle? Or is that what looseness is for? – valadil Mar 08 '10 at 17:30
  • Forcing 8 lines anywhere generally isn't a good idea - something will look ugly whatever you do, basically. LaTeX does not give you an easy way to do this on purpose. Maybe your can make your unbreakable paragraph a float? Also, see my addition to the answer below. – AVB Mar 08 '10 at 18:26
  • I fixed your formatting with a markdown codeblock. You could also have used
     as Stack Overflow questions and answers (but not comments) support a limited set of safe hmtl.
    – dmckee --- ex-moderator kitten Mar 08 '10 at 18:49
  • dmckee, Thanks. Wasn't sure what was supported. AB, normally I'd agree and just let latex do its thing but this is very specific and I'm the only person that will see the result. The application of this is that I'm printing up my D&D notes and don't want monster stats split over columns. I'll give floats a try, though the multicol documentation says they're broken. – valadil Mar 08 '10 at 19:37

2 Answers2

9

Would putting the text inside a minipage not work for this?

\begin{minipage}{\columnwidth}
text etc
\end{minipage}
Seamus
  • 2,041
  • 6
  • 22
  • 42
7

Forcing a column break is as easy as \columnbreak.

There are some gentler possibilities here.

If you decide to fight LaTeX algorithms to the bitter end, there is also this page on preventing page breaks. You can try the \samepage command, but as the page says, "it turns out to be surprisingly tricky".

AVB
  • 3,994
  • 22
  • 21