根据此处的其他问题,我正在尝试使用 创建一个带注释的参考书目\fullcite
,其中我想隐藏所有 URL。
我正在使用一个看似简单的解决方案,它适用于“正常”参考书目,但不适用于\fullcite
(我已经包含了正常参考书目以供说明):
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{mwe82.bib}
@MANUAL{wilson2009,
author = {Peter Wilson},
title = {A Few Notes on Book Design},
year = {2009},
organization = {The Herries Press},
url = {http://mirrors.ctan.org/info/memdesign/memdesign.pdf},
address = {Normandy Park, WA},
urlaccessdate = {19.12.2012}
}
\end{filecontents*}
\usepackage[%
citestyle=authoryear,
bibstyle=authoryear,
backend=biber,
bibencoding=utf8,
]{biblatex}
\addbibresource{mwe82.bib}
\AtEveryBibitem{%
\clearfield{url}%
}
\begin{document}
\fullcite{wilson2009}
\printbibliography
\end{document}
给出这个:
有人能告诉我我做错了什么吗?
答案1
有不同的方法。
首先在 LaTeX 级别上你可以使用
\AtEveryCitekey{\clearfield{url}}
\AtEveryBibitem
仅适用于\printbibliography
。
或者你使用 Biber 解决方案:
\DeclareSourcemap{
\maps[datatype=bibtex ]{
\map{
\step [ fieldset = url , null ]
}
}
}
梅威瑟:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{mwe82.bib}
@MANUAL{wilson2009,
author = {Peter Wilson},
title = {A Few Notes on Book Design},
year = {2009},
organization = {The Herries Press},
url = {http://mirrors.ctan.org/info/memdesign/memdesign.pdf},
address = {Normandy Park, WA},
urlaccessdate = {19.12.2012}
}
\end{filecontents*}
\usepackage[%
citestyle=authoryear,
bibstyle=authoryear,
backend=biber,
bibencoding=utf8,
]{biblatex}
\addbibresource{mwe82.bib}
\DeclareSourcemap{
\maps[datatype=bibtex ]{
\map{
\step [ fieldset = url , null ]
}
}
}
\begin{document}
\fullcite{wilson2009}
\printbibliography
\end{document}