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 can't figure out where do I load the hyperref package. I know it sounds odd, but I scanned all my preamble and couldn't find a single \usepackage{hyperref}. I feel really stupid, but I don't know where to look for it. Is it possible that some other package I load loaded hyperref on it own? Any ideas are welcomed. I'm really puzzled.

share|improve this question
2  
Yes another package can load hyperref. Look in the log-file. It records the loaded packages. –  Ulrike Fischer Apr 8 '11 at 8:21
1  
without a minimal no-one will be able to assist you. Many other packages look for it and if it is not loaded they will input it automatically. –  Yiannis Lazarides Apr 8 '11 at 8:22
    
Beamer loads hyperref. –  Seamus Apr 8 '11 at 8:22
    
@Yiannis: I value the importance of ME, but in this case I don't it is really hard to generate one, as it is involved. I'll try to add something. –  Dror Apr 8 '11 at 8:25
4  
the point is that the process of creating the MWE will almost certainly solve your problem. –  Seamus Apr 8 '11 at 10:42

2 Answers 2

up vote 7 down vote accepted

Look in the log file and you'll notice that included files are printed within parentheses. And if a file that you include includes another file, that file will appear within parentheses within the first parentheses. So each parenthetical group delimits a file.

(./a.tex
 % tex is now processing a.tex ...
 (./b.tex % a.tex requests b.tex be read
  % tex is now reading b.tex
  ) % tex is now done with b.tex and is reading
  % the rest of a.tex
 ) % done with a.tex

So search the log file for hyperref.sty. Find the parenthetical group that includes it, and the file at the beginning of that group is your culprit.

share|improve this answer
    
OH! So that's what the parentheses are for. They make sense now... –  Seamus Apr 8 '11 at 11:50
    
Yes seems like the problem was in my personalized .sty file which was not updated. I guess I don't know how to use it... I reverted to self contained preamble :) –  Dror Apr 8 '11 at 12:00

Use \listfiles in your document and then have a look into your log file. It shows the loading of all packages at the beginning and the end of the log file.

If this doesn't help, then copy your document source, delete all text and then uncomment the preamble line by line from the bottom to top, until hyperrefisn't loaded anymore.

Some document classes, like beamer and powerdot, load hyperref by default. And with PassOptionsToPackage{draft}{hyperref} you can disable all settings.

share|improve this answer
    
Thnx! This looks good. I'll try it. –  Dror Apr 8 '11 at 8:36
    
I'm using a personal .sty file where I load most of the things. It lives in my home part of the latex directories. Is it possible, that I changed the file, but it was not really changed? I have to do something like texhash to it whenever I edit it? –  Dror Apr 8 '11 at 8:47
    
@dror you shouldn't have to texhash if it's in your personal texmf directory... –  Seamus Apr 8 '11 at 11:50
1  
@Dror: texhash is only needed for TEXMF and TEXMFLOCAL. TEXMFHOME is searched recursively by TeX. With kpsewhich <file> you can easily controll which file is used by TeX. –  Herbert Apr 8 '11 at 11:59

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.