[OS X TeX] Avoiding page breaks

David Watson dewatson at mac.com
Wed Apr 16 19:29:41 CEST 2008


I also suggested removing the \begin{center} ... \end{center} and  
replacing that with { \centering ... } which will not add extra space  
before and after your description, though I admit I haven't tried it.

On Apr 16, 2008, at 11:57 AM, Toke Lindegaard Knudsen wrote:

> On Apr 16, 2008, at 12:49 PM, Toke Lindegaard Knudsen wrote:
>
>> On Apr 16, 2008, at 12:44 PM, Chris Goedde wrote:
>>
>>> 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.
>
> I tried this:
>
> -----
> \newenvironment{versetxt}[2]
> {
>   \begin{center}$\sim$ {\sc #2} $\sim$\end{center}\Nopagebreak%
>     ({#1}) \begin{large}\begin{bf}
> }
> {
>   \end{bf}\end{large}\\ \mbox{}
> }
> -----
>
> But it still breaks between the description and the main text.
>
> Sincerely,
> Toke




More information about the macostex-archives mailing list