Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
2  
Welcome to TeX.SX! cleveref doesn't create clickable links, if that's what you mean. Add \usepackage{hyperref} before \usepackage{cleveref}. –  Torbjørn T. Mar 10 at 19:27
    
Thank you, that worked. –  neunfuenf Mar 10 at 20:10

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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