![使用 biblatex(美国社会学协会参考格式)删除 urlseen 和 url 之间的标点符号](https://linux22.com/image/477027/%E4%BD%BF%E7%94%A8%20biblatex%EF%BC%88%E7%BE%8E%E5%9B%BD%E7%A4%BE%E4%BC%9A%E5%AD%A6%E5%8D%8F%E4%BC%9A%E5%8F%82%E8%80%83%E6%A0%BC%E5%BC%8F%EF%BC%89%E5%88%A0%E9%99%A4%20urlseen%20%E5%92%8C%20url%20%E4%B9%8B%E9%97%B4%E7%9A%84%E6%A0%87%E7%82%B9%E7%AC%A6%E5%8F%B7.png)
我的参考书目已经基本达到导师的标准了,但有一件事我似乎就是不明白。
我需要删除我的参考书目输出中的 {urlseen} 和 {url} 打印输出之间的标点符号。
例如:
作者。2013 年。“网页标题:网页副标题。”组织。2014 年 12 月 15 日检索。(http://web.page.com/)。
应该改成这样:
作者。2013 年。“网页标题:网页副标题。”组织。检索日期:2014 年 12 月 15 日(http://web.page.com/)。
这是我的 MWE:
\documentclass[12pt,lettersize]{article}
\usepackage{mathptmx}
\usepackage[style=chicago-authordate,abbreviate=true,backend=biber,natbib=true,sorting=nyt,urldate=long,dateabbrev=false,isbn=false,doi=false]{biblatex}
\addbibresource{./minimal.bib}
\DeclareFieldFormat[article]{title}{\mkbibquote{#1}}
\DeclareFieldFormat[book]{title}{ %
\mkbibemph{#1}\isdot}
\DeclareFieldFormat{booktitle}{\mkbibemph{#1}}
\DeclareFieldFormat{url}{\mkbibparens{#1}\isdot}
\DeclareFieldFormat[inbook]{pages}{pp. {#1}}
\DefineBibliographyStrings{english}{%
urlseen = {Retrieved},
}
\begin{document}
\uspunctuation
\cite{Aut13}
\printbibliography
\end{document}
以下是我的简单参考书目:
@online{Aut13,
author = {Author},
title = {Web Page Title},
date = {2013},
url = {http://web.page.com/},
subtitle = {Web Page Subtitle},
organization = {Organization},
urldate = {2014-12-15}
}
答案1
您需要修补online
提供的参考书目驱动程序biblatex-chicago
以实现您的目标。
因此,在你的序言中添加以下几行
\usepackage{xpatch}
\xpatchbibdriver{online}
{\newunit\newblock
\iftoggle{cms@doionly}%
{\iffieldundef{doi}%
{}%
{\printfield{doi}%
\clearfield{url}}}%
{\printfield{doi}}%
\newunit\newblock%
\usebibmacro{eprint}%
\newunit\newblock
}
{\setunit{\addspace}
\iftoggle{cms@doionly}%
{\iffieldundef{doi}%
{}%
{\printfield{doi}%
\clearfield{url}}}%
{\printfield{doi}}%
\setunit{\addspace}%
\usebibmacro{eprint}%
\setunit{\addspace}
}
{}
{}
完成 MWE
\documentclass[12pt]{article}
\usepackage{filecontents}
\begin{filecontents*}{minimal.bib}
@online{Aut13,
author = {Author},
title = {Web Page Title},
date = {2013},
url = {http://web.page.com/},
subtitle = {Web Page Subtitle},
organization = {Organization},
urldate = {2014-12-15}
}
\end{filecontents*}
\usepackage{mathptmx}
\usepackage[style=chicago-authordate,abbreviate=true,backend=biber,natbib=true,sorting=nyt,urldate=long,dateabbrev=false,isbn=false,doi=false]{biblatex}
\addbibresource{./minimal.bib}
\DeclareFieldFormat[article]{title}{\mkbibquote{#1}}
\DeclareFieldFormat[book]{title}{ %
\mkbibemph{#1}\isdot}
\DeclareFieldFormat{booktitle}{\mkbibemph{#1}}
\DeclareFieldFormat{url}{\mkbibparens{#1}\isdot}
\DeclareFieldFormat[inbook]{pages}{pp. {#1}}
\DefineBibliographyStrings{english}{%
urlseen = {Retrieved},
}
\usepackage{xpatch}
\xpatchbibdriver{online}
{\newunit\newblock
\iftoggle{cms@doionly}%
{\iffieldundef{doi}%
{}%
{\printfield{doi}%
\clearfield{url}}}%
{\printfield{doi}}%
\newunit\newblock%
\usebibmacro{eprint}%
\newunit\newblock
}
{\setunit{\addspace}
\iftoggle{cms@doionly}%
{\iffieldundef{doi}%
{}%
{\printfield{doi}%
\clearfield{url}}}%
{\printfield{doi}}%
\setunit{\addspace}%
\usebibmacro{eprint}%
\setunit{\addspace}
}
{}
{}
\begin{document}
\uspunctuation
\cite{Aut13}
\printbibliography
\end{document}
输出: