无法使用 OSCOLA 书目样式编制索引

无法使用 OSCOLA 书目样式编制索引

我正在尝试在引用法律材料的文档中生成案例和立法表格。我正在使用BibLaTeX 的 OSCOLA 样式这种方式通常效果很好。但是,我在插入案例表等时遇到了困难。正如样式文档所述,在法律写作中,这些内容必须位于文档正文之前,这与正常行为相反。样式(我认为)为此提供了一个命令 \printindexearly,它应该可以工作,但我仍然遇到错误:

! Package imakeidx Error: Misplaced \printindex[test].

由于我似乎无法自定义 TeXShop 中的索引命令,因此弄清楚这一点变得更加复杂,因此我从命令行运行 makeindex。

这是一个 MWE:

LaTeX 文件:

\documentclass[12pt, a4paper]{book}


\usepackage[style=british]{csquotes}
\usepackage[style=oscola,    citereset=chapter, ibidtracker=true,          indexing=cite,         backend=biber,        babel=hyphen]{biblatex}
\usepackage[splitindex,            nonewpage]{imakeidx}

\makeindex[name=cases, title={Table of Cases}]

\DeclareIndexAssociation{eucases}{cases}

\addbibresource{Bibliography.bib}
\title{Test Document}
\begin{document}

\printindexearly{cases}

 Environmental protection was not mentioned as a policy goal or area of Community powers in the Treaty of Rome and therefore the European Council stated that environmental measures could be harmonised as part of efforts to equalise competitive conditions across the EEC, something which was later affirmed by the European Court of Justice.\autocite[]{C91/79}  

\end{document}

.bib 文件:

@jurisdiction{C91/79,
title = {Commission v. Italy}, 
shorttitle = {Commission v. Italy}, 
shorthand = {C91/79}, 
volume = {}, 
number = {91/79}, 
keywords = {eu}, 
court = {}, 
journaltitle = {ECR}, 
series = {}, 
pages = {1099}, 
pagination = {}, 
options = {}, 
note = {}, 
additionalreports = {}, 
date = {1980}, 
location = {}
}

我用来生成索引文件的命令行是:

 /usr/local/texlive/2013/bin/x86_64-darwin/splitindex test.idx -- -s oscola

答案1

使用imakeidx选项splitindex,可以使用多个索引。为了知道哪个索引条目属于哪个索引,必须分别使用\index[indexA]{Entry}等以及。\printindex[indexA]\printindexearly[cases]

原帖者写作时要么打错了,要么语法错误\printindexearly{cases}

\documentclass[12pt, a4paper]{book}


\usepackage[style=british]{csquotes}
\usepackage[style=oscola,    citereset=chapter, ibidtracker=true,          indexing=cite,         backend=biber,        babel=hyphen]{biblatex}
\usepackage[splitindex,            nonewpage]{imakeidx}

\makeindex[name=cases, title={Table of Cases}]

\DeclareIndexAssociation{eucases}{cases}

\addbibresource{Bibliography.bib}
\title{Test Document}
\begin{document}

\printindexearly{cases}

 Environmental protection was not mentioned as a policy goal or area of Community powers in the Treaty of Rome and therefore the European Council stated that environmental measures could be harmonised as part of efforts to equalise competitive conditions across the EEC, something which was later affirmed by the European Court of Justice.\autocite[]{C91/79}  

\end{document}

相关内容