Removing an indent (when \noindent doesn’t work)

indentation

I am using a CV template that indents all text within a section (the template can be found here). I want to remove the indents, and my 'solution' has been to repeatedly type \hspace{-0.8em}. Surely there is a better way?

I have tried doing this using \noindent or \setlength\parindent{0pt}. However, neither of these seem to eliminate the indent (I'm not sure why…) Below is an example which includes \setlength\parindent{0pt} but nonetheless has an indent.

\documentclass{resume}

\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry}

\setlength\parindent{0pt}

\begin{document}

\begin{rSection}{Education}

{\bf University of Sydney} \hfill {\em 2013-2019} \\

\end{rSection}

\end{document}

Note: I recently asked this question but it was closed because it is allegedly answered here. However, the solution to that question was to use \noindent or \setlength\parindent{0pt} – and the whole point of my question is that these don't seem to work here! So I'm not sure why the question was closed… (and there doesn't seem to be any way for me to reverse this except to repost the question).

Best Answer

The environment rSection is defined by

\newenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \MakeUppercase{\bf #1} % Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section
  }
  \item[]
}{
  \end{list}
}

so the indent is wanted. By the way, the class also does

\usepackage[parfill]{parskip} % Remove paragraph indentation

so there's no point in adding again \setlength{\parindent}{0pt}.

You can redefine the environment as

\documentclass{resume}

\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry}

\renewenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \textbf{\MakeUppercase{#1}}% Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{0pt} % Margin within the section
  }
  \item[]
}{
  \end{list}
}

\begin{document}

\begin{rSection}{Education}
\textbf{University of Sydney} \hfill \emph{2013-2019}
\end{rSection}

\end{document}

Please, note that \bf and the similar two-letter font changing commands have been deprecated for almost 30 years. It's quite surprising that a class written in 2010 still uses them. I changed the code to a better one, but the rest of the class should probably be modified as well.

Related Question