使用 LyX 和biblatex-apa
。我试图删除参考文献中围绕文章、书籍、合集等年份的括号。我只希望格式YEAR.
改为(YEAR).
\documentclass{article}
\begin{filecontents}{bib.bib}
@article{art1,
Author = {John Smith},
Year = {1998},
Publisher = {XYZ},
Title = {ABC}
}
@book{book1,
Author = {Jane Smith},
Year = {2009},
Publisher = {ABC},
Title = {XYZ}
}
\end{filecontents}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{bib.bib}
\begin{document}
text \cite{art1}
text \cite{book1}
\printbibliography
\end{document}
\DeclareFieldFormat{year}{#1}
我尝试使用序言中的命令删除它们,但没有任何变化
答案1
要格式化特殊字段,您可以使用命令\DeclareFieldFormat
。在内容中,您必须执行以下操作:
\DeclareFieldFormat{yearorunkyear}{%
\ifthenelse{\iffieldequalstr{doubtfuldate}{true}}
{\mkbibbrackets{ca\adddot\addspace#1}}
{#1}}
如果您使用此重新定义,您将获得以下输出: