[OS X TeX] unwanted page break

Herbert Schulz herbs at wideopenwest.com
Wed Jun 15 15:50:29 EDT 2011

On Jun 15, 2011, at 2:41 PM, Art Werschulz wrote:

> Hi.
> Attached you will find two files that illustrate a problem I'm having.  As you can see in the PDF file, there's a page break between the "Exercise 3.4" heading and the solution.   Needless to say, this is a really bad place for a page break.  It would make much more sense for the page break to appear before the heading, so that the heading and the solution would be together.
> Note that the definition of the "solution" environment includes a \nopagebreak.  Moreover, I even inserted a \nopagebreak within the solution to this exercise.  This availed me not.
> Of course, I could insert a \newpage before the solution to Exercise 3.4.  But this is a pretty brittle solution.  What I'm showing you here is really a stripped-down example of the real thing, which is the solutions manual to a textbook.  Moreover, rather than manually maintaining separate files for the text and the solutions manual, we're using the "answers" package to generate the solutions manual file automatically, which adds a bit more indirection to the stew.  So going back and fixing things manually would be a tedious, error-prone solution, which would break if we were to include additional exercises.
> Do any of you have suggestions about how to fix this?  Many thanks!!
> Art Werschulz (8-{)}   "Metaphors be with you."  -- bumper sticker
> GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y?
> Internet: agw STRUDEL comcast.net


Others may have other solutions but if it only happens occasionally you cansimply force a page break before that problem with a \newpage command.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

More information about the MacOSX-TeX mailing list