2

I am using babel (spanish) and want to change the name provided by \subsubsection (e.g. "Subsubsección" in Spanish) to something shorter (e.g. "Sección")

To that end, I tried to follow the post:

Change the word "Chapter" to something else

But the command

\addto\captionsspanish{\renewcommand{\subsubsectionname}{Sección}}

does not work... :(

Any help?

  • 2
    Please what means "does not work"? Error message, warning, no changing of the output, ... – Mensch Oct 19 '14 at 16:54
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. It is really hard to help when we don't know anything about the class you are using or relevant packages! – cfr Oct 19 '14 at 17:15
  • Sorry. No error or warning messages, but the output is not changed. I tried the same with other "titles", e.g. \addto\captionsspanish{\def\listtablename{\'Indice de Tablas} \def\tablename{Tabla}} and it worked fine... – ceca depeca Oct 19 '14 at 17:15
  • Is there anything in the console output or log file which gives a clue? – cfr Oct 19 '14 at 17:16
  • The console output (TeXllipse) does not say anything about it... really weird... the question is: is \subsubsectionname the real command, as \chaptername is for chapter? – ceca depeca Oct 19 '14 at 17:24
2

With babel there is no default definition for \subsubsectionname; you're probably referring to what \autoref does, which requires a different strategy.

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{hyperref}

\addto\extrasspanish{%
  \def\subsectionname{Secci\'on}%
  \def\subsectionautorefname{Secci\'on}%
  \def\subsubsectionname{Secci\'on}%
  \def\subsubsectionautorefname{Secci\'on}%
}

\begin{document}

\section{A}\label{s:a}
\subsection{B}\label{ss:b}
\subsubsection{C}\label{sss:c}

\autoref{s:a}

\autoref{ss:b}

\autoref{sss:c}

\end{document}

enter image description here

  • Wow!!!! Exactly! Now it worked fine. Thanks ! ;) – ceca depeca Oct 19 '14 at 18:17

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.