?SPAM? - Re: [texhax] Orphan section heads

Uwe Lück uwe.lueck at web.de
Fri Oct 28 16:27:26 CEST 2005

At 13:31 28.10.05, Philip TAYLOR wrote:
>Dear Uwe -- Many thanks for your suggestion;
>I suspect that one "\expandafter" got lost in
>transit (as it stands, you are trying to redefine
>\expandafter rather than \verbatim !), but modulo
>that, it seems to work as you intended :-)))
>>\def \expandafter \verbatim \expandafter{\expandafter
>>   \@beginparpenalty\expandafter\@M\verbatim}
Indeed, it was missing before transit already!

>Very many thanks, and I am cc'ing Robin who may
>wish to retrofit something similar to the TUGboat

It might be a subject for LaTeX as well; yet someone
who makes subsection headings embedded is
particularly obliged to deal with the problem (IMHO).

The best that comes to my mind is a user version
of \@afterheading to be used when one knowingly
starts a \@trivlist after an embedded heading:

Or even: \@xsect uses \@nobreaktrue in any case,
and \@nobreakfalse starts its \everypar assignment!?

-- Uwe.

>Uwe Lück wrote:
>>Dear Phil and all involved,
>>the diagnosis is rather simple. The LTUGproc subsections
>>are embedded into the following text (the "next skip" is negative).
>>The authors of \@startsection seem not to have thought of
>>the possibility that an embedded heading could precede a
>>paragraph environment. In Standard LaTeX, the same would happen
>>with \paragraph. The environment is even likely to set a penalty
>>that overrides the \clupenalty (a general TeX problem).
>>I don't find good ways out so easily.
>>In your case I would suggest:
>>\def \expandafter \verbatim \expandafter{\expandafter
>>   \@beginparpenalty\expandafter\@M\verbatim}
>>-- This should also prevent the \skip in \@verbatim
>>from breaking.
>>One may also try the samepage trick or
>>\parbox{\columnwidth}, I am not experienced with that.
>>Best Regards,
>>   Uwe.
>>At 16:32 24.10.05, Philip TAYLOR wrote:
>>>Dear Uwe -- the relevant part of the log, as requested,
>>>as 1435 lines, and is at
>>>         http://personal.rhul.ac.uk/chaa/006/log.log.txt
>>>the input was :
>>>         \tracingmacros = 1
>>>         \subsection {explanation.cases}
>>>         \begin{verbatim}
>>>         0
>>>         1
>>>         2
>>>         \end{verbatim}
>>>         \tracingmacros = 0
>>>Note that this is a boundary case; one fewer lines in the
>>>verbatim text and it is all fitted on the current page.
>>>Looking at the first few lines of the log, I fear this
>>>is complicated (and perhaps even caused) by TUGboat's
>>>intervention : I am therefore cc'ing Barbara, who may
>>>wish to look at her part of the code ...
>>>** Phil.
>>>>>At 16:12 21.09.05, Philip TAYLOR wrote:
>>>>>>Hmmm, sadly I can now demonstrate that it
>>>>>>is only too easy to get an orphaned subsection
>>>>>>head : this accomplishes it for me, though
>>>>>>I very much wish that it didn't :-(((
>>>>>>         \documentclass [final]{ltugproc}
>>>>>>         \usepackage {graphicx}
>>>>>>         \hfuzz = 1\jot
>>>>>>         \overfullrule = 1\jot
>>>>>>         \hyphenation {legit-imately}
>>>>>>         \flushbottom
>>>>>>                 . . .
>>>>>>         \subsection {byz-data.dat}
>>>>>>         \begin{verbatim}
>>>>>>                 . . .

More information about the texhax mailing list