我正在尝试创建一个与我的大学坚持使用的哈佛“有趣”形式相匹配的序言。
我快完成了,但需要一种方法来删除 pp. 和页码之间的空格。
在我的哈佛指南中,它必须pp.66-67
是pp. 66-67
请帮忙!
我目前拥有的代码:
\documentclass[12pt]{report}
\usepackage[
firstinits=true,
useprefix=true,
maxcitenames=3,
maxbibnames=99,
style=authoryear,
dashed=false,
natbib=true,
isbn=false,
url=false
]{biblatex}
\usepackage{csquotes}
\renewbibmacro*{name:andothers}{
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\andothersdelim\bibstring[\emph]{andothers}}
{}}
\renewcommand*{\bibinitdelim}{}
\usepackage{xpatch}
\xapptobibmacro{date+extrayear}{\nopunct}{}{}
\usepackage[british]{babel}
\usepackage{csquotes}
\DeclareNameAlias{author}{last-first}
\renewcommand*{\bibnamedelimd}{\addlpthinspace}
\renewcommand*{\nameyeardelim}{\addcomma\addspace}
\setlength\bibitemsep{1.5\itemsep}
\renewbibmacro{in:}{}
\renewbibmacro*{volume+number+eid}{
\setunit*{\addcomma\space}
\printfield{volume}
\setunit*{\addnbspace}
\printfield{number}
\setunit{\addcomma\space}
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\addbibresource{references.bib}
\AtEveryBibitem{\clearlist{language}} % clears language
\AtEveryBibitem{\clearfield{note}} % clears notes
\begin{document}
\printbibliography[title=References]
\end{document}
答案1
如果您确实必须使用这种可怕的风格:重新定义\ppspace
。有关详细信息,请参阅手册第 4.6.4 节。
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\renewcommand*{\ppspace}{}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Some text \autocite[9]{A01}.
\printbibliography
\end{document}