[OS X TeX] Avoiding page breaks

Toke Lindegaard Knudsen toke_knudsen at brown.edu
Wed Apr 16 18:49:03 CEST 2008


On Apr 16, 2008, at 12:44 PM, Chris Goedde wrote:

> On Apr 16, 2008, at 11:21 AM, Toke Lindegaard Knudsen wrote:
>
>>> So the complete tip would be
>>>
>>> \makeatletter
>>> \newcommand\Nopagebreak{\@nobreaktrue\nopagebreak}
>>> \makeatother
>>
>> I could not get this suggestion to work.  However, I solved the 
>> problem by using the minipage environment as suggested by Peter 
>> Vamos.
>
> Just out of curiosity, what went wrong? Did you get an error message 
> or a page break?

No error message, but page breaks still occurred where they were not 
supposed to.

> One thing I probably should have mentioned is that any white space can 
> be used as an opportunity to break, so you might need to end lines 
> with a % in order to prevent TeX from seeing the whitespace. I always 
> use \Nopagebreak in macros or as part of an environment's definition, 
> and I haven't seen it fail.

I did not put a % at the end of the line, so that might be the reason 
why it failed.  I can try again with this added later today.

Cheers,
Toke




More information about the macostex-archives mailing list