4

I was wondering if there was a way to create a header in LaTeX that looks similar to those from Microsoft Word, for, say, a picky teacher.

2
  • 5
    It would be great if you could add more detail to this question. What version of Word are you thinking about, what header style, which parts of the header style in particular (font, alignment, colour)? Probably best to post a screenshot as well, since not everyone has access to Word.
    – Jake
    Commented Oct 13, 2011 at 2:54
  • I meant just the general style, like have the left, middle, and right columns of the header and footer, etc.
    – chbaker0
    Commented Oct 13, 2011 at 3:10

1 Answer 1

10

I think you might like the fancyhdr package, a MWE is below

\documentclass{article}
\usepackage{fancyhdr} % for headers and footers
\usepackage{lipsum}   % for dummy text

\begin{document}

% headers
\fancyhead[L]{left head}
\fancyhead[C]{center head}
\fancyhead[R]{right head}
% footers
\fancyfoot[L]{left foot}
\fancyfoot[C]{center foot}
\fancyfoot[R]{right foot}

% need to specify the pagestyle as fancy
\pagestyle{fancy}
\lipsum

% if you want a non-fancy page, use ... 
\pagestyle{empty}
\lipsum
\end{document}

Note that if you have chapters, sections, and subsections, then the fancyhdr will automatically assign the headers- see MWE below. These can be (ofcourse) be tweaked- see the documentation for details.

\documentclass{article}
\usepackage{fancyhdr} % for headers and footers
\usepackage[english]{babel}
\usepackage{blindtext}   % for dummy text

\begin{document}

% need to specify the pagestyle as fancy
\pagestyle{fancy}

\blinddocument

\end{document}

The command \pagestyle can be empty, plain, or (once you have loaded fancyhdr) fancy. As Doncherry commented, if you use \pagestyle{plain}, then it will affect the current page and all consequent pages. If you use \thispagestyle{plain} it will only affect the current page.

The standard page style for article is \pagestyle{plain}.

2
  • @mebob You're welcome- for customization, see the documentation, and search this site (tex exchange) and others- happy TeXing!
    – cmhughes
    Commented Oct 13, 2011 at 3:14
  • 1
    As for % if you want a non-fancy page, use ... ||\pagestyle{empty} -- I'd specify 1) that this is not the standard page style, and 2) that this will affect all following pages (not just "a non-fancy page"), as opposed to \thispagestyle{empty}, which only affects the current page. The standard page style for article is \pagestyle{plain}.
    – doncherry
    Commented Oct 13, 2011 at 12:48

You must log in to answer this question.

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