Número de telefone não exibido na classe de letras

Número de telefone não exibido na classe de letras

Estou escrevendo uma carta formal usando a classe Letter. Adicionando o \telephone{}comando abaixo \address{}no exemplo encontradoaqui, o número de telefone não será adicionado.

\documentclass{letter}
\usepackage{hyperref}
\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
\telephone{123456789}
\begin{document}
    
    \begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
            \\ Newport \\ Ipswich IP3 5RT}
        \opening{Dear Sir or Madam:}
        
        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
        open manner, to ask for permission to use your copyrighted material.
        
        % 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.
        
        I look forward to your reply.
        
        \closing{Yours Faithfully,}
        
        \ps
        
        P.S. You can find the full text of GFDL license at
        \url{http://www.gnu.org/copyleft/fdl.html}.
        
        \encl{Copyright permission form}
        
    \end{letter}
\end{document}

Captura de tela

Por que o número de telefone não é exibido? E como pergunta extra, é possível adicionar meu endereço de e-mail também?

Responder1

A documentação da carta diz sobre a macro do telefone:

Apenas no caso de algum estilo colocar isso na carta.

Para adicioná-lo, você pode, por exemplo, redefinir \opening:

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

\makeatletter
\renewcommand*\opening[1]{\ifx\@empty\fromaddress
  \thispagestyle{firstpage}%
    {\raggedleft\@date\par}%
  \else  % home address
    \thispagestyle{empty}%
    {\raggedleft\begin{tabular}{l@{}}\ignorespaces
      \fromaddress\\
      Phone~\telephonenum\\*[2\parskip]%
      \@date \end{tabular}\par}%
  \fi
  \vspace{2\parskip}%
  {\raggedright \toname \expandafter\\\toaddress \par}%
  \vspace{2\parskip}%
  #1\par\nobreak}
\makeatother


\begin{document}


    
    \begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
            \\ Newport \\ Ipswich IP3 5RT}
        \opening{Dear Sir or Madam:}    
        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
        open manner, to ask for permission to use your copyrighted material.
        
        % 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.
        
        I look forward to your reply.
        
        \closing{Yours Faithfully,}
        
        \ps
        
        P.S. You can find the full text of GFDL license at
        \url{http://www.gnu.org/copyleft/fdl.html}.
        
        \encl{Copyright permission form}
        
    \end{letter}
\end{document}

insira a descrição da imagem aqui

informação relacionada