Does anybody know how to increase the space between underline and contents?

I am trying to use the template for my thesis, here is the .sty file for header.

%UHEAD.STY  If this is included after \documentstyle{report}, it adds
% an underlined heading style to the LaTeX report style.
% \pagestyle{uheadings} will put underlined headings at the top
% of each page. The right page headings are the Chapter titles and
% the left page titles are supplied by \def\lefthead{text}.

% Ted Shapin, Dec. 17, 1986



% modifications
% end of modifications
\def\chaptermark##1{\markboth {\ifnum \c@secnumdepth >\m@ne
 \chapapp2\ \thechapter. \ \fi ##1}{}}%
\def\sectionmark##1{\markright {\ifnum \c@secnumdepth >\z@
   \thesection. \ \fi ##1}}}
  • 1
    Welcome to tex.sx! wow that's old code:-) You could insert a zero width \rule with depth to push the line down but I wouldn't do that I'd instead use the facilities of the fancyhdr package. Jun 14, 2013 at 16:13
  • Dear David,thank you so much! Would you please give me more hints to modify the codes?
    – Aaron
    Jun 14, 2013 at 16:24

1 Answer 1


Try this; it's much more readable and customizable.


\def\chapapp{\@chapapp} % The LaTeX kernel doesn't make \@chapapp public

  \markboth{\ifnum\value{secnumdepth}>-1 \chapapp\ \thechapter. \ \fi #1}{}}
  \markright{\ifnum\value{secnumdepth}>0 \thesection. \ \fi #1}}

\preto\appendix{\cleardoublepage} % a useful adjustment

\usepackage{kantlipsum} % just for the example



\chapter{A chapter}
\section{A section}
\chapter{An appendix}
\section{An appendix section}
  • Hi, egreg, thank you so much for your help!!
    – Aaron
    Jun 15, 2013 at 1:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .