Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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 Oct 13 '11 at 2:54
    
I meant just the general style, like have the left, middle, and right columns of the header and footer, etc. –  mebob Oct 13 '11 at 3:10
add comment

1 Answer

up vote 7 down vote accepted

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}.

share|improve this answer
    
Thank you very much, that did the trick. –  mebob Oct 13 '11 at 3:10
    
@mebob You're welcome- for customization, see the documentation, and search this site (tex exchange) and others- happy TeXing! –  cmhughes Oct 13 '11 at 3:14
    
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 Oct 13 '11 at 12:48
    
@doncherry Thanks, I made the edit. –  cmhughes Oct 13 '11 at 15:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.