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.

In this question is asked how to hide single entries from my acronyms list. The solution works fine in the minimal example from that question. However, trying to use that solution in my actual document, I get another strange problem. My new minimal example:

\documentclass{scrartcl}                        
\usepackage[T1]{fontenc}        
\usepackage{hyperref}     
\usepackage[acronym,shortcuts,acronymlists={hidden}]{glossaries}

\newglossary[algh]{hidden}{acrh}{acnh}{Hidden Acronyms}
\makeglossaries

\newacronym{ex1}{Example 1}{should be displayed in list of acronyms when used at least once}
\newacronym[type=hidden]{ex2}{Example 2}{should never be displayed in list of acronyms}

\begin{document}
\printglossary[type=\acronymtype]
I use \textbf{\acs{ex1}} and \textbf{\acs{ex2}}  in my text.
\end{document}

This results in a pdftex warning about a non-existing reference, name:{glo:ex2}, which gets replaced by a fixed one. I'd say, this comes from the hyperref-package. But the warning only appears, when I use KOMA-documentclass scrartcl AND the T1 option of fontenc-package. When using plain article or just fontenc without options, everything is fine. Any clues?

share|improve this question
2  
This does not compile for me. Produces Argument of \@fileswith@ptions has an extra }. Also, I think I read something about hyperref should be last package loaded? –  Peter Grill Oct 17 '11 at 15:40
    
Once I fix the typo with the misplaced } near }]glossaries}, this seems to compile fine for me. –  Peter Grill Oct 17 '11 at 15:44
    
You're right, I lost a bracket while editing. Generally you're right about loading hyperrref last, but there are a few exceptions to that rule: See here –  meep.meep Oct 17 '11 at 15:48
    
@Peter Grill: But I think you already found the solution, at least for this mwe. When I change the order of hyperref and glossaries, the warning disappears. Now I only have to check, whether this produces other undesired behaviour. –  meep.meep Oct 17 '11 at 15:52
add comment

2 Answers 2

up vote 4 down vote accepted

I can't really believe that you get the warning only with scrartcl and/or T1-encoding. I get it also with article (and it is certainly related to hyperref). You can avoid it by disabling the link in the acronym:

\acs[hyper=false]{ex2}
share|improve this answer
    
That's funny. I just checked again and I definitely get no warning when simply using article instead of scrartcl. –  meep.meep Oct 17 '11 at 16:05
    
But either way, your solution works just fine. Thanks. –  meep.meep Oct 17 '11 at 16:24
add comment

Loading the hyperref package after glossaries eliminates the warning in this case.

Generally, hyperref should be loaded last, but there are several exceptions as pointed out in Which packages should be loaded after hyperref instead of before?. While gloassaies is listed as one of the exceptions, the following comment should be noted:

...although glossaries can be loaded before hyperref, you have to jump through extra hoops to make it work quite as well...

share|improve this answer
    
Thanks for your answer. The problem is, when loading hyperref after glossaries all hyperlinks disappear. So for me it's clearly better to load hyperref first. Even if there is a way to get the desired hyperlinks back, this would probably get way to complicated. But thanks anyway. :) –  meep.meep Oct 17 '11 at 16:35
add comment

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.