# Modification of a given letter

In this letter from Wikibooks,

\documentclass{letter}
\usepackage{hyperref}
\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
\begin{document}

\begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
\\ Newport \\ Ipswich IP3 5RT}

I am writing to you on behalf of the Wikipedia project (http://www.wikipedia.org/),
an endeavour to build a fully-fledged multilingual encyclopaedia in an entirely

% The \ldots command produces dots in a way that will not upset
% the typesetting of the document.
\ldots

That said, allow me to reiterate that your material will be used to the noble end of
providing a free collection of knowledge for everyone; naturally enough, only if you
agree. If that is the case, could you kindly fill in the attached form and post it
back to me? We shall greatly appreciate it.

Thank you for your time and consideration.

\closing{Yours Faithfully,}

\ps{P.S. You can find the full text of GFDL license at
\url{http://www.gnu.org/copyleft/fdl.html}.}

\end{letter}

\end{document}


I would like to make the following changes but I don't know how,

1. The address and date I would like to be right-aligned , I tried \begin{flushright} \end{flushright} but it didn't work. Similarly for left-aligned for the signature and the \closing{Yours Faithfully,}.

2. Change the margin distances.

3. Add "University of Smallville" at the top centre (at the beginning) of the document.

Thanks

-

One possibility, using the geometry package to change the page layout (the margins in this case), and the xpatch package to patch the \opening command; setting \longindentation to 0pt you can get the closing part to be left aligned:

\documentclass{letter}
\usepackage{xpatch}
\usepackage[lmargin=3cm,rmargin=3.5cm,tmargin=4.5cm,bmargin=4cm]{geometry}
\usepackage{hyperref}

\setlength\longindentation{0pt}

\xpatchcmd{\opening}{l@}{r@}{}{}

\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}

\begin{document}

\begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
\\ Newport \\ Ipswich IP3 5RT}

I am writing to you on behalf of the Wikipedia project (http://www.wikipedia.org/),
an endeavour to build a fully-fledged multilingual encyclopaedia in an entirely

% The \ldots command produces dots in a way that will not upset
% the typesetting of the document.
\ldots

That said, allow me to reiterate that your material will be used to the noble end of
providing a free collection of knowledge for everyone; naturally enough, only if you
agree. If that is the case, could you kindly fill in the attached form and post it
back to me? We shall greatly appreciate it.

Thank you for your time and consideration.

\closing{Yours Faithfully,}

\ps{P.S. You can find the full text of GFDL license at
\url{http://www.gnu.org/copyleft/fdl.html}.}
