Oscola biblatex 数字索引(引文表)排序不正确

Oscola biblatex 数字索引(引文表)排序不正确

BL-Oscola 封装实现 OSCOLA 法律引文格式。它生成多个索引 - 权威表 - 案例、立法等有单独的表格。对于欧盟案例,它会创建按字母和数字排序的表格。我希望在两点上得到帮助,其中第一点我认为是一个错误。

任何帮助都将不胜感激。我对乳胶还很陌生,但如果有人能给我一些指点,我愿意努力学习。

(1)它不能正确处理欧盟案件的数字排序。欧盟案件编号可以采用以下几种格式之一:

  • xx-yy
  • T-xx/yy
  • 年份

其中 (xx 可以从 1 到 999,yy 是表示年份的两位数字符串。

表壳还可以有各种后缀(P、R、Rev 等),例如:T-11/06 R、792/79 R、C-3/06 P。

案例编号样本按数字错误排序如下:

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

后缀(P、R 等)似乎会造成排序混乱。下面我提供了一个基于文档示例中的 oscola.tex 文件的示例 .tex 文件的简化版本,以及 bib 记录。

如果解析(例如)“C-3 / 06 P”在 Latex 中是一个难以解决的问题,我完全愿意在我的 bibtex 文件中添加字段以分离出 xx 和 yy。

(2) 一个相关的观点不是错误,而是作者的设计选择,欧盟案件表目前混合了下级法院 (T-xx/yy) 和上级法院 (xx-yy 和 C-xx/yy) 的案件。更常见的是将两者分开。推荐的 Bibtex 格式标识法院(“机构 = CFI”或机构 =“ECJ”),因此需要创建两个单独的表格。

再次,任何指点都将不胜感激。

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

答案1

为了回答第一个问题,下面显示了一个即时破解方法。中期解决方案是在构建索引排序键时增强 OSCOLA 的正则表达式处理(联系维护者)。长期解决方案可能更容易维护,即把病例编号分子的组成部分分离成原子作为单独的字段:然后混合和匹配它们就不需要通过转换层进行过滤。

反正:

欧盟按数字排序

脚步

  1. .bib文件中:向 bib 条目添加一个任意命名的排序键字段(sortkeyN在 MWE 中调用):sortkeyN={T1989011A},- 其中格式为 xyyyynnnL、x=C 或 T、yyyy = 年份、nnn=三位数的案例编号、L = 后缀字母(例如 R)并自行决定在没有实际后缀时所需的默认字母(例如,A将案例放在前面Rz将其放在后面)。

1a. 从实用角度来说,少量(<100?)可以手动构建;更多或大量构建则需要某种程度的自动化。

  1. 使用 biblatex 的映射功能,欧盟案例编号由 OSCOLA(使用正则表达式转换)从字段映射number到内置 biblatex字段。在文件中使用您自己的映射userf覆盖此功能,从直接到:.texsortkeyNuserf
\DeclareStyleSourcemap{
  \maps[datatype=bibtex]{
 \map[overwrite=true]{
    \pertype{jurisdiction}
    \step[fieldsource=keywords, 
          match=eu,
          final=true]
    \step[fieldsource=sortkeyN]
    \step[fieldset=userf,
          origfieldval=true]
 }}}

userf字段用于在调用 bibmacro 时指定索引排序顺序index:title。(另一种方法是定义一个单独的index:numberbibmacro,直接使用该sortkeyN字段 - 在 OSCOLA 的其他地方进行相应的代码更改以调用 bibmacro。)

编辑添加sortkeyN步骤 1 和 2 已足够。省略步骤 3 和 4 的实验仍会生成按(通过) 排序的案例表userf- 尽管我(尚)不知道步骤 3 和 4 在其他地方会产生什么影响(如果有的话)。


  1. eucasesnum将项目发送到cases拆分索引而不是trash索引:片段:\renewcommand\bbx@eucasesnum{cases}。参见 MWE,因为@

  2. 通过添加一行并在末尾添加相应的行setrelevantindex,稍微重新定义多行 bibmacro。请参阅 MWE。{\ifkeyword{eu}{\renewcommand{\bbx@relevantindex}{[\bbx@eucasesnum]}}%}if


  1. 运行标准工具链:xelatex/biber/xelatex/splitindex/xelatex

完整 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}

编辑

有个想法:该\makeindex命令采用选项columns=1来输出单列索引。对于较长的案例名称,这种格式可能比两列布局更适合读者:

单列索引


进一步编辑

两个索引

bibentrytabulate字段允许创建手动索引。

使用制表字段创建两个索引

欧盟案件数量

.bib文件

  1. 为每个 bibentry 添加一个索引 sortkey 字段,例如sortkeyN={T1989011A},

  2. 要手动创建索引文件,请tabulate向每个 bibentry 添加一个字段,并将值设置为索引名称,例如tabulate = {eutcases},tabulate = {euccases},,具体取决于条目

.tex文件

  1. sortkeyN字段映射到userf带有\DeclareStyleSourcemap- 参见 MWE 的字段

  2. 将机构名称定义为宏:\newcommand\instecj{ECJ}\newcommand\instcfi{CFI}

  3. 重新定义index:titlebibmacro 以选择相关类别中的相关 bibitem - 参见 MWE

  4. 用于\makeindex定义两个指标:\makeindex[name=euccases,...\makeindex[name=eutcases,...

  5. \printindex[euccases]用和打印它们\printindex[eutcases]

平均能量损失

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

要应用 BL-OSCOLA 数字排序,只需注释掉源映射更改即可获得:

数字排序

在我看来,这个序列有点奇怪,因为有些数字代表 20xx 年,而其他数字代表 19xx 年 - 但我不熟悉欧盟案例编号排序,也几乎不熟悉正则表达式,所以我对此事的看法实际上根本不相关。:)

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

相关内容