文章總頁數 - Biblatex

文章總頁數 - Biblatex

我想知道如何引用一篇文章並標明該文章的總頁數。我將該字段添加pagetotal.bib文件中,並在序言中添加以下程式碼:

\DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1~pp.}}

然而,無論有沒有這個代碼,或其變體與Pagetotal而不是pagetotal所有失敗。可以理解的是,該鍵bookpagination可能僅影響該欄位針對書籍的格式化方式。因此,任何指向正確方向的指標都會非常有幫助。

答案1

biblatex實現的預設樣式standard.bbx僅列印類似書本的條目類型的字段,pagetotal例如@book@collection、等。考慮到文章通常帶有一個字段來指示它們可以在其中找到的期刊的第一頁和最後一頁,該字段似乎確實是多餘的,因為(通常)它的信息價值可以通過對該字段進行少量計算來獲得(一些在線期刊沒有這樣的頁面,在這種情況下它可能有用)。@booklet@thesis@articlepagetotalpagespagetotalpages

為了pagetotal在輸出中包含 - 儘管有冗餘,我們必須將該命令包含\printfield{pagetotal}%在 的驅動程式中@article。為此,我們掛鉤note+pages僅由以下人員使用的宏@article

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \setunit{\bibpagespunct}% this ...
  \printfield{pagetotal}% ... and this is new
  \newunit}

我們還確保該字段的格式正確(因為標準bookpagination在這裡沒有幫助)

\DeclareFieldFormat[article]{pagetotal}{\mkpagetotal[pagination]{#1}}

微量元素

\documentclass{article}  
\usepackage[style=authoryear, backend=biber]{biblatex}
\usepackage{filecontents}
\usepackage{hyperref}
\begin{filecontents*}{\jobname.bib}
@article{BarPalNumEst,
  author    = {Hilary C. Barth and Annie M. Paladino},
  title     = {The development of numerical estimation},
  subtitle  = {Evidence against a representational shift},
  journal   = {Developmental Science},
  volume    = {14},
  number    = {1},
  pages     = {125-135},
  date      = {2011-01},
  doi       = {10.1111/j.1467-7687.2010.00962.x},
  gender    = {pf},
  pagetotal = {11},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\DeclareFieldFormat[article]{pagetotal}{\mkpagetotal[pagination]{#1}}
\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \setunit{\bibpagespunct}%
  \printfield{pagetotal}%
  \newunit}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

在此輸入影像描述


對於目前缺乏的其他條目類型pagetotal也可以進行此修改。對於@inbook@incollection和朋友來說,可以對 進行修改chapter+pages。但在這裡,這種修改似乎特別不必要,因為這些條目都應該在其欄位中包含正確的實體頁碼pages

\renewbibmacro*{chapter+pages}{%
  \printfield{chapter}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \setunit{\bibpagespunct}%
  \printfield{pagetotal}%
  \newunit}

相關內容