3

I'm using moderncv package in LaTex to prepare my CV. I've been struggling on left indentation of subsection title. How would you push the \subsection header to the left?

As you see in the image, the [Subsection 1] is aligned along the vertical line where [Section] starts. How can I push the [Subsection 1] (blue substitle) to the left so that it's aligned with the line below [Subsection 1.1:] which starts with bullet?

enter image description here

  • In other words, is it possible to start the [Subsection 1] right below the blue line ? – Urmu1988 Mar 22 '16 at 2:28
  • A very warm welcome to TeX.SE! If you post a minimal working example (a WME) it will make it easier for other people to help answer your question. – A Feldman Mar 22 '16 at 2:36
2

You have to redefine the \subsection command.

\documentclass[sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}

\name{John}{Doe}
\title{Title}

\makeatletter
\RenewDocumentCommand{\subsection}{sm}{%
  \par\addvspace{1ex}%
  \phantomsection{}% reset the anchor for hyperrefs
  \addcontentsline{toc}{subsection}{#2}%
  \strut\subsectionstyle{#2}%
  \par\nobreak\addvspace{.5ex}\@afterheading}% to avoid a pagebreak after the heading
\makeatother

\begin{document}
\maketitle
\section{Section}
\subsection{Subsection 1}
\end{document}

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.