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 am in the process of writing my thesis and am using the \include command to separate the files. But when I use the \includeonly command to select on the current chapter which has references to figures, theorems and algorithm2e code blocks in other chapters, I get the correct references in the output PDF file along with this warning:

name{..} has been referenced but does not exist, replaced by a fixed one

Based on all I have read upon on \includeonly, I don't think this is its expected behavior. This is the that preamble I am using.

\documentclass[pdftex,11pt,a4paper,twoside]{book}
\special{papersize=210mm,297mm}
\usepackage[slide,algochapter,linesnumbered,algoruled,vlined]{algorithm2e}
\usepackage{enumitem,IEEEtrantools,graphics,float,amsmath,amssymb,fullpage}
\usepackage{verbatim,tabularx,graphicx,setspace,sectsty,microtype}
\usepackage[a4paper,margin=1in,left=35mm]{geometry}
\usepackage[unicode,colorlinks,linktocpage=true]{hyperref}
\usepackage[all]{hypcap}
\usepackage{amsthm}
\usepackage[nameinlink,capitalise,noabbrev]{cleveref}

For some reason the \WarningsOff* and \WarningFilter commands of the silence package aren't working either. What am I doing wrong? How can I avoid these warnings?

share|improve this question
4  
\special{papersize=210mm,297mm}? Who told you that? Please trust in geometry. –  Martin Scharrer Apr 19 '12 at 15:48
    
The warning refers to hyperlinks generated by hyperref. When the pages to be referred to don't exist in your document, there really is no way to generate a link to them. So the warning is correct. –  Stephan Lehmke Apr 19 '12 at 15:50
    
I'm using biblatex and coded this to get rid for the warnings of \cites: \makeatletter \if@partsw \PassOptionsToPackage{hyperref=false}{biblatex} \fi \makeatother \usepackage[style=numeric-comp,sorting=none,doi=false,isbn=false,url=true,eprint‌​=false,maxnames=10]{biblatex} It disables hyperlinks for citations when \includeonly is used. –  Martin Scharrer Apr 24 '12 at 21:18
    
@MartinScharrer Do you happen to know anything like this for BibTeX? –  Mario S. E. Apr 16 '13 at 12:08
    
@MarioS.E.: No, sorry, I don't. –  Martin Scharrer Apr 16 '13 at 16:55

2 Answers 2

up vote 3 down vote accepted

Since you seem to be using \includeonly only when you are working with just one chapter, you might not need any hyperref generated links at that time. So consider the draft package option.

Another clumsier possibility: write \renewcommands (or wrappers) for macros from the hyperref package. Put them in your preamble right next to the \includeonly and you'll remember to comment that stuff out all together when you compile the whole thesis.

share|improve this answer
    
Thanks a lot, that worked perfectly.. didn't know that draft mode can suppress hyperlinks.. Out of curiosity though, could you be more descriptive about your second option? –  Berserker Apr 20 '12 at 2:58
    
@Berserker the second option is described in http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2011-05/msg00234.htm‌​l although I couldn't get it to work in your situation –  cmhughes Apr 20 '12 at 8:44

This is a warning from the hyperref package.

The hyperlinks you create to other chapters don't exist when using \includeonly, but of course the reference itself is still valid.

You'll notice you don't get the warning when you compile the whole document together, because the hyperlinks do exist in this case.

share|improve this answer
2  
I understand that, but is there any way that I can suppress the warning? I have too many inter-chapter references and those warnings kind of hide the ones I actually need to be concerned about. As I have already mentioned, I am not being able to do so using the silence package. –  Berserker Apr 19 '12 at 15:56

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.