# The space between the numbering of the subsections and their titles in TOC [duplicate]

I wonder why the space between the numbering and the titles for those sections starting from 10 is less than the space for those sections between 1 and 9. I want it to increase since the numbering seems too close to the titles. How should I achieve it ?. I searched and asked many times about this problem but I got no a useful solution. I just use the command \tableofcontents in my article documentclass. Here is a screenshot of what I meant.

I appreciate any help, and I hope my question not to be marked as duplicate because I did not get any benefit from any other like questions.

This is what I use:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{footskip=15pt}
\usepackage{amsmath}

\usepackage{tocloft}

\begin{document}
\tableofcontents
\end{document}


 \documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage[svgnames]{xcolor}
\geometry{footskip=15pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tocloft}
\makeatletter
\let\stdl@section\l@section
\renewcommand*{\l@section}[2]{%
\stdl@section{\textcolor{blue}{#1}}{\textcolor{blue}{#2}}}
\let\stdl@subsection\l@subsection
\renewcommand*{\l@subsection}[2]{%
\stdl@subsection{\textcolor{DarkGreen}{#1}}{\textcolor{DarkGreen}{#2}}}

\AtBeginDocument{%
\let\nl@org@contentsline\contentsline
\def\contentsline#1{%
\def\nl@current@levelname{#1}%
\nl@org@contentsline{#1}%
}%
}

% \numberline evaluates \nl@current@levelname to find
% the horizontal alignment
\protected\def\numberline#1{%
\begingroup
\edef\nl@align{%
nl@align@%
\@ifundefined{nl@current@levelname}{}{\nl@current@levelname}%
}%
\edef\nl@align{%
\@ifundefined{\nl@align}\nl@align@{\csname\nl@align\endcsname}%
}%
\@ifundefined{nl@numberline@\nl@align}{%
\errmessage{Unknown alignment '\nl@align' for \noexpand\numberline}%
\nl@numberline@l{#1}%
}{%
\csname nl@numberline@\nl@align\endcsname{#1}%
}%
\endgroup
}

% Implementations of \numberline for the different horizontal alignments
\newcommand*{\nl@numberline@l}[1]{% left-aligned
\hb@xt@\@tempdima{#1 \hfil}%
}
\newcommand*{\nl@numberline@c}[1]{% centered
\hb@xt@\@tempdima{\hfil#1 \hfil}%
}
\newcommand*{\nl@numberline@r}[1]{% right-aligned
\hb@xt@\@tempdima{\hfil#1 }%
}

% Configuration
% -------------
% Horizonal alignment in \numberline:
%   l: left-aligned
%   c: centered
%   r: right-aligned
% \nl@align@: Default setting
% \nl@align@<levelname>: Setting for specific level

\def\nl@align@{r}% default
\def\nl@align@section{r}

\makeatother

\begin{document}
\tableofcontents
\newpage
\section{The First Section}
\section{The Exterior Algebra of Multiconvectors}
\subsection{Dual Space}
\subsection{Permuations}
\subsection{Multilinear Functions}
\subsection{The Symmetrizing and Alternating  Operations}
\subsection{The Tensor Product}
\subsection{The Wedge Product}
\subsection{Associativity of The Wedge Product}
\subsection{A Basics for \textit{k}-Convector}
\section{Tangent Vectors in $\mathbb{R}^{n}$}
\subsection{Germs of Functions}
\subsection{The Tangent Space}
\subsection{Vector Fields}
\section{Differential Forms on $\mathbb{R}^{n}$}
\subsection{Differential 1-Forms and the Differential of a function}
\subsection{Differential \textit{k}-Forms}
\subsection{The Exterior Derivative}
\section{Manifolds}
\subsection{Differentiability of Mapping and Jacobians}
\subsection{Topological Manifolds, Compatible charts and Smooth Manifolds}
\subsection{Smooth Functions on a Manifold}
\subsection{Smooth Maps Between Manifolds}
\subsection{Diffeomorphisms}
\subsection{Partial Derivatives}
\section{Tangent Vectors and the Tangent Space}
\subsection{Bases For the Tangents Space at a Point}
\subsection{The Differential of a Map}
\section{The Tangent Bundle}
\subsection{The Topology of The Tangent Bundle}
\subsection{The Manifold Structure on The Tangent Bundle}
\section{Smooth Bump Functions}
\section{Vector Fields}
\subsection{Smoothness of a Vector Field}
\section{Differential 1-Forms}
\subsection{The Differential of a Function and Local Expression for a Diffecrential 1-Form}
\subsection{The Cotangent Bundle}

\end{document}


Spacing between section number and title can be made by using ~~ in \subsection{~~The title name} here is new spacing after right allingment in section number

 \documentclass[8pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage[svgnames]{xcolor}
\geometry{footskip=15pt}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tocloft}
\makeatletter
\let\stdl@section\l@section
\renewcommand*{\l@section}[2]{%
\stdl@section{\textcolor{blue}{#1}}{\textcolor{blue}{#2}}}
\let\stdl@subsection\l@subsection
\renewcommand*{\l@subsection}[2]{%
\stdl@subsection{\textcolor{DarkGreen}{#1}}{\textcolor{DarkGreen}{#2}}}

\AtBeginDocument{%
\let\nl@org@contentsline\contentsline
\def\contentsline#1{%
\def\nl@current@levelname{#1}%
\nl@org@contentsline{#1}%
}%
}

% \numberline evaluates \nl@current@levelname to find
% the horizontal alignment
\protected\def\numberline#1{%
\begingroup
\edef\nl@align{%
nl@align@%
\@ifundefined{nl@current@levelname}{}{\nl@current@levelname}%
}%
\edef\nl@align{%
\@ifundefined{\nl@align}\nl@align@{\csname\nl@align\endcsname}%
}%
\@ifundefined{nl@numberline@\nl@align}{%
\errmessage{Unknown alignment '\nl@align' for \noexpand\numberline}%
\nl@numberline@l{#1}%
}{%
\csname nl@numberline@\nl@align\endcsname{#1}%
}%
\endgroup
}

% Implementations of \numberline for the different horizontal alignments
\newcommand*{\nl@numberline@l}[1]{% left-aligned
\hb@xt@\@tempdima{#1 \hfil}% Distance between titles and page number
}
\newcommand*{\nl@numberline@c}[1]{% centered
\hb@xt@\@tempdima{\hfil#1 \hfil}%
}
\newcommand*{\nl@numberline@r}[1]{% right-aligned
\hb@xt@\@tempdima{\hfil#1 }%
}

% Configuration
% -------------
% Horizonal alignment in \numberline:
%   l: left-aligned
%   c: centered
%   r: right-aligned
% \nl@align@: Default setting
% \nl@align@<levelname>: Setting for specific level

\def\nl@align@{r}% default
\def\nl@align@section{r}

\makeatother

\begin{document}
\tableofcontents
\newpage
\section{The First Section}
\section{The Exterior Algebra of Multiconvectors}
\subsection{~~Dual Space}
\subsection{~~Permuations}
\subsection{~~Multilinear Functions}
\subsection{~~The Symmetrizing and Alternating  Operations}
\subsection{~~The Tensor Product}
\subsection{~~The Wedge Product}
\subsection{~~Associativity of The Wedge Product}
\subsection{~~A Basics for \textit{k}-Convector}
\section{Tangent Vectors in $\mathbb{R}^{n}$}
\subsection{~~Germs of Functions}
\subsection{~~The Tangent Space}
\subsection{~~Vector Fields}
\section{Differential Forms on $\mathbb{R}^{n}$}
\subsection{~~Differential 1-Forms and the Differential of a function}
\subsection{~~Differential \textit{k}-Forms}
\subsection{~~The Exterior Derivative}
\section{Manifolds}
\subsection{~~Differentiability of Mapping and Jacobians}
\subsection{~~Topological Manifolds, Compatible charts and Smooth Manifolds}
\subsection{~~Smooth Functions on a Manifold}
\subsection{~~Smooth Maps Between Manifolds}
\subsection{~~Diffeomorphisms}
\subsection{~~Partial Derivatives}
\section{Tangent Vectors and the Tangent Space}
\subsection{~~Bases For the Tangents Space at a Point}
\subsection{~~The Differential of a Map}
\section{The Tangent Bundle}
\subsection{~~The Topology of The Tangent Bundle}
\subsection{~~The Manifold Structure on The Tangent Bundle}
\section{Smooth Bump Functions}
\section{Vector Fields}
\subsection{~~Smoothness of a Vector Field}
\section{Differential 1-Forms}
\subsection{~~The Differential of a Function and Local Expression for a Diffecrential 1-Form}
\subsection{~~The Cotangent Bundle}

\end{document}


• Please describe what change you have made to get the effect. – Andrew Swann May 29 '17 at 6:14
• We need to allign right for section numbers then the problem can be solved, originally it is center allign, this question can be mark as duplicate and already solved here by Heiko Oberdiek tex.stackexchange.com/questions/67523/… @AndrewSwann – Biki Teron May 29 '17 at 6:19
• The aspect "I want it [the space between the number and the title] to increase since the numbering seems too close to the titles." of the question is missing in this answer, isn't it? – Schweinebacke May 29 '17 at 6:25
• I was really asking you to update your answer so that a reader can get an explanation of what you have changed and why it works. Now I am inclined to think you should just have provided a link to Heiko's answer in a comment. – Andrew Swann May 29 '17 at 6:49
• You should not add ~~ in the \subsection argument, because it will be placed also in the heading and (if used) in the running head. – Schweinebacke May 29 '17 at 7:57