1

I want to mark the CV in which the sections are in capitals (sc shape and underlined. While overleave generates the correct output errors are reported. How to resolve this issue?

\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[pdftitle={CV},pdfauthor={Fnu Snu}, pdfsubject={CV},pdfcreator={Overleaf},colorlinks=false,allbordercolors=cyan]{hyperref}
\usepackage[english]{babel}
\usepackage{titlesec}
\usepackage{csquotes}
\usepackage{multirow}
\usepackage[super]{nth}
\usepackage[backend=biber,sorting=ydnt,style=apa,isbn=false,maxbibnames=99]{biblatex}
\DeclareLanguageMapping{english}{english-apa}
    \addbibresource{bibliography.bib}
\titleformat{\section}[hang]{\scshape}{}{}{}[\titlerule]
\titlespacing{\section}{0pt}{10pt plus 0pt minus 0pt}{3pt plus 0pt}
\titleformat{\subsection}[hang]{\textbf}{}{0pt}{}
\titlespacing{\subsection}{0pt}{10pt plus 0pt minus 0pt}{3pt plus 0pt}
\usepackage[margin=2cm,left=2.5cm]{geometry}
\usepackage{enumitem}
\newcommand{\cvitem}[2]
    {\begin{itemize}[topsep=-3pt,align=left,labelwidth=100pt,labelsep=8.5pt,leftmargin=!]
        \item [{#1}]{#2}
    \end{itemize}}
%===
%Content
%===
\begin{document}
\title{\vspace{-1.5cm}\textbf{Fnu Snu}}
\author{}
\date{\vspace{-10ex}}
\maketitle
\noindent Short bio / description
\section{Personal Data}
    \cvitem{Date of birth}{01 January 1980}
    \cvitem{Nationality}{XY}
\end{document}

Error report overleave Correct output

campa
  • 31,130
pablo
  • 37

1 Answers1

0

The problem is caused by the line

\titleformat{\section}[hang]{\scshape}{}{}{}[\titlerule]

The fifth argument should be a length. From the documentation: "[it] is the horizontal separation between label and title body and must be a length (it must not be empty)". If it is supposed to be empty, use 0pt.

\titleformat{\section}[hang]{\scshape}{}{0pt}{}[\titlerule]
gernot
  • 49,614