# Underline small-capped section with titleformat?

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{fancyhdr}
\usepackage[charter]{mathdesign}
\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:

• 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