0

I modified \section format to add an underline. How can I reduce the space between the section name and the underline? The code I used is the following.

\usepackage{titlesec} % Allows creating custom \section's

\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\rule{\linewidth}{1pt}]

enter image description here

  • Try raisebox. – Johannes_B Jun 10 '16 at 7:36
2

Using titlerule and vspace :

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage{titlesec}

\titleformat{\section}{\large\scshape\raggedright}{}{0em}{} [{\vspace{1cm}\titlerule[1pt]}]

\begin{document}
\section{TEST}
Bla bla

\titleformat{\section}{\large\scshape\raggedright}{}{0em}{} [{\vspace{0cm}\titlerule[1pt]}]
\section{TEST2}
Bla bla2

\titleformat{\section}{\large\scshape\raggedright}{}{0em}{} [{\titlerule[1pt]}]
\section{TEST2}
Bla bla3

\end{document}

enter image description here

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.