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

2
  • 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.
https://tex.stackexchange.com/questions/501368/build-an-index-based-on-keywords-in-the-bibtex-file-using-biblatex-and-imakei
tex.stackexchange.com
crawl=CC-MAIN-2021-17
169879
application/http; msgtype=response
sha1:3YWJFR4CFMSF7UE4JU464N6YRJAQH7AD
<urn:uuid:b4835689-f34e-499f-b8e9-3dee47552c8d>
2021-04-16T12:21:13Z
151.101.65.69
text/html
sha1:TREEOBWWU4J5FDO5YHI4BCCMSHLOIFKN
<urn:uuid:86d8eb70-c278-43cf-9a3a-482259a3124d>
https://tex.stackexchange.com/questions/501368/build-an-index-based-on-keywords-in-the-bibtex-file-using-biblatex-and-imakei
response
<urn:uuid:0bc6ef0f-452d-42fd-bd0d-47183de6047e>
isPartOf: CC-MAIN-2021-17
publisher: Common Crawl
description: Wide crawl of the web for April 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-62.ec2.internal
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/