1

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
\begin{equation}
R = k^2, \label{eq:myequation}
\end{equation}
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?

5
  • 1
    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/…
    – someonr
    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!
    – synaptik
    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/…
    – someonr
    Dec 30 '13 at 17:22
  • @someonr That makes sense.
    – synaptik
    Dec 30 '13 at 17:23
  • 1
    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/…
    – someonr
    Dec 30 '13 at 17:25
1

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}

\usepackage[hidelinks]{hyperref}

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

\begin{document}

\tableofcontents

\section{Introduction to Problem}

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

\section{Potential Solution}

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

\end{document}

Result

result

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

  1. Remove ugly borders around clickable cross-references and hyperlinks
  2. How to get lines with dots in the table of contents for sections?
1
  • I would have flagged this question as duplicate, but how can I flag it as duplicate of two different questions?
    – someonr
    Dec 30 '13 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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