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 would like to add a logo to the top right of the document in line with the centered address on the top. I found Put an image header in \documentclass{letter} but this adds a line and separates itself from my centered top address. Here is a MWE:

\documentclass[11pt]{letter}

\usepackage{helvet}

% Margins
\topmargin=-1in 
\textheight=8.5in 
\oddsidemargin=-10pt 
\textwidth=6.5in 

\let\raggedleft\raggedright 

\begin{document}

\begin{letter}{mr. so and so \\ 123 main st \\ blah blah, IL 60617}

\begin{center}
\large{\bf Cowbell Place} \\ 
PO Box 5551212 \\ Chicago, IL 60617
\end{center} 
\vfill

\signature{some dude}

\opening{mr. so and so,}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pretium pharetra orci, at commodo turpis pharetra nec. Ut pretium odio quis metus euismod, ut vestibulum tellus ullamcorper. Donec quis egestas velit. Praesent quis eros enim. Nunc malesuada mi sagittis, ornare nisi id, aliquet dui. Sed tempus egestas libero, ac mollis turpis vulputate ac. In rutrum nec turpis eu mattis. In sagittis aliquet diam, eu ultricies enim posuere nec. Vestibulum in turpis quis nunc condimentum rhoncus vel et nulla. Quisque est eros, mollis vitae ornare sit amet, interdum nec diam. Mauris eget cursus justo. Nam ipsum sem, ornare eget justo eu, commodo rutrum quam.

Sed id velit volutpat, viverra urna ac, placerat dolor. Vestibulum aliquam euismod mollis. Pellentesque commodo leo non augue dignissim hendrerit. Maecenas convallis eleifend augue quis egestas. Curabitur dictum ante vitae mi porta consectetur non et sapien. Pellentesque sit amet sollicitudin arcu. Duis in pharetra dolor. Aliquam tincidunt quam at interdum scelerisque. Fusce bibendum lobortis quam id consectetur.

Etiam placerat tempus diam. Ut a nisl pharetra, accumsan velit ut, pretium tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris volutpat nulla nec tempus vestibulum. Donec quis aliquet sapien. Nullam aliquam magna odio, vel faucibus leo congue ac. Morbi tincidunt lacinia ipsum. Vivamus elit arcu, tempus eget purus dapibus, iaculis iaculis eros. Etiam viverra erat eu libero tincidunt fermentum. Cras at mi semper, venenatis neque vel, porttitor nibh.

\closing{Sincerely,}


\encl{Form A, Form B, blah blah}

%----------------------------------------------------------------------------------------

\end{letter}

\end{document}

I'd like it to go here:

example of logo placement and alignment

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Here's a way: you can make the header in a box, where you can play with alignment. The main trick is to set the logo flush right without influencing the centering of the main header, which is done by setting the logo in a zero width box.

The \raisebox is to align the logo vertically.

Rather than setting parameters by hand, it's better to use geometry; also \bf should not be used; note also that \large is not a command with an argument, but a declaration similar to (the deprecated) \bf.

\documentclass[11pt]{letter}
\usepackage{geometry}
\geometry{
  textwidth=6.5in,
  textheight=8.5in,
}
\usepackage{graphicx}

\begin{document}

\begin{letter}{mr. so and so \\ 123 main st \\ blah blah, IL 60617}

\makebox[\linewidth]{\hfill
  \begin{tabular}{c}
  \large\bfseries Cowbell Place \\ 
  PO Box 5551212 \\ Chicago, IL 60617
  \end{tabular}\hfill
  \makebox[0pt][r]{\raisebox{-.5\height}{\includegraphics[height=3cm]{duck}}}%
}
\vfill

\signature{some dude}

\opening{mr. so and so,}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pretium pharetra orci, at commodo turpis pharetra nec. Ut pretium odio quis metus euismod, ut vestibulum tellus ullamcorper. Donec quis egestas velit. Praesent quis eros enim. Nunc malesuada mi sagittis, ornare nisi id, aliquet dui. Sed tempus egestas libero, ac mollis turpis vulputate ac. In rutrum nec turpis eu mattis. In sagittis aliquet diam, eu ultricies enim posuere nec. Vestibulum in turpis quis nunc condimentum rhoncus vel et nulla. Quisque est eros, mollis vitae ornare sit amet, interdum nec diam. Mauris eget cursus justo. Nam ipsum sem, ornare eget justo eu, commodo rutrum quam.

Sed id velit volutpat, viverra urna ac, placerat dolor. Vestibulum aliquam euismod mollis. Pellentesque commodo leo non augue dignissim hendrerit. Maecenas convallis eleifend augue quis egestas. Curabitur dictum ante vitae mi porta consectetur non et sapien. Pellentesque sit amet sollicitudin arcu. Duis in pharetra dolor. Aliquam tincidunt quam at interdum scelerisque. Fusce bibendum lobortis quam id consectetur.

Etiam placerat tempus diam. Ut a nisl pharetra, accumsan velit ut, pretium tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris volutpat nulla nec tempus vestibulum. Donec quis aliquet sapien. Nullam aliquam magna odio, vel faucibus leo congue ac. Morbi tincidunt lacinia ipsum. Vivamus elit arcu, tempus eget purus dapibus, iaculis iaculis eros. Etiam viverra erat eu libero tincidunt fermentum. Cras at mi semper, venenatis neque vel, porttitor nibh.

\closing{Sincerely,}


\encl{Form A, Form B, blah blah}

%----------------------------------------------------------------------------------------

\end{letter}

\end{document}

enter image description here

share|improve this answer
    
And where is the duck? :-) –  Kurt Aug 20 '13 at 21:09
    
Yay! Quack! :) –  Paulo Cereda Aug 21 '13 at 0:39

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.