Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Letters, date alignment and position.

1,965 views
Skip to first unread message

Justin C

unread,
Jun 21, 2012, 7:42:45 AM6/21/12
to

I'm trying to use LaTeX for a mail-merge project. I
found a great example (I've lost the link where), but
I've included the code at the bottom of this post.
What I want to do is have the date left aligned.
Ideally I'd also like it to appear after the
destination address.

I've tried \left{date{\today}} but that produces an
error, the date isn't in a table column (which I
think is the purpose of \left).

Leslie Lamport's book doesn't help here either.

Any suggestions how I can do this?

Thank you for any suggestions.


% The letter
\documentclass[a4paper,11pt]{letter}

\oddsidemargin=.2in
\evensidemargin=.2in
\textwidth=5.9in
\topmargin=-1in
\textheight=9in

\signature{\textbf{Justin C. \\ By The Sea.}}

\date{\today}

\begin{document}

\def \body
{
Here be the words I want in the letter.
}

\begin{letter}{Mr Paul McCartney \\
Narrow Lane \\
Peasemarsh \\
East Sussex \\
TN99 9ZZ}
\opening{Dear Paul,} \body
\closing{Yours sincerely,}
\end{letter}

\begin{letter}{Mr Ringo Starr \\
14 Middle Road \\
Great Waterton \\
Sodor}
\opening{Dear Mr Starr,} \body
\closing{Yours sincerely,}
\end{letter}

\end{document}



Justin.

--
Justin C, by the sea.

swiny

unread,
Jun 21, 2012, 9:38:39 AM6/21/12
to
> I'm trying to use LaTeX for a mail-merge project.

> What I want to do is have the date left aligned.
> Ideally I'd also like it to appear after the
> destination address.

\documentclass[11pt,
refline=dateleft,% set date left
backaddress=false,% not return address
foldmarks=false% no folding marks
]{scrlttr2}

\usepackage[english]{babel}
\usepackage{lipsum}

% Change some placements:
\makeatletter
\@setplength{toaddrhpos}{\dimexpr\oddsidemargin+1in\relax}
\@setplength{firstheadwidth}{\textwidth}
\makeatother

% If you want senders address at the head, try:
%\setkomavar{fromname}{Justin C.}
%\setkomavar{fromaddress}{Somewhere\\There}

\setkomavar{signature}{Justin C.\\By The Sea.}

\def\raggedsignature{\raggedright}% align closing and signature left

\begin{document}
\begin{letter}{Mr Paul McCartney \\
Narrow Lane \\
Peasemarsh \\
East Sussex \\
TN99 9ZZ}
\opening{Dear Paul,}
\lipsum[1]
\closing{Yours sincerely,}
\end{letter}

\begin{letter}{Mr Ringo Starr \\
14 Middle Road \\
Great Waterton \\
Sodor}
\opening{Dear Mr Starr,}
\lipsum[2]
\closing{Yours sincerely,}
\end{letter}

\end{document}

see <http://mirror.ctan.org/macros/latex/contrib/koma-
script/doc/scrguien.pdf>, chapters 4 and 17 for more information about
usage and configuration of scrlttr2.

Dan Luecking

unread,
Jun 21, 2012, 10:01:14 AM6/21/12
to
On Thu, 21 Jun 2012 12:42:45 +0100, Justin C
<justi...@purestblue.com> wrote:

>
>I'm trying to use LaTeX for a mail-merge project. I
>found a great example (I've lost the link where), but
>I've included the code at the bottom of this post.
>What I want to do is have the date left aligned.
>Ideally I'd also like it to appear after the
>destination address.
>
>I've tried \left{date{\today}} but that produces an
>error, the date isn't in a table column (which I
>think is the purpose of \left).

\left is a math command. It's used like
$$
\left( \frac{A}{B} \right)
$$
which instructs LaTeX to produce parentheses large enough
to match the size of the contents.

\shoveleft is a command defined in amsmath to force an
equation in a multlines environment to be be aligned
with the left edge.

>
>Leslie Lamport's book doesn't help here either.
>
>Any suggestions how I can do this?

I'm afraid one needs to redefine aspects of the letter
document class, or use a more configurable class for
letters. Some possibilities are newlfm and scrlettr.

If you wish to stick with letter.cls, you'd need changes
to the \opening command. Here is a possibility (untested)
in which I've copied the original definition from
letter.cls and made some minor changes. I've commented
my changes to the original:

\makeatletter
% Since we're changing the definition, use
% \renewcommand instead of the \newcommand:
\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
\thispagestyle{firstpage}%
% The following line would put the date at the right.
% I change that, but also move it to a later position:
% {\raggedleft\@date\par}%
\else % home address
\thispagestyle{empty}%
{\raggedleft\begin{tabular}{l@{}}\ignorespaces
\fromaddress \\*[2\parskip]%
\@date \end{tabular}\par}%
\fi
\vspace{2\parskip}%
{\raggedright \toname \\ \toaddress \par}%
% Move the date to this point (after the \toaddress above).
% You can optionally insert some vertical space above or
% below it:
{\raggedright\@date\par}%
\vspace{2\parskip}%
#1\par\nobreak}
\makeatother

Put all that just after the \documentclass{letter} line.
Let me know if it doesn't work and I'll try to do a
proper job.


Dan
To reply by email, change LookInSig to luecking

Phillip Helbig---undress to reply

unread,
Jun 21, 2012, 1:06:48 PM6/21/12
to
In article <ludbb9-...@zem.masonsmusic.co.uk>, Justin C
<justi...@purestblue.com> writes:

> I'm trying to use LaTeX for a mail-merge project. I
> found a great example (I've lost the link where), but
> I've included the code at the bottom of this post.
> What I want to do is have the date left aligned.
> Ideally I'd also like it to appear after the
> destination address.

You might want to try gletter. This is for a German letter, formatted
according to DIN (Deutsche Industrie Norm, a standards organization).
One aspect of this is that everything is left-aligned.

I particularly like the backaddress feature, which provides the return
address in small font above the recipient's address so that it appears
in the window of an envelope which accepts a third-folded A4 sheet of
paper.

% %%%%%%%%%%%%%%%%%%% RUM-Aenderungen vom 12.6.89 (Gr) %%%%%%%%%%%%%%%%%%%%%
% %% %%
% %% 1) 'Letter'-Style des Herrn D. Heinrich in %%
% %% 'Letterg' umbenannt. %%
% %% 2) entsprechende '\typeout{..}'-Meldungen ausgeschaltet. %%
% %% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
% This is LETTER.STY in text format, as of April, 14, 1988,
% by D. Heinrich (TH Karlsruhe).
%
% Last modified May, 04, 1988.
%
% According to the german DIN.
% It gives the possibility to add a backaddress to the information
% given in the window and to include a huge address (sender).
% \windowrules and \nowindowrules are possible.
% It's also possible to adapt captions to other languages.
%
% It is based on A4LETTER.STY in text format, as of June 16, 1987.
% letter.sty 17-Jan-86 with modifications
% for DIN-A4 paper + window envelopes, by H.Partl (Wien)
%

% \typeout{} |
% \typeout{Document Style `letter'.} |
% \typeout{Modified at University of Karlsruhe - 04. May 1988.} |
% \typeout{} | RUM-Aenderung 12.6.89
% \typeout{If you really want to use Lamport's original letter format,}|
% \typeout{please use the style `aletter'.} |
% \typeout{} |

{\catcode`\_=12 \gdef\jobname@aux{\jobname.aux}} % .aux or _aux or ...

\def\@ptsize{0}
\@namedef{ds@10pt}{\def\@ptsize{0}}
\@namedef{ds@11pt}{\def\@ptsize{1}}
\@namedef{ds@12pt}{\def\@ptsize{2}}
\@twosidefalse
\def\ds@draft{\overfullrule 5pt}

\@options

\lineskip 1pt \normallineskip 1pt
\def\baselinestretch{1}

\ifcase \@ptsize\relax
\def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt
\belowdisplayshortskip 6pt plus3pt minus3pt}
\def\small{\@setsize\small{11pt}\ixpt\@ixpt
\abovedisplayskip 8.5pt plus 3pt minus 4pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2pt
\belowdisplayshortskip 4pt plus2pt minus 2pt}
\def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
\abovedisplayskip 6pt plus 2pt minus 4pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus 1pt
\belowdisplayshortskip 3pt plus 1pt minus 2pt}
\def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
\def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
\or
\def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
\abovedisplayskip 11pt plus3pt minus6pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt
\belowdisplayshortskip 6.5pt plus3.5pt minus3pt}
\def\small{\@setsize\small{12pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt
\belowdisplayshortskip 6pt plus3pt minus3pt}
\def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
\abovedisplayskip 8pt plus 2pt minus 4pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus 1pt
\belowdisplayshortskip 4pt plus 2pt minus 2pt}
\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
\or
\def\@normalsize{\@setsize\normalsize{15pt}\xiipt\@xiipt
\abovedisplayskip 12pt plus3pt minus7pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt
\belowdisplayshortskip 6.5pt plus3.5pt minus3pt}
\def\small{\@setsize\small{13.6pt}\xipt\@xipt
\abovedisplayskip 11pt plus3pt minus6pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt
\belowdisplayshortskip 6.5pt plus3.5pt minus3pt}
\def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt
\belowdisplayshortskip 6pt plus3pt minus3pt}
\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
\def\large{\@setsize\large{18pt}\xivpt\@xivpt}
\def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
\def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
\def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}
\let\Huge=\huge
\fi

\normalsize

% \oddsidemargin 53pt \evensidemargin 53pt
% \marginparwidth 90pt \marginparsep 11pt
% \marginparpush 5pt \topmargin 27pt
% \headheight 12pt \headsep 45pt
% \footheight 12pt \footskip 25pt
% \textheight 505pt \textwidth 365pt
% \columnsep 10pt \columnseprule 0pt
% The above values (letter.sty) are replaced by the following values:

\oddsidemargin 0in
\evensidemargin 0in
\marginparwidth .08in
\marginparsep .01in
\marginparpush 5pt
\topmargin -35pt
\headheight 12pt
\headsep 25pt
\footheight 12pt
\footskip 25pt
\textheight 8.9in
\textwidth 6.5in
\columnsep 10pt
\columnseprule 0pt
% (Note that these new values use all of the paper, like in Plain TeX,
% but disable the writing of marginpar's.

\raggedbottom

\footnotesep 12pt
\skip\footins 10pt plus 2pt minus 4pt

\floatsep 12pt plus 2pt minus 2pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 12pt plus 2pt minus 2pt
\dblfloatsep 12pt plus 2pt minus 2pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@maxsep 20pt
\@dblmaxsep 20pt
\@fptop 0pt plus 1fil
\@fpsep 8pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 8pt plus 2fil
\@dblfpbot 0pt plus 1fil

% window for toaddress
\def\@windowrules#1{\gdef\@@windowrules{#1}}
\def\windowrules{\@windowrules{yes}}
\def\nowindowrules{\@windowrules{}}
\windowrules

\def\backaddress#1{\gdef\@backaddress{#1}}
\backaddress{}

% \opening is quite different from the original one:
\def\opening#1{\thispagestyle{empty}
\vspace*{-2cm} % upper edge of window <----
\ifx\@empty\fromaddress \else
\setbox0=\vbox{\raggedright \fromaddress \par \bigskip}
\vbox{\raggedright \fromaddress \par \bigskip}
\vspace{-\ht0}
\vspace{-\dp0}
\vspace{2.25cm}
\ifx\@empty\@@windowrules \hrule width 0pt
\else \hrule width 8cm
\fi
\ifx\@empty\@backaddress \else
\vspace{.75cm}
\setbox1=\vbox{
\hbox to 8cm{\hss{\scriptsize \@backaddress}\hss}}
\vbox{
\hbox to 8cm{\hss{\scriptsize \@backaddress}\hss}
\hrule width 8cm}
\vspace{-\ht1}
\vspace{-\dp1}
\hrule width 0pt
\fi
\fi
\ifx\@empty\@backaddress \vspace{5cm} \else % height of window <----
\vspace{4.25cm} % height of window <----
\fi
\vbox to 0pt{\vss \raggedright \toname \\ \toaddress \par
\vspace{.75cm}} % vorher .25cm + \bigskip
\ifx\@empty\fromaddress \else
\ifx\@empty\@@windowrules \hrule width 0pt
\else \hrule width 8cm
\fi
\vspace{0.85cm}% vorher 1.4cm
\hspace*{-2cm}\vbox{\hrule width .3cm}\par
\fi
\vspace{1cm}
{\raggedleft \@place\space\@date \par}
\medskip
\vspace{0pt plus 1cm} % to help with page break
#1\par\nobreak}

\long\def\closing#1{\par\nobreak\vspace{\parskip}
\stopbreaks
{\raggedright
\ignorespaces #1\\[6\parskip]
\ifx\@empty\fromsig
\fromname
\else \fromsig \fi\strut}
\par\bigskip}

%\def\ps{\par\startbreaks}
\def\ps#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\rm P.S.: }%
\ignorespaces #1\strut}\par}
\def\cc#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\rm \ccname: }% <-----
\ignorespaces #1\strut}\par}
\def\ccname{cc} % <-----
\def\encl#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\rm \enclname: }% <-----
\ignorespaces #1\strut}\par}
\def\enclname{encl} % <-----
\def\stopletter{}

\def\returnaddress{}
\newcount\labelcount
\def\place#1{\gdef\@place{#1,}}
\def\@place{}
\def\date#1{\gdef\@date{#1}}
\def\@date{\today}

\def\startlabels{
\labelcount=0 \baselineskip=0pt \lineskip=0pt
\pagestyle{empty}
\let\@texttop=\relax
\topmargin -50pt
\headsep 0pt
\oddsidemargin -35pt
\evensidemargin -35pt
\textheight 10in
\@colht\textheight \@colroom\textheight \vsize\textheight
\textwidth 550pt
\columnsep 25pt
\xpt
\baselineskip=0pt
\lineskip=0pt
\boxmaxdepth=0pt
\twocolumn\relax}
\def\mlabel#1#2{\setbox0\vbox{\parbox[b]{3.6in}{%
\strut\ignorespaces #2}}
\vbox to 2in{\vss \box0 \vss}}



\long\def\letter#1{\clearpage
\c@page\@ne
\interlinepenalty=200 \@processto{#1}}
\def\endletter{\stopletter\@@par\pagebreak\@@par
\if@filesw
\begingroup
\def\protect{\string}
\let\\=\relax
\def\protect##1{\string##1\space}
\immediate\write\@auxout{\string\mlabel{\returnaddress}{\toname
\\\toaddress}}
\endgroup
\fi}
\long\def\@processto#1{\@xproc #1\\@@@\ifx\toaddress\@empty
\else \@yproc #1@@@\fi}
\long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
\long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
\def\stopbreaks{\interlinepenalty \@M
\def\par{\@@par\nobreak}\let\\=\@nobreakcr
\let\vspace\@nobreakvspace}
\def\@nobreakvspace{\@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}
\def\@nobreakvspacex#1{\ifvmode\nobreak\vskip #1\relax\else
\@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}
\def\@nobreakcr{\vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}}
\def\startbreaks{\let\\=\@normalcr
\interlinepenalty 200\def\par{\@@par\penalty 200}}

\def\name#1{\def\fromname{#1}}
\def\fromname{}
\def\signature#1{\def\fromsig{#1}}
\def\fromsig{}
\long\def\address#1{\def\fromaddress{#1}}
\def\fromaddress{}
\def\location#1{\def\fromlocation{#1}}
\def\fromlocation{}
\def\telephone#1{\def\telephonenum{#1}}
\def\telephonenum{}

\def\document{\endgroup
\@colht\textheight \@colroom\textheight \vsize\textheight
\columnwidth\textwidth \@clubpenalty\clubpenalty
\if@twocolumn \advance\columnwidth -\columnsep
\divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
\fi
\hsize\columnwidth \linewidth\hsize
\begingroup\@floatplacement\@dblfloatplacement\endgroup
\if@filesw \immediate\openout\@mainaux=\jobname@aux
\immediate\write\@mainaux{\string\startlabels\string\@startlabels}\fi
\def\do##1{\let ##1\@notprerr}
\@preamblecmds
\let\do\noexpand
\@normalsize\everypar{}}
\def\enddocument{\@checkend{document}\newpage\begingroup
\if@filesw \immediate\closeout\@mainaux
\makeatletter\input \jobname@aux\clearpage
\fi\endgroup\deadcycles\z@\@@end}

\def\makelabels{\@fileswtrue}
\def\@startlabels{}



% \def\@texttop{\ifnum\c@page=1\vskip 0pt plus .00006fil\relax\fi}
\let\@texttop=\relax

\def\ps@headings{
\def\@oddhead{\sl \headtoname\ \ignorespaces\toname \hfil \today % <--
\hfil Seite \thepage}\def\@oddfoot{}}
\def\headtoname{To} % <-----
\def\ps@empty{
\def\@oddhead{}\def\@oddfoot{}\def\@evenhead{}\def\@evenfoot{}}

\def\ps@firstpage{\def\@oddhead{}\def\@oddfoot{\raisebox
{-45pt}[0pt]{\hbox to \textwidth
{\hspace*{100pt}\xpt\fromlocation \hfill
\telephonenum}}\hss}\def\@evenhead{}\def\@evenfoot{}}

\def\ps@plain{
\def\@oddhead{}\def\@oddfoot{\rm\hfil\thepage
\hfil}\def\@evenhead{}\let\@evenfoot\@oddfoot}

\parskip .7em
\parindent 0pt
\topsep .4em
\partopsep 0pt
\itemsep .4em

\@lowpenalty 51 \@medpenalty 151 \@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty



\leftmargini 2.5em
\leftmarginii 2.2em
\leftmarginiii 1.87em
\leftmarginiv 1.7em
\leftmarginv 1em
\leftmarginvi 1em
\leftmargin\leftmargini
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\labelsep 5pt
\parsep 0pt

\let\@listi\relax
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep .2em
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi\advance\labelwidth-\labelsep}

\def\labelenumi{\arabic{enumi}.}
\def\theenumi{\arabic{enumi}}
\def\labelenumii{(\alph{enumii})}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}
\def\labelenumiii{\roman{enumiii}.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}
\def\labelenumiv{\Alph{enumiv}.}
\def\theenumiv{\Alph{enumiv}}
\def\p@enumiv{\p@enumiii\theenumiii}

\def\labelitemi{$\bullet$}
\def\labelitemii{\bf --}
\def\labelitemiii{$\ast$}
\def\labelitemiv{$\cdot$}

\def\verse{\let\\=\@centercr
\list{}{\itemsep\z@ \itemindent -15pt\listparindent \itemindent
\rightmargin\leftmargin\advance\leftmargin 15pt}\item[]}
\let\endverse\endlist
\def\quotation{\list{}{\listparindent 1.5em
\itemindent\listparindent
\rightmargin\leftmargin}\item[]}
\let\endquotation=\endlist
\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

\def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
\let\makelabel\descriptionlabel}}
\let\enddescription\endlist


\def\theequation{\arabic{equation}}

\arraycolsep 5pt
\tabcolsep 6pt
\arrayrulewidth .4pt
\doublerulesep 2pt
\tabbingsep \labelsep
\skip\@mpfootins = \skip\footins
\fboxsep = 3pt \fboxrule = .4pt

\def\footnoterule{\kern-1\p@
\hrule width .4\columnwidth
\kern .6\p@}

\long\def\@makefntext#1{\noindent \hangindent 5pt\hbox
to 5pt{\hss $^{\@thefnmark}$}#1}


\c@topnumber=2
\def\topfraction{.7}
\c@bottomnumber=1
\def\bottomfraction{.3}
\c@totalnumber=3
\def\textfraction{.2}
\def\floatpagefraction{.5}
\c@dbltopnumber= 2
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}

\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}


\smallskipamount=.5\parskip
\medskipamount=\parskip
\bigskipamount=2\parskip

\ps@plain
\pagenumbering{arabic}
\onecolumn
\@fileswfalse

Justin C

unread,
Jun 25, 2012, 7:49:40 AM6/25/12
to
On 2012-06-21, Dan Luecking <Look...@uark.edu> wrote:
> On Thu, 21 Jun 2012 12:42:45 +0100, Justin C
> <justi...@purestblue.com> wrote:
>
>>
>>I'm trying to use LaTeX for a mail-merge project. I
>>found a great example (I've lost the link where), but
>>I've included the code at the bottom of this post.
>>What I want to do is have the date left aligned.
>>Ideally I'd also like it to appear after the
>>destination address.
>>
>>
>>Leslie Lamport's book doesn't help here either.
>>
>>Any suggestions how I can do this?
>
> I'm afraid one needs to redefine aspects of the letter
> document class, or use a more configurable class for
> letters. Some possibilities are newlfm and scrlettr.

Thank you, Dan. I took a look at scrletter2, and the
Koma package in general. I really must spend some
time with the documentation for that, it looks so
useful. I also looked at newlfm, and spent a lot of
time on both of those but wasn't getting any where.

The code I had was working perfectly well, I just
needed to move and change alignment of the the date,
so...
This worked spectacularly, straight away. I really
wish I'd tried it first instead of trying the other
sugestions. The reason I didn't try it straight away
was that I was put off by your saying about
re-defining parts of 'letter' and that sounded
complex and I didn't want to dig a nast hole for
myself... but I was wrong.

Thank you so much for the very simple solution. I
shall read through the documentation and get my head
around the commands there.

Thanks also to Swiny and Phillip. I did try with each
of these (probably not hard enough) but the merging
of my data didn't seem as easy as what I already had
(especially as I'd already formatted it for the
orignal code).

Anyway, thank you all. Problem solved, that's three
hundred personalised letters elegantly prepared.
0 new messages