7

i have a problem with cleveref. I'm using cleveref with the nameinlink-option but there is still no link. This is my header:

\documentclass[12pt,a4paper]{scrreprt}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage[english]{babel}
\usepackage{fontenc}
\usepackage{graphicx,epsfig,color}
\usepackage[nameinlink]{cleveref}
\usepackage{geometry}
\usepackage{float}
\geometry{
  left=2cm,
  right=2cm,
  top=2cm,
  bottom=3cm,
  bindingoffset=5mm
}

\usepackage{dsfont}
\DeclareGraphicsRule{.pdftex}{pdf}{.pdftex}{}
\usepackage{setspace}
\usepackage{ifpdf}
\usepackage{caption}

And i'm using:

\Cref{cor:simplification}

I don't get what I'm doing wrong.

1
  • 3
    Welcome to TeX.SX! cleveref doesn't create clickable links, if that's what you mean. Add \usepackage{hyperref} before \usepackage{cleveref}. Commented Mar 10, 2014 at 19:27

1 Answer 1

8

As mentioned in comments, cleveref does not by itself produce hyperlinks, it only handles the formatting of the references. To make cross references (and citations and footnotes) into clickable links, add the hyperref package, as mentioned in How to make clickable links and cross-references in pdfs produced by LaTeX?

hyperref should, as a rule of thumb, be the last package loaded, as it redefines a lot of stuff, but cleveref is an exception to this rule (see Which packages should be loaded after hyperref instead of before?). Hence, in the preamble you should have

\usepackage{hyperref}
\usepackage{cleveref}

in that order.

Addendum: No everyone is a fan of the default look of hyperlinks, which is red rectangles around the text. To modify this you could add use the hidelinks or colorlinks option to the package, as described in the answers to Remove ugly borders around clickable cross-references and hyperlinks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .