From: igrdb@informatik.tu-chemnitz.de (Ingo Gringer)
Subject: Re: Kopfzeile unterstrichen
Organization: tu-chemnitz
Date: Mon, 23 Nov 1992 07:34:12 GMT

Holger_Boysen@fl.maus.de (Holger Boysen) writes:

>...,das Nice-Tex so eine schoene Linie unter die Kopfzeile
>zieht. Kann man das auch mit LaTeX gealisieren?

>Holger

Bei mir liegt dazu ein 'head_ul.sty' rum:

Mit '\documentstyle[11pt, german, head_ul]{report}' zB reinholen
und mit '\underhead' "gealisieren" :-)

Tschuess,
Ingo

----- cut here ----
% Three part head and foot macros by
% Lance Berc
% Olivetti Research Center
% 2882 Sand Hill Road
% Menlo Park, California 94025
% (415) 496-6200
% lance@orc.olivetti.com

\def\lhead#1{\gdef\@lhead{#1}} \def\lfoot#1{\gdef\@lfoot{#1}}
\def\chead#1{\gdef\@chead{#1}} \def\cfoot#1{\gdef\@cfoot{#1}}
\def\rhead#1{\gdef\@rhead{#1}} \def\rfoot#1{\gdef\@rfoot{#1}}

\def\@lhead{} \def\@lfoot{}
\def\@chead{} \def\@cfoot{}
\def\@rhead{} \def\@rfoot{}

\def\@threepart#1#2#3{\rlap{#1} \hfil {#2} \hfil \llap{#3}}

\def\ps@threepartheadings
    {
    \def\@oddhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
    \def\@oddfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}

    \if@twoside
	\def\@evenhead{\@threepart{\@rhead}{\@chead}{\@lhead}}
	\def\@evenfoot{\@threepart{\@rfoot}{\@cfoot}{\@lfoot}}
    \else
	\def\@evenhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
	\def\@evenfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
    \fi
    }

\ps@threepartheadings

% Define \underhead to put a rule under the headers.  \nounderhead
% suppresses \underhead on the current page.  The space between
% the text and the rule is \underheadsep.

\def\underhead{
 \addtolength{\headheight}{\underheadsep}
 \def\@outputpage{\begingroup\catcode`\ =10 \if@specialpage
     \global\@specialpagefalse\@nameuse{ps@\@specialstyle}\fi
     \if@twoside
       \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
            \let\@themargin\oddsidemargin
          \else \let\@thehead\@evenhead
          \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
     \fi\fi
     \shipout
     \vbox{\normalsize \baselineskip\z@ \lineskip\z@
           \vskip \topmargin \moveright\@themargin
           \vbox{\setbox\@tempboxa
                   \vbox to\headheight{\vfil \hbox to\textwidth{\@thehead}
                         \vskip \underheadsep
                          \if@nounderhead\global\@nounderheadfalse
                                 \hbox to\textwidth{}
                          \else  \hbox to\textwidth{\hrulefill}\fi}
                 \dp\@tempboxa\z@
                 \box\@tempboxa
                 \vskip \headsep
                 \box\@outputbox
                 \baselineskip\footskip
                 \hbox to\textwidth{\@thefoot}}}\global\@colht\textheight
           \endgroup\stepcounter{page}\let\firstmark\botmark}

}
\def\ps@empty{\@nounderheadtrue
              \let\@mkboth\@gobbletwo\def\@oddhead{}\def\@oddfoot{}%
\def\@evenhead{}\def\@evenfoot{}}

\def\ps@plain{\@nounderheadtrue
     \let\@mkboth\@gobbletwo
     \def\@oddhead{}\def\@oddfoot{\rm\hfil\thepage
     \hfil}\def\@evenhead{}\let\@evenfoot\@oddfoot}


\newif\if@nounderhead \@nounderheadfalse
\def\nounderhead{\@nounderheadtrue}

\newlength{\underheadsep}
\setlength{\underheadsep}{.5ex}


------- cut here -----------