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'm getting to know memoir, and I cannot make cross references work.

\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{array}
\usepackage{color}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{hyperref}
\hypersetup{
  hypertexnames=true,                
  linktocpage=true,
  linktoc=section,
  colorlinks=true,                                        
}
\usepackage{makeidx} % enables indexing
\makeindex

These are the major packages I'm loading and cleveref in addition. However, cross references in the document doesn't work. Neither in the TOC nor in when using \cref nor \ref. What am I missing? If I need to provide more information let me know.

share|improve this question
1  
Please expand your code into a standalone MWE (minimum working example) that shows how you're defining the items' labels and how you're using the cross-referencing commands. The reason I suggest this is because I've taken your code and expanded it into an MWE -- and I can't seem to replicate the problems you're describing. (Did you remember to run LaTeX twice so let it resolve the cross-references?) –  Mico Apr 4 '12 at 15:45
    
Please post you solution as a self-answer then (or delete the question altogether if you think the issue was only minor after all). –  Martin Scharrer Apr 5 '12 at 15:05
    
@MartinScharrer: I don't know whether this is minor or not. I couldn't find this behavior documented; but maybe I didn't look in the right places... Maybe the best would be to close the question? –  Dror Apr 5 '12 at 15:56
    
Just post your findings in an answer and accept it after the time limit allows. –  Martin Scharrer Apr 5 '12 at 16:09

1 Answer 1

up vote 1 down vote accepted

Well, apparently the problem is the class' option draft. Here's the very beginning of my document:

\documentclass[%
stockaiv,%
pageaiv,%
extrafontsizes,%
11pt,%
twoside,%
draft%
]{memoir}
\fixpdflayout

and once removing the draft option all cross references worked as expected (as far as I can tell now). I couldn't find any reference to this behavior in the class' documentation.

share|improve this answer
    
Since memoir does not provide hyperlinks, it might be an idea to check elsewhere. As far as I can see hyperref reacts to the draft option. All class options are also given to packages (which is quite handy) –  daleif Apr 6 '12 at 7:36
    
@daleif: I'm not sure I understand what you mean. Can you please elaborate? –  Dror Apr 6 '12 at 13:10
    
You mention, that you cannot understand why this is not in the manual. I mentioned that hyperlinks does not come from memoir, thus of course it is not a part of the manual. Many things behave strange when the draft option is added (e.g. the listings package) –  daleif Apr 7 '12 at 14:59
    
@daleif: I meant documentation in the broader sense. Anyway, now this interaction (i.e. memior with its draft option and hyperref is sort of documented. –  Dror Apr 8 '12 at 17:50

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.