LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and AcronymsAuthor index with apacite, subject index and hyperref Topic is solved

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
butfilter
Posts: 3
Joined: Mon Aug 06, 2012 2:37 pm

Author index with apacite, subject index and hyperref

Postby butfilter » Mon Aug 06, 2012 2:41 pm

Hello,

I have the following problem. I would like to create hyperlinks in the subject index while additionally having the author index in the document. I generate the author index with a bib file and apacite with the option index or emindex. The subject index is generated with the makeidx package. As a result, the entries in the author index as well as in the reference list are linked with the corresponding points in the text. However, links in the subject index are not activated. If I enable the options for making author index in apacite, everything works alright, i.e. links in the subject index are active.

Enclosed, please find a short sample file example.tex, lit.bib and the generated example.pdf where you can see how I proceeded. I would be very grateful if you could give me any hint how to make the links in the subject index active too.

Best
Attachments
example.pdf
(74.9 KiB) Downloaded 521 times
lit.bib
(154 Bytes) Downloaded 268 times
example.tex
(595 Bytes) Downloaded 365 times

Tags:

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Mon Aug 06, 2012 3:18 pm

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to goLaTeX and MrUnix (two German LaTeX forums).
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

User avatar
Stefan Kottwitz
Site Admin
Posts: 8522
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Aug 06, 2012 3:58 pm

Hi,

welcome to the board!

Besides
  1. makeindex -o example.and example.adx

run also standard makeindex, i.e.
  1. makeindex example


When I did that, I got the normal index with hyperlinks as well:
index.png
index.png (3.77 KiB) Viewed 5919 times


Stefan
Site admin

butfilter
Posts: 3
Joined: Mon Aug 06, 2012 2:37 pm

Postby butfilter » Mon Aug 06, 2012 9:17 pm

Hi Stefan,

many thanks for your response. I have tried what you did but unfotunately I still obtain the same as before. Links in the subject index are not activated. I have no idea where the problem lies. Could you tell me which steps you exactly do while compiling the tex file?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8522
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Aug 06, 2012 10:25 pm

Well, there are some steps (pdfLaTeX, bibtex, pdfLaTeX twice, separate makeindex runs), I hardly remember now which produced all hyperlinks. Maybe it's a workaround to produce the apacite index, remove it from the document source (exept its \printindex line), run makeindex normally and compile again. This could be what I made during testing.

There are packages for creating multiple indexes, such as index, imakeidx, splitindex, multind. apacite may use index. However, it's probably not compatible with other multi-index packages and hyperref regarding multiple linking.

Stefan
Site admin

butfilter
Posts: 3
Joined: Mon Aug 06, 2012 2:37 pm

Postby butfilter » Tue Aug 07, 2012 9:56 am

Hi,
for all of you who are interested in the solution: loading of package index seems to do the trick. Attached you can find the new tex file example.tex that produces the desired output.

  1. \documentclass[a4paper,12pt]{article}
  2. \usepackage[english]{babel}
  3. \usepackage[T1]{fontenc}
  4. \usepackage[ansinew]{inputenc}
  5. \usepackage{makeidx}
  6. \makeindex
  7. \usepackage{index}
  8. \usepackage[hyperindex=true]{hyperref}
  9. \usepackage[emindex]{apacite}
  10. \bibliographystyle{apacitex}
  11. \makeindex
  12.  
  13. %****************************************
  14.  
  15. \begin{document}
  16.  
  17.  
  18. This is a book by \citeA{HK}.
  19. \newpage
  20. This is a very famous approach.\index{approach}
  21. \newpage
  22. This is a very powerful function.\index{function}
  23. \newpage
  24.  
  25. \bibliography{lit}
  26. \newpage
  27. \printindex[autx]
  28. \newpage
  29. \printindex
  30.  
  31.  
  32. \end{document}
  33.  
Attachments
example.tex
(619 Bytes) Downloaded 317 times

harwijn
Posts: 1
Joined: Sun Aug 23, 2015 6:45 pm

Postby harwijn » Sun Aug 23, 2015 6:51 pm

I've been trying the same with this MWE but the author index fails to print. It seems there's no input of authors in the .ind. Any ideas what went wrong? Normal index works fine.

User avatar
cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Fri Aug 28, 2015 7:12 pm

harwijn wrote:I've been trying the same with this MWE but the author index fails to print. It seems there's no input of authors in the .ind. Any ideas what went wrong? Normal index works fine.


Hi and welcome to the forum. It seems to me you have a new question (albeit related to this one). Would you mind opening a new thread with a Infominimal working example showing what doesn't work? (If the background is needed you can easily link to this thread for information)

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim


Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 1 guest