Is this wrong?

It seems the ToC does dotfilling only for sections and not subsections. Why is this happening and how can I fix it?

I'm using \tableofcontents and nothing else to generate this ToC, the document class is article.

Edit: Yes; I want to fill the space in the sections with dots, from the end of the section title to the beginning of the number, just like how it fills with dots the subsection 5.1

MWE below:

   \documentclass[a4paper,spanish]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage[spanish]{babel}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage[right]{eurosym}
\usepackage{rotating}
\usepackage{ccicons}
\usepackage{multirow}
\usepackage{tabu}
\usepackage{amsmath,amssymb,amsthm,amscd}
\usepackage{amsmath}
\graphicspath{{./Imagenes/}} %Lugar en el que se guardarán las imágenes
\itemsep 1ex
\newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}
\begin{document}

\tableofcontents % Índice

\newpage % Salto de página

\section{Los tres tipos generales de conocimiento} % Sección superior
bar
foo
\section{Lo inefable}
barfoo
foobar
\section{Las fuentes del conocimiento}
bar
\subsection{La experiencia sensorial}
foo
\end{document}

-
Do you really mean that you have dots for section? \part and section are the levels without dots in the table of contents. –  Marco Daniel Mar 9 '13 at 20:04

If you don't want to look for the right lengths to give as parameters to tocloft or titletoc commands, you can also patch the \l@section command to use the same leaders as the other commands instead of blank space:

\documentclass[a4paper]{article}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\l@section}
{\hfil}
{\leaders\hbox{\normalfont$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill}
{}{}
\makeatother

\begin{document}

\tableofcontents % Índice

...
\end{document}


-
Thank you for your detailed explanation and illustrated example on this! Very much appreciating the quick response aswell! Cheers :) This is exactly what I was looking for!! –  Pyrobisqit Mar 10 '13 at 0:16

In article.cls the default behaviour for section entries in the ToC is not to use the dotted leaders; if you want to have these, you can use the tocloft package and redefine \cftsecleader to have the dots:

\documentclass{article}
\usepackage{tocloft}

\begin{document}

\tableofcontents
\section{Test Section}
\subsection{Test Subsection}

\end{document}


Another option would be to use the titletoc package and its \dottedcontents command:

\documentclass{article}
\usepackage{titletoc}

\dottedcontents{section}[1.5em]{\bfseries}{1.3em}{.6em}

\begin{document}

\tableofcontents
\section{Test Section}
\subsection{Test Subsection}

\end{document}


Yet another option, not requiring additional packages, would be to redefine the internal command \l@section (in charge of typesetting section entries in the ToC) to use \@dottedtocline:

\documentclass{article}

\makeatletter
\renewcommand*\l@section{\@dottedtocline{1}{0em}{1.5em}}
\makeatother

\begin{document}

\tableofcontents
\section{Test Section}
\subsection{Test Subsection}

\end{document}


-
And with tocstyle it is also possible. –  Speravir Mar 9 '13 at 23:07
Thanks for your accurate and detailed listing of the several methods available, I'm just learning LaTeX and I'm already loving it. Your answer is highly appreciated :) –  Pyrobisqit Mar 10 '13 at 0:19