
如標題中所提到的,有什麼方法可以使頁碼成為舊式,並保持分頁(“p.”和“pp.”)?
這是我到目前為止所做的:
我的 MWE 代碼:
% !TEX program = xelatex
\documentclass{article}
\usepackage{filecontents}
\usepackage{hyperref}
\begin{filecontents}{mybib.bib}
@Article{Cormos2012,
Title = {Integrated assessment of IGCC power generation technology with carbon capture and storage (CCS)},
Author = {Cormos, C.},
Journal = {Energy},
Year = {2012},
Number = {1},
Pages = {434-445},
Volume = {42},
ISBN = {0360-5442},
Publisher = {Elsevier Ltd},
Url = {http://dx.doi.org/10.1016/j.energy.2012.03.025}
}
@Article{Mumford2015,
Title = {Review of solvent based carbon-dioxide capture technologies},
Author = {Mumford, Kathryn a. and Wu, Yue and Smith, Kathryn H. and Stevens, Geoffrey W.},
Journal = {Frontiers of Chemical Science and Engineering},
Year = {2015},
Number = {2},
Pages = {125-141},
Volume = {9},
Doi = {10.1007/s11705-015-1514-6},
ISBN = {2095-0179},
Keywords = {absorption,carbon capture,carbon dioxide,large scale,solvent},
Url = {http://link.springer.com/10.1007/s11705-015-1514-6}
}
\end{filecontents}
\usepackage[%
backend = biber,
style = numeric-comp,
firstinits = true,
isbn = false,
doi = true,
url = false,
maxcitenames = 4,
maxbibnames = 4
]{biblatex}
\DeclareFieldFormat*{pages}{\mkpageprefix[pagination]{\oldstylenums{#1}}}
\addbibresource{mybib.bib}
\begin{document}
Here comes the 1st citation\autocite{Cormos2012} and the 2nd one\autocite{Mumford2015}.
\printbibliography
\end{document}
可以看到,第一個[1]的頁碼根本沒有改變,但第二個改變成功。他們倆都失去了「p」。和“頁”。我打算保留。
抱歉,我是新人,在發布圖片時遇到一些“聲譽”問題。
答案1
當測試頁面欄位是否為數字時,您\NumCheckSetup
可以忽略。 \oldstylenums
(也可以看看Biblatex 不列印“p”。當頁碼以某些字母結尾時,單破折號的複合頁碼和\DeclareNumChars 和頁面欄位中的命令)
最安全的解決方案可能是
\newcommand{\myosn}[1]{\ifpages{#1}{\oldstylenums{#1}}{#1}}
\DeclareFieldFormat*{pages}{\mkpageprefix[pagination]{\myosn{#1}}}
\NumCheckSetup{\renewcommand{\myosn}[1]{#1}}
或者你只能忽略\oldstylenums
\DeclareFieldFormat*{pages}{\mkpageprefix[pagination]{\oldstylenums{#1}}}
\NumCheckSetup{\def\oldstylenums#1{#1}}
另一個快速解決方案是添加\oldstylenums
到負責的內部巨集中\mkpageprefix
\makeatletter
\protected\long\def\blx@mkpageprefix#1[#2]#3{%
\ifnumeral{#3}
{\bibstring{#1}\ppspace}
{\ifnumerals{#3}
{\bibstring{#1s}\ppspace}
{\def\pno{\bibstring{#1}}%
\def\ppno{\bibstring{#1s}}}}%
\blx@mkpageprefix@i[#2]{\oldstylenums{#3}}}
\makeatother