4

I can't modify the \sectionformat in KOMA classes when using the spanish option in {babel}. Is there any direct fix (I mean, without recurring to {titlesec})?

\documentclass{scrartcl}

\usepackage[%
%   english,
    spanish, % <--- Problem
    ]{babel}

\renewcommand*{\sectionformat}[1]{Secc. }

\usepackage{blindtext}

\begin{document}
\tableofcontents
\blinddocument 
\end{document}
5

Without the es-nosectiondot option, babel-spanish restores the default definition of \@seccntformat, so overriding the redefinition made in the KOMA classes.

\documentclass{scrartcl}

\usepackage[spanish,es-nosectiondot]{babel}

\renewcommand*{\sectionformat}{Secc. \thesection\autodot\enskip}

\begin{document}

\tableofcontents

\section{ABC}

\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.