Document 379

How to add a line under typeset headers

Version: 3.x, 4.x, 5.x - Scientific WorkPlace & Scientific Word

To add a line, or rule, under the header, use the fancyhdr package and a few TeX commands:

  1. Add the fancyhdr package to your document.
  2. Enter an encapsulated TeX field on the first page of the body of the document.
  3. In the entry area, type these two commands:

    \pagestyle{fancy}

    \renewcommand{\headrulewidth}{xpt}

    where x is the point size of the rule you want.

  4. Choose OK.

    If the space allotted for headers and footers is inadequate, increase the space.

You can use the same technique to remove a line under a header:

  1. Add the fancyhdr package to your document and then enter an encapsulated TeX field on the first page of the body of the document.
  2. In the entry area, type these commands:

    \pagestyle{fancy}

    \renewcommand{\headrulewidth}{0pt}

  3. Choose OK.

Last revised 03/03/06

This document was created with Scientific WorkPlace.