4

Possible Duplicate:
Unbreakable block

Hello I am trying to print this poem together on a single page except it keeps getting broken in the middle. Is there a way for me to group it together? I looked here but I was unsure of the best way to go about it.

\documentclass[12pt,a4paper]{article}
\begin{document}
\vspace*{0.8\textheight}% just to demonstrate the breaking; in the real world,
                        % this would be text

A poem:

To yowe that Joyntly with vndaunted paynes\newline
Vowtsafed to Chawnte to vs thease noble straynes,\newline
How mutch yowe merrytt by it, it is not sedd,\newline
But yowe haue pleased the lyving, loved the deadd,\newline
Raysede from the woambe of Earth a Ritcher myne\newline
Then Curteys Cowlde with all his Castelyne\newline
Associattes, they dydd butt dig for Gowlde,\newline
Butt yowe for Treasure mutch moare manifollde.
\end{document}
8
  • 2
    This is a lot of code. In order to help people who'll help you, could you please remove everything from the code that's not related to your problem (e.g. everything about bibliographies, footnotes and indexes) to get a so-called minimal working example (MWE), that people can copy and compile to reproduce your problem? Otherwise, your question might be in danger of being closed as too localized.
    – doncherry
    Jul 15, 2012 at 19:23
  • No problem, hopefully that helps! Jul 15, 2012 at 19:28
  • Thanks! I reduced your MWE further: Actually, none of the packages you listed are relevant for your problem. One thing that is relevant, however, is the pagebreak. I artificially introduced that by adding vertical space above your poem.
    – doncherry
    Jul 15, 2012 at 20:24
  • Thank you very much. It is tough to know what people need to diagnose my problems since I just started with latex. Cheers! Jul 15, 2012 at 20:27
  • After applying the appropriate tag page-breaking, I noticed that your question has already been asked here. See the answers of that question. This one will most likely be closed soon. Make sure to check if your question has been asked already because we want to avoid duplicates.
    – doncherry
    Jul 15, 2012 at 20:28

1 Answer 1

3

This problem is discussed in the TeX FAQ. Take a look there.

The first thing you could try is using the samepage environment. Although, like mentioned in the FAQ, this might not work in every case, it is the most convenient way to go. Especially if the block your trying to create contains only text.

Automatically avoiding any annoyance altogether, seems not to be possible with existing solutions, if I read the FAQ correctly. What you should do is choose one solution and test whether it gives any errors in your specific use case. I would try samepage first.

1
  • Thanks, I saw that but I was unsure what would be the best way to do it. (hopefully someone else has experience) The FAQ just mentions the difficulties of the \samepage environment so I was hoping to avoid it if possible/preferable. Jul 15, 2012 at 19:32

Not the answer you're looking for? Browse other questions tagged .