
タイトルで述べたように、ページ番号 (「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] はまったく変更されていませんが、2 番目のページ番号は正常に変更されています。どちらも、保持するつもりだった "p." と "pp." が失われています。
申し訳ありませんが、私は初心者なので、画像を投稿するには「評判」の問題があります。
答え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