2

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): enter image description here enter image description here

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.

  • That is an interesting project. Normally we prefer to ask one question per question though, and you seem to come packed with a whopping seven (!). It is easier for future visitors and also the people trying to answers questions if you raise only one issue per question. I for example probably know the answer for two or three of the points right away and could probably cook something up for another two (if I'm lucky) - but then we would still be left with some of the issues and so I would be wary to answer. – moewe Oct 4 '16 at 7:40
  • ... On the other hand if someone finds an answer to only some of your issues and posts that, people might think the question is answered and will not be as eager to invest time into it. I will admit that some of your issues can probably solved simultaneously and it would not be too bad to have them in the same question. But with that seven it is really hard to give comprehensive and satisfying answer. – moewe Oct 4 '16 at 7:41
  • @moewe yes, I was debating posting this question(s) since there's so many parts to it. Since these questions are "small"/easy (I'm assuming?), I didn't want to seem like I was spamming by posting multiple questions one after the other, so I figured combining them all here was the best approach, although even still its a lot :/ – airatin Oct 4 '16 at 8:09
  • 1
    Not all of them are that easy, I assume. But then that could be my bias. (1) should be easy, but (2) could be more complicated if the naive solution doesn't cut it. (4) depends on the reader I guess and I'm not sure if we can do anything about that. ... Maybe you can at least re-structure the question a bit, you don't have to make seven questions out of it, but maybe two (or three). – moewe Oct 4 '16 at 8:20
  • @moewe I've tried boiling it down into three main questions/requests, hope this simplified things a bit --- if not, let me know and I will fix it. – airatin Oct 4 '16 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.