3

The BL-Oscola package implements the OSCOLA legal citation format. It generates multiple indexes - tables of authorities - with separate tables for cases, legislation etc. For European Union cases it creates alphabetically and numerically ordered tables. I'd appreciate help on two points, the first of which I think is a bug.

Any assistance on either would be much appreciated. I'm very new to latex but willing to work on this if someone could give me some pointers.

(1) It doesn't properly handle the numeric sorting of EU cases. EU case numbers can be in one of several formats :

  • xx-yy
  • T-xx/yy
  • C-xx/yy

where (xx can be from 1 to 999 and yy is a two digit string for the year.

Cases can also have various suffixes (P, R, Rev and others), eg: T-11/06 R, 792/79 R, C-3/06 P.

A sample of case numbers is wrongly sorted numerically as:

  • C-3/06 P
  • 792/79 R
  • T-11/06 R
  • 2-57
  • 432/85
  • T-11/89
  • C-61/97
  • T-11/06
  • C-1/14

The suffixes (P, R etc) look to be confusing the sort. Below I've included a shortened version of an example .tex file based on the oscola.tex file in the documentation example, as well as the bib records.

In case parsing (eg) "C-3/06 P" would be a non-trivial problem to solve in latex, I'm perfectly open to adding fields to my bibtex file splitting out the xx and yy.

(2) A related point which is not a bug, but a design choice made by the author, the table of EU cases currently mixes both lower court (T-xx/yy) and upper court (xx-yy and C-xx/yy) cases. It is more usual to have separate tables for the two. The recommended Bibtex format identifies the court ("institution = CFI" or institution="ECJ") so the information is there to create two separate tables.

Again, any pointers here would be appreciated.

\documentclass[a4paper,
    11pt,
    DIV=1,
    footinclude=false]{scrartcl}

\usepackage[style=oscola,
            indexing=cite,
            backend=biber,
            ecli=only,
            babel=hyphen]{biblatex}

\usepackage[splitindex,
            nonewpage]{imakeidx}

\usepackage{tabularx}
\usepackage{multicol}
\usepackage{booktabs}

% Various commands and environments specific to this document
\newcommand{\oscola}{\textsc{bl-oscola}}
\newcommand{\biblatex}{\textsc{biblatex}}
\newcommand{\oscolashort}{\textsc{oscola}\nocite{oscola}}
\newcounter{egcounter}\setcounter{egcounter}{0}

% BIBLIOGRAPHIC RESOURCES
\addbibresource{ECLI-bib-test.bib}

% INDEXES
\makeindex[name=eucasesn, intoc=true,
           title={Table of EU Cases (Numerical)}]
\DeclareIndexAssociation{eucasesnum}{eucasesn}

\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}

\usepackage[style=oscola, eutreaty=alternative, ibidtracker=false, ecli=only]{biblatex}
\newenvironment{cslreferences}%
  {}%
  {\par}

\begin{document}
\maketitle

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

\clearpage\markright{Tables}\pagestyle{scrheadings}

\printindex[eucasesn]
\end{document}
@jurisdiction{ECLI:EU:T:1992:33,
    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,
    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,
    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,
    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,
    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,
    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,
    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,
    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,
    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}}
2
  • Welcome to tex.se! Biblatex's Sort keys capability should do it. But I can't get your code to work to test it out. I'll have to debug it first (e.g., you use \maketitle without a \title{...}; undefined pagestyle errors, etc) - that'll take time.
    – Cicada
    Commented Feb 19, 2020 at 3:50
  • Er, not quite, about the biblatex sort. It's the index sorting that's in play.
    – Cicada
    Commented Feb 19, 2020 at 9:59

1 Answer 1

5

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:

eu sorted numerically

Steps

  1. 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.

  1. 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).


  1. Send eucasesnum items to the cases split index instead of the trash index: snippet: \renewcommand\bbx@eucasesnum{cases}. See the MWE, because of the @.

  2. 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.


  1. 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:

one column index


Further edit

Two Indexes

The bibentry tabulate field allows the creation of manual indexes.

two indexes created with tabulate field

EU cases numeric

.bib file

  1. Add an index sortkey field to each bibentry, e.g. sortkeyN={T1989011A},

  2. 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

  1. Map the sortkeyN field to the userf field with a \DeclareStyleSourcemap - see MWE

  2. Define the institution names as macros: \newcommand\instecj{ECJ} and \newcommand\instcfi{CFI}

  3. Redefine the index:title bibmacro to pick up the relevant bibitems in the relevant categories - see MWE

  4. Use \makeindex to define the two indices: \makeindex[name=euccases,... and \makeindex[name=eutcases,...

  5. 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:

numeric sorting

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}]
4
  • With many thanks and apologies for my M"W"E. I thought the answer was right for my first question, but it changes the sort order compared to the (intended) original of the maintainer. The answer lists the ECJ (C) cases chronologically, and then the CFI (T) cases chronologically in the same table. The original BL-OSCOLA mixed ECJ and CFI cases, producing a single integrated chronological list. (This isn't actually what I want to do - per my second question above - but I mention it in case someone wants to use this answer but wants to remain consistent with the BL-OSCOLA package.) Commented Feb 20, 2020 at 15:57
  • And thanks for the single column suggestion. That's much better. Commented Feb 20, 2020 at 15:58
  • @KevinCoates See edited answer for two-index output. BL-OSCOLA can be enhanced to do this natively, I would imagine.
    – Cicada
    Commented Feb 21, 2020 at 13:15
  • @KevinCoates Adjust the index sort key format to have a structure consistent with what you refer to as 'numerical' sorting - for quick response time, I assumed chronological had overall priority (after court type) for ease of finding something quickly, but many nuances are possible. Certainly, alphabetical by name is rather impractical.
    – Cicada
    Commented Feb 21, 2020 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .