To answer the first question, an immediate hack is shown below. Medium-term solution would be to enhance OSCOLA's regex processing when constructing the index sort key (contact the maintainer). Long-term solution for easier maintenance would be, possibly, to separate out the components of the case number molecule into its atoms as separate fields: then mixing-and-matching them wouldn't need to be filtered through a transformation layer.
Anyway:
Steps
- In the
.bib
file: Add an arbitrarily-named sorting-key field (called sortkeyN
in the MWE) to the bib entries: sortkeyN={T1989011A},
- where the format is xyyyynnnL, x=C or T, yyyy = year, nnn=three-digit case number, L = suffix letter (e.g., R) and decide for yourself what default letter you want when there is no actual suffix (e.g., A
to put the cases before R
, and z
to put them after).
1a. To be practical, a few (<100?) can be constructed manually; more or bulk would need some automation.
- Using biblatex's mapping feature, EU case numbers are mapped by OSCOLA (using regex transformations) from the
number
field to the built-in biblatex userf
field. Override this in the .tex
file with your own mapping, from sortkeyN
directly to userf
:
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=true]{
\pertype{jurisdiction}
\step[fieldsource=keywords,
match=eu,
final=true]
\step[fieldsource=sortkeyN]
\step[fieldset=userf,
origfieldval=true]
}}}
The userf
field is used to specify the index sorting order when the bibmacro index:title
is called. (An alternative would be to define a separate index:number
bibmacro which uses the sortkeyN
field directly - with corresponding code changes elsewhere in OSCOLA to call the bibmacro.)
Edited to add
Steps 1 and 2 are sufficient. An experiment leaving out steps 3 and 4 still produced a table of cases sorted by sortkeyN
(via userf
) - although I don't know (yet) what effect steps 3 and 4 have elsewhere (if any).
Send eucasesnum
items to the cases
split index instead of the trash
index: snippet: \renewcommand\bbx@eucasesnum{cases}
. See the MWE, because of the @
.
Redefine the many-line bibmacro setrelevantindex
ever so slightly by adding a line {\ifkeyword{eu}{\renewcommand{\bbx@relevantindex}{[\bbx@eucasesnum]}}%
and add a corresponding }
at the end of the if
. See the MWE.
- Run the standard toolchain: xelatex/biber/xelatex/splitindex/xelatex
Full MWE
\begin{filecontents}{\jobname.bib}
@jurisdiction{ECLI:EU:T:1992:33,
sortkeyN={T1989011A},
Date = {1992},
Ecli = {ECLI:EU:T:1992:33},
Institution = {CFI},
Journaltitle = {ECR},
Keywords = {eu},
Number = {T-11/89},
Options = {url=true},
Pages = {00757},
Title = {Shell International Chemical Company Ltd v Commission of the European Communities.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:1992:33},
Volume = {II},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:1992:33}}
@jurisdiction{ECLI:EU:T:2006:217,
sortkeyN={T2006011R},
Date = {2006},
Ecli = {ECLI:EU:T:2006:217},
Institution = {CFI},
Journaltitle = {ECR},
Keywords = {eu},
Number = {T-11/06 R},
Options = {url=true},
Pages = {02491},
Title = {Romana Tabacchi Srl v European Commission.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2006:217},
Volume = {II},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2006:217}}
@jurisdiction{ECLI:EU:T:2011:560,
sortkeyN={T2006011A},
Date = {2011},
Ecli = {ECLI:EU:T:2011:560},
Institution = {CFI},
Journaltitle = {ECR},
Keywords = {eu},
Number = {T-11/06},
Options = {url=true},
Pages = {06681},
Title = {Romana Tabacchi Srl v European Commission.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2011:560},
Volume = {II},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2011:560}}
@jurisdiction{ECLI:EU:C:1998:422,
sortkeyN={C1997061A},
Date = {1998},
Ecli = {ECLI:EU:C:1998:422},
Institution = {ECJ},
Journaltitle = {ECR},
Keywords = {eu},
Number = {C-61/97},
Options = {url=true},
Pages = {05171},
Title = {Foreningen af danske Videogramdistribut{\o}rer, acting for Egmont Film A/S, Buena Vista Home Entertainment A/S, Scanbox Danmark A/S, Metronome Video A/S, Polygram Records A/S, Nordisk Film Video A/S, Irish Video A/S and Warner Home Video Inc. v Laserdisken.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1998:422},
Volume = {I},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1998:422}}
@jurisdiction{ECLI:EU:C:2007:88,
sortkeyN={C2006003P},
Date = {2007},
Ecli = {ECLI:EU:C:2007:88},
Institution = {ECJ},
Journaltitle = {ECR},
Keywords = {eu},
Number = {C-3/06 P},
Options = {url=true},
Pages = {01331},
Title = {Groupe Danone v Commission of the European Communities.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2007:88},
Volume = {I},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2007:88}}
@jurisdiction{ECLI:EU:C:2015:378,
sortkeyN={C2014001A},
Date = {2015},
Ecli = {ECLI:EU:C:2015:378},
Institution = {ECJ},
Keywords = {eu},
Number = {C-1/14},
Options = {url=true},
Title = {Base Company NV and Mobistar NV v Ministerraad.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2015:378},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2015:378}}
@jurisdiction{ECLI:EU:C:1980:18,
sortkeyN={C1979792R},
Date = {1980},
Ecli = {ECLI:EU:C:1980:18},
Institution = {AG},
Journaltitle = {ECR},
Keywords = {eu},
Number = {792/79 R},
Options = {url=true},
Pages = {00119},
Title = {Cabour SA and Nord Distribution Automobile SA v Arnor SOCO SARL, supported by Automobiles Peugeot SA and Automobiles Citro{\"e}n SA.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1980:18},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1980:18}}
@jurisdiction{ECLI:EU:C:1987:236,
sortkeyN={C1985432A},
Date = {1987},
Ecli = {ECLI:EU:C:1987:236},
Institution = {ECJ},
Journaltitle = {ECR},
Keywords = {eu},
Number = {432/85},
Options = {url=true},
Pages = {02229},
Title = {Theano Souna v Commission of the European Communities.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1987:236},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1987:236}}
@jurisdiction{ECLI:EU:C:1958:5,
sortkeyN={C1957002A},
Date = {1958},
Ecli = {ECLI:EU:C:1958:5},
Institution = {ECJ},
Keywords = {eu},
Number = {2-57},
Options = {url=true},
Title = {Compagnie des Hauts Fourneaux de Chasse v High Authority of the European Coal and Steel Community.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1958:5},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1958:5}}
\end{filecontents}
%\documentclass[a4paper,
% 11pt,
% DIV=1,
% footinclude=false]{scrartcl}
\documentclass{article}
\usepackage[style=oscola,
indexing=cite,
backend=biber,
ecli=only,
babel=hyphen]{biblatex}
\usepackage[splitindex,
nonewpage]{imakeidx}
%=============================================
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=true]{
\pertype{jurisdiction}
\step[fieldsource=keywords,
match=eu,
final=true]
\step[fieldsource=sortkeyN]
\step[fieldset=userf,
origfieldval=true]
}
}
}
\makeatletter
%\renewcommand\bbx@eucasesnum{trash}
\renewcommand\bbx@eucasesnum{cases}
\renewbibmacro{setrelevantindex}{%
% DEFAULT IS TRASH INDEX
\renewcommand{\bbx@relevantindex}{[\bbx@trash]}%
\iffieldundef{usera}{%
% COURT RULES ALL GO TO ENROC
\ifboolexpr{ test {\ifentrytype{legislation}}%
and test {\iffieldequals{entrysubtype}{\subtypecourtrules}}}%
{\renewcommand\bbx@relevantindex{[\bbx@enroc]}}%
{}%
% THEN WE DEAL WITH PRIMARY
\ifboolexpr{ test {\ifentrytype{legislation}}%
and test {\iffieldequals{entrysubtype}{\subtypeprimarylegislation}}}%
{\ifkeyword{gb}{\renewcommand\bbx@relevantindex{[\bbx@gbprimleg]}}{}%
\ifkeyword{en}{\renewcommand\bbx@relevantindex{[\bbx@enprimleg]}}{}%
\ifkeyword{sc}{\renewcommand\bbx@relevantindex{[\bbx@scprimleg]}}{}%
\ifkeyword{cy}{\renewcommand\bbx@relevantindex{[\bbx@cyprimleg]}}{}%
\ifkeyword{ni}{\renewcommand\bbx@relevantindex{[\bbx@niprimleg]}}{}%
\iffieldundef{keywords}{\renewcommand\bbx@relevantindex{[\bbx@gbprimleg]}}{}%
}%
{}% OTHER KINDS OF LEGISLATION
\ifboolexpr{ test {\ifentrytype{legislation}}%
and test {\iffieldequals{entrysubtype}{\subtypesecondarylegislation}}}%
{\ifkeyword{gb}{\renewcommand\bbx@relevantindex{[\bbx@gbsecleg]}}{}%
\ifkeyword{en}{\renewcommand\bbx@relevantindex{[\bbx@ensecleg]}}{}%
\ifkeyword{sc}{\renewcommand\bbx@relevantindex{[\bbx@scsecleg]}}{}%
\ifkeyword{cy}{\renewcommand\bbx@relevantindex{[\bbx@cysecleg]}}{}%
\ifkeyword{ni}{\renewcommand\bbx@relevantindex{[\bbx@nisecleg]}}{}%
\iffieldundef{keywords}{\renewcommand\bbx@relevantindex{[\bbx@gbsecleg]}}{}%
}%
{}% OTHER KINDS OF LEGISLATION
\ifboolexpr{ test {\ifentrytype{legislation}}%
and test {\ifkeyword{eu}}}%
{\iffieldequals{entrysubtype}{\eutreaty}%
{\renewcommand\bbx@relevantindex{[\bbx@eutreaty]}}{}%
\ifboolexpr{ test {\iffieldequals{type}{\euregulation}}%
or test {\iffieldequals{entrysubtype}{\euregulation}}}%
{\renewcommand\bbx@relevantindex{[\bbx@euregs]}}{}%
\ifboolexpr{ test{\iffieldequals{type}{\eudirective}}%
or test {\iffieldequals{entrysubtype}{\eudirective}}}%
{\renewcommand\bbx@relevantindex{[\bbx@eudirs]}}{}%
\ifboolexpr{ test{\iffieldequals{type}{\eudecision}}%
or test {\iffieldequals{entrysubtype}{\eudecision}}}%
{\renewcommand\bbx@relevantindex{[\bbx@eudecs]}}{}}%
{}%
\ifboolexpr{ test {\ifentrytype{legislation}}%
and test {\ifkeyword{draft}} }%
{\ifboolexpr {test {\ifkeyword{gb}} or test {\ifkeyword{en}}%
or test {\ifkeyword{sc}} or test {\ifkeyword{cy}}%
or test {\ifkeyword{ni}}}%
{\renewcommand\bbx@relevantindex{[\bbx@gbdraftleg]}}%
{}}%
{}%
\ifentrytype{jurisdiction}%
{\ifkeyword{sc}{\renewcommand{\bbx@relevantindex}{[\bbx@sccases]}}%
{\ifkeyword{gb}{\renewcommand{\bbx@relevantindex}{[\bbx@gbcases]}}%
{\ifkeyword{en}{\renewcommand{\bbx@relevantindex}{[\bbx@encases]}}%
{\ifkeyword{ni}{\renewcommand{\bbx@relevantindex}{[\bbx@nicases]}}%
{\ifkeyword{eu}{\renewcommand{\bbx@relevantindex}{[\bbx@eucases]}}%
{\ifkeyword{eu}{\renewcommand{\bbx@relevantindex}{[\bbx@eucasesnum]}}%<===
{\ifkeyword{echr}{\renewcommand{\bbx@relevantindex}{[\bbx@echrcases]}}%
{\ifkeyword{int}{\renewcommand{\bbx@relevantindex}{[\bbx@pilcases]}}%
{\ifkeyword{us}{\renewcommand{\bbx@relevantindex}{[\bbx@uscases]}}% ADDED
{\ifkeyword{ca}{\renewcommand{\bbx@relevantindex}{[\bbx@cacases]}}% ADDED
{\ifkeyword{au}{\renewcommand{\bbx@relevantindex}{[\bbx@aucases]}}% ADDED
{\ifkeyword{nz}{\renewcommand{\bbx@relevantindex}{[\bbx@nzcases]}}% ADDED
{\iffieldundef{keywords}{\renewcommand{\bbx@relevantindex}{[\bbx@encases]}}
{\renewcommand{\bbx@relevantindex}{[\bbx@othercases]}}}}}}}}}}}}}}}%<=== extra}
{}%
\ifboolexpr{ test {\ifentrytype{legal}}%
and test {\iffieldequals{entrysubtype}{\treatysubtype}} }%
{\ifkeyword{echr}{\renewcommand{\bbx@relevantindex}{[\bbx@echrtreaty]}}{\renewcommand{\bbx@relevantindex}{[\bbx@piltreaty]}}}{}%
\iffieldequals{entrysubtype}{\parliamentarytype}%
{\renewcommand{\bbx@relevantindex}{[\bbx@gbparltmat]}}%
{}%
\iffieldequals{entrysubtype}{\comdocsubtype}%
{\renewcommand{\bbx@relevantindex}{[\bbx@euoffdoc]}}%
{}%
\ifentrytype{commentary}%
{\renewcommand{\bbx@relevantindex}{[\bbx@commentaries]}}%
{}%
\ifboolexpr{ test{\ifentrytype{legal}}
and test {\iffieldequals{entrysubtype}{\explanatorynote}}}
{\renewcommand{\bbx@relevantindex}{[\bbx@gbparltmat]}}%
{}%
}%
{\renewcommand{\bbx@relevantindex}{[\thefield{usera}]}}
}
\makeatother
% BIBLIOGRAPHIC RESOURCES
\addbibresource{\jobname.bib}
% INDEXES
\makeindex[name=eucasesn, intoc=true,
title={Table of EU Cases (Numerical)}]
\DeclareIndexAssociation{eucasesnum}{eucasesn}
\makeindex[name=eucases, intoc=true,
title={Table of EU Cases (Alphabetical)}]
\DeclareIndexAssociation{eucases}{eucases}
\begin{document}
\cite{ECLI:EU:T:1992:33}
\cite{ECLI:EU:T:2006:217}
\cite{ECLI:EU:T:2011:560}
\cite{ECLI:EU:C:1998:422}
\cite{ECLI:EU:C:2007:88}
\cite{ECLI:EU:C:2015:378}
\cite{ECLI:EU:C:1980:18}
\cite{ECLI:EU:C:1987:236}
\cite{ECLI:EU:C:1958:5}
\printindex[eucasesn]
\printindex[eucases]
%\printbibliography
\end{document}
Edit
Had a thought: the \makeindex
command takes an option, columns=1
, to output a one-column index. With long case names, that format may be more amenable to readers than a two-column layout:
Further edit
Two Indexes
The bibentry tabulate
field allows the creation of manual indexes.
EU cases numeric
.bib
file
Add an index sortkey field to each bibentry, e.g. sortkeyN={T1989011A},
To manually create an index file, add a tabulate
field to each bibentry, with a value set to the indexname, e.g., tabulate = {eutcases},
or tabulate = {euccases},
, as appropriate for the entry
.tex
file
Map the sortkeyN
field to the userf
field with a \DeclareStyleSourcemap
- see MWE
Define the institution names as macros: \newcommand\instecj{ECJ}
and \newcommand\instcfi{CFI}
Redefine the index:title
bibmacro to pick up the relevant bibitems in the relevant categories - see MWE
Use \makeindex
to define the two indices: \makeindex[name=euccases,...
and \makeindex[name=eutcases,...
Print them with \printindex[euccases]
and \printindex[eutcases]
.
MWE
\begin{filecontents}{\jobname.bib}
@jurisdiction{ECLI:EU:T:1992:33,
sortkeyN={T1989011A},
Date = {1992},
Ecli = {ECLI:EU:T:1992:33},
Institution = {CFI},
Journaltitle = {ECR},
Keywords = {eu,eut},
tabulate = {eutcases},
Number = {T-11/89},
Options = {url=true},
Pages = {00757},
Title = {Shell International Chemical Company Ltd v Commission of the European Communities.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:1992:33},
Volume = {II},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:1992:33}}
@jurisdiction{ECLI:EU:T:2006:217,
sortkeyN={T2006011R},
Date = {2006},
Ecli = {ECLI:EU:T:2006:217},
Institution = {CFI},
Journaltitle = {ECR},
Keywords = {eu,eut},
tabulate = {eutcases},
Number = {T-11/06 R},
Options = {url=true},
Pages = {02491},
Title = {Romana Tabacchi Srl v European Commission.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2006:217},
Volume = {II},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2006:217}}
@jurisdiction{ECLI:EU:T:2011:560,
sortkeyN={T2006011A},
Date = {2011},
Ecli = {ECLI:EU:T:2011:560},
Institution = {CFI},
Journaltitle = {ECR},
Keywords = {eu,eut},
tabulate = {eutcases},
Number = {T-11/06},
Options = {url=true},
Pages = {06681},
Title = {Romana Tabacchi Srl v European Commission.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2011:560},
Volume = {II},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:T:2011:560}}
@jurisdiction{ECLI:EU:C:1998:422,
sortkeyN={C1997061A},
Date = {1998},
Ecli = {ECLI:EU:C:1998:422},
Institution = {ECJ},
Journaltitle = {ECR},
Keywords = {eu,euc},
tabulate = {euccases},
Number = {C-61/97},
Options = {url=true},
Pages = {05171},
Title = {Foreningen af danske Videogramdistribut{\o}rer, acting for Egmont Film A/S, Buena Vista Home Entertainment A/S, Scanbox Danmark A/S, Metronome Video A/S, Polygram Records A/S, Nordisk Film Video A/S, Irish Video A/S and Warner Home Video Inc. v Laserdisken.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1998:422},
Volume = {I},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1998:422}}
@jurisdiction{ECLI:EU:C:2007:88,
sortkeyN={C2006003P},
Date = {2007},
Ecli = {ECLI:EU:C:2007:88},
Institution = {ECJ},
Journaltitle = {ECR},
Keywords = {eu,euc},
tabulate = {euccases},
Number = {C-3/06 P},
Options = {url=true},
Pages = {01331},
Title = {Groupe Danone v Commission of the European Communities.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2007:88},
Volume = {I},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2007:88}}
@jurisdiction{ECLI:EU:C:2015:378,
sortkeyN={C2014001A},
Date = {2015},
Ecli = {ECLI:EU:C:2015:378},
Institution = {ECJ},
Keywords = {eu,euc},
tabulate = {euccases},
Number = {C-1/14},
Options = {url=true},
Title = {Base Company NV and Mobistar NV v Ministerraad.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2015:378},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:2015:378}}
@jurisdiction{ECLI:EU:C:1980:18,
sortkeyN={C1979792R},
Date = {1980},
Ecli = {ECLI:EU:C:1980:18},
Institution = {AG},
Journaltitle = {ECR},
Keywords = {eu,euc},
tabulate = {euccases},
Number = {792/79 R},
Options = {url=true},
Pages = {00119},
Title = {Cabour SA and Nord Distribution Automobile SA v Arnor SOCO SARL, supported by Automobiles Peugeot SA and Automobiles Citro{\"e}n SA.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1980:18},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1980:18}}
@jurisdiction{ECLI:EU:C:1987:236,
sortkeyN={C1985432A},
Date = {1987},
Ecli = {ECLI:EU:C:1987:236},
Institution = {ECJ},
Journaltitle = {ECR},
Keywords = {eu,euc},
tabulate = {euccases},
Number = {432/85},
Options = {url=true},
Pages = {02229},
Title = {Theano Souna v Commission of the European Communities.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1987:236},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1987:236}}
@jurisdiction{ECLI:EU:C:1958:5,
sortkeyN={C1957002A},
Date = {1958},
Ecli = {ECLI:EU:C:1958:5},
Institution = {ECJ},
Keywords = {eu,euc},
Number = {2-57},
tabulate = {euccases},
Options = {url=true},
Title = {Compagnie des Hauts Fourneaux de Chasse v High Authority of the European Coal and Steel Community.},
Url = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1958:5},
Bdsk-Url-1 = {https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=ecli:ECLI:EU:C:1958:5}}
\end{filecontents}
%\documentclass[a4paper,
% 11pt,
% DIV=1,
% footinclude=false]{scrartcl}
\documentclass{article}
\usepackage[style=oscola,
indexing=cite,
backend=biber,
ecli=only,
babel=hyphen]{biblatex}
\usepackage[splitindex,
nonewpage,
]{imakeidx}
%=============================================
%index sort key:
%number field maps to userf, via multi-step regex match/replace.
%Map sortkeyN to userf, instead:
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=true]{
\pertype{jurisdiction}
\step[fieldsource=keywords,
match=eu,
final=true]
\step[fieldsource=sortkeyN]
\step[fieldset=userf,
origfieldval=true]
}
}
}
\newcommand\instecj{ECJ}
\newcommand\instcfi{CFI}
\makeatletter
\renewbibmacro*{index:title}[2]{%
\ifboolexpr{ test {\ifentrytype{jurisdiction}}
and test {\ifkeyword{eu}}
% and test {\ifkeyword{euc}}
and test {\iflistcontains{institution}{\instecj}}
}%if
{\renewcommand\bbx@relevantindex{[\bbx@trash]}%
\usebibmacro{setrelevantindex}%
\usebibmacro{index:field:eu}%
{\index}%
{\thefield{userf}}%
{\thefield{entrykey}}}%true
{}%false
%------------
\ifboolexpr{ test {\ifentrytype{jurisdiction}}
and test {\ifkeyword{eu}}
% and test {\ifkeyword{eut}}
and test {\iflistcontains{institution}{\instcfi}}
}%if
{\renewcommand\bbx@relevantindex{[\bbx@trash]}%
\usebibmacro{setrelevantindex}%
\usebibmacro{index:field:eu}%
{\index}%
{\thefield{userf}}%
{\thefield{entrykey}}}%true
{}%false
%------------
\ifboolexpr{ test {\ifentrytype{jurisdiction}}
and test {\ifkeyword{eu}}
% and (not test {\iflistcontains{institution}{\commission}})
}
{\renewcommand\bbx@relevantindex{[\bbx@eucasesnum]}%
\usebibmacro{index:field:eu}%
{\index}%
{\thefield{userf}}%
{\thefield{entrykey}}}%
{}%----------------
\usebibmacro{setrelevantindex}%
\ifboolexpr{ test {\ifentrytype{legal}}
and test {\iffieldequals{entrysubtype}{\parliamentarytype}}}
{\usebibmacro{hansard:index:fields}{#1}{#2}}
{\ifboolexpr{ (not test {\ifentrytype{legislation}} )
and (not (test {\ifentrytype{jurisdiction}}
and test {\ifkeyword{eu}}))% <====
and not
( test {\ifentrytype{legal}}
and test {\iffieldequals{entrysubtype}{\treatytype}} ) }%
{\usebibmacro{index:field}%
{\index}%
{\thefield{indexsorttitle}}
{\thefield{entrykey}}}% B: <====
{\iffieldequals{entrysubtype}{\subtypecourtrules}%
{\usebibmacro{index:rules}}%
{%catch-all category:
\ifboolexpr{ (not test {\ifentrytype{jurisdiction}})}% <====
{\usebibmacro{legislation:with:postnote}{#1}{#2}}
{}% <====
}}}
}
\makeatother
% BIBLIOGRAPHIC RESOURCES
\addbibresource{\jobname.bib}
% INDEXES
\makeindex[name=eucasesn, columns=1, intoc=true,
title={Table of EU Cases (Numerical)}]
\DeclareIndexAssociation{eucasesnum}{eucasesn}
\makeindex[name=euccases, columns=1, intoc=true,
title={Table of EU Cases: ECJ (Numerical)}]
%\DeclareIndexAssociation{euccases}{euccases}
\makeindex[name=eutcases, columns=1, intoc=true,
title={Table of EU Cases: CFI (Numerical)}]
%\DeclareIndexAssociation{eutcases}{eutcases}
%\makeindex[name=eucases, intoc=true,
% title={Table of EU Cases (Alphabetical)}]
%\DeclareIndexAssociation{eucases}{eucases}
\begin{document}
\cite{ECLI:EU:T:1992:33}
\cite{ECLI:EU:T:2006:217}
\cite{ECLI:EU:T:2011:560}
\cite{ECLI:EU:C:1998:422}
\cite{ECLI:EU:C:2007:88}
\cite{ECLI:EU:C:2015:378}
\cite{ECLI:EU:C:1980:18}
\cite{ECLI:EU:C:1987:236}
\cite{ECLI:EU:C:1958:5}
\printindex[eucasesn]
\printindex[euccases]
\printindex[eutcases]
%\printindex[eucases]
%\printbibliography
\end{document}
To apply the BL-OSCOLA numeric sorting, just comment out the sourcemap change to get this:
which sequence looks a bit odd to my eye, based on some numbers going to 20xx years and others to 19xx - but I have no acquaintance with EU case number sequencing and almost none of regex, so my opinion on the matter is actually not relevant at all. :)
\step[fieldsource=userf,
match=\regexp{([^A]*)A([^A]*)A([01234]\d)$},
replace=\regexp{$1A$2A20$3}]
\step[fieldsource=userf,
match=\regexp{([^A]*)A([^A]*)A([56789]\d)$},
replace=\regexp{$1A$2A19$3}]
\maketitle
without a\title{...}
; undefined pagestyle errors, etc) - that'll take time.