3

I found it easy to produce an index from biblatex using the makeidx package, biblatex's indexing=cite option, and the \makeindex and \printindex commands. However, what I did not find easy was to have an index of names only, with no titles mentioned. Please have a look at the following MWE, which I take from the biblatex example documents (20), slightly adjusted:

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

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

\usepackage{makeidx}
\renewbibmacro*{citeindex}{\indexnames{labelname}{}}
\makeindex

\begin{document}

\section*{Indexing with the \texttt{makeidx} package}

\nocite{*}

\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero}

\index{Example entry}

\clearpage


\printbibliography

\printindex

\end{document}

I tried to insert

\renewbibmacro*{citeindex}{%
    \ifboolexpr{ test {\ifciteindex} and not test {\iffootnote} }
    {\indexnames{author}}{}}

as proposed here, but that doesn't seem to work. So, any ideas how I can get an index of names only?

3

You need to add indexing=cite to your biblatex options.

\usepackage[indexing=cite,style=authortitle,backend=biber]{biblatex}

To avoid \citetitle from adding the title to the index, you need to modify the \citetitle macro to change what it indexes. I've made the assumption that if you cite a title, you still want the author to appear on the index on that page, so I've modified \citetitle to index the authors' names. But if you don't want that you can just remove the indexing code altogether from \citetitle.

Here's a complete example:

\documentclass[a4paper]{article}

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

\usepackage[indexing=cite,style=authortitle,backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareCiteCommand{\citetitle}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printfield[citetitle]{labeltitle}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand*{\citetitle}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printfield[citetitle]{title}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\usepackage{makeidx}
\renewbibmacro*{citeindex}{\indexnames{labelname}{}}
\makeindex

\begin{document}

\section*{Indexing with the \texttt{makeidx} package}

\nocite{*}

\cite{piccato,gaonkar,malinowski,cicero}
\citetitle{coleridge,gerhardt}

\index{Example entry}

\clearpage


\printbibliography

\printindex

\end{document}

enter image description here

  • Perfect, that actually solved the problem as described in my question. However, it left me with the following problem: The proposed \renewbibmacro* will not only allow names of authors to the index, but also titles of works, if they are cited after \citetitle in a footnote, like this: \footnote{\citetitle[43--72]{coleridge}. Any idea on why that is, and how to fix it? Obiously, I wouldn't want the titles of works in an index of names. – faxminell Jul 3 '17 at 21:45
  • @faxminell I've updated the solution. – Alan Munn Jul 3 '17 at 22:29

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.