如何在文章的卷数之后和页码范围之前放置冒号?
\documentclass{memoir}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
author = {First I. Last, and Second Y. Author},
title = {This is the article title},
journal = {T Journal T},
journallongtitle = {The Journal Title},
year = 1994,
volume = 50,
pages = {30--40}
}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
答案1
以下内容适用于默认numeric
或样式authoryear
,但实际上只适用于样式,authoryear
因为在numeric
样式中,年份位于卷之后。页码前的标点符号由宏控制\bibpagespunct
。
\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
author = {First I. Last, and Second Y. Author},
title = {This is the article title},
journal = {T Journal T},
journallongtitle = {The Journal Title},
year = 1994,
volume = 50,
number = 6,
pages = {30--40}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\renewcommand*{\bibpagespunct}{\addcolon\space}
\begin{document}
\autocite{Reference:1994}
\printbibliography
\end{document}
答案2
此解决方案将只为期刊文章添加冒号(我相信这是您唯一需要它的地方)。我还删除了“In:”和“pp.”,我认为这是不寻常的解决方案。
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{myarticle,
AUTHOR = "John Doe",
TITLE = "My article",
JOURNALTITLE = "A Cool Journal",
VOLUME = "16",
PAGES = "18--56",
YEAR = "2005"}
@incollection{mycontrib,
AUTHOR = "Peter Smith",
TITLE = "My contribution",
BOOKTITLE = "A collection of articles",
EDITOR = "John Carpenter",
YEAR = "2010",
LOCATION = "London",
PAGES = "685--764"}
\end{filecontents}
\addbibresource{\jobname.bib}
\renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon\addspace}{\addcomma\addspace}}
\DeclareFieldFormat[article,incollection]{pages}{#1}
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\begin{document}
\nocite{myarticle,mycontrib}
\printbibliography
\end{document}