TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
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
up vote 1 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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