Take the 2-minute tour ×
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.

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
    
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Kurt Dec 19 '12 at 15:41
    
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 Answer 1

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.