I'm trying to make a document for myself that lists all of the references in my bibliography with their abstracts and keywords. I want an index which lists all of the keywords and their instances, where I can click on a specific instance and be redirected to that entry in the document (if I can't be redirected to that entry's title, then at least to where that keyword shows up). I also want the reverse to be possible, i.e. click on a keyword in an entry and be redirected to that keyword in the index.
The closest I could come up with is using the reading
class in biblatex
and use the imakeidx
package to make an index. I've tried fiddling around and reading the documentation and relevant questions here, but I could only go so far. Here's an MWE of what I have up to now, using advice taken from here and here:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Padial2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={biology, taxonomy},
}
\end{filecontents*}
\usepackage[backend=biber,style=reading,sorting=ynt,entrykey=false]{biblatex}
\AtEveryBibitem{\csappto{blx@bbx@\thefield{entrytype}}{
\newline \textbf{Keywords:} \printfield{keywords}}}
\DeclareRangeChars{~,;-+/{}} % add '{}' as page range delimiter
\addbibresource{\jobname.bib}
\DeclareFieldFormat{file}{\href{file:#1}{\textbf{Open file}}}
\AtEveryBibitem{%
\csappto{blx@bbx@\thefield{entrytype}}{% put at end of entry
\iffieldundef{file}{\space \textbf{No file!}}{%
\space \printfield{file}
}
}
}
\usepackage[colorlinks,unicode,breaklinks]{hyperref}
\usepackage{imakeidx}
\makeindex[name=keywords, title=List of Keywords]
\DeclareIndexFieldFormat{keywords}{\forcsvfield{\index[keywords]}{keywords}}
\AtEveryBibitem{\indexfield{keywords}}
\begin{document}
\nocite{*} % list all entries
\printbibliography
\printindex[keywords]
\end{document}
Here is the result (ignore the green/grey colour; screenshot tool isn't working properly):
Goal
The keywords should hyperlink to the index, and the index instances (here shown as page numbers) should link back to the place where that keyword was used (ideally to the article title itself, but if not at least to that keyword specifically).
How can I achieve this?
EDIT: Removed other requests as I either fixed them manually or gave up on them for now.