Biblatex --- 如何在volume后添加冒号?

Biblatex --- 如何在volume后添加冒号?

如何在文章的卷数之后和页码范围之前放置冒号?

\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}

在此处输入图片描述

相关内容