0

Generating separate (author and subject) indexes with bibtex is very well documented. But how about generating those two indexes with BibLatex, I found no documentation.

3

2 Answers 2

2

biblatex comes with several example files, three of them concerned with indexing.

Those files not only contain example code, but also extensive explanatory comments.

Here is a simplified version of 21-indexing-multiple.tex that uses imakeidx (as 22-indexing-subentry.tex).

The key is that one needs to define the standard biblatex indexing (bib)macros to call \index with an optional argument to specify into which index the entry should go.

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[american]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear, indexing]{biblatex}
\addbibresource{biblatex-examples.bib}

\usepackage{imakeidx}
\makeindex
\makeindex[name=names,title={Names}]
\makeindex[name=titles,title={Titles}]

\DeclareIndexNameFormat{default}{%
  \usebibmacro{index:name}{\index[names]}
   {\namepartfamily}
   {\namepartgiven}
   {\namepartprefix}
   {\namepartsuffix}}


\DeclareIndexFieldFormat{indextitle}{%
  \usebibmacro{index:title}{\index[titles]}{#1}%
}

\begin{document}
\cite{sigfridsson,worman,nussbaum,geer,pines}

\index{Example entry}

\printbibliography
\printindex
\printindex[names]
\printindex[titles]
\end{document}

Index of Names

Index of Titles

0

Thanks, here is an MMWE that creates the two distinct indexes (authors and subjects)

\documentclass{article}
    \begin{filecontents}{my.bib}
    @article{sanchez16,
      title={Use of Damage Rating Index to Quantify Alkali-Silica Reaction Damage in Concrete: Fine versus Coarse Aggregate.},
      author={Sanchez, L. and Fournier, B. and Jolin, M. and Bedoya, M. and Bastien, J. and Duchesne, J.},
      journal={ACI Materials Journal},
      volume={113},
      number={4},
      year={2016}
    }
    \end{filecontents}
    \usepackage{csquotes}
    \usepackage[style=numeric,natbib=true,backend=bibtex,sorting=nyt,refsegment=section,defernumbers=true,maxnames=4,indexing=cite
    ]{biblatex}
    \addbibresource{my.bib}
    \usepackage{imakeidx}
    \makeindex
    \makeindex[name=names,title={Names}]
    \DeclareIndexNameFormat{default}{%
      \usebibmacro{index:name}{\index[names]}
       {\namepartfamily}
       {\namepartgiven}
       {\namepartprefix}
       {\namepartsuffix}}
    \renewbibmacro*{citeindex}{%
      \ifciteindex
        {\indexnames{labelname}}
        {}}
    %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    \begin{document}
    \citet{sanchez16} have shown    \index{Damage Rating}
    \printbibliography
    \printindex
    \printindex[names]
    \end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .