Page LayoutLetterhead alignment

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
peaches2165
Posts: 25
Joined: Wed Oct 22, 2008 5:03 pm

Letterhead alignment

Post by peaches2165 »

Hi

I am trying to setup letterhead. I am using Ubu10.4 and emacs23. I am trying to put the Company name with section underneath on the left hand side of the page. I am having trouble aligning the address on the right hand side across from the company name and section on the left. Here is my code

Code: Select all

\documentclass[12pt]{letter} 
\usepackage{color}
\textwidth 6.75in
\textheight 9.25in
\oddsidemargin -.25in
\evensidemargin -25in
\topmargin -1in
\parindent 0.4in
\begin{document}  



\noindent {\textcolor{red}{\Large \bf Company Name}}\\
{\sf {\LARGE Company section }} \hfill 
\noindent {\sf \textbf{Company section}\\
Company department\\
Company name\\
City, State, Zip, USA\\
Tel: \\
Fax: \\
}
\end{document} 
I will appreciate your assistance in fixing this.

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Letterhead alignment

Post by mas »

It is not quite clear to me what alignment you are looking for. But I have a couple of suggestions to achieve what you want in an easier way.

Use the package geometry to handle the paper dimensions and offsets.

Your existing code will not create a letterhead if there is more than one page in the document. Is it what you want?

If you want the information inserted for each page, use fancyhdr to handle left, right and center sections with independent alignments for both header and footer.

Take a look at the code below to get an idea:

Code: Select all

\documentclass[12pt]{letter}

\usepackage{geometry,graphicx,fancyhdr,lastpage}
\usepackage[svgnames,x11names]{xcolor}

\geometry{a4paper,
headheight=1.1in,
includeheadfoot=false,
hmargin={1in,.8in}, 
vmargin={1.7in,1.5in},
footskip=.8in,
centering
}

% Name goes here
\lhead{\sffamily %
  {\large\bfseries Ty Coon}\\ %
   \qquad{\slshape President}\\[1\baselineskip]}

% logo of the institution
\chead{%
    \includegraphics[scale=.25]{example-image-a}
}

% Dept. affiliation
\rhead{\sffamily%
  {\bfseries\large Whatever Section}\\ %
  Some Company\\ %
  State, Nation zip\\
  }

\lfoot{%
  \small Tel : 123 456 7980}
\cfoot[CO,CE]{\small  %
  \arabic{page}/\pageref{LastPage}}
\rfoot{\small  %
  Email: {\ttfamily abc@xyz.com}}

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrule}{{%
  \hrule width\headwidth height\footrulewidth \vskip5pt}}

\renewcommand{\footrulewidth}{0.1pt}

\pagestyle{fancy}

\begin{document}  
Hi,

Welcome to the wonderful world of \LaTeXe.
\end{document}

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Post Reply