[Tex/LaTex] Indentation of the signature in the letter class

indentationletters

I am writing a letter with the wikibooks template. The letter is going to be printed on a official paper which contains the address already. So I thought I can omit the \address command. For some strange reason the signature will not indent as shown on the webpage. I tried the \longindentation=20pt command, no matter what numbers I change, the closing and the signature are all aligned to the left margin of the body and will not indent. I was able to get it work by the command \address{\phantom{a}}, but that should not be how it is supposed to work (yes, I did try \address{}, but that doesn't work). Any better solutions?

What is wrong with omitting the \address command anyway?

Edit: Here is the what I am doing.

----------------------------------------------------------------------------------
\documentclass[11pt]{letter}

\signature{James Bond}
%\address{\phantom{i}}
%\longindentation=0pt
\begin{document}
\begin{letter}{}

\opening{To whom it may concern:}

The body of the letter goes on here. 

\closing{Yours sincerely,}

\end{letter}

\end{document}
------------------------------------------------------------------------------

As it stands now, without the address command, the closing and signature will not indent. However, if we uncomment the \address command, then they indents as shown in the Wikibook LaTeX example.

Best Answer

The reason for the apparent "conditional indentation" stems from the source code for \closing:

\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
  \stopbreaks
  \noindent
  \ifx\@empty\fromaddress\else
  \hspace*{\longindentation}\fi
  \parbox{\indentedwidth}{\raggedright
       \ignorespaces #1\\[6\medskipamount]%
       \ifx\@empty\fromsig
           \fromname
       \else \fromsig \fi\strut}%
   \par}

The indent of \longindentation is only executed if \fromaddress is non-empty. And, \fromaddress is defined when using \address:

\newcommand*{\address}[1]{\def\fromaddress{#1}}

So, in order for the indentation to work properly (for whatever reason), you need something in \fromaddress. Using \def\fromaddress{\null} works just as well.