4

I have an essay I need to write and I would like to use MacTeX, however it has been very challenging to get it formatted to all of my prof.'s requirements. If someone could help that would be SO helpful as I am still fairly new to LaTeX, but I would like to get better. The formatting needed is below.

Formatting guidelines: Times

12-point font

Double-spaced

Put name and date in single space at top of page

Put last name and page # in header section of following pages

8

I think this does what you require.

\documentclass[12pt]{article}
\usepackage{fancyhdr}     % Enhanced control over headers and footers 
\usepackage[T1]{fontenc}  % Font encoding
\usepackage{mathptmx}     % Choose Times font 
\usepackage{microtype}    % Improves line breaks      
\usepackage{setspace}     % Makes the document look like horse manure 
\usepackage{lipsum}       % For dummy text

\pagestyle{fancy} % Default page style 
\lhead{My name}
\chead{}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}

\thispagestyle{empty} %First page style 

\setlength\headheight{15pt} %Slight increase to header size

\begin{document}
\begin{center}
\begin{tabular}{c}
\textbf{My Name} \\
\textbf{\today}
\end{tabular}
\end{center}
\doublespacing

\lipsum[1-10]

\end{document}

Result:

enter image description here

  • horse manure :) – Habi Oct 8 '14 at 8:59
  • 1
    You may want to move the horse-manure comment to the line that says \doublespacing... (The setspace package, per se, isn't horse manure, right?) – Mico Nov 6 '14 at 23:13
  • horse manure -- best code comment line ever. – Joseph Nov 28 '18 at 0:33

protected by Community Sep 27 '14 at 9:25

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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