Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the book document class and the babel package with the spanish option, I have a ToC like this:

  1. CHAPTER NAME
    1.1. SECTION NAME
    1.1.1. Subsection name
    1.1.1.1. Subsubsection name

How can I remove the dot after sections numbers, tables numbers on LoT and figure numbers on LoF?.

P.S.: The Chapter number should have a dot.

Here a MWE

\documentclass{book}
\usepackage[spanish,es-lcroman]{babel}

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\makeatletter
\def\@seccntformat#1{\csname the#1\endcsname\quad}
\makeatother

\begin{document}

\tableofcontents

\listoftables

\listoffigures

\chapter{CHAPTER NAME}

\section{SECTION NAME}

\subsection{Subsection name}

\subsubsection{Subsubsection name}

\begin{table}
    My table
    \caption{Table}
\end{table}

\begin{figure}
    My figure
    \caption{Figure}
\end{figure}

\end{document}

Note that I'm using the code:

\makeatletter
\def\@seccntformat#1{\csname the#1\endcsname\quad}
\makeatother

to remove the dot after sections number in the document.

share|improve this question
1  
Thanks for the MWE; I took the liberty and removed some things from it that aren't relevant to your problem, in order to make it somewhat more of a real minimal working example. –  doncherry Sep 25 '12 at 21:42

1 Answer 1

up vote 6 down vote accepted

The Spanish module for babel is responsible for this, probably following some directive of the authority on the language. There is an additional option for disabling it:

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

See section 2.3 in the documentation for the Spanish option (texdoc spanish or here on TeXdoc.net).

There will be no need to act on \@seccntformat.

In order to keep the period after the chapter number (although I don't see why), patch the \@chapter command:

\usepackage{etoolbox}
\makeatletter
\patchcmd\@chapter{\numberline{\thechapter}}{\numberline{\thechapter.}}{}{}
\makeatother
share|improve this answer
    
Thanks egreg, this is a very good solution. But removes the dot after the Chapter number in TOC. How can I add a dot to this? –  OSjerick Sep 25 '12 at 21:40
1  
...caused by a redefinition of \numberline: \def\numberline#1{\hb@xt@\@tempdima{#1\if&#1&\else.\fi\hfil}} from the original \def\numberline#1{\hb@xt@\@tempdima{#1\hfil}} –  Werner Sep 25 '12 at 21:40
    
egreg thanks again, the dot after chapter number is a requirement of the format for my thesis. Thanks! –  OSjerick Sep 25 '12 at 21:50
1  
@osjerick doncherry removed the irrelevant packages from your example and did well. But remember: never pass the pdftex option to graphicx or hyperref. –  egreg Sep 25 '12 at 21:53
    
Ok @egreg, thanks. –  OSjerick Sep 25 '12 at 21:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.