支持法律引用的样式

支持法律引用的样式

这部分是“在我重新发明轮子之前”的问题,部分是关于最佳实践的问题。

  • 是否有任何现有解决方案可以在使用 Biblatex/Biber 的文档中适当地处理合法来源,而这些文档需要非法律默认样式,例如大多数来源的作者年份?

    • 如果是的话,有哪些解决方案可用,并且是否仅将 OSCLA 用于特定的合法来源?
  • 如果不是,那么配置 Biblatex/Biber 的哪种方法才是最佳实践?我并不是要求别人这样做——我示例中的作者年份样式实际上与我使用的样式略有不同,因此解决此处问题的代码可能对我来说效果不佳。我更想问的是,需要哪些配置任务?是否有可以应用于这种情况的并行过程?配置应该在哪里进行?

    • 我发现最接近的问题是在 Bibtex 中创建行政命令条目,但这个问题和答案已经很老了,我不确定它是否是当前 Biblatex/Biber 的有用模型。(例如,它不使用 bib 字符串,并且早于最近弃用 BibTeX 后端。)

奥斯陆大学法学院

移动网络:

\begin{filecontents}{\jobname.bib}
@jurisdiction{case,
  title             = {{Somebody} v {Somebody Else} and Others (No 4)},
  note              = {[2016] AC 100},
  pages             = {100--178},
  date              = {2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01}}


@legislation{deddf,
    title               =   {{Deddf  Ardderchog (Cymru)} 2014},
    year                =   2014,
    author              =   {{Cynulliad Cenedlaethol Cymru}},
    languageid          =   {cy}}

@article{article,
  title     = {Fantastic Findings and Where to Find Them},
  author    = {Vark, Aar D.},
  journal   = {Diligent Discoveries},
  volume    = 45,
  number    = 3,
  pages     = {23--32},
  year      = 2010}

@book{book,
  title     = {Brilliant Baths},
  author    = {Allard, M.},
  publisher = {Empire Books},
  address   = {Alpha Centauri},
  year      = 1998}

\end{filecontents}

\documentclass[welsh,british,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{cfr-lm}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\bibliography{\jobname}

\begin{document}

Most of my bibliography entries are `normal' sources, such as articles \autocite[e.g.][]{article} and books \autocite[e.g.][]{book}.
\Textcite{article} and \textcite{book} are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
\begin{quote}
  \Textcite{deddf} is a law \autocite{deddf}.
  \Textcite{case} is a case \autocite{case}.
\end{quote}
I \emph{think} that these should be cited rather differently, although I'm not certain exactly how they should look.
I suspect something like the following is needed
\begin{quote}
  Deddf  Ardderchog (Cymru) 2014 is a law (Deddf  Ardderchog (Cymru) 2014).
  \emph{{Somebody} v {Somebody Else} and Others (No 4)} [2016] AC 100 is a case (\emph{{Somebody} v {Somebody Else} and Others (No 4)} [2016] AC 100).
\end{quote}
That is, specifically legal sources should follow the Oxford Standard for the Citation of Legal authorities (OSCOLA), except that inline rather than footnote citations are used.

Similar principles will also apply to the entries in the bibliography.

\printbibliography

The entries for the book and the article are as desired.
The entries for the law and the case are not.

The year of legislation is part of the name of the act and shouldn't be separated from it. 
The title should come first.
Probably I should not have an author but just a publisher or URL, but if I don't have an author, author-year citations go wrong.

I should not have `n.d.' in the entry for the case, but nor should I have the year in round brackets.
No full-stop should follow the year.
Not sure about the full-stops at the end of entries, but OSCLA doesn't use them, I don't think.

In some cases, citations and entries for cases are more complex, though I haven't yet got to grips with all the nuances.

What is the best way to configure Biblatex for legal sources, when using a non-legal style for all others?

\end{document}

答案1

剂量使评论中说得好不仅各国的法律体系不同,而且其引用惯例也不同。

下面列出的风格主要来自英美普通法视角。

支持法律引用的样式

少数样式对法律引用biblatex有某种支持(我只列出了我认为是近期的样式,即2016 年 v3.3发布后更新的样式)@jurisdiction@legislationbiblatex

  • biblatex-abnt将两者都别名为@article

  • biblatex-apa定义类型@legislation@legadminmaterial和。一些(带注释的)示例条目可以在以下位置找到@legal@jurisdictionbiblatex-apa-test-references.bib. 另请参阅§4.2.5合法条目类型文档biblatex-apa

  • biblatex-bath支持英国立法和议会报告(@legislation)以及欧盟立法和报告(@legislation)和案例报告(@jurisdiction)。请参阅第 4.8-4.10 条文档

  • biblatex-chicago提供类型@jurisdiction@legal@legislation遵循CMS/蓝皮书建議。

  • biblatex-oxref(作者撰写biblatex-bath)也提供了对模仿 OSCOLA 的法律来源的支持,但略有不同。请参阅 §10法律参考样式文档(此处oxyear对于作者年份格式,oxyear作者注释

    由于法律参考文献通常使用脚注引用,因此oxyear应如何表现尚未明确定义。因此,我没有将其配置为做任何花哨的事情:完整参考文献的格式与 相同oxnotes,并且引用通常是使用括号的标题-年份,这是通常的方式。

  • biblatex-philosophy已对 进行了实验支持@jurisdiction

  • oscola得到了大部分英语国家的支持。

biblatex-apa、、biblatex-bath的风格和biblatex-oxref的风格将特别令人感兴趣,因为这些风格通常遵循作者年份方案,并且不关注法律引用。oxyearbiblatex-chicagoauthordate

据我所知biblatex-bathbiblatex-oxref在不大幅修改引文命令(修改了一些分隔符,但引用 bibmacro 本身没有修改)的情况下,biblatex-chicago已经为合法引文设置了专用宏。所有样式都有专用驱动程序和支持基础设施,用于接受的条目类型。

还有专门的款式德国法律引证瑞士法律风格法国法律引文,但这些样式最近没有更新,可能不再按预期工作。较新的法式样式是https://github.com/ienissei/frenchlaw

2020 年更新德国风格biblatex-juradiss已紧急更新,至少可以再次使用。还有两种新款式biblatex-jura2biblatex-german-legal


撰写您自己的法律参考资料

根据您期望的输出和您认为合理的输入,您可能需要做的工作可能会有所不同。

参考书目

我认为,您可以公平地假设您必须为@legislation和编写专用的书目驱动程序@jurisdiction。映射到 或 等标准驱动程序@article可能@misc@book您来说还不够。编写书目驱动程序的一般方法如下在 Bibtex 中创建行政命令条目如何使用 BibLaTeX/Biber 创建全新的数据类型?仍然有效。我绝对更喜欢在宏中使用 bibstring 而不是硬编码文本,并且通常会尽量避免和尽可能多地\printtext使用(但我想在某种程度上这只是个人喜好问题)。我们都清楚地知道,目前还没有全面的“编写样式简介”或“我的第一个 bibdriver”(还没有?),所以我通常建议通过查看示例来学习。当然,你会从标准驱动程序开始,但我相信上面列出的大多数样式也可以用来学习最佳实践——如果你记住其中一些需要实现一组复杂的规则,因此偶尔需要一些技巧。\DeclareFieldFormatbiblatex

如果您认为可用字段不能满足您的所有需求,您可能还需要将某些字段添加到默认数据模型中。(biblatex-oxref例如,为案例报告添加一些非标准字段。)请参阅将字段“tome”添加到 biblatex 条目

只要稍加注意,这两件事就可以几乎独立于以后使用的风格而发生。

引用

对于引用来说,情况就不那么清楚了。

正如biblatex-oxrefbiblatex-bath所示,实际上可能不需要修改引用宏,使用现有功能(如)labeltitlelabeldate对其行为进行一些修改即可获得可接受的引用输出。但根据您的其余风格和输入,可能需要更改引用宏以包含合法引用。这很难以独立于所用引用样式的方式实现。如果您使用复杂的样式,例如authoryear-icomp需要小心确保合法引用以合理的方式与样式的各种功能交互。

专用\lawcite命令可能是一种避免干扰严重依赖样式的引用命令的选项,但对我来说感觉不太好。

答案2

我真的无法就此事发表太多关于最佳实践的言论,尤其是关于法律来源的言论。所以从技术上讲我不应该回答。但我确实认为我有一些可能感兴趣的意见。然而,我打算从一个比较具体的角度来解决这个问题:分享我对如何处理非常规条目类型的想法biblatex,其中法律来源可以被视为一种特殊情况。

我自己与这个问题的关系来自于需要引用/参考经济史研究的主要资料,这意味着大部分是档案资料,但实际上可能相当多样化。这包括法律资料,但我从未真正担心过这种资料的具体要求。我提到这一点是因为我在这里的一些选择确实源于这所隐含的要求,但我确实认为下面的大多数建议都非常灵活(事实上,“灵活性”是我的主要要求之一,因为我通常无法在开始任何给定工作时提前预测提交所需的风格)。

总是有一系列的替代方案来处理非标准类型的来源。moewe 在他的回答,所以我无需重申。但对自然选择的评论可能是值得的。事实上,显而易见的方法之一就是选择一种处理我们需要的特定类型源的样式。我的观点是,除非有普遍的理由选择一种专门的或高度定制的样式,否则我觉得仅仅为了支持我们需要的特定条目类型而选择它是太过分了。我更喜欢坚持我选择的风格(通常是标准风格之一),它为我提供了常规条目类型的预期结果,并在其上分层了处理非常规条目类型的必要结构。通常,常规条目类型无论如何都会占源的很大一部分,那么为什么要为所有条目类型更改所有内容,只是为了能够处理一种或另一种特殊源?

鉴于此,在最一般的情况下,处理非标准条目类型涉及三个基本问题:

  • 提供数据结构(输入类型、输入字段)

  • 指定条目类型在参考书目中的显示方式(bibdrivers、过滤)

  • 指定这些条目类型的引用应如何表现。

至于前两个问题,moewe 也在他的回答的第二部分中进行了介绍,并指出了网站上关于此事的两个很好的来源(在 Bibtex 中创建行政命令条目如何使用 BibLaTeX/Biber 创建全新的数据类型?)。就是这样。这是对biblatex功能的证明,其设计既可定制又可扩展。

但有一些评论。很难避免为您的特殊条目类型定义 bibdriver。好吧,至少如果您想把事情做得很好(理论上您总是可以尝试敲打/(滥用)使用一个或另一个现有的条目类型)。无论如何,biblatex为我们提供了一个不错的用户界面,可以毫不费力地完成这项工作,因此强烈建议这样做。

至于是否扩展数据模型,选择并不那么明确,取决于您的要求(和品味)。特别是,biblatex有一些条目类型和条目字段可用于此类目的(条目类型、custom[a-f]条目字段等)。因此,如果您只需要其中的几个,则可能不需要对数据模型进行适当的扩展。此外,如果您想为类型和字段使用有意义的名称,则可以使用源映射将您选择的名称映射到现有名称。name[a-c]list[a-f]user[a-f]

关于扩展数据结构以支持特殊类型的源的另一个考虑因素是 ( .bib) 数据的可移植性。与此相关的是,如果您喜欢或需要现有软件来管理您的参考书目数据(JabRef、Zotero、Mendeley 及其同类软件和相关软件),您将能够获得多少支持。我对此的看法是,对于不太标准的源类型,无论如何都不会授予可移植性(和软件支持),所以我最好放弃可移植性(仅适用于这些类型的条目!),并寻求有意义的数据结构。我一次又一次发现自己“量身定制” bibentry 数据以实现特定样式的期望最终结果,结果就是“语义和可移植性较差”的 bib 数据。根据我的经验,对于高度定制的样式或专门的样式尤其如此,这些样式将首先支持您的特殊源类型。每次您诉诸这种方法时,您的数据就不再真正具有可移植性了。因此,我选择将常规条目类型分开,并保持它们的可移植性,让标准样式处理它们,而对于非标准源/条目类型,假设它们无论如何都不可移植,我倾向于使用有意义/语义的数据结构。我将“可移植”和“不可移植”数据保存在单独的.bib文件中。但是,请注意,一旦您可以将特殊条目类型的并行结构带到您选择的样式中,这并不是特别严格的限制(但这并不是不受限制的。首先,您不会将它带到外面biblatex,这意味着您不会将它带到 LaTeX 之外,因此只能实现 pdf 或类似的输出)。

那么如何处理引文呢?引文标注比 bibdrivers 更微妙。首先,因为 bibdrivers 允许你为每种条目类型设置一个特定的结构,而引文(通常)需要一个单一的整体标准结构,无论条目类型是什么。这一点很有趣,因为这里的第一个诱惑是:我可以简单地重新定义相关的引文命令或引文宏,让它们处理我的特殊来源类型。从技术上讲这是正确的,但这不是问题的关键。首先,我们必须弄清楚我们的引文标注应该如何显示,以及是否有任何有意义的方法可以将我们的特殊来源纳入当前样式的引文结构中。例如,尝试将法令或法律纳入作者年份结构是否有意义?出于这种困境,我最终采用了我所说的“混合引文风格”。我通常使用的那种特殊来源实际上需要在脚注中引用很长的内容,因为信息量通常很长,不适合文本流,而且主要/档案来源通常不会单独到达参考书目(它们的“容器”会到达)。这与风格(或变体)有机地融合在一起,但也与例如风格verbose配合得很好authoryear常规的条目类型,只要我为每种情况正确选择引用命令即可。我并不是说这是解决问题的唯一方法,事实恰恰相反,但我只能说这是我在处理非标准来源时能够找到的最便捷的方法。

从技术角度来看,鉴于这一观点,如何处理引文?考虑到我的灵活性要求,我选择修补(嗯,某种程度上)bibmacro cite,它为此目的提供了一个合理的钩子。这使我们能够完成我们事后选择的任何风格。(好吧,“无论”并不完全正确,稍后会详细介绍)。我目前的设置如下形式:

\letbibmacro{cite:orig}{cite}

\renewbibmacro*{cite}{%
  \ifcategory{primary}{%
    \usebibmacro{primary}}{%
    \usebibmacro{cite:orig}}}

当然,你可以primary用替换legal(或任何你想选择的内容),只要注意将你的合法来源条目类型集适当地添加到相应的类别中即可。(有关用于相同目的的其他技术,请参阅Biblatex-带有不平衡括号的 xpatch bibmacro)。

这实质上重新定义了citebibmacro,使其可以执行通常对常规条目类型执行的操作,但允许您单独控制对特殊条目类型执行的操作。鉴于此,您现在可以通过( ) biblatexbibmacro 完全控制仅针对特殊条目类型的引文调用,而常规条目类型的引文则保持不变。这绝非易事,但需要付出代价。primarylegal

对这种方法的一些评论。补丁允许对常规条目类型进行样式灵活性,这可能是也可能不是您的要求。但是,即使不是,我认为它仍然可能很有趣,因为如果调用的结构在当前引用样式逻辑中不是真正可调整的,您可能会看到需要诉诸类似的条件(无论您选择将其放置在何处)。如果是这样,最终的要求/限制不会有太大差异。所以补丁可能很方便。无论如何,如上所述,重新定义相关的 bibmacros 和/或相关的引用命令也是可以考虑的选项。定义专用的引用命令也是如此。但是,修补引用命令不是(请参阅评论中的讨论Biblatex 的 bibmacros、参考书目驱动程序、格式 - 修补或重新定义?)。这很重要,因为citebibmacro 并不是一个完美的通用钩子,特别是对于comp标准引用样式的变体(更不用说贡献的引用样式)来说。

这种方法使我们在选择底层引用样式(对于常规条目类型)时具有合理的灵活性,但它并不完全是“样式不可知的”,这有两个原因。

首先,鉴于我们以这种方式劫持了核心引用 bibmacro,这意味着我们有责任为特殊条目类型(例如ibid处理、短格式与长格式等)自行重新实现引用样式的任何特殊功能。而且很难以独立于样式的方式来做到这一点...

其次,并非所有样式都能仅基于 bibmacro 构建完整的引用cite,即使是标准样式也不行,comp变体就是最明显的例子。 (尽管我仍然认为这应该是相当可行的,只要您不在任何单个引用命令中混合常规和非常规条目类型。但这尚未经过测试)。 虽然原则上,这种方法可能适用于标准样式,并且可能适用于(许多?)贡献的样式,但是否有效取决于同一个问题。 它也必须是合理的(例如,我不认为这会与numeric或很好地融合alphabetic,即使它在技术上可行)。 无论如何,我一直将它与authoryearauthortitleverbose以及它们的ibid变体一起使用,而且非常成功,在引用任何给定来源时无需过于偏执(当然需要小心谨慎),也不用担心除了选择引用样式之外的任何其他调整。

最后一点。如果您和我一样,您可能会遇到这样一种情况:您的一种非常规源类型恰好在常规源类型中发布,并且您希望将其视为特殊类型,因为这很有意义/很重要,但仍要承认已发布的版本。您可以通过在具有适当 crossref 的 feed 中非常规源类型的cite引用中使用常规类型的 bibmacro,以响应常规条目类型所用的引用样式来执行此操作。(moewe,现在您知道为什么我之前entrydata对嵌套如此感兴趣了)。entrydatas

从概念上讲,这些就是我的主要观点。为了不那么抽象,我以具体的形式包含了几个关键部分。bibmacroprimary处理我的主要来源的引文,它使用 biblatex 的混合接口(即使用 bibdriver 来呈现引文),类似于:

\newbibmacro*{primary}{%
  \ifciteseen
  {\ifboolexpr{
      test {\ifciteibid}
      and
      not test {\iffirstonpage}}
    {\usebibmacro{cite:ibid}}
    {\ifdriver{\thefield{entrytype}:short}
      {\usedriver{}{\thefield{entrytype}:short}}
      {\usedriver{}{\thefield{entrytype}}}}}
  {\usedriver{}{\thefield{entrytype}}}}

当然,您不必使用混合接口,也可以使用常规 bibmacros。我碰巧认为这特别方便,只需定义相关的 bibdriver 即可获得我每种特殊条目类型的引文调用。请注意,上述结构可处理短/长引文形式和 ibid,并自动使用相应的引文样式执行此操作而无需任何进一步干预,因为 biblatex 会根据所选样式打开或关闭相关跟踪器。

我的legislation驱动程序如下:

\DeclareBibliographyDriver{legislation}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{legislation:typenumber}%
  \setunit{\addcomma\space}%
  \printdate%
  \setunit{\addcomma\space}%
  \printfield{leggov}%
  \setunit{\addcomma\space}%
  \iffieldundef{shorttitle}
    {\printfield[title]{title}}
    {\printfield[title]{shorttitle}}%
  \setunit{\addcomma\space}%
  \iffieldundef{pubin}
    {}
    {%
      \bibstring{in}%
      \setunit{\addspace}%
      \usebibmacro{primpublishedin}%
    }%
  \newunit
  \ifcitation
    {}
    {\printfield{addendum}}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{legislation:short}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{legislation:typenumber}%
  \setunit{\addcomma\space}%
  \printshortdate%
  \setunit{\addcomma\space}%
  \iffieldundef{shortleggov}
    {\printfield{leggov}}
    {\printfield{shortleggov}\isdot}%
  \setunit{\addcomma\space}%
  \iffieldundef{pubin}
    {}
    {%
      \bibstring{in}%
      \setunit{\addspace}%
      \usebibmacro{primpublishedin}%
    }%
  \usebibmacro{finentry}}

要求:

\newbibmacro*{legislation:typenumber}{%
  \ifboolexpr{
    test {\iffieldundef{pubin}}
    and
    test {\ifcitation}
    and not
    test {\iffieldundef{crossref}}
  }{%
    \printtext[bibhyperref:crossref]{%
      \printfield{legtype}%
      \setunit{\addspace}%
      \bibstring{number}%
      \setunit{\addnbspace}%
      \printfield{legnumber}}%
  }{%
    \printfield{legtype}%
    \setunit{\addspace}%
    \bibstring{number}%
    \setunit{\addnbspace}%
    \printfield{legnumber}}}

\newbibmacro*{primpublishedin}{%
  \entrydata*{\strfield{pubin}}{%
    \ifentrytype{primperiodical}{%
      \ifbibliography
        {\clearfield{urlintro}%
          \clearfield{url}%
          \clearfield{addendum}%
          \usedriver{}{\thefield{entrytype}}}
        {\begingroup%
          \delimcontext{none}%
          \usebibmacro{cite}%
          \endgroup}%
      \setunit{\addcomma\space}%
      \iffieldundef{savedvolume}
        {}
        {\iffieldnum{savedvolume}
          {\bibstring{jourvol}\addnbspace}
          {}%
        \printfield{savedvolume}}%
      \setunit{\addcomma\space}%
      \iffieldundef{savednumber}
        {}
        {\iffieldnum{savednumber}
          {\bibstring{number}\addnbspace}
          {}%
          \printfield{savednumber}}%
      \setunit{\addcomma\space}%
      \printsavedpubdate%
    }{%
      \ifbibliography
        {\usedriver{}{\thefield{entrytype}}}
        {\begingroup%
          \delimcontext{none}%
          \usebibmacro{cite}%
          \endgroup}%
    }%
  }%
  \ifboolexpr{
      test {\iffieldpages{postnote}}
      and
      not test {\iffieldundef{pages}}}
    {\global\toggletrue{prim:thiscite}}
    {}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
}

有了这个(并假设相关字段在您的数据模型中定义),您只需将所有类型的条目添加legislation到类别primary(或legal)中,以使您的引用适用于legislation条目类型(标准\AtEveryCitekey钩子应该足够了)。

为了在实践中完成任务,我只需填写适当的模板:

% legislation
% "legtype", "legnumber" and "date" are mandatory
% If "pubin" is not set, does not automatically crossref to any entry, if that's desired use the "crossref" field directly
@legislation{ID,
  OPTdocid = {},
  legtype = {},
  legnumber = {},
  OPTleggov = {},
  OPTshortleggov = {},
  date = {},
  OPTtitle = {},
  OPTshorttitle = {},
  OPTpubin = {},
  OPTvolume = {},
  OPTnumber = {},
  OPTpubdate = {},
  OPTpages = {},
  OPTcrossref = {},
  OPTaddendum = {},
}

当然,这并不符合 OSCLA 或任何其他知名的法律来源引用风格,它也不是自给自足的代码,但希望可以作为如何更具体地使用这种引用方法的一个例子。

好吧,我想这些就是我对此事的看法,正如承诺的那样。我希望它们有用。

答案3

使用oxnotesbiblatex 样式。它做得相当好,而且很强大,并且具有足够细致入微的呈现。在法律论坛之外,完全符合 OSCOLA 要求的激光雕刻精度实际上并不是必需的。

您几乎已经完成了 MWE。还有一些其他调整:

在 bib 文件中,对于案例,请将案例参考号放在字段中number。这将处理纸质和电子法律报告。对于印刷案例,不需要页码范围。

对于立法,请勿使用字段author。在脚注中填写年份就足够了。

在文本中使用autocite。律师写作清晰的原则之一就是让页面简洁。参考详细信息放在脚注中。(请注意 MWE 如何textcite处理立法名称 - 它应该是简单的。)

请注意,您可以在 bib 字段项目中放置格式化命令(latex 代码),emph等中。

至于‘应该’的问题,这是一个程度的问题。

如果你想将参考书目分为法律部分和非法律部分,为了帮助读者,最简单的方法是使用keywords。 (还有其他方法:biblatex 实际上是一个工具包。)

梅威瑟:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@jurisdiction{case,
  title             = {{Somebody} v {Somebody Else} and Others (No 4)},
  number              = {[2016] AC 100},
  date={2016},
  keywords={legal,case},
%  pages             = {100--178},
%  date              = {2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01}
  }
@legislation{teu,
keywords = {legal,legislation},
entrysubtype = {eu-treaty},
title = {Consolidated Version of the
Treaty on European Union},
date = {2010},
journaltitle = {OJ},
series = {C},
volume = {83},
pages = {13},
shorthand = {TEU},
pagination = {article},
}
@jurisdiction{c632,title = {Tenacity Investments v Ku-Ring-Gai Council and Ors (No 2)},keywords = {au},number = {[2008] NSWLEC 171},institution = {Land and Environment Court of New South Wales},date = {2008-08-22},  keywords={legal,case},}

@jurisdiction{c606,title = {Lee-Hirons v Secretary of State for Justice},keywords = {au},number = {[2016] UKSC 46},institution = {United Kingdom Supreme Court},date = {2016-07-27},keywords={legal,case},}

@legislation{deddf,
    title               =   {{Deddf  Ardderchog (Cymru)}},
    year                =   {2014},
    institution              =   {{Cynulliad Cenedlaethol Cymru}},
    languageid          =   {cy},
      keywords={legal,legislation},
    }

@legislation{cansw,
    title               =   {Crimes Act (NSW) },
    year                =   {1900},
    languageid          =   {en_AU},
      keywords={legal,legislation},
    }

@article{article,
  title     = {Fantastic Findings and Where to Find Them},
  author    = {Vark, Aar D.},
  journal   = {Diligent Discoveries},
  volume    = 45,
  number    = 3,
  pages     = {23--32},
  year      = 2010}

@book{book,
  title     = {Brilliant Baths},
  author    = {Allard, M.},
  publisher = {Empire Books},
  address   = {Alpha Centauri},
  year      = 1998}

@book{austrams,
author = {Austin, Robert P. and Ramsay, Ian M},
title = {Ford, Austin and Ramsay's Principles of Corporations Law},
edition = {16},
publisher = {LexisNexis Butterworths},
date = {2015},
pagination = {paragraph},
ISBN = {9780409338386},
}
\end{filecontents}

\documentclass[welsh,british,a4paper]{article}
%\usepackage[utf8]{inputenc}
%\usepackage{geometry}
%\usepackage{cfr-lm}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=oxnotes]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

Most of my bibliography entries are `normal' sources, such as articles \autocite[e.g.][]{article} and books \autocite[e.g.][]{book}.
\Textcite{article} and \textcite{book} are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
\begin{quote}
  \textcite{deddf} is a law \autocite{deddf}.
  \Textcite[at 150]{case} is a case \autocite{case}.
  A legal textbook\autocite{austrams}. And another case\autocite{c632}. And a medium-neutral citation of a case \autocite[at para 23]{c606}. Some EU legislation to play with \autocite{teu}. And a statute\autocite{cansw}. A law from another jurisdiction: \textcite{cansw}
\end{quote}

\printbibheading
\printbibliography  [
    heading=subbibliography,%
    keyword=case,
    title={Cases}
    ]
\printbibliography  [
    heading=subbibliography,%
    keyword=legislation,
    title={Statutes}
    ]
\printbibliography  [
    heading=subbibliography,%
    notkeyword=case,
    notkeyword=legislation,
    title={General}
    ]

\hrule


\end{document}

给予:

带引文的文本

以及脚注:

脚注

以及参考书目:

法规

附录:在 MWE 中,更改

\textcite{deddf} is a law \autocite{deddf}.
\Textcite[at 150]{case} is a case \autocite{case}.

\citetitle{deddf} is a law \autocite{deddf}.
\citetitle{case} is a case \autocite[at 150]{case}.

这使得它更干净。

PS 我花了几分钟才弄明白为什么我在 BAILII 上找不到“Deddf Ardderchog”!:)

=============================

完全另类(几天后),探索 moewe 关于专用\lawcite命令的想法:

我能够\lawcite在大约十几个步骤内启动并运行一个可行的(极简主义)命令,使用bibentry 类型上的title和字段,使用两个关键字和(在后台,如支持演员、文档类和number@rticlecaselegislationarticleext-authortitlebiblatex 样式,这是默认样式之一的扩展)。

以下是完整的 MWE,供需要了解结果的人参考

平均能量损失

% arara: xelatex
% arara: biber
% arara: xelatex 
% arara: xelatex 
\RequirePackage{filecontents}


\begin{filecontents*}{\jobname.bib}


@article{jones,
title ={Jones v City of Birmingham},
number={224 So. 2d 922 (1969)},
caseref={224 So. 2d 922},
fullcaseref={Jones v. City of Birmingham, 224 So. 2d 922},
partyfirst={Betty Lou JONES},%individual entity>last name as unit
partyfirstrole={appellant},
partysecond={CITY OF BIRMINGHAM},%corporate entity>full name as unit
partysecondrole={appellee},
casetype={appeal},
institution={Court of Appeals of Alabama},
hearingdate={April 22, 1969 and Rehearing Denied May 20, 1969},
decision={Appeal dismissed},
date={1969},
volume={224},
reportseriesname={Southern Reporter},
reportseriesabbrev={So},
reportseries={2},
page={922},
keywords={us, case},
}


@article{ordart,
title ={An Ordinary Article Title},
number={Issue 14},
journaltitle={The Journal},
date={2019-05},
page={10},
}



@article{stat1,
Title ={The Ordinaries Act},
date={2019},
keywords={uk, legislation},
}


\end{filecontents*}





\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\usepackage[british]{babel}
\usepackage{csquotes}

\usepackage{splitidx}
\makeindex
\newindex[Table of Cases]{cases}
\newindex[Table of Statutes]{legislation}

\newcommand\abibname{ext-authortitle}
\newcommand\abibstyle{style=\abibname}
\usepackage[
    \abibstyle , 
    indexing=cite,
    citetracker,
    autocite=footnote, 
        ]{biblatex}
\newcommand\mynote{biblatex option used: \texttt{\abibstyle}.}
\defbibnote{abibnote}{\mynote}


\usepackage{xcolor}
\pagecolor{red!3}


\addbibresource{\jobname.bib}



\DeclareFieldFormat[article]{title}{%
\ifkeyword{case}%
    {\mkbibemph{#1}}%
    {%
    \ifkeyword{legislation}%
    {#1}%
    {\mkbibquote{#1}}%
    }%
}


\newbibmacro{sendtocaseindex}{%
        \ifboolexpr{
        test {\ifkeyword{case}} 
        }
    {\sindex[cases]{\thefield{title}, \thefield{number}}}%
    {%
    \ifboolexpr{
        test {\ifkeyword{legislation}} 
        }
    {\sindex[legislation]{\thefield{title} \thefield{year}}}%
    {}%
    }%  
}



\newbibmacro{gettitle}{%
    \printfield{title}%
    \usebibmacro{sendtocaseindex}%
}

\newbibmacro{getnumber}{%
\ifkeyword{case}%
    {\addcomma\addspace\printfield{number}}%
    {%
    \ifkeyword{legislation}%
    {\addspace\printfield{year}}%
    {}%
    }%
}


\DeclareCiteCommand{lawcite}
{\usebibmacro{prenote}}
{
    \usebibmacro{gettitle}
    \ifciteseen{}{\usebibmacro{getnumber}}
}
{}
{\usebibmacro{postnote}}





\begin{document}

%https://stackoverflow.com/questions/2389689/single-column-long-index-pages-in-latex
%Apr 2 '11 at 2:39
%Smiley
%for two columns > one column
%addedL remove clearpage
\let\oldtwocolumn\twocolumn
\renewcommand{\twocolumn}[1][]{#1}
\let\oldclearpage\clearpage
\renewcommand\clearpage{\relax}
\printindex[cases]
\printindex[legislation]
\renewcommand{\twocolumn}[1][]{\oldtwocolumn}
\renewcommand\clearpage{\oldclearpage}

\section{Example}
\lawcite{jones}

\lawcite[under section 27A]{stat1}, provides that in the situation of ...

\cite{ordart}

 Second cite: \lawcite[per Judge Cates at page 924]{jones}, was decided on the basis that (to paraphrase) ``what the court hasn't seen, the court can't review'', and that any redeeming social importance of prowess and endowment is a question of fact.

\printbibliography[prenote=abibnote,nottype=jurisdiction,
notkeyword=case,notkeyword=legislation]


\begin{center}
\textemdash
\textemdash
\end{center}
\end{document}

和输出

法律引用结果

起点是决定书目信息的粒度:粒度越细,需要的努力和实力就越多(就像图像一样,从低分辨率到高分辨率)。

最终,法律案例引证仅由一个标识符(案例名称)和一个定位器(案例参考,这是查找判决的一种方式)组成。这种双块结构(实际上是名称和地址)是最低限度的。

我们可以捕获、存储和处理各个组件,但最终还是要返回到案例名称和案例引用。幸运的是,从编程术语上讲,这两者都是常量,因此我们可以从那里开始。

这个练习的目的是了解构建一个成熟的 biblatex 风格需要涉及什么(我们不会这样做;只是为了了解这个想法)。

因此,让我们任意选择一个 biblatex bibentry 类型@article(只是因为它在那里),并且随机挑选一个案例(通过 Google Scholar,从以“A”开头的司法管辖区开始,即阿拉巴马州),在我们.bib文件的 bibentry 中,我们将案例名称放在字段中title,并将案例参考放在字段中number

@article{jones,
title ={Jones v City of Birmingham},
number={224 So. 2d 922 (1969)},
keywords={us, case},
}

注意关键词。它们以后会变得很重要。考虑如何对信息进行分类会影响需要做出的处理设计决策。

当我们在 bib 文件中时,我们还设置了一个普通的文章条目,以便进行比较。

@article{ordart,
title ={An Ordinary Article Title},
number={Issue 14},
journaltitle={The Journal},
date={2019-05},
page={10},
}

现在,建立一个.tex引用这两个条目的文档

\section{Example}
\cite{jones}
\noindent\cite{ordart}

并打印参考书目,我们循环工作流程latex- biber- latex,得到以下结果:

文章类型

首先,与其他一般书目混合的案例看起来很奇怪:我们会将它们从那里删除并稍后单独打印(某个地方,尚未决定)。

其次,文中案例名称有引号,是直立的而不是斜体;且案例参考文献(该number字段)没有打印。

通过关键字技术可以轻松修复参考书目,使其不打印案例:

\printbibliography[notkeyword=case]

现在开始旅程:

我们想要一个引用命令,类似于\lawcite{jones},它打印斜体案例名称,然后number在案例名称后打印字段,但不会对“普通”文章执行任何操作(记住我们在@article数据结构内)。

想想看,我们还需要在两段文本之间添加逗号和空格。

声明一个 cite 命令,给它一个名称lawcite,并让它打印title字段,方法是\DeclareCiteCommand四个参数:在引用之前打印的内容、引用本身、如果有引用列表则使用什么分隔符以及在引用之后打印的内容。

因此,基本系统\DeclareCiteCommand看起来应该是这样的:

\DeclareCiteCommand{lawcite}
{}
{
    \printfield{title}
}
{}
{}

使用 biblatex 内置函数prenotepostnodebibmacros 对之前和之后的功能进行一些增强,得到如下结果:

\DeclareCiteCommand{lawcite}
{\usebibmacro{prenote}}
{
    \printfield{title}
}
{}
{\usebibmacro{postnote}}

\printfield只需根据字段给出的格式指令打印该字段即可\DeclareFieldFormat

对于title字段格式化,我们可以使用\ifkeyword{condition}{true}{false} 测试来检查当前正在处理的 bibentry 是否包含关键字case,如果包含则有条件地强调打印(使用\mkbibemph),如果不包含则用引号打印(使用\mkbibquote)。

\DeclareFieldFormat还可以采用可选的 bibentry 类型列表来限制格式,因此我们只更改title格式article

\DeclareFieldFormat[article]{title}{%
\ifkeyword{case}%
    {\mkbibemph{#1}}%
    {\mkbibquote{#1}}%
}

再次循环工作流程,我们得到:

斜体案例名称

现在将案例参考添加到引用:\ifkeyword再次派上用场,这次用于打印number字段(前面​​有逗号和空格)。

\DeclareCiteCommand{lawcite}
{\usebibmacro{prenote}}
{
    \printfield{title}
\ifkeyword{case}%
    {\addcomma\addspace\printfield{number}}%
    {}%
}
{}
{\usebibmacro{postnote}}

我们不会对该number字段进行任何格式更改,只是让它以默认格式打印。

已添加案例参考

现在,为了便于代码维护,我们可以将看起来可以在多个地方使用的代码块移动到它们自己的宏中,称为bibmacros (实际上,它们只是一个\newcommand带有包装器)。

让我们将title打印和number打印移到 bibmacros 中,gettitle并调用它们getnumber

\newbibmacro{gettitle}{%
    \printfield{title}%
}

\newbibmacro{getnumber}{%
\ifkeyword{case}%
    {\addcomma\addspace\printfield{number}}%
    {}%
}

cite 命令变为

\DeclareCiteCommand{lawcite}
{\usebibmacro{prenote}}
{
    \usebibmacro{gettitle}
    \usebibmacro{getnumber}
}
{}
{\usebibmacro{postnote}}

除其他外,它读起来更加清晰。

现在,查看病例表。

有两种方法可用。

我们可以拆分参考书目来分别打印案例,但这样它就不会显示引用案例的页码(尽管如此,现实世界中 10-30 页的文章或论文的读者不太可能需要案例表的导航帮助)。

第二种方法是使用索引,将其拆分,然后将其称为表。

有各种包和实用程序可用于此目的。随机选择,让我们将该splitidx包与 SplitIndex 引擎(我理解为 Perl 脚本)结合使用。

使用 激活包\usepackage{splitidx},使用 启动索引构建\makeindex,使用 定义案例索引标题“案例表” \newindex[Table of Cases]{cases},然后我们就可以使用\sindex命令将条目发送到拆分索引了。

但是我们想做什么?每当提到案例(= title)时,我们都会进行索引。打印标题是gettitlebibmacro 的工作,因此操作将在那里发生。它必须确定条目是否是案例,如果是,则使用命令\sindex将案例名称发送到索引。

现在,biblatex 可以访问该etoolbox包,从那里,我们可以使用该\ifboolexpr命令构建一组非常复杂的条件(如果我们愿意的话),使用andor和括号(而不是一个或两个(或四个中的三个)\if不同类型的嵌套)。结构为\ifboolexpr{condtions}{true}{false},如下所示:

\ifboolexpr{
 test {\ifkeyword{case}} 
 }
 {true}%
 {false}%   

由于索引不理解 biblatex 代码,我们将使用title以下命令将字段的原始数据发送到案例索引:

\sindex[cases]{\thefield{title}}

bibmacrogettitle现在变成了:

\newbibmacro{gettitle}{%
    \printfield{title}%
        \ifboolexpr{
        test {\ifkeyword{case}} 
        }
    {\sindex[cases]{\thefield{title}}}%
    {}% 
}

输入\printindex[cases]命令并循环工作流程,现已扩展到 latex-biber-latex-splitindex-latex,我们得到以下结果:

在自己的页面上建立索引

直立字体对于案例索引来说是正确的,但是双列格式有点奢侈(并且在结构上与文档的其余部分在视觉上截然不同)并且分页是不必要的。

应用 SE 解决方法恢复为单列(并且没有页面提要)

%https://stackoverflow.com/questions/2389689/single-column-long-index-pages-in-latex
%Apr 2 '11 at 2:39
%Smiley
%for two columns > one column
%addedL remove clearpage
\let\oldtwocolumn\twocolumn
\renewcommand{\twocolumn}[1][]{#1}
\let\oldclearpage\clearpage
\renewcommand\clearpage{\relax}
\printindex[cases]

\renewcommand{\twocolumn}[1][]{\oldtwocolumn}
\renewcommand\clearpage{\oldclearpage}

我们得到了这个

很好的案例表

旁注:因为我喜欢点和方括号,所以我给 SplitIndex 提供了一个如下索引样式文件:

delim_0 "\\space\\dotfill\\space ["
delim_1 "\\space\\dotfill\\space ["
delim_2 "\\space\\dotfill\\space ["
delim_n "], ["
delim_r "--"
delim_t "]"

由 OSCOLA 版本 (包含点) 修改而来。

接下来的旅程中,如果索引中也有案例参考就更好了,尤其是现在它更宽了,而且整条线路都可用。

因此索引命令\sindex现在得到了额外的一点, \thefield{number}

\newbibmacro{gettitle}{%
    \printfield{title}%
        \ifboolexpr{
        test {\ifkeyword{case}} 
        }
    {\sindex[cases]{\thefield{title}, \thefield{number}}}%
    {}% 
}

工作流程循环(再次)以及结果:

案例参考现已列入索引

案件已经处理完毕。立法呢?

代入一个\lawcite{stat1},循环,我们得到:

立法作为条款

哎呀。它在参考书目中。文中却有引文,却没有年份。

使用我们的老朋友\DeclareFieldFormatlegislation关键字对不带引号的立法标题进行格式化:

\DeclareFieldFormat[article]{title}{%
\ifkeyword{case}%
    {\mkbibemph{#1}}%
    {%
    \ifkeyword{legislation}%
    {#1}%
    {\mkbibquote{#1}}%
    }%
}

可以通过添加以下代码来打印立法年份

\ifkeyword{legislation}%
{\addspace\printfield{year}}%
{}%

像这样的bibmacro getnumber

\newbibmacro{getnumber}{%
\ifkeyword{case}%
    {\addcomma\addspace\printfield{number}}%
    {%
    \ifkeyword{legislation}%
    {\addspace\printfield{year}}%
    {}%
    }%
}

也许getnumber应该改名?它实际上做的是获取引文块的第二部分,对于立法来说,在这个练习中,year

gettitle使用嵌套测试对立法(包括标题和年份)进行索引:

\newbibmacro{gettitle}{%
    \printfield{title}%
        \ifboolexpr{
        test {\ifkeyword{case}} 
        }
    {\sindex[cases]{\thefield{title}, \thefield{number}}}%
    {%
    \ifboolexpr{
        test {\ifkeyword{legislation}} 
        }
    {\sindex[cases]{\thefield{title} \thefield{year}}}%
    {}%
    }%  
}

(旁注:细心的读者会注意到打字错误——而我直到后来才注意到。)

如果一个案例被第二次引用,我们要打印什么?立法、标题和年份都可以;但案例呢?

循环执行工作流程:

第二次援引案件

哎呀,太急切了。

可以清除书目中的立法,并notkeyword=legislation添加\printbibliography选项。

\printindex立法已发送到案件索引,但无论如何也没有命令。轻松修复。

\newbibmacro{gettitle}{%
    \printfield{title}%
        \ifboolexpr{
        test {\ifkeyword{case}} 
        }
    {\sindex[cases]{\thefield{title}, \thefield{number}}}%
    {%
    \ifboolexpr{
        test {\ifkeyword{legislation}} 
        }
    {\sindex[legislation]{\thefield{title} \thefield{year}}}%
    {}%
    }%  
}

并把\printindex[legislation]文档中。

现在,对于第二次及后续引用,Biblatex 有一个\ifciteseen我们可以使用(和 Biblatex 的citetracker必须打开 Biblatex 的选项才能使其工作)。

如果这是该条目第一次被引用,我们希望打印两个数据块(“名称和地址”结构类型);否则,只打印第一个:

\ifciteseen{}{\usebibmacro{getnumber}}

cite命令\lawcite可以有这个任务。

\DeclareCiteCommand{lawcite}
{\usebibmacro{prenote}}
{
    \usebibmacro{gettitle}
    \ifciteseen{}{\usebibmacro{getnumber}}
}
{}
{\usebibmacro{postnote}}

最后一点整理:索引代码可以放入其自己的 bibmacro 中:

\newbibmacro{sendtocaseindex}{%
        \ifboolexpr{
        test {\ifkeyword{case}} 
        }
    {\sindex[cases]{\thefield{title}, \thefield{number}}}%
    {%
    \ifboolexpr{
        test {\ifkeyword{legislation}} 
        }
    {\sindex[legislation]{\thefield{title} \thefield{year}}}%
    {}%
    }%  
}

因此gettitle简化为:

\newbibmacro{gettitle}{%
    \printfield{title}%
    \usebibmacro{sendtocaseindex}%
}

循环工作流程,以及:

全做完了。

所以我们结束于我们开始的地方。

===

引用就完成了。

不断添加更多逻辑、调整和增​​强,这种做法将一直持续下去(例如,精明的读者会问,“第二次引用的立法会怎样?我们是否要保留年份?”)。越来越多的 if-then-elses。并且转换\lawcite为脚注参考系统(如 OSCOLA 实施的系统)将是代码方面的直接。不过,放入并行报告会有点棘手,但也许可以使用 biblatex 文字列表集。

使用由案件名称、案件参考、年份(作为单独和可移动的项目)和管辖权组成的四部分结构并不难,但中等中性引用(MNC)方法(年份/法院/年份中的案件编号)更简单且更有用(实际上是合法的 doi)。

除了法院和法官在判决中没有真正要求参考书目外,从头开始构建参考书目驱动程序(为什么?)所需的工作量大致相同,还需要考虑额外的实际文本块层及其排列。与引文有很大的重叠,因此 bibmacros 很有用。

(另外:Biblatex 可以在源之间进行映射和动态重新定义,并且具有各种类型的继承,这在元元数据的方式下非常强大。)

因此,总体而言,主要问题,或者说“驱动”问题,将是图书馆员的问题:bib 数据应具有什么级别的粒度?以及:应该对其应用什么分类方法(例如,如果使用关键字方法,应该使用什么关键字)?其他一切都源于此。

:) 还有一个逻辑上微不足道(但可能最耗时)的部分:元数据应该是什么?是否有法律引文书目信息交换国际标准 (ISO-LCBII)?

如果我有一个像这样的 bibentry,存储在任何合适的 bibentry 类型下:

@article{jones,
partyfirst={Betty Lou JONES},%individual entity>last name as unit
partyfirstrole={appellant},
partysecond={CITY OF BIRMINGHAM},%corporate entity>full name as unit
partysecondrole={appellee},
casetype={appeal},
bench={Cates},
institution={Court of Appeals of Alabama},
hearingdates={April 22, 1969 and Rehearing Denied May 20, 1969},
decision={Appeal dismissed},
date={1969},
volume={224},
reportseriesname={Southern Reporter},
reportseriesabbrev={So},
reportseries={2},
page={922},
mnc={[1969] ALCA 420},
mncyear={1969},
mnccourt={ALCA},
mncnumber={420},
factslocation={The Blue Note Lounge},
factsdate={1967-12-03},
keywords={us, case},
}

这有什么用处?

答案4

完全不同的方法。(其他答案框中没有足够的空间来添加它。)

保持简单,使用最广泛,编码最少:

lite cite 法律引证

在排版上,法律参考文献由斜体部分和直立部分组成。

使用现有的 bibentry 类型和字段:

对于.bib文件:

使用@jurisdictionbibentry 类型。将参考文献的斜体部分存储在title=字段中。将案例的非斜体部分存储在字段中number=;将法规的非斜体部分(如果有)存储在字段中location。如果需要单独的书目或子书目,请使用关键字作为过滤器。

在序言中,调用 biblatex 之后,定义字段格式、引用命令和参考书目驱动程序(法律工作中并不真正需要参考书目 - 即法律论文和判决 - 但在非法律领域却很常见;而案例表则过于严厉)。

由于法律项目将以相同的格式出现在引文和参考书目中,因此一组 bibmacros 可以为两种输出构建格式。

案例将呈现为:标题数字。

法规将以以下形式出现:标题(地点)。

引用命令将是\legal{}

按需要更改。

\DeclareFieldFormat[jurisdiction]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[jurisdiction]{number}{#1}
\DeclareListFormat[jurisdiction]{location}{%
\mkbibparens{#1%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
{}}}

\newbibmacro{getlegaltitle}{%
    \printfield{title}%
}
\newbibmacro{getlegalrefcase}{%
    \iffieldundef{number}{}{\printfield{number}}%
}

\newbibmacro{getlegalrefstat}{%
    \iflistundef{location}{}{\printlist{location}}%
}

\newbibmacro{getlegalref}{%
    \usebibmacro{getlegalrefstat}%
    \usebibmacro{getlegalrefcase}%
}

\newbibmacro{getlegalfull}{%
    \usebibmacro{getlegaltitle}%
    \addspace%
    \usebibmacro{getlegalref}%
}

\DeclareCiteCommand{legal}%
%@@@@@@@@@@@@@@@@ prenote
{\usebibmacro{prenote}}% 
%@@@@@@@@@@@@@@@@ item
{\usebibmacro{getlegalfull}}%
%@@@@@@@@@@@@@@@@ delim
{\multicitedelim}%
%@@@@@@@@@@@@@@@@ postnote
{\usebibmacro{postnote}}

%
\DeclareBibliographyDriver{jurisdiction}{%
    \usebibmacro{begentry}%
   \usebibmacro{getlegalfull}
    \usebibmacro{finentry}
}
%=================

其他引用命令,例如 parencite、footcite、titlecite 等命令,可以根据需要进行构建:只需插入相关的 bibmacro,如果需要,可以应用格式化程序(例如 \mkbibparens{}\mkbibfootnote)作为包装器。

作为快捷方式,可以将包装器命令作为选项添加到引用命令中,如下所示:

\DeclareCiteCommand{legal}[\mkbibfootnote]%

完整 MWE

\begin{filecontents*}{\jobname.bib}
@jurisdiction{sc1,
title = {Kay v Foo Pty Ltd},
number = {[2020] XYZCA 92},
keywords={legal,case},
}

@jurisdiction{sc2,
title = {Elle v Emm},
number = {[2020] ABCCA 12},
keywords={legal,case},
}

@jurisdiction{st1,
title = {Planetary Building and Construction Industry Security of Payment Act 2999},
location = {OM},
keywords={legal,statute},
}

@jurisdiction{st2,
title = {Time Travel Capsules Building Act},
location = {2989, PX},
keywords={legal,statute},
}

\end{filecontents*}


%===================================================

\documentclass[12pt]{article}
\newcommand\rulesep{\rule{0.4\textwidth}{.4pt}}
\usepackage{fontspec}
\setmainfont{Noto Serif}
%------------------
\newcommand\abibname{ext-authortitle-ibid}
\newcommand\abibstyle{style=\abibname}
\usepackage[
    \abibstyle , 
    indexing=cite,
    citetracker=true,
    ibidtracker=true,
    pagetracker=true,
    idemtracker=true,
    opcittracker=true,
    loccittracker=true,
    autocite=footnote,
        ]{biblatex}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
%============= legal
\DeclareFieldFormat[jurisdiction]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[jurisdiction]{number}{#1}
\DeclareListFormat[jurisdiction]{location}{%
\mkbibparens{#1%
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}
{}}}

\newbibmacro{getlegaltitle}{%
    \printfield{title}%
}
\newbibmacro{getlegalrefcase}{%
    \iffieldundef{number}{}{\printfield{number}}%
}

\newbibmacro{getlegalrefstat}{%
    \iflistundef{location}{}{\printlist{location}}%
}

\newbibmacro{getlegalref}{%
    \usebibmacro{getlegalrefstat}%
    \usebibmacro{getlegalrefcase}%
}

\newbibmacro{getlegalfull}{%
    \usebibmacro{getlegaltitle}%
    \addspace%
    \usebibmacro{getlegalref}%
}

%\DeclareCiteCommand{legal}[\mkbibfootnote]%
\DeclareCiteCommand{legal}%
%@@@@@@@@@@@@@@@@ prenote
{\usebibmacro{prenote}}% 
%@@@@@@@@@@@@@@@@ item
{\usebibmacro{getlegalfull}}%
%@@@@@@@@@@@@@@@@ delim
{\multicitedelim}%
%@@@@@@@@@@@@@@@@ postnote
{\usebibmacro{postnote}}

%
\DeclareBibliographyDriver{jurisdiction}{%
    \usebibmacro{begentry}%
   \usebibmacro{getlegalfull}
    \usebibmacro{finentry}
}
%=================
\usepackage[
                bookmarks,
            colorlinks=true,        
            allcolors = black,  
            citecolor=blue, 
            hyperindex=false,       
]{hyperref}
%------------------
\begin{document}
Case and statute: \legal{sc2,st1}. And with pinpoints: \legal[s 4]{st2} and \legal[at para 123]{sc1}.

Normal text with citations -- \parencite{reese,kullback:related,aristotle:anima}.

\printbibliography

Sorted into order by the authortitle style via the \textit{name}, \textit{title} fields.
\bigskip
\bigskip

\hfill --oooOooo--\hfill\ 
\end{document}

相关内容