强制将信息(页面)打印到参考书目中;更改引用样式

强制将信息(页面)打印到参考书目中;更改引用样式

我使用非常有用的 oscola 脚本。不幸的是,根据引用样式,贡献的页码@incollection未显示在参考书目中。出于多种原因,我想坚持使用 Oscola,我能否强制将页码打印在参考书目中?我可以更改的引用样式吗\printbibliography[type=incollection]

这是一个例子(不幸的是,这可能不是一个最小的例子,因为 oscola 脚本需要某些命令才能运行 - 我的问题仅涉及 中的引用\printbibliography[type=incollection])。任何帮助都非常感谢!

\documentclass[a4paper,
           12pt,
       DIV=1,              
       footinclude=false,oneside]
      {scrbook}
\usepackage{geometry}
\usepackage{setspace}
\usepackage[style=british]{csquotes}
\usepackage[T1]{fontenc}
\usepackage[style=oscola,
        indexing=cite,
        backend=biber,
        ecli=yes,
        citereset=chapter,
        babel=hyphen]{biblatex}
\usepackage[splitindex,nonewpage]{imakeidx}
\setcounter{secnumdepth}{5}
\usepackage{tabularx}
\usepackage[mono=false]{libertine}
\usepackage[scaled=0.8]{beramono}
\usepackage{microtype}
\usepackage{ragged2e}
\usepackage{enumitem}
\setlist[description]{%
font=\ttfamily\mdseries,
leftmargin=3.8cm,
labelwidth=3.6cm,
labelsep=0.2cm}
\usepackage[utf8]{inputenc}   
\usepackage{multicol}
\usepackage{booktabs}
\renewcommand{\linespread}{1.2}
\newcommand{\oscola}{\textsc{bl-oscola}}
\newcommand{\biblatex}{\textsc{biblatex}}
\newcommand{\oscolashort}{\textsc{oscola}\nocite{oscola}}
\newcounter{egcounter}\setcounter{egcounter}{0}
\usepackage{scrpage2}
\usepackage[dvipsnames]{xcolor}
% This code from Juanjo's answer at http://www.latex-community.org
% /viewtopic.php?f=&t=1437&sid30648b3e881b9dd8c033a7ed1b1f31fd&start=10
\newlength{\boxwidth}
\newsavebox{\boxcontainer}
\newenvironment{bibexample}[1][]
{%
  \medskip\par\noindent\ignorespaces
  \marginpar{[\refstepcounter{egcounter}\arabic{egcounter}]\label{#1}}%
  \setlength{\boxwidth}{0.95\linewidth}%
  \addtolength{\boxwidth}{-2\fboxsep}
  \addtolength{\boxwidth}{-2\fboxrule}
  \begin{lrbox}{\boxcontainer}
  \begin{minipage}[t]{\boxwidth}%
}
{%
  \end{minipage}\end{lrbox}%
  \colorbox{gray!30}{\usebox{\boxcontainer}}
  \par\medskip}
\newcommand{\egref}[1]{[\ref{#1}]}
\newcommand{\egcite}[1]{{\texttt{\textbackslash cite#1}}}
\newcommand\angledtext[1]{$\langle$\textit{#1}\/$\rangle$}
\usepackage[final=true,colorlinks=true]{hyperref}
\addbibresource{test.bib}
\begin{document}
Test!\footnote{\cite[30]{kelsen_law_1950}; \cite[280]{rasulov_doctrine_2013}.}
\printbibliography[type=book, title={Monographs},prenote=note]
\printbibliography[type=incollection, title={Contributions to edited volumes},prenote=note]
\end{document}

test.bib 包含:

@book{kelsen_law_1950,
address = {London},
title = {The {Law} of {The} {United} {Nations} {A} {Critical} {Analysis} of {Its} {Fundamental} {Problems}},
publisher = {Stevens},
author = {Kelsen, Hans},
year = {1950}
}

@incollection{rasulov_doctrine_2013,
address = {Leiden},
title = {The {Doctrine} of {Sources} in the {Discourse} of the {Permanent} {Court} of {International} {Justice}},
booktitle = {Legacies of the {Permanent} {Court} of {International} {Justice}},
publisher = {Brill},
author = {Rasulov, Akbar},
editor = {Tams, Christian J. and Fitzmaurice, Malgosia},
year = {2013},
pages = {271--317}
}

答案1

如果我理解正确的话,OSCOLA 是一种在脚注中提供长/完整引文的样式,末尾没有提供参考书目。通常,页面在引文和参考书目中的处理方式略有不同,并且对于某些条目类型,根本oscola不打印该pages字段。

如果要恢复页面,则需要修改相关驱动程序。oscola类型结构意味着我们需要查看@inbook@inreference。我们只需添加

  \newunit\newblock
  \usebibmacro{chapter+pages}%

在适当的位置(驱动程序可以在中找到oscola.bbx,例如https://github.com/PaulStanley/oscola-biblatex/blob/1.6/oscola.bbx)。

由于oscola对后记分隔符做了一些特殊的事情,我们需要稍微修改chapter+pagesbibmacro 才能使用它。

\makeatletter
\newbibmacro*{chapter+pages}{%
  \printfield{chapter}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \ifboolexpr{
       not test {\iffieldundef{pages}}
    or not test {\iffieldundef{chapter}}}
    {\bbx@resetpostnotedelim}
    {}%
  \newunit}
\makeatother

其原始定义可以在standard.bbx3.14 版中的 895-899)。

为了避免脚注中的页码重复,您可能需要添加

    citepages=suppress,

加载选项。查看选项的其他可能值verbose-inote样式文档

\documentclass{article}
\usepackage[british]{babel}
\usepackage[style=british]{csquotes}
\usepackage[T1]{fontenc}
\usepackage[style=oscola,
        backend=biber,
        citepages=suppress,
        ecli=yes,
        babel=hyphen]{biblatex}

\makeatletter
\newbibmacro*{chapter+pages}{%
  \printfield{chapter}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \ifboolexpr{
       not test {\iffieldundef{pages}}
    or not test {\iffieldundef{chapter}}}
    {\bbx@resetpostnotedelim}
    {}%
  \newunit}
\makeatother

\DeclareBibliographyDriver{inbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\addcomma\space}\newblock
  \usebibmacro{title}%
  \usebibmacro{byauthor}%
  \usebibmacro{in:}%
  \newunit\newblock%
  \usebibmacro{bybookauthor/editor/translator}%
  \newblock%
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
  \newunit\newblock
  \usebibmacro{publicationinfo}%
  \newunit\newblock
  \usebibmacro{revisedbookvolume}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{inreference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \clearlist{publisher}%
  \newunit\newblock
  \usebibmacro{title}%
  \usebibmacro{byauthor}%
  \setunit{\addcomma\space}%
  \setunit{\addcomma\space}%
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \usebibmacro{publicationinfo:short}%
  \usebibmacro{revisedbookvolume}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}

\begin{filecontents}[force]{\jobname.bib}
@book{kelsen_law_1950,
  address   = {London},
  title     = {The Law of The {United Nations}
               {A} Critical Analysis of Its Fundamental Problems},
  publisher = {Stevens},
  author    = {Kelsen, Hans},
  year      = {1950}
}
@incollection{rasulov_doctrine_2013,
  address   = {Leiden},
  title     = {The Doctrine of Sources in the Discourse of the
               {Permanent Court of International Justice}},
  booktitle = {Legacies of the {Permanent Court of International Justice}},
  publisher = {Brill},
  author    = {Rasulov, Akbar},
  editor    = {Tams, Christian J. and Fitzmaurice, Malgosia},
  year      = {2013},
  pages     = {271--317}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Lorem \autocite[30]{kelsen_law_1950}
ipsum \autocite[280]{rasulov_doctrine_2013}
\printbibliography
\end{document}

参考书目

Rasulov A,《常设国际法院话语中的渊源理论》,载 CJ Tams 和 M Fitzmaurice 编,《常设国际法院的遗产》(Brill 2013),第 271-317 页。

引用

Akbar Rasulov,《常设国际法院话语中的渊源理论》,载 Christian J Tams 和 Malgosia Fitzmaurice 编,《常设国际法院的遗产》(Brill 2013),第 280 页。

上面再现的输出图像。

您可以在驱动程序中自由移动页码。如果您想将页码移动到 bibmacro 控制的位置,则需要采用不同的方法。


请注意,您可能需要推迟任何 LaTeX(特别是biblatex/Biber)更新,以避免遇到https://github.com/PaulStanley/oscola-biblatex/pull/8

相关内容