Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latex Letter: From Address Left aligned

This is my first time using Latex to write a letter. I am using the letter class. When I use:

\address{100 From Address \\ City, State \\ Pin}

The from address becomes right aligned. Is there someway I can make this left aligned. The format of the letter I am looking for is: the from address left aligned, followed by the date left aligned, followed by the to address left aligned, then opening and body, and finally signature left aligned.

I managed to get the signature left aligned by using: \longindentation=0pt, the rest of the items are properly aligned - its just the from address that is right aligned.

like image 721
Aishwar Avatar asked Nov 27 '09 17:11

Aishwar


2 Answers

The answer is to use the full block letter style - everything left-aligned. In LaTeX that is the block.sty, which you will probably have to install. You can find it here http://www.ctan.org/tex-archive/macros/latex/contrib/block . Usage is quite simple:

\usepackage{block}

like image 77
I R A Darth Aggie Avatar answered Nov 02 '22 09:11

I R A Darth Aggie


\makeatletter
\def\opening#1{\ifx\@empty\fromaddress
  \thispagestyle{firstpage}%
    {\raggedleft\@date\par}%
  \else  % home address
    \thispagestyle{empty}%
    {\noindent\let\\\cr\halign{##\hfil\cr\ignorespaces
      \fromaddress \cr\noalign{\kern 2\parskip}%
      \@date\cr}\par}%
  \fi
  \vspace{2\parskip}%
  {\raggedright \toname \\ \toaddress \par}%
  \vspace{2\parskip}%
  #1\par\nobreak}
\makeatother
like image 44
Alexey Malistov Avatar answered Nov 02 '22 09:11

Alexey Malistov