我如何说服biblatex-chicago
显示一本书的总页数?必填字段似乎是pagetotal
,可以选择禁用它,但即使我明确启用它,它也会被忽略。
\documentclass{memoir}
\usepackage{fontspec}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book { iwamoto1937,
editor = {Yutaka Iwamoto},
year = {1937},
title = {Mahāsāhasrapramardanī (Pañcarakṣā I)},
series = {Beiträge zur Indologie},
number = {1},
pagetotal = {43},
location = {Kyoto},
options = {bookpages=true},
}
\end{filecontents*}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
答案1
默认情况下biblatex-chicago
忽略该pagetotal
字段。
所以我们必须自己启用它,我们将此支持添加到pubstate
宏中(据我所知,所有驱动程序都使用此宏,我认为它的位置相当合适)
\makeatletter
\renewbibmacro*{pubstate}{%
\iftoggle{cms@reprint}%
{\iftoggle{cms@switchdates}%
{\iffieldundef{year}% Fix for consistency???
{}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
\printdate\addperiod}\nopunct}}
{\iffieldundef{origyear}%
{}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
\printorigdate\addperiod}\nopunct}}}%
{\printfield{pubstate}}%
\newunit
\printfield{pagetotal}}
\makeatother
我们只是添加了\printfield{pagetotal}
的标准定义chicago-authordate.bbx
。
平均能量损失
\documentclass{article}
\usepackage[authordate,backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book {iwamoto1937,
editor = {Yutaka Iwamoto},
year = {1937},
title = {A Non-Unicode Title},
series = {Just ASCII Here},
number = {1},
pagetotal = {43},
location = {Kyoto},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\makeatletter
\renewbibmacro*{pubstate}{% changed to \renewbibmacro to get rid of the warning.
\iftoggle{cms@reprint}%
{\iftoggle{cms@switchdates}%
{\iffieldundef{year}% Fix for consistency???
{}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
\printdate\addperiod}\nopunct}}
{\iffieldundef{origyear}%
{}%
{\printtext{% 16th ed.
\usebibmacro{choosepubstring}%
\printorigdate\addperiod}\nopunct}}}%
{\printfield{pubstate}}%
\newunit
\printfield{pagetotal}}
\makeatother
\begin{document}
\nocite{*}
\printbibliography
\end{document}