[Tex/LaTex] Spacing between number and text in TOC

booksspacingtable of contents

enter image description hereI am facing problem for spacing for number and text in TOC.

The are very close after second digit.
Help Please… Sharelatex link is https://www.sharelatex.com/2743925469dskrfjrbsyzc

\documentclass[a4paper,12pt,openany]{book}  %openany is for removing blank page between two chapter
\usepackage[a4paper, top=1 in, bottom=1 in,textwidth=6.52in]{geometry} %to get normal margin, remove textwith length

%###############----FONT----#########################


\usepackage[T1]{fontenc}
\usepackage[adobe-utopia]{mathdesign}%% ADDED
\usepackage[utf8]{inputenc}

%--------------------------------------------
%-----------THIS SECTION IS ADDED FROM IIT-------------------

\usepackage{booktabs}
\usepackage{amsmath}%, amsfonts, amssymb
\usepackage{amsfonts}
\usepackage{amsthm}

\usepackage{xcolor}
\usepackage{fancyhdr}
\setlength{\headheight}{15pt} % related to fancyhdr
%------------------------------------------------------------------
\usepackage[bookmarks,%
            breaklinks,%
            backref=false,%
            pdfhighlight=/I,%
            pdffitwindow=true,%
            pdfstartview=Fit,%
            pdfcenterwindow=true,%
            linkbordercolor={1 0 1},%
            pdfusetitle]
            {hyperref}

\RequirePackage{graphicx}
\usepackage{multicol} % For multiple column
\usepackage{siunitx} %for SI units

%%%%%%%%%%%%%%%%%%%%ADDED BY ME%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pifont} %for symbols in text mode
\usepackage{enumitem}
\setlist[itemize,enumerate]{noitemsep,topsep=0pt}%http://tex.stackexchange.com/questions/43743/how-to-reduce-line-space-leading-within-an-enumerate-environment
\renewcommand{\labelitemi}{\ding{70}}%https://en.wikibooks.org/wiki/LaTeX/Special_Characters
\renewcommand{\labelitemii}{\ding{118}}
\usepackage{tcolorbox} %%for coloured boxex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Source: http://en.wikibooks.org/wiki/LaTeX/Hyperlinks %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
\usepackage{graphicx} 
\usepackage{caption}
\usepackage{subcaption}
\usepackage[english]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'dedication' environment: To add a dedication paragraph at the start of book %
% Source: http://www.tug.org/pipermail/texhax/2010-June/015184.html            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{dedication}
{
   \cleardoublepage
   \thispagestyle{empty}
   \vspace*{\stretch{1}}
   \hfill\begin{minipage}[t]{0.66\textwidth}
   \raggedright
}
{
   \end{minipage}
   \vspace*{\stretch{3}}
   \clearpage
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chapter quote at the start of chapter        %
% Source: http://tex.stackexchange.com/a/53380 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\renewcommand{\@chapapp}{}% Not necessary...
\newenvironment{chapquote}[2][2em]
  {\setlength{\@tempdima}{#1}%
   \def\chapquote@author{#2}%
   \parshape 1 \@tempdima \dimexpr\textwidth-2\@tempdima\relax%
   \itshape}
  {\par\normalfont\hfill...\ \chapquote@author\hspace*{\@tempdima}\par\bigskip}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       Colour font of Chapters and sections %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\usepackage{xcolor}
\usepackage{sectsty} 
\usepackage{titlecaps} %http://tex.stackexchange.com/questions/129677/automatic-capitalization-of-sectioning-headings
\chapterfont{\color{blue}}  % sets colour of chapters
\sectionfont{\color{blue}\titlecap}  % sets colour of sections and each letter of word capital
\Addlcwords{to the of or at in and for from is} % make words in title/section small
\subsectionfont{\color{black}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% First page of book which contains 'stuff' like: %
%  - Book title, subtitle                         %
%  - Book author name                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Book's title and subtitle
\title{\Huge \textbf{Chemical Engineering Notes}}
% Author
\author{\textsc{Dr. XYZ}}


\begin{document}

\frontmatter
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Add a dedication paragraph to dedicate your book to someone %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{dedication}
Dedicated to All Chemical Engineers
\end{dedication}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Auto-generated table of contents, list of figures and list of tables %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents
\listoffigures
\listoftables

\mainmatter

%%%%%%%%%%%


%%%%%%%%%%%%%%%%
% NEW CHAPTER! %

\chapter{Fluid Flow}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}
\section{Drag reduction is found generally}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Best Answer

This is well-known limitation of standard classes TOCs. It depends a bit on fonts used (because narrower fonts will be less likely to show the problem).

Simplest workaround is to add something like this to your preamble

\usepackage{tocloft}

\advance\cftsecnumwidth 0.5em\relax
\advance\cftsubsecindent 0.5em\relax
\advance\cftsubsecnumwidth 0.5em\relax

For example:

\documentclass{book}
\usepackage{tocloft}

\advance\cftsecnumwidth 0.5em\relax
\advance\cftsubsecindent 0.5em\relax
\advance\cftsubsecnumwidth 0.5em\relax
\begin{document}

\tableofcontents

\setcounter{chapter}{11}
\setcounter{section}{8}

\section{Enthalpy Concentration Diagram}

\section{Single stage flash vaporization}

\section{Reflux Ratio}

\subsection{Minimum reflux ratio}
\subsection{Optimum reflux ratio}

\end{document}

Without the added lines:

enter image description here

With the fix:

enter image description here