I am writing a letter using LaTeX's letter
template, in which I include my e-mail address and phone numbers in the \address
section. I would like to use icons from the marvosym
package instead of writing "E-mail:" etc. Further, I would prefer for the e-mail address and phone numbers to be aligned as in a table.
Here is the code I try to use in the \address
section:
\address{Kurt Han Peek \\ Piet Heinlaan 23 \\ 2341 SG Oegstgeest \\ \begin{tabbing} \Letter \= \hspace{0.5em}\= kurt.peek@gmail.com \\ \Mobilefone \> \>06-14920959 \\ \Telefon \> \> (071) 517 7081 \end{tabbing}}
However, I get the error: ! LaTeX Error: Something's wrong--perhaps a missing \item.
in TeXworks. I suspect the tabbing
environment can't be used in the \address
, because it does work in the main text. I have also tried using a tabular
environment which works, but the cells have some "padding", so the marvosym icons then are not left-aligned with the address above.
Any ideas on how to solve this would be much appreciated.
P.S. For the sake of completeness, here is the complete LaTeX code:
\documentclass{letter}
\usepackage{graphicx}
\usepackage[margin=2cm]{geometry}
\usepackage{marvosym}
\usepackage[pdfborder=0]{hyperref}
%\address{Kurt Han Peek \\ Piet Heinlaan 23 \\ 2341 SG Oegstgeest \\ \Letter~\href{mailto:kurt.peek@gmail.com}{kurt.peek@gmail.com} \\ %\Mobilefone~0614920959 \\ \Telefon~ 071 517 7081}
\address{Kurt Han Peek \\ Piet Heinlaan 23 \\ 2341 SG Oegstgeest \\ \begin{tabbing} \Letter \= \hspace{0.5em}\= kurt.peek@gmail.com \\ \Mobilefone \> \>06-14920959 \\ \Telefon \> \> (071) 517 7081 \end{tabbing}}
\date{23 februari 2012}
\begin{document}
\begin{letter}{TNO \\ t.a.v. Maaike Blikslager \\ High Tech Campus 5 \\ 5656 AE Eindhoven}
\opening{Beste ...,}
Graag wil ik solliciteren op de functie .... Het werk van de ...groep sluit goed aan bij interesses en carri\`eredoelen, ik en zou me verheugen om mijn kandidatuur persoonlijk met u te bespreken.
\begin{tabular}{r@{\hspace{1em}}l}
\Letter&\href{mailto:...@gmail.com}{...@gmail.com}\\
\Mobilefone&06 14920959\\
\Telefon&(071) 517 7081\\ \end{tabular}
\begin{tabbing}
\Letter \= \hspace{0.5em} \= kurt.peek@gmail.com \\
\Mobilefone \> \>06-14920959 \\
\Telefon \> \> (071) 517 7081
\end{tabbing}
Bedankt voor uw tijd, en ik verheug me op uw reactie.
\closing{Met vriendelijke groet, \\
%\fromsig{\includegraphics[scale=0.5]{signature_kurt.jpg}} \\
\fromname{Kurt Peek}
}
\end{letter}
\end{document}
Best Answer
You can "simulate" the
tabbing
behaviour using\hbox to <length>{...}
, the following code is self-explanatory I hope: