3

I would like to create an index of authors, an index of titles and an index of terms using biblatex with indexing=cite and imakeidx.

However, I manage to get only an Index of Authors.

My MWE is:

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman,english]{babel}

\usepackage[style=authoryear-icomp,indexing,indexing=cite,backend=biber]{biblatex}
\bibliographystyle{alpha}
\bibliography{\jobname}

% add authors, editors, etc to list of authors
\renewbibmacro*{citeindex}{%
  \ifboolexpr{ test {\ifciteindex} and not test {\iffootnote} }
    {\indexnames{labelname}}{}}

\usepackage[xindy]{imakeidx}
\makeindex
\makeindex[name=term,title=Index of Terms,columns=2]

\begin{document}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
  @book{Knu86,
    author = {Knuth, Donald E.},
    year = {1986},
    title = {The \TeX book},
  }
\end{filecontents}

\begin{document}

This \index[term]{book} is great! \cite{Knu86}

\printbibliography

\renewcommand{\indexname}{Index of Authors}
\printindex
\printindex[term]

\end{document}

Usually indexing will give an index with both the authors and titles. Indexing=cite only authors. What is the easiest way possible in my example to get three indices?

  • 1
    Remove the \bibliographystyle{alpha} line, it does nothing in biblatex. It can only add confusion. – moewe Oct 24 '17 at 10:32
3

Inspired by Indexing with biblatex - how to filter out publication titles of indexed authors? you could try

\documentclass{article}
\usepackage[T1]{fontenc} 
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[indexing=cite, backend=biber, style=authoryear-icomp]{biblatex}
\usepackage[xindy]{imakeidx}
\makeindex
\makeindex[program=texindy, name=nameindex, title = Index of names]
\makeindex[program=texindy, name=titleindex, title = Index of titles]

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

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

\renewbibmacro*{citeindex}{%
  \ifboolexpr{ test {\ifciteindex} and not test {\iffootnote} }
    {\indexnames{labelname}%
      \indexfield{indextitle}}{}}

\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}
\begin{document}
\cite{geer,worman,sigfridsson,cicero}
\index{foo}

\printbibliography
\printindex[nameindex]
\printindex[titleindex]
\printindex
\end{document}

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.