Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of acronyms contains hyperlink #32

Closed
angelog0 opened this issue Apr 13, 2020 · 12 comments · Fixed by #54
Closed

List of acronyms contains hyperlink #32

angelog0 opened this issue Apr 13, 2020 · 12 comments · Fixed by #54

Comments

@angelog0
Copy link

After the upgrade from TL2019 to TL2020 I have rebuilt a few documents and noticed that those documents using acronym package and that contain

\usepackage[pagebackref]{hyperref}
\usepackage[hyperpageref]{backref}

display the list of acronyms with more o less randomly distributed hyperlinked acronyms which behave as backref package does. The attachment contains 2 screenshot, one taken on a document built (2020.03.03) with TL219 (what I expect) and one taken for the same document rebuilt with TL2020, displaying what I do not expect.

The documents using acronym package but not backref have the list of acronims as I expect, not hyperlinked but just black bold text...

BTW, I flagged this issue also on texlive list

acronyms_sshot.tar.gz

@marsmee
Copy link
Collaborator

marsmee commented Apr 13, 2020

The behaviour of the package regarding the list of acronyms itself has been aligned with the other lists (LoF, LoT, …). First, the spacing between the dots has changed (withpage option enabled), and second, the forward linking to the place where the acronyms are used first has been added (hyperref package present). So this is the new normal behaviour.

But what exactly do you mean by "random"? Did you use the acronyms that have no link anywhere?

Edit: There is a nohyperlinks option which prevents forward and backward linking.

@angelog0
Copy link
Author

Sorry @marsmee, but I don't like this new feature.. How can I get the old feature? The list of acronyms should not have acronyms hyperlinked but jut what acronyms mean..

I use the package with

\usepackage[smaller]{acronym}

and are hyperlinked in the text so that clicking on them the user goes to the list of acronyms (usually after the list of figures) to read the meaning of acronym. Why one should have the need to go where the acronym is used for the first time? I don't follow...

Different is the case of the acronym hyperlinked in the list of figures: reading the list of figures the user could have the need what an acronym means. Why should one align all these logic? They are different logic..

With this new feature the document loses the elegance to have the list of acronyms.

As I wrote my acronyms are hyperlinked in the text but I added also abbreviations which are present only in the list. In any case, this does not explain the randomness of hyperlink in the list. See the attachment. acronym_list.png shows CERN not hyperlinked but in the acronym_text.png it is and clicking on it takes you to the definition point, in the list of acronyms..

As you see there are both hyperlinked and not in the list of acronyms. But with which logic? and why in another document with

\usepackage[smaller]{acronym}
...
\usepackage{hyperref}

the acronyms are not hyperlinked?

Please, give me the recipe to return to old version of acronyms.

acronym.tar.gz

@marsmee
Copy link
Collaborator

marsmee commented Apr 14, 2020

Sorry @marsmee, but I don't like this new feature.. How can I get the old feature? The list of acronyms should not have acronyms hyperlinked but jut what acronyms mean..

I use the package with \usepackage[smaller]{acronym} and are hyperlinked in the text so that clicking on them the user goes to the list of acronyms (usually after the list of figures) to read the meaning of acronym. Why one should have the need to go where the acronym is used for the first time? I don't follow...

Different is the case of the acronym hyperlinked in the list of figures: reading the list of figures the user could have the need what an acronym means. Why should one align all these logic? They are different logic..

Thanks for your feedback @angelog0. We are sorry to hear that you do not like this new feature or that it is not reasonable for your use case. But in general it complements especially the withpage option and is (in my opinion) useful for several reasons:

  1. It allows to go directly to the context to better understand the (written out) acronym.
  2. Depending on how the a document is structured, it is possible to jump directly to the semantic definition of an acronym. To do this, an acronym can be reset before it is defined, for example.
  3. The list of acronyms can act like a second index.
  4. The withpage option developed by @oetiker would not exist without a reason.

As I wrote my acronyms are hyperlinked in the text but I added also abbreviations which are present only in the list. In any case, this does not explain the randomness of hyperlink in the list. See the attachment. acronym_list.png shows CERN not hyperlinked but in the acronym_text.png it is and clicking on it takes you to the definition point, in the list of acronyms..

As you see there are both hyperlinked and not in the list of acronyms. But with which logic? and why in another document with

Most likely, the CERN acronym is not linked because it has never been written out or marked as used in the text. I think you have always used it only with \acs or the starred macro variants.

As you see there are both hyperlinked and not in the list of acronyms. But with which logic? and why in another document with

\usepackage[smaller]{acronym}
...
\usepackage{hyperref}

the acronyms are not hyperlinked?

The hyperref package has to be loaded before the acronym package, otherwise the hyperref macros will be replaced by dummies. This is common practice and documented for our package. "If hyperref is loaded, all acronyms will link to their glossary entry."

Please, give me the recipe to return to old version of acronyms.

There are several ways to recover the old behaviour, here are two:

  • Completely remove the hyperrefs by using a dummy.
    \begingroup
    \makeatletter\def\AC@hyperref[#1]#2{#2}\makeatother
    \begin{acronym}[...]
       ...
    \end{acronym}
    \endgroup
    
  • Remove the colour from the links, which is only a cosmetic fix.
    {\hypersetup{hidelinks}
    \begin{acronym}[...]
      ...
    \end{acronym}}
    

If it turns out that several people wish the old behaviour back, I will consider implementing an appropriate option (noforwardlinks) to restore it.

@angelog0
Copy link
Author

@marsmee, thanks for clarifications and suggestions. Waiting for the back compatibility option, the quick workaround has been to just copy the old acronym.sty in the documents folder.

BTW, the new acronym package makes PDF documents about 4 KiB longer...

@ramingesh
Copy link

@marsmee Sorry for exhuming this thread, but I think this would be a good improvement:

If it turns out that several people wish the old behaviour back, I will consider implementing an appropriate option (noforwardlinks) to restore it.

The reason is that I also use acronyms that are "common knowledge" (for example, everybody knows what NASA is). So there is no value in explitly writing them out. For the sake of completeness, however, I like to include them in the list of acronyms, where I mark them as used immediately after defining them.

The drawback is that I get annoying warnings ("Hyper reference `acro:NASA' on page X undefined") when compiling the document [MikTeX 20.7 with pdflatex 2020.10.2].

The "golden solution" would of course be to somehow catch these acronyms without throwing warnings; but that's probably not easy to implement.

So I think a `noforwardlinks' option would be a good compromise. I really wouldn't want to sacrifice the links from acronyms to their definitions as I find that extremely useful.

Thanks!

@UBAUM
Copy link

UBAUM commented Nov 3, 2020

@ramses4th I totally agree with your suggestion. Basically, I have the same issue that I am using only short forms of well known acronyms (e.g. GPS). For readers unaware of the acronym a link is quite helpful. On the other hand, a link from the list of abbreviations seems less useful to me (and opens the question to which occurence of the acronym a link leads).

I can also reproduce the warnings, as for the \acs{} acronyms no link is created in the list of abbreviations:
*.tex|26 warning| LaTeX Warning: Hyper reference acro:GPS' on page iv undefined on input line 26. *.tex|26 warning| LaTeX Warning: Hyper reference acro:GPS' on page iv undefined on input line 26.

To circumvent the problem I tried using \acused{} or \acsu{}. However, this does not solve the issue.

The 'noforwardlinks' option seems to be my prefered solution, but alternatively adding links for \acs{} acronyms could also make the document/list of abbreviations more consistent.

Thanks a lot!

@marsmee
Copy link
Collaborator

marsmee commented Nov 5, 2020

Hi @ramses4th,
hi @UBAUM

Sorry for the late reply but I'm very busy at the moment in my private life. Despite the fact that I consider this a minor bug – as it's just a warning which only occurs in an uncommon use case – I'll do my best to fix this as soon as possible. However, I want to create a comprehensive solution to this problem which should also provide a non-style-breaking look when using a known acronym and having the withpage option enabled. The current implementation would create a LoA like
now
… but I think something like
opt1
would be better. The latter could either refer to the LoA itself or to the first occurrence, both are definitely not the perfect method to handle this case.

Another solution would be to add an asterisk or whatever symbol instead of a page number and perhaps to give the user an option to create a footnote with some custom text like
opt2

Since all three options (refer to LoA, refer to first, symbol or footnote) are likely to require much work and testing, I think I'm going to fix those warnings first and then start to work on a solution for the withpage option. Maybe @oetiker has a good idea.

@oetiker
Copy link
Owner

oetiker commented Nov 6, 2020

I @marsmee great that you are looking into this ... I like options one and three best …

@angelog0
Copy link
Author

angelog0 commented Jul 4, 2021

What is the status of this issue?

Even with TL2021 I use the old acronym.sty from TL2019. Is there the option to reproduce that behavior with current acronym package? Thanks

@ColorfulCookie
Copy link

ColorfulCookie commented Nov 30, 2022

@marsmee

If it turns out that several people wish the old behaviour back, I will consider implementing an appropriate option (noforwardlinks) to restore it.

I really like this feature but it bugged me a lot, that when I use \acresetall the hyperlinks in the acronym listing now point to the second of the "first" uses of the acronym.
Either having the option to turn off the hyperlinks, which is what I did now using your "dummy" idea, or the option to point to the first/second/third "first" feels kind of necessary when using the \acresetall command imo.

@angelog0
Copy link
Author

As the many complains shows, the new behavior of this package is out of any logic. You should have restored the original behavior, at the most you should have add the option forwardlinks for who (if there is) likes this new behavior. I will not use this package for future documents and for the old I will continue to use the old TL2019 .sty.

@chrislandis
Copy link

As the many complains shows, the new behavior of this package is out of any logic. You should have restored the original behavior, at the most you should have add the option forwardlinks for who (if there is) likes this new behavior. I will not use this package for future documents and for the old I will continue to use the old TL2019 .sty.

@angelog0: I'm sorry that you feel this way about the new feature. The explanation for the package upgrade was provided above and you said in your reply post that you were looking forward to having "the back compatibility option" that this noforwardlinks option provides.

As LaTeX users, we are free to use or avoid whatever packages we want. Even while waiting for the official push to CTAN, I have the new .sty and already found this feature helpful in my own projects.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants