Use hyperref without any link coloring, and with dotted TOC lines

Currently, my document is of the following form:

\documentclass[11pt,a4paper]{article}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\section{Introduction to Problem}

There is the relation
$$R = k^2, \label{eq:myequation}$$
which we have previously discussed.

\section{Potential Solution}

Using the relation in Equation~(\ref{eq:myequation}), we can ...

\end{document}

Given the way the above document looks when compiled with pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian), I wish to make only 2 changes:

1. No colored boxes surrounding any of the TOC, figure, equation, etc., links
2. Dotted lines connected the TOC entries to their corresponding page numbers on the right side of the page

How can I make these changes?

• Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem. Are you using LaTeX? If yes you probably mean \usepackage. What documentclass are you using? For the colored boxes take a look at: tex.stackexchange.com/questions/823/… Dec 30 '13 at 17:05
• @someonr yes, from the link you posted, I found that adding [hidelinks] worked to disable the colored boxes around links. So, my only remaining question is (2), the dotted lines question. Thanks! Dec 30 '13 at 17:21
• great that you took your time to enhance your answer. Here at tex.SX we like to work with Minimal Working examples. meta.tex.stackexchange.com/questions/228/… Dec 30 '13 at 17:22
• @someonr That makes sense. Dec 30 '13 at 17:23
• You can get the dotted lines for example with \makeatletter \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} \makeatother For details and other possibilities see here: tex.stackexchange.com/questions/53898/… Dec 30 '13 at 17:25

As suggested in the comments, you can use pass hidelinks option to hyperref to disable the boxes and

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

to add dottetd lines to the TOC.

Example

\documentclass[11pt,a4paper]{article}

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

\begin{document}

\tableofcontents

\section{Introduction to Problem}

There is the relation
$$R = k^2, \label{eq:myequation}$$
which we have previously discussed.

\section{Potential Solution}

Using the relation in Equation~(\ref{eq:myequation}), we can ...

\end{document}

Result

For more details on the two individual questions, visit these links:

• I would have flagged this question as duplicate, but how can I flag it as duplicate of two different questions? Dec 30 '13 at 17:47