# noindent fail in resume mode

I'm writing a resume and want to add a line under each section name:

\documentclass[line]{res}

\begin{document}
\renewcommand{\namefont}{\LARGE \bf}

\name{Tianlun Zhang}

\begin{resume}

\section{OBJECTIVE}
{\rule[3pt]{\textwidth}{1pt}}} \\
...
\end{resume}
\end{document}


But the line has a indentation which I can't suppress with \noindent, any ideas?

-

You need to compensate for the length \sectionwidth:

\documentclass[line]{res}

\renewcommand{\namefont}{\LARGE\bfseries}
\newcommand\Hrule{%
\par\hspace*{-\sectionwidth}\rule[3pt]{\dimexpr\textwidth+\sectionwidth\relax}{1pt}\par
}

\begin{document}

\name{Tianlun Zhang}

\begin{resume}
\section{OBJECTIVE}
\Hrule
\section{ANOTHER SECTION}
\Hrule
\end{resume}

\end{document}


According to res.cls, \address can be used only twice, so the third time you use it overrides the second call; to have more than two lines in the address, you can use a \parbox of the proper width as I did in my example.

By the way, \bf should be replaced with \bfseries in modern LaTeX documents.

-
Out of curiosity, why \bf has been replaced with \bfseries – manuzhang Sep 16 '12 at 1:39
@manuzhang One reason is that \bf and all the other two letter commands (\it, \sc) internally use \normalfont, so. for example, combinations such as {\it\bf text} won't produce italicized boldface but just boldface; the new declarative commands \bfseries, \itshape, etc. (or their counterparts with arguments \textbf, \textit, etc.) will produce the desired result in combinations: {\bfseries\itshape text}. – Gonzalo Medina Sep 16 '12 at 1:54
any ideas why only two of the three addresses get displayed? – manuzhang Sep 16 '12 at 3:28
@manuzhang according to res.cls, \address can be used only twice, so the third time you use it overrides the second call; let me think of a possible solution. – Gonzalo Medina Sep 16 '12 at 4:23
@manuzhang I updated my answer with a solution allowing more than two lines in the address. – Gonzalo Medina Sep 16 '12 at 5:20