TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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

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.
http://tex.stackexchange.com/questions/31835/curious-interaction-between-koma-fontenc-and-hyperref-when-using-hidden-glossar
tex.stackexchange.com
crawl=CC-MAIN-2016-30
87200
application/http; msgtype=response
sha1:2G2BJ7TJ6TWTHL4LDXSOGI7T24VSBOSC
<urn:uuid:d7e67fab-5ed2-45f6-9fc7-187cdded8b24>
2016-07-28T16:28:21Z
151.101.1.69
sha1:JW3LTTL64VTEHTDX6IPXXUXYSBNZZCWU
<urn:uuid:40f0449e-27e9-4091-8fc8-086e4822b245>
http://tex.stackexchange.com/questions/31835/curious-interaction-between-koma-fontenc-and-hyperref-when-using-hidden-glossar
response
<urn:uuid:63c871a1-cd29-4d30-a1e9-ada8486c2edd>
robots: classic
hostname: ip-10-185-27-174.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-30
operator: CommonCrawl Admin
description: Wide crawl of the web for July 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf