目前我正在编写参考书目。有两个问题无法解决: - 我想在参考书目中插入页数总计。 - 应仅显示机构名称而非机构缩写。
\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,german,ngerman]{babel}
\usepackage{lmodern}
\usepackage[babel]{csquotes}
\usepackage[language=autobib,backend=biber,citetracker=true,autolang=other,style=authoryear,maxcitenames=2,maxbibnames=99,uniquename=false,uniquelist=true,isbn=false,doi=false]{biblatex}
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}
\renewcommand*{\revsdnamedelim}{}
\renewcommand*{\multinamedelim}{\slash}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\renewcommand*{\multilistdelim}{\addsemicolon\space}
\renewcommand*{\finallistdelim}{\multilistdelim}
% --- () footnotes
% --- () year footnotes
\DeclareFieldFormat{bibhyperrefparens}{\bibhyperref{\mkbibparens{#1}}}
\newbibmacro*{cite:parens:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\printtext[bibhyperrefparens]{%
\printfield{labelyear}%
\printfield{extrayear}}}}
\renewbibmacro*{cite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{cite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\usebibmacro{cite:parens:labelyear+extrayear}}
{\usebibmacro{cite:shorthand}}}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\AtBeginBibliography{%
\renewcommand*{\mkbibnamefamily}[1]{#1}}
%%%%%%%%%% MODIFICATION: BIBLIOGRAPY %%%%%%%%%%
% --- Sort authors --- %
\DeclareNameAlias{sortname}{family-given}
% --- colon after author and year --- %
\renewcommand{\labelnamepunct}{\addcolon\space}
% --- No "-" for the same authors --- %
\ExecuteBibliographyOptions{dashed=false}
% --- more space between references --- %
\setlength{\bibitemsep}{0.5\baselineskip}
% - German / English literature - %
\DefineBibliographyExtras{ngerman}{%
\DeclareFieldFormat[article]{volume}{#1\adddot\addnbspace Jg\adddot\addcomma}%
\DeclareFieldFormat[article]{number}{\addspace Nr\adddot\addnbspace#1}%
\DeclareFieldFormat{edition}{#1\adddot\addnbspace Aufl\adddot\addcomma}%
}
\DefineBibliographyExtras{english}{%
\DeclareFieldFormat[article]{volume}{Vol\adddot\addnbspace #1\addcomma}%
\DeclareFieldFormat[article]{number}{\addspace No\adddot\addnbspace#1}%
\DeclareFieldFormat{edition}{#1\adddot\addnbspace Ed\adddot\addcomma}%
}
% title without quotation marks %
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[incollection]{title}{#1}
\DeclareFieldFormat[thesis]{title}{#1}
\DeclareFieldFormat[misc]{title}{#1}
% No publisher %
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
%\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
% URL %
\urlstyle{same}
%\DeclareFieldFormat{url}{\printtext{URL\addcolon}\space\url{#1}} % "URL" --> "Unter:"
%\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1} % date without brackets
%\DefineBibliographyStrings{ngerman}{% % "besucht am" --> "am"
%urlseen = {besucht am}}
%\DefineBibliographyStrings{english}{% % "besucht am" --> "am"
%urlseen = {accessed}}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{PRA.2013,
year = {2013},
title = {The Prudential Regulation Authority’s approach to banking supervision},
url = {www.bankofengland.co.uk/publications/Documents/praapproach/bankingappr1304.pdf},
urldate = {2017-01-31},
number = {3},
series = {PRA approach documents},
editor = {{Prudential Regulation Authority}},
shortauthor = {PRA},
pagetotal = {42},
hyphenation = {english}
}
@misc{PRA.2013b,
year = {2013},
title = {The Prudential Regulation Authority’s approach to banking supervision},
url = {www.bankofengland.co.uk/publications/Documents/praapproach/bankingappr1304.pdf},
urldate = {2017-01-31},
number = {3},
series = {PRA approach documents},
editor = {{Prudential Regulation Authority}},
shortauthor = {PRA},
pagetotal = {42},
hyphenation = {german}
}
\end{filecontents*}
\bibliography{\jobname}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DefineBibliographyExtras{english}{%
\protected\def\mkbibordinal#1{\stripzeros{#1}\adddot}%
\protected\def\mkbibmascord{\mkbibordinal}%
\protected\def\mkbibfemord{\mkbibordinal}%
\protected\def\mkbibneutord{\mkbibordinal}%
\protected\def\mkbibdatelong#1#2#3{%
\iffieldundef{#3}
{}
{\mkbibordinal{\thefield{#3}}%
\iffieldundef{#2}{}{\nobreakspace}}%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}%
\iffieldundef{#1}{}{\space}}%
\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}%
\protected\def\mkbibdateshort#1#2#3{%
\iffieldundef{#3}
{}
{\mkdatezeros{\thefield{#3}}\adddot
\iffieldundef{#2}{}{\thinspace}}%
\iffieldundef{#2}
{}
{\mkdatezeros{\thefield{#2}}%
\iffieldundef{#1}
{}
{\iffieldundef{#3}{/}{\adddot\thinspace}}}%
\iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\mkdatezeros{\thefield{#1}}}}%
}
\begin{document}
\noindent
\textcites[][]{PRA.2013}{PRA.2013b}
\printbibliography
\end{document}
答案1
默认情况下,pagetotal
不会为所有条目类型打印 。默认情况下,我们会为 和类似类型获取它@book
,@collection
只要有意义。其他类型(例如@article
和@incollection
)通常具有pages
字段,但不会获取pagetotal
。我们可以为@misc
和添加该字段
\renewbibmacro*{addendum+pubstate}{%
\printfield{addendum}%
\newunit\newblock
\printfield{pubstate}
\newunit\newblock
\ifentrytype{misc}{\printfield{pagetotal}}{}}
也可以看看文章的页面总数 - Biblatex
如果你只想看到“PRA”而不是Prudential Regulation Authority
,为什么不直接给出editor
它
editor = {PRA},
{{Prudential Regulation Authority}}
如果您不打算使用它,保留它就没有意义。