我的部门对参考文献的格式有非常具体的要求。通常,大多数部分都要用句号、逗号、冒号……来分隔。我解决了大部分问题,但有一个问题仍然存在。
对于文章来说,应该是这样的:
Last Name, First Name. Year. “Title of Article.” Title of Book. Ed. Name(s) of editor(s). Place: Publisher. Pages of article.
请注意,文章标题和书名之间的句号不见了。它应该在文章标题内。我可以轻松地将其插入到我的 bib 文件中,但随后我必须删除作者年份设置的句号。
到目前为止,我一直在\xpatch
尝试biblatex:书籍和收藏标题后没有句号,但我似乎无法让它工作。我也查找了standard.bbx
任何看起来像我正在寻找的东西,但似乎什么也没找到。
请参阅附件我的.tex
文件:
\documentclass[a4paper,12pt]{article}
\usepackage{xpatch}
\usepackage{csquotes}
\usepackage{polyglossia}
\setmainlanguage[variant=american]{english}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage[style=authoryear-ibid,backend=biber,doi=false,isbn=false,url=false,autolang=hyphen]{biblatex}
\addbibresource{Merkliste.bib}
\renewcommand*{\postnotedelim}{\addcolon\space}
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\renewcommand*{\intitlepunct}{\addspace}
\renewcommand{\bibpagespunct}{\ifentrytype{incollection}{\addperiod\addspace}{\addcolon\addspace}}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit*{\addperiod\space}%
\printtext%
}{}{}
%\xpatchbibdriver{article}{\newunit\usebibmacro{title}}{%
%\setunit{\addspace}\newunit%
%\usebibmacro{publisher+location+date}%
%}{}{}
\AtEveryBibitem{\clearlist{language}} % clears language
\AtEveryBibitem{\clearfield{note}} % clears notes
\AtEveryBibitem{\clearfield{series}} % clears Series
\AtEveryBibitem{\ifentrytype{book}{\clearfield{number}}{}}
\AtEveryBibitem{\ifentrytype{book}{\clearfield{pages}}{}}
\begin{document}
\nocite{*}.
\printbibliography
\end{document}
注释掉的是我想获得正确引用的部分。
以下是我的 .bib 中的此类期刊的一个例子:
@article{conrick_challenges_2006,
Author = {Conrick, Maeve},
Date-Modified = {2014-08-03 13:33:04 +0000},
Doi = {10.1386/ijfs.9.3.311_1},
Issn = {13682679},
Journal = {International Journal of Francophone Studies},
Keywords = {{BILINGUALISM}, Bill 101, {CANADA}, {CONFEDERATION}, 1867, Education, {FEDERAL} government, francophone, French, {GOVERNMENT} policy, {HISTORY}, {LANGUAGE} \& languages, language policy, linguistic duality, minority language communities, official languages, Quebec},
Month = dec,
Number = {3},
Pages = {311--328},
Shorttitle = {The challenges of linguistic duality for francophone Canada},
Title = {The challenges of linguistic duality for francophone Canada: contact, conflict and continuity},
Url = {http://www.redi-bw.de/db/ebsco.php/search.ebscohost.com/login.aspx%3fdirect%3dtrue%26db%3daph%26AN%3d24405708%26site%3dehost-live},
Urldate = {2014-07-26},
Volume = {9},
Year = {2006}}
答案1
如果您的语言设置(被识别为)美式,这实际上是默认设置。然后biblatex
尝试使用美式标点符号规则并将句号移到引号内。
不幸的是,polyglossia
支持仍然有点不稳定,因此american
无法检测到语言变体(您会得到纯文本english
,基本上american
没有您想要的标点符号设置)。您必须手动启用美式引号
\uspunctuation
或者
\DefineBibliographyExtras{english}{\uspunctuation}
在你的序言中(后者是biblatex
文档似乎暗示的)。
如果您使用babel
而不是polyglossia
,这将自动为您完成,如果您使用american
。
答案2
我向 bib 宏添加了一个补丁title
来执行此操作:
\documentclass[a4paper,12pt]{article}
\usepackage{filecontents}
\usepackage{xpatch}
\usepackage{csquotes}%[style = american]
\usepackage{polyglossia}
\setmainlanguage[variant=american]{english}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage[style=authoryear-ibid,backend=biber,doi=false,isbn=false,url=false,autolang=hyphen]{biblatex}
\renewcommand*{\postnotedelim}{\addcolon\space}
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\renewcommand*{\intitlepunct}{\addspace}
\renewcommand{\bibpagespunct}{\ifentrytype{incollection}{\addperiod\addspace}{\addcolon\addspace}}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit*{\addperiod\space}%
\printtext%
}{}{}
\AtEveryBibitem{\clearlist{language}} % clears language
\AtEveryBibitem{\clearfield{note}} % clears notes
\AtEveryBibitem{\clearfield{series}} % clears Series
\AtEveryBibitem{\ifentrytype{book}{\clearfield{number}}{}}
\AtEveryBibitem{\ifentrytype{book}{\clearfield{pages}}{}}
%%%%% Patch added
\xpatchbibmacro{title}{\printfield[titlecase]{subtitle}}%
{\printfield[titlecase]{subtitle}\ifentrytype{article}{\addperiod}{}}%
{}{}%
\begin{filecontents}{\jobname.bib}
@article{conrick_challenges_2006,
Author = {Conrick, Maeve},
Date-Modified = {2014-08-03 13:33:04 +0000},
Doi = {10.1386/ijfs.9.3.311_1},
Issn = {13682679},
Journal = {International Journal of Francophone Studies},
Keywords = {{BILINGUALISM}, Bill 101, {CANADA}, {CONFEDERATION}, 1867, Education, {FEDERAL} government, francophone, French, {GOVERNMENT} policy, {HISTORY}, {LANGUAGE} \& languages, language policy, linguistic duality, minority language communities, official languages, Quebec},
Month = dec,
Number = {3},
Pages = {311--328},
Shorttitle = {The challenges of linguistic duality for francophone Canada},
Title = {The challenges of linguistic duality for francophone Canada: contact, conflict and continuity},
Url = {http://www.redi-bw.de/db/ebsco.php/search.ebscohost.com/login.aspx%3fdirect%3dtrue%26db%3daph%26AN%3d24405708%26site%3dehost-live},
Urldate = {2014-07-26},
Volume = {9},
Year = {2006}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}.
\printbibliography
\end{document}
\begin{document}
\nocite{*}
\printbibliography
\end{document}