Simple school style report headers
The solution below uses fancyhdr
and puts the content you described in a minipage
.
Following @Seamus' comment, I have increased the headheight
using the geometry
package.
\documentclass{article}
\usepackage[showframe=true,headheight=1cm]{geometry}
\usepackage{fancyhdr} % for headers and footers
\usepackage{lipsum} % for dummy text
\begin{document}
% headers
\fancyhead[L]{}
\fancyhead[C]{}
\fancyhead[R]{%
\begin{minipage}{3cm}
\raggedleft
Hughes\\
Math 251: Calc\\
MW 9am-11.30am
\end{minipage}}
\renewcommand{\headrulewidth}{0pt}
% 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 pages from this point use ...
\pagestyle{plain}
\lipsum
\end{document}
If you only want the information to appear in the header on the first page it might be appropriate to use
\pagestyle{plain}
\thispagestyle{fancy}
at the beginning of your document.
The titlesec package also offers a set of commands for one-step headline and footline settings (see Section 5. Page Styles of the package documentation). Here's a little example, placing the required information (on every page) flushed to the right margin, and the page number in the center of the footer:
\documentclass{article}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum} % just to generate text for the example
\addtolength\headheight{6pt}
\newpagestyle{mystyle}{
\sethead{}{}{\begin{minipage}{3.5cm}
\raggedleft
The Professor\\
The Class\\
The Time
\end{minipage}}
\setfoot{}{\thepage}{}
}
\pagestyle{mystyle}
\begin{document}
\lipsum[1-14]
\end{document}