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'm trying to use this exact template, but I'd like a to put a rectangular image in the top left corner ( I can give you the dimension of said rectangle if you need them). I don't know that the graphics package alone will help.

Relevant Information:

*The letter will not be greater than one page.

*The base of the inserted image must have a length as long as the black line in the document.

*The top of this image must be flush with the top of the "John Smith" in the top-right corner.


EDIT(1):

Actually, never mind the black-line criterion because the addresses will be changing, which means the black-line length will be changing too.


EDIT(2):

Here is how to insert the signature

\closing{Sincerely, \\ $\hspace{7cm}$\includegraphics{signature.png}}


EDIT(3):

I have one last question: How can I get rid of the this address with the black line under it? It looks redundant.

share|improve this question
    
How do I get rid of those dashes on the left-hand side? –  Tyquan Pesik Jun 5 '13 at 18:24
    
If the letter spans more than one page, should the image appear on every page or just in the first one? –  Gonzalo Medina Jun 5 '13 at 18:25
    
Just the first only; however, don't worry because the letter will be less than a page without doubt. –  Tyquan Pesik Jun 5 '13 at 18:25
    
I'm doing this for a club here at my university, and I need to make the letter look university-club-like, so the director of some film will consider coming to America to show the film for the first time. –  Tyquan Pesik Jun 5 '13 at 18:27
1  
Please add that new information to your question. –  Gonzalo Medina Jun 5 '13 at 18:33
show 6 more comments

2 Answers

up vote 6 down vote accepted

To add the image, you can use the fromlogo insert:

\setkomavar{fromlogo}{<contents>}

To get rid of the folding marks, replace

foldmarks=true

with

foldmarks=false

A complete example (depending on your actual image, you might need to adjust some of the lengths used):

% Original author:
% Micha Elmueller (http://micha.elmueller.net/)
\documentclass[
    pagenumber=false, % Removes page numbers from page 2 onwards
    parskip=half, % Separates paragraphs with some whitespace, use parskip=full for more space or comment out to return to default
    fromalign=right, % Aligns the from address to the right
    foldmarks=false, % If "true", prints small fold marks on the left of the page
    addrfield=true, % Set to false to hide the addressee section - you will then want to adjust the height of the body of the letter on the page by adding the following in this section: \makeatletter \@setplength{refvpos}{\useplength{toaddrvpos}} \makeatletter
fromlogo=true
    ]{scrlttr2}

\usepackage[english]{babel} % Explicitly load the babel package to stop an error occurring on some LaTeX installations

\renewcommand*{\raggedsignature}{\raggedright} % Stop the signature from indenting
\usepackage{graphicx}

%----------------------------------------------------------------------------------------
%   YOUR INFORMATION AND LETTER DATE
%----------------------------------------------------------------------------------------

\setkomavar{fromname}{John Smith} % Your name used in the from address
\setkomavar{fromaddress}{123 Broadway \\ City, State 12345} % Your address
\setkomavar{signature}{John Smith} % Your name used in the signature
\setkomavar{fromlogo}{\raisebox{-2pt}{\includegraphics[width=5.84cm,height=1.5cm]{example-image-a}}}

\date{\today} % Date of the letter

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

\begin{document}
%----------------------------------------------------------------------------------------
%   ADDRESSEE
%----------------------------------------------------------------------------------------

\begin{letter}{Director \\ Corporation \\ 123 Pleasant Lane \\ City, State 12345} % Addressee name and address

%----------------------------------------------------------------------------------------
%   LETTER CONTENT
%----------------------------------------------------------------------------------------
%\includeimage[width=5cm,height=2cm]{example-image-a}

\opening{Dear Sir or Madam,}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet tellus vel justo porta et semper libero rutrum. Duis vestibulum sagittis aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit eu dolor lobortis fringilla. Quisque imperdiet porta ante in pretium. Maecenas facilisis varius metus et blandit. Proin rhoncus arcu non ante elementum non vehicula sem varius. Morbi feugiat, elit eget tristique posuere, urna eros vestibulum nibh, at tempus neque justo nec enim.

Curabitur id est enim. Suspendisse potenti. Fusce eleifend sodales tortor, a interdum tortor sollicitudin vel. Morbi vel tellus enim, eget hendrerit ligula. Proin molestie suscipit erat, eget consectetur orci convallis at. Ut vestibulum, odio vitae blandit dignissim, dui magna auctor leo, at molestie augue magna sed nisi. Phasellus ipsum magna, fringilla id tempor id, tristique vitae mauris. Maecenas sed orci vel eros consectetur ultrices.

Mauris enim velit, feugiat at venenatis eu, scelerisque vitae mauris. Nullam accumsan facilisis mauris sagittis iaculis. Mauris condimentum dictum libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam consequat malesuada feugiat. Vestibulum tempor commodo turpis id gravida.

\closing{Sincerely,}

\setkomavar*{enclseparator}{Attached} % Change the default "encl:" to "Attached:"
\encl{Copyright permission form} % Attached documents

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

\end{letter}

\end{document}

enter image description here

To remove the from information from the "backadress" and its rule, add

backaddress=off

to the class options, as in

\documentclass[
    pagenumber=false,
    parskip=half,
    fromalign=right,
    foldmarks=false,
    addrfield=true,
    fromlogo=true,
    backaddress=off
]{scrlttr2}
share|improve this answer
    
Yes, sorry for not including the original author. I figured open source documents needn't need them (Can you even say "needn't need"?). –  Tyquan Pesik Jun 5 '13 at 18:56
    
Ahg, that's perfect. If you ever need any help with something, let me know. It's become a custom of mine to always return the favor. I mean with anything you might need help with not related to LaTeX. –  Tyquan Pesik Jun 5 '13 at 18:58
    
@TyquanPesik thanks! –  Gonzalo Medina Jun 5 '13 at 19:00
    
Wait, how would I get that raised box to move to the other side? That is, the top-right corner. –  Tyquan Pesik Jun 5 '13 at 19:12
    
@TyquanPesik I'm afraid don't understand, using \raisebox you can move the object vertically. What exactly are you trying to move to the right? –  Gonzalo Medina Jun 5 '13 at 19:13
show 8 more comments

In addition to adding the graphicx package, I added a few lines at the beginning of the letter environment.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Full Size Formal Letter
% LaTeX Template
% Version 1.2 (8/2/13)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Micha Elmueller (http://micha.elmueller.net/)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[
    pagenumber=false, % Removes page numbers from page 2 onwards
    parskip=half, % Separates paragraphs with some whitespace, use parskip=full for more space or comment out to return to default
    fromalign=right, % Aligns the from address to the right
    foldmarks=true, % Prints small fold marks on the left of the page
    addrfield=true % Set to false to hide the addressee section - you will then want to adjust the height of the body of the letter on the page by adding the following in this section: \makeatletter \@setplength{refvpos}{\useplength{toaddrvpos}} \makeatletter
    ]{scrlttr2}

\usepackage[english]{babel} % Explicitly load the babel package to stop an error occurring on some LaTeX installations
\usepackage{graphicx}

\renewcommand*{\raggedsignature}{\raggedright} % Stop the signature from indenting

%----------------------------------------------------------------------------------------
%   YOUR INFORMATION AND LETTER DATE
%----------------------------------------------------------------------------------------

\setkomavar{fromname}{John Smith} % Your name used in the from address
\setkomavar{fromaddress}{123 Broadway \\ City, State 12345} % Your address
\setkomavar{signature}{John Smith} % Your name used in the signature

\date{\today} % Date of the letter

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

\begin{document}

%----------------------------------------------------------------------------------------
%   ADDRESSEE
%----------------------------------------------------------------------------------------

\begin{letter}{%
\rlap{\smash{\shortstack{
\includegraphics[scale=.2]{example-image}% <-IMAGE GOES HERE
\\\rule{0in}{1.in}}}}%  <- VERTICAL OFFSET GOES HERE
Director \\ Corporation \\ 123 Pleasant Lane \\ City, State 12345} % Addressee name and address

%----------------------------------------------------------------------------------------
%   LETTER CONTENT
%----------------------------------------------------------------------------------------

\opening{Dear Sir or Madam,}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet tellus vel justo porta et semper libero rutrum. Duis vestibulum sagittis aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit eu dolor lobortis fringilla. Quisque imperdiet porta ante in pretium. Maecenas facilisis varius metus et blandit. Proin rhoncus arcu non ante elementum non vehicula sem varius. Morbi feugiat, elit eget tristique posuere, urna eros vestibulum nibh, at tempus neque justo nec enim.

Curabitur id est enim. Suspendisse potenti. Fusce eleifend sodales tortor, a interdum tortor sollicitudin vel. Morbi vel tellus enim, eget hendrerit ligula. Proin molestie suscipit erat, eget consectetur orci convallis at. Ut vestibulum, odio vitae blandit dignissim, dui magna auctor leo, at molestie augue magna sed nisi. Phasellus ipsum magna, fringilla id tempor id, tristique vitae mauris. Maecenas sed orci vel eros consectetur ultrices.

Mauris enim velit, feugiat at venenatis eu, scelerisque vitae mauris. Nullam accumsan facilisis mauris sagittis iaculis. Mauris condimentum dictum libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam consequat malesuada feugiat. Vestibulum tempor commodo turpis id gravida.

\closing{Sincerely,}

\setkomavar*{enclseparator}{Attached} % Change the default "encl:" to "Attached:"
\encl{Copyright permission form} % Attached documents

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

\end{letter}

\end{document}

enter image description here

share|improve this answer
    
Thank you, Mr. Segletes. –  Tyquan Pesik Jun 5 '13 at 19:46
add comment

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.