From 8187ee4afbfebfbfe258b590e16c1498e36a9587 Mon Sep 17 00:00:00 2001 From: Aaron Wolen Date: Wed, 8 Nov 2017 10:38:02 -0500 Subject: [PATCH] Add option to invert address alignment In response to #21, this allows alignment of to/from addresses to be swapped. --- template-letter.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/template-letter.tex b/template-letter.tex index e480c5a..8fe6cd1 100755 --- a/template-letter.tex +++ b/template-letter.tex @@ -242,6 +242,24 @@ \fi $endif$ +$if(invert-address)$ +\makeatletter +\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress + \thispagestyle{firstpage}% + \else % home address + \thispagestyle{empty}% + {\raggedright\begin{tabular}{l@{}}\ignorespaces + \fromaddress \\*[2\parskip]% + \end{tabular}\par}% + \fi + \vspace{2\parskip}% + {\raggedleft \toname \\ \toaddress \\*[2\parskip]% + \@date \par}% + \vspace{2\parskip}% + #1\par\nobreak} +\makeatother +$endif$ + \address{$for(return-address)$$return-address$$sep$\\$endfor$} $if(blockquote)$