0

With the MWE in place, i got the smallcaps into the section formatting (hopefully right), but cannot use \titleformat to uline the section, despite the doc saying: "The very last command can take an argument, which is the title text." but the uline is ignored. Furthermore it shouldnt have numbering. Just an underlined small-caps section.

\documentclass[a4paper,10pt]{article}

\usepackage{latexsym}
\usepackage[empty]{fullpage}
%\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage{ulem}
\usepackage[pdftex, hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage[charter]{mathdesign}
%\usepackage{newpxtext,newpxmath}%bad w/ small-caps
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{float} 

\titleformat{\section}{\vspace{-0pt}\scshape}{}{0pt}{\uline{#1}}[\vspace{-5pt}]
\let\resumeSection\section

\begin{document} 
%---------------------OBJECTIVE
\resumeSection{Objective}
blue blue
\end{document}
%FIN

The error at each \resumeSection is

! You can't use `macro parameter character #' in restricted horizontal mode. @empty ## 1\xdef \UL@spfactor {\the \spacefactor }

solved: solved

  • 3
    According to the manual, without using the package option explicit the last command is assumed to have an argument without the need of typing #1 explicitly. Just replace \uline{#1} by \uline. – campa Jun 24 at 10:36
  • this actually solves it :) – qrtLs Jun 24 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.