5

I need two indices: one of names, one of concepts.

I'm using biblatex with indexing (and TeXshop on a mac, I am a newbie of LaTeX, so sorry for any stupid question). This works fine for the index of names, but I need to index also concepts.

Until now, I did with \index{concept1}. I get one index with both names and concepts. This was fine until my supervisor wanted two different indices.

Now, with the code below, I get only one index of things I manually indexed, but no more names from biblatex

\documentclass[12pt,a4paper,twoside,openright,titlepage,fleqn,%
headinclude,,footinclude,BCOR5mm,%
           numbers=noenddot,cleardoublepage=empty,%
           tablecaptionabove]{scrreprt}

\usepackage[style=philosophy-modern,indexing,hyperref,square,natbib,backref]{biblatex}

\usepackage{imakeidx}
\makeindex[name=title,title={List of Titles}]



\renewbibmacro*{citeindex}{%
\ifciteindex
{\indexnames{labelname}}%
{}}
\renewbibmacro*{bibindex}{%
\ifbibindex
{\indexnames{author}%
\indexnames{editor}%
\indexnames{editora}%
\indexnames{editorb}%
\indexnames{editorc}}%
{}}%
%\DeclareIndexFieldFormat{indextitle}{%
%\usebibmacro{index:title}{\index}{#1}}
%\DeclareIndexNameFormat{default}{%
%\usebibmacro{index:name}{\index[nomi]}{#1}{#3}{#5}{#7}}
\usepackage{index}
%\newindex{default}{idx}{ind}{Index}
%\newindex{nomi}{ndx}{nnd}{Index of Names}


\usepackage{makeidx} %\usepackage{imakeidx}
%\DeclareIndexFieldFormat{indextitle}{}{}{}


\usepackage[eulerchapternumbers,subfig,beramono,eulermath,pdfspacing,listings]{classicthesis} %minionpro parts
\usepackage{arsclassica}


\input{arsclassica-settings}

\makeindex%[program=xindy]

\begin{document}


\input{Chapters/hw}
 \index{normativity}

\printbibliography

\printindex
%\printindex[title]

\end{document}

I hope to have provided a MWS – I suspect I must run twice something I don't know.

  • 1
    Welcome to TeX.SX! I took the liberty of doing minor edits on your post; we like to mark our inline code here. You can use backticks ` to obtain the same result as in my edit. – Corentin Jun 27 '13 at 20:37
  • You surely cannot use both imakeidx and index. – egreg Jun 27 '13 at 22:49
  • 1
    Can you show the version with only one index that worked? – egreg Jun 27 '13 at 23:02
  • Example 21 from the biblatex documentation covers multiple indices (concept/subject, name, title) with the index package. The answer really depends on the indexing package you're using, so I'd meet egreg's request. – Audrey Jun 28 '13 at 3:24
  • Now there is the version with only one index working, both of names and of concepts. – Fedrîg Jun 28 '13 at 7:11
2

Example 21 from the biblatex documentation (21-indexing-multiple.tex) demonstrates how you can create separate subject, name and title indices using the index package. Here is another example using the imakeidx package. It compiles with the usual calls to latex and biber (or bibtex, if you load biblatex with backend=bibtex).

\documentclass[12pt,a4paper,twoside,openright,titlepage,fleqn,
  headinclude,footinclude,BCOR5mm,numbers=noenddot,cleardoublepage=empty,
  captions=tableheading]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage{imakeidx}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=philosophy-modern,indexing,hyperref,square,natbib,backref]{biblatex}
\usepackage{subfig}
\usepackage[eulerchapternumbers,subfig,beramono,eulermath,pdfspacing,
  listings]{classicthesis}
\usepackage{arsclassica}

\makeindex[title={Concept Index}]
\makeindex[name=name,title={Name Index}]
\makeindex[name=title,title={Title Index}]

\DeclareIndexNameFormat{default}{%
  \usebibmacro{index:name}{\index[name]}{#1}{#3}{#5}{#7}}

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

\renewbibmacro*{citeindex}{%
  \ifciteindex
    {\indexnames{labelname}%
     \indexfield{indextitle}}
    {}}

\renewbibmacro*{bibindex}{%
  \ifbibindex
    {\indexnames{author}%
     \indexnames{editor}%
     \indexnames{editora}%
     \indexnames{editorb}%
     \indexnames{editorc}%
     \indexfield{indextitle}}
    {}}

\addbibresource{biblatex-examples.bib}
\begin{document}
\nocite{*}
\cite{piccato,gaonkar,jaffe,malinowski,coleridge,gerhardt,cicero}
\index{Example concept index entry}
\printbibliography
\printindex
\printindex[name]
\printindex[title]
\end{document}
  • Thank you! It works now, but the last page of each index won't print, and the margins of odd/even pages are inverted. I get these kinds of errors: \begin{document} ended by \end{theindex} and \begin{document} ended by \end{multicols} – Fedrîg Jun 28 '13 at 22:14
  • @Fedrîg That is related to your document layout, not biblatex. I don't get any issues on my end when I use your document class, load subfig and your additional packages. So the problems must lie in the files you include with \input. – Audrey Jun 29 '13 at 0:56

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.