3

I am using a .cls template to generate a letterhead for my resume, by the following snippet:

\def\namefont{\huge\bf}
\def\@linename{\begingroup
  \def\\{, }
  {\namefont\@name}
  \vskip 2pt
  \fullline
  \vskip 2pt
  % where do you live?
  \@ifundefined{@addressone}{%
    % do nothing
  }{%
    \leavevmode\hbox to \textwidth
      {\hfill\vbox{\hbox{\@addressone}
           \hbox{\@addresstwo}
          }%
      }\par
  }
\endgroup}

I need to recreate this for a different document, and I have done so like this:

\begin{flushleft}
  \huge\bfseries Name
\setlength{\parindent}{0pt}
\end{flushleft}
\medskip\hrule height 0.5pt
\begin{flushright}
  address1 \\
  address2 
\end{flushright} 

In the second version, there is a space between the huge name and the vertical line which I'd like to remove. Also the vertical line is black and not grey... How can I match the first version?

Note: This is only my second project in LaTeX.

  • Regarding the vertical space, you should remove \medskip. If that doesn't please you, add a negative space manually with \vskip-10pt, for example. – Mafra Dec 19 '12 at 18:44
1

Simply remove the \medskip to get rid of the extra vertical space. For the color, use the package xcolor.

\documentclass{article}
\usepackage{xcolor}
\begin{document}

\begin{flushleft}
  \huge\bfseries Name
\setlength{\parindent}{0pt}
\end{flushleft}
{\color{gray}\hrule height 0.5pt}
\begin{flushright}
  address1 \\
  address2
\end{flushright}

\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.