[Tex/LaTex] Reproducing an official letterhead

header-footerpositioning

My university, just like many other institutions, isn't really aware of something called LaTeX. Therefore, the letterhead comes only in MS Word. The following (low quality) image is the best guide I have that describes the measurements, margins, and fonts. I will need to reproduce the letterhead (some measurements are, at best, odd).

WSU Letterhead

The University's logo is available at WSU visual identity web site as shown below

WSU logo

I know I can place the logo at the prescribed location using textpos package, but how can I add the horizontal line and the flushright text?

Best Answer

See the edit below.

Here's my first attempt at this. The code is reasonably commentated but essentially I'm using textpos for placing the logo, tikz for adding the extra horizontal line, and geometry to set the margins. The subheader is placed using textpos and \hfill. The footer is placed at the bottom of the page using \vfill. This works for one-page letters, but not for longer letters (which will hopefully be avoided anyways). A better solution might be to use fancyhdr.

\documentclass{article}

\usepackage[dvinames]{xcolor}
% Measurements are taken directly from the guide
\usepackage[top=2in,left=1.5in,bottom=0.5in,right=0.625in]{geometry}
\usepackage{graphicx}
\usepackage[colorlinks=false,
            pdfborder={0 0 0},
            ]{hyperref}
\usepackage{lipsum}
\usepackage[absolute]{textpos}
\usepackage{tikz}
\usetikzlibrary{calc}
% A nice serif font, but no the prescribed nonfree ITC stone
\usepackage[oldstylenums]{kpfonts}
\usepackage[T1]{fontenc}

% No paragraph indentation
\parindent0pt
\setlength{\parskip}{0.8\baselineskip}
\raggedright
\pagestyle{empty}
% Define WSU official colors
\definecolor{WSUcrimson}{RGB}{152,30,50}
\definecolor{WSUgray}{HTML}{5e6a71}
% Ensure consistency in the footer
\urlstyle{sf}

\begin{document}

Date
\bigskip

Prof.~Wisman\\
Department of Wisemen\\
Wise State University \\
Wisetown, Wise\ \ 12345-6789\\
USA

Dear Prof.~Wiseman:

% Write the body of the letter
\lipsum[1]

Sincerely,
\vspace{4\baselineskip}

Me Myselfovsky \\
Assistant Professor


% -------------------------------------------------------
% Add logo, the text under the crimson line, and the line itself
\begin{textblock*}{2in}[0.3066,0.39](1.5in,1.33in)
    \includegraphics[width=2in]{WSUlogo}
\end{textblock*}
\begin{textblock*}{6.375in}(1.5in,1.4in)   % 6.375=8.5 - 1.5 - 0.625
    \sffamily
    \hfill \color{WSUgray} School of Electrical Engineering and Computer Science\\
    \hfill Dr.~Me Myselfovsky, Assistant Professor
\end{textblock*}
\begin{tikzpicture}[remember picture,overlay]
    \draw[color=WSUcrimson,line width=1pt] (current page.north west)+(1.5in,-1.33in) -- ($(-0.625in,-1.33in)+(current page.north east)$);
\end{tikzpicture}

% Add the footnote. A better way would be to use fancyhdr
\vfill
{\footnotesize\color{WSUgray}\sffamily
PO Box 642752, Pullman, WA 99164-2752\\[-0.1\baselineskip]
(509) 335-6249 \textbullet\ Fax: (509) 335-3818 \textbullet\ \url{me@eecs.wsu.edu} \textbullet\ \url{http://eecs.wsu.edu/~me}
}
\end{document}

Here's the result: WSU Letterhead in LaTeX


EDIT


The following is a better way to do this. The common definitions are put in a separate file. Headers and footers are used to place the letterhead components, so there is no problem with letters that are longer than one page. \AtBeginDocument and \AtEndDocument are used to place the salutation and signature. The actual letter just needs to \input these definitions and add appropriate \renewcommands.

EDIT 2

The missing } at the end of the Common Definitions code block as been fixed.

Common Definitions:

% Define WSU official colors
\usepackage[dvinames]{xcolor}
\definecolor{WSUcrimson}{RGB}{152,30,50}
\definecolor{WSUgray}{HTML}{5e6a71}

% Measurements are taken directly from the guide
\usepackage[top=2in,left=1.5in,bottom=0.5in,right=0.625in]{geometry}
\usepackage{graphicx}
\usepackage[colorlinks=false,
            pdfborder={0 0 0},
            ]{hyperref}
\usepackage[absolute]{textpos}
\usepackage{ifthen}
\usepackage{soul}


% --- For placement of the horizontal line
\usepackage{tikz}
\usetikzlibrary{calc}

% --- A nice serif font (palatino), but not the prescribed nonfree ITC stone
\usepackage[sc,osf]{mathpazo}
\linespread{1.05}

% Remove paragraph indentation
\parindent0pt
\setlength{\parskip}{0.8\baselineskip}
\raggedright
\pagestyle{empty}
% Ensure consistency in the footer
\urlstyle{sf}

\providecommand\WSUfromname{Me Myselfovsky}
\providecommand\WSUfromtitle{Assistant Professor}
\providecommand\WSUfromdegree{Ph.D.}
\providecommand\WSUfromdept{School of Electrical Engineering and Computer Science}
\providecommand\WSUfromaddress{PO Box 642752, Pullman, WA 99164-2752}
\providecommand\WSUfromtel{(509) 335-5555}
\providecommand\WSUfromfax{(509) 335-6666}
\providecommand\WSUfromemail{\url{me@eecs.wsu.edu}}
\providecommand\WSUfromweb{\url{http://eecs.wsu.edu/~me}}
\providecommand\WSUtoname{Dr.~Wiseman}
\providecommand\WSUtoaddress{Department of Wisemen\\
                            Wise State University \\
                            Wisetown, Wise\ \ 12345-6789\\
                            USA}
\providecommand\WSUdate{\today}
\providecommand\WSUopening{Dear \WSUtoname}
\providecommand\WSUclosing{Sincerely}
% Update this and the next line to the correct path
\providecommand\WSUsignaturefile{AleeSignatureVector}
\providecommand\WSUlogofile{WSUlogo}
\providecommand\WSUenclosure{}

\usepackage{fancyhdr}
\pagestyle{fancy}

\renewcommand{\footrulewidth}{0pt}
\fancyfoot{}
\fancyfoot[L]{%
    {\footnotesize\color{WSUgray}\sffamily
    \WSUfromaddress\\[-0.1\baselineskip]
    \WSUfromtel\ \textbullet\ Fax: \WSUfromfax\ \textbullet\ \WSUfromemail\ \textbullet\ \WSUfromweb}\color{black}}

\fancyhead{}
\fancyhead[L]{%
    \begin{textblock*}{2in}[0.3066,0.39](1.5in,1.33in)
        \includegraphics[width=2in]{\WSUlogofile}
    \end{textblock*}
    \begin{textblock*}{6.375in}(1.5in,1.4in)   % 6.375=8.5 - 1.5 - 0.625
        \sffamily
        \hfill \color{WSUgray} \WSUfromdept
        \\ \hfill \WSUfromname, \WSUfromdegree
    \end{textblock*}
    \begin{tikzpicture}[remember picture,overlay]
        \draw[color=WSUcrimson,line width=0.7pt] (current page.north west)+(1.5in,-1.33in) -- ($(-0.625in,-1.33in)+(current page.north east)$);
    \end{tikzpicture}}
\renewcommand{\headrulewidth}{0pt}


\AtBeginDocument{
    % Text lines should be less than 6in long
    \newgeometry{top=2in,left=1.5in,bottom=1.2in,right=1in}

    \WSUdate
    \bigskip

    \WSUtoname\ifthenelse{\equal{\WSUtoname}{}}{}{\\}
    \WSUtoaddress
    \bigskip

    \WSUopening\par
    }

\AtEndDocument{
    \par\vspace{2ex}
    \WSUclosing,

    \ifthenelse{\equal{\WSUsignaturefile}{}}{\bigskip\bigskip}{\includegraphics[width=1.2in]{\WSUsignaturefile}\\[-0.2\baselineskip]}

    \WSUfromname \\
    \WSUfromtitle\ifthenelse{\equal{\WSUfromtitle}{}}{}{\\}
    \WSUenclosure
    }

Letter Body:

This can be as simple as the following:

\documentclass{article}

\usepackage{lipsum}
\input{WSUletterdefs}

\begin{document}
\lipsum[1-2]
\end{document}