Using the authoryear
style, it is possible to setup multiple indexes, including an author index, as follows:
\begin{filecontents*}{oscola.bib}
@article{boyle04,
author = {Boyle, James},
title = {A Manifesto on WIPO and the Future of Intellectual Property},
journaltitle = {2004 Duke L \& Tech Review 0009},
url = {http://dltr.law.duke.edu/2004/09/08/a-manifesto-on-wipo-and-the-future-of-intellectual-property},
urldate = {2012-07-18},
options = {url=true},
}
@legislation{eggs,
title = {Eggs and Chicks (England) Regulations},
date = {2009},
number = {SI 2009\slash 2163},
pagination = {regulation},
entrysubtype = {secondary},
}
@jurisdiction{corfu,
title = {Corfu Channel Case},
subtitle = {UK v Albania},
titleaddon = {Merits},
date = {1949},
reporter = {ICJ Rep},
pages = {4},
keywords = {int},
}
\end{filecontents*}
\begin{filecontents*}{oscola.ist}
% Part of the OSCOLA package for biblatex: see the file
% oscola.lbx for copyright and licence information
% v 1.5 01/04/2017
delim 0 "\\space\\dotfill\\space "
delim_1 "\\space\\dotfill\\space "
delim_2 "\\space\\dotfill\\space "
\end{filecontents*}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[margin=2cm]{geometry}
\usepackage[splitindex,nonewpage]{imakeidx}
\usepackage{csquotes,xcolor,graphicx}
\usepackage{hyperref}
\setlength\parindent{0pt}
\pagestyle{empty}
\hypersetup{
pdfauthor={The author},
pdftitle={The title},
colorlinks=true,
pdfborder={0 0 0},
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black},
citecolor={green!50!black},
urlcolor={purple!80!black}
}
\usepackage[%
style=authoryear,
indexing=cite,
backend=biber,
sorting=nyt,
maxcitenames=1,
mincitenames=1,
maxbibnames=999,
minbibnames=999,
refsection=section,
doi=true,
url=true
]{biblatex}
\indexsetup{level=\section*,toclevel=section,noclearpage}
\makeindex[name=general,intoc=true,columns=2,options=-s oscola.ist,title={General Index}]
\makeindex[name=name,intoc=true,columns=2,options=-s oscola.ist,title={Index of Authors}]
\makeindex[name=title,intoc=true,columns=1,options=-s oscola.ist,title={Index of Titles}]
\makeindex[name=ukcases,intoc=true,columns=1,options=-s oscola.ist,title={Table of UK Cases}]
\makeindex[name=ukleg, intoc=true,columns=1,options=-s oscola.ist,title={Table of UK Legislation}]
\DeclareIndexNameFormat{default}{%
\usebibmacro{index:name}{\index[name]}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}
}
\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{oscola.bib}
\begin{document}
\section{My text}
Add an entry to the general index. \index[general]{IndexEntry}\par
Add a citation to an article \cite{boyle04}. The author's name to appear in the Index of Authors.\par
Add a citation to a piece of legislation \cite{eggs}\index[ukleg]{Legislation!Eggs}, which is to appear in the Table of UK legislation.\par
Manually add a case \cite{corfu}\index[ukcases]{Case!Corfu}, which is to appear in the Table of UK cases.\par
Run pdflatex, biber, pdflatex, splitindex, pdflatex
\printbibliography[nottype=jurisdiction,nottype=legislation,nottype=legal,notsubtype=parliamentary,nottype=commentary]
\printindex[general] % Print the general index
\printindex[name] % Print the Index of Authors
\printindex[title] % Print the Index of Titles
\printindex[ukleg] % Print the Index of UK Legislation
\printindex[ukcases] % Print the Index of UK cases
\end{document}
Which produces this, as required:
OSCOLA
is the Oxford University Standard for the Citation of Legal Authorities. It is implemented for Biblatex
using the OSCOLA
package.
Changing the authoryear
style on line 61 to the oscola
style, results in the incorrectly producing the author index, as follows:
The OSCOLA standard requires the use of footnote citations, and defines the command \footcite
for this purpose. My understanding is that the the incorrect author index will be due to incorrectly defining \usebibmacro{index:name}{\index[name]}
for the oscola
style.
Advice regarding how to create an author index for the oscola
style would be appreciated.
A secondary question concerns the formatting of the index. I expect makeindex
to use oscola.ist
to produce an index with right aligned page numbers separated from the index item by \dotfill
. However, there is no dotfill and the page numbers are raggedright
.
The file is compiled with:
pdflatex
, biber
, pdflatex
, splitindex
,pdflatex
.