使用 biblatex 和索引的多个索引

使用 biblatex 和索引的多个索引

我需要两个索引:一个是名称索引,一个是概念索引。

我正在使用biblatex索引(以及 Mac 上的 TeXshop,我是 LaTeX 新手,所以对于任何愚蠢的问题深表歉意)。这对于名称索引来说很有效,但我还需要索引概念。

到目前为止,我都是这样做的\index{concept1}。我得到了一个包含名称和概念的索引。这很好,直到我的主管想要两个不同的索引。

现在,使用下面的代码,我只能获得我手动索引的事物的一个索引,但没有更多名称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}

我希望已经提供了 MWS——我怀疑我必须运行两次我不知道的东西。

答案1

biblatex文档 ( )中的示例 2121-indexing-multiple.tex演示了如何使用index包创建单独的主题、名称和标题索引。这是使用该包的另一个示例。它使用对和(或,如果您使用 加载)imakeidx的常见调用进行编译。latexbiberbibtexbiblatexbackend=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}

答案2

这个答案对我有用,尽管它需要按照说明进行更新Biblatex 3.3 名称格式

在 biblatex 3.3 中,\DeclareNameFormat 的格式已发生改变。在其代码部分,它不再接受 8 个参数,而只接受一个参数。对于名称的各个部分,现在有宏,您可以通过使用 \namepart 拆分主名称数据来获取这些宏。

我相应地更新了 MWE:

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]}%
  {\namepartfamily}% #1->\namepartfamily, #2->\namepartfamilyi
  {\namepartgiven}%  #3->\namepartgiven,  #4->\namepartgiveni
  {\namepartprefix}%  #5->\namepartprefix, #6->\namepartprefixi
  {\namepartsuffix}%   #7->\namepartsuffix, #8->\namepartsuffixi
  }   

\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}

按照 Mensch 的要求,我添加了结果的截图:

正文

参考书目

概念索引

名称索引

标题索引

相关内容