[comp.text.tex] LaTeX sections and bottom of page

sdawalt@cs.wright.edu (Shane Dawalt) (01/11/91)

  It has been discovered that subsection headers and the text 
they represent may be split between pages.  For instance, a
subsection header will appear on one page while the paragraph(s)
following the header are placed on the following page.  This is not
desirable.  What is required is that LaTeX automatically move the
header to the next page where the text is printed.  Yes, \pagebreak
can be used before the header definition, but if the text is editing
and the \pagebreak is forgotten about then improper formatting will
result.  Furthermore, if this occurs several times, the editing
problem is compounded!  Surely there is a command or variable which can
be accessed to automatically move these headers to the next page along
with the text.  Ideas anyone?

  Also, is there any way to replace Arabic numering with Roman numerials
for section/subsection numbering?  What about Roman for sections and
arabic for subsections?  (Don't you wonder how people can want such
bizarre options?)

  Thanks.

  Shane();

-- 

--------------------------------------------------------------------------
From the keyboard of:			     email: sdawalt@cs.wright.edu
	Shane A. Dawalt

eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (01/13/91)

sdawalt@cs.wright.edu (Shane Dawalt) writes:

>  It has been discovered that subsection headers and the text 
By whom?

>they represent may be split between pages.  For instance, a
>subsection header will appear on one page while the paragraph(s)
>following the header are placed on the following page.  This is not
>desirable. 
I would even say that it's not possible in LaTeX.
Unless you're doing something out of the ordinary.
I suggest that you supply an example. This sort of thing
has meticulously been taken care of in LaTeX. I'd appreciate
seeing it go wrong.

>  Also, is there any way to replace Arabic numering with Roman numerials
>for section/subsection numbering?  What about Roman for sections and
>arabic for subsections?  (Don't you wonder how people can want such
>bizarre options?)

Look into the style file. Numbering is determined by commands
\thesection et cetera. You can redefine these.

Victor.

mdeck@acsu.buffalo.edu (Mary Deck) (01/15/91)

In article <1991Jan12.195735.20151@csrd.uiuc.edu> eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) writes:
>sdawalt@cs.wright.edu (Shane Dawalt) writes:
>>  It has been discovered that subsection headers and the text 
>By whom?

More than one person.  I've seen the problem, too. :)

>>they represent may be split between pages.  For instance, a
>>subsection header will appear on one page while the paragraph(s)
>>following the header are placed on the following page.  This is not
>>desirable. 
>I would even say that it's not possible in LaTeX.
>Unless you're doing something out of the ordinary.
>I suggest that you supply an example. This sort of thing
>has meticulously been taken care of in LaTeX. I'd appreciate
>seeing it go wrong.

I don't have the source, but this is an example of what happened:
	\section{Something}
	\subsection{Something Else}
	\subsubsection{And Now, For Something Completely Different}
	Here's some text in the subsubsection.  It doesn't really
	matter what it is, as long as there's something here.

Now, if this occurs near the end of a page, then LaTeX is going to try
to break it somewhere.  Let's assume that it can fit the section on
the first page without shrinking the stuff on the page before it.
Let's assume that it then tries to put the subsection on the same
page; it will have to do a fair amount of shrinking, but it can be
done.  Well, then it gets to the subsubsection, and it just can not
squeeze the page any more.  LaTeX tries to put the section and
subsection on the next page, but that stretches thing so they're worse
than the shrunk-down stuff.  LaTeX puts the section and subsection on
the first page, and the subsubsection and text goes on the following
page.

Judicious use of \pagebreak[x] could help this situation (I suggest
this to Mr. Dawalt), but not always.  There are only three
intermediate levels of \pagebreak's, and my situation (which is more
complex than this) demands at least four.  Any suggestions, short of
resorting to TeX's \penalty, would be appreciated.  Thanks.

If anyone would like a concrete example, mail me and I'll see what I
can do. 

					.....Mary
---
Mary M. Deck
Student Assistant, User Services  |  Internet:  mdeck@cs.buffalo.edu 
University Computing Services     |  uucp:      rutgers!ub!mdeck
SUNY at Buffalo                   |  Bitnet:    mdeck%cs.buffalo.edu@ubvms

eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (01/16/91)

mdeck@acsu.buffalo.edu (Mary Deck) writes:

>>sdawalt@cs.wright.edu (Shane Dawalt) writes:
>>>  It has been discovered that subsection headers and the text 

I've just been mailed an example where this can happen:
if there is a figure environment between the header and the text.
O.k. Don't do that. Put the figure after the first line of
text.

>I don't have the source, but this is an example of what happened:
>	\section{Something}
>	\subsection{Something Else}
>	\subsubsection{And Now, For Something Completely Different}
>	Here's some text in the subsubsection.  It doesn't really
>	matter what it is, as long as there's something here.

There are \nobreak commands after each heading level.
Meaning there is a penalty of 10000 of breaking after a header.
The only way to leave a header stranded is for all breakpoints to
have the same badness. And I don't see how that can be.
It is always possible to break above \section. If there is no 
stretchable glue on the page this will at most give an underfull
box.

I would still like to see concrete examples where it
happens nevertheless, and that have *only* headers and text.

Victor.