1

As a starting point, there are two examples to build indices grouped on the basis of 'authors and their titles' and 'year of published titles' here.

I can also find many examples that use keywords in the `\printbibliography' command but I am not looking for that.

This should be the foundational source for designing the solution, but I couldn't figure it out.

If the keywords are presented in the bibtex as a comma-separated list, then, to organize the titles (with their cited positions in the document) on the basis of the keywords.

For example, for mybib.bib:

@article{adelson1982phenomenal,
  title={Phenomenal coherence of moving visual patterns},
  author={Adelson, Edward H and Movshon, J Anthony},
  journal={Nature},
  volume={300},
  number={5892},
  pages={523},
  year={1982},
  publisher={Nature Publishing Group},
  keywords={research, experimental}
}

@article{proske2012proprioceptive,
  title={The proprioceptive senses: their roles in signaling body shape, body position and movement, and muscle force},
  author={Proske, Uwe and Gandevia, Simon C},
  journal={Physiological reviews},
  volume={92},
  number={4},
  pages={1651--1697},
  year={2012},
  publisher={American Physiological Society Bethesda, MD},
  keywords={review, experimental}
}

the index should look something like this:

experimental
    Phenomenal coherence of moving visual patterns, <position where the paper has been cited>
    The proprioceptive senses: their roles in signaling body shape, body position and movement, and muscle force, 4, 5

review
    The proprioceptive senses: their roles in signaling body shape, body position and movement, and muscle force, 4, 5

research
    Phenomenal coherence of moving visual patterns, <position where the paper has been cited>

Finally, this answer may help in constructing the solution.

1

Keywords is a special comma-separated field. We can iterate over its items with etoolbox's \forcsvlist.

Then it is just a matter of getting the index subentries right. For that I stole the code from 22-indexing-subentry.tex, in particular \DeclareIndexFieldFormat{with:year}.

In index:keywords the sole argument #1 holds one keyword. We then index that keyword and add a subentry with the title (\mkbibindex field takes two arguments: the first is for sorting, the second the (formatted, if you like) printed output; the special fields indextitle and indexsorttitle are calculated automatically if they are not given explicitly in the .bib file).

The macro citeindex is changed to index the keywords. Finally, indexing of citations needs to be turned on with indexing=cite.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, indexing=cite, backend=biber]{biblatex}
\usepackage{imakeidx}
\makeindex

\DeclareIndexFieldFormat{keywords}{%
  \forcsvlist{\usebibmacro{index:keywords}}{#1}}

\newbibmacro{index:keywords}[1]{%
  \usebibmacro{index:entry}{\index}{%
    #1%
    \subentryoperator
    \mkbibindexfield
      {\thefield{indexsorttitle}}
      {\emph{\csfield{indextitle}}}}}

\renewbibmacro*{citeindex}{%
  \ifciteindex
    {\indexfield{keywords}}
    {}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{adelson1982phenomenal,
  title    = {Phenomenal coherence of moving visual patterns},
  author   = {Adelson, Edward H. and Movshon, J. Anthony},
  journal  = {Nature},
  volume   = {300},
  number   = {5892},
  pages    = {523},
  year     = {1982},
  keywords = {research, experimental},
}

@article{proske2012proprioceptive,
  title    = {The proprioceptive senses},
  subtitle = {Their roles in signaling body shape,
              body position and movement, and muscle force},
  author   = {Proske, Uwe and Gandevia, Simon C.},
  journal  = {Physiological reviews},
  volume   = {92},
  number   = {4},
  pages    = {1651--1697},
  year     = {2012},
  keywords = {review, experimental},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
Lorem \autocite{adelson1982phenomenal,sigfridsson}
\clearpage
ipsum \autocite{proske2012proprioceptive,worman}
\clearpage
dolor \autocite{proske2012proprioceptive,adelson1982phenomenal}
\printbibliography
\printindex
\end{document}

experimental>Phenomenal coherence of moving visual patterns>1, 3//experimental>The proprioceptive senses>2, 3//research>Phenomenal coherence of moving visual patterns>1, 3//review>The proprioceptive senses>2, 3

|improve this answer|||||
  • Because I had multiple indices, each with a specific name, I changed \usebibmacro{index:entry}{\index}{% to \usebibmacro{index:entry}{\index[name_of_my_index]}{% – Himanshu Ahuja Jul 28 '19 at 20:31
  • What is the use of with in \DeclareIndexFieldFormat, which is being used in the example used to index titles based on years? – Himanshu Ahuja Jul 29 '19 at 18:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.