![更改 footfullcite 项目的样式](https://linux22.com/image/297543/%E6%9B%B4%E6%94%B9%20footfullcite%20%E9%A1%B9%E7%9B%AE%E7%9A%84%E6%A0%B7%E5%BC%8F%20.png)
目前\footfullcite{jdoe2014}
对于
@inproceedings{jdoe2014,
author = {John Doe},
title = {Some paper},
url = {http://somelink.com/file.pdf},
year = {2014},
note = {Rarecon}
}
渲染成:
John Doe (2014)。“一些论文”。出自:Rarecon。网址:http://somelink.com/file.pdf
我如何才能将其标准输出更改为
John Doe (2014)。“一些文件”。在:Rarecon。
在哪里“一些纸”也是 PDF 链接/urlhttp://somelink.com/file.pdf?
答案1
以下内容摘自 Herbertbiblatex:将标题超链接到 doi url(如果可用)
我们在加载时使用doi=false
和url=false
来隐藏 DOI 和 URL,但这对条目不起作用@online
,所以如果我们想删除那里的 URL,我们还需要
\renewbibmacro*{url+urldate}{}
然后我们使用 Herbert 的宏来排版带有链接的标题(DOI 优先于 URL)
\newbibmacro{string+doiurl}[1]{%
\iffieldundef{doi}{%
\iffieldundef{url}{%
#1%
}{%
\href{\thefield{url}}{#1}%
}%
}{%
\href{http://dx.doi.org/\thefield{doi}}{#1}%
}%
}
该格式应用于标题字段
\DeclareFieldFormat{title}{\usebibmacro{string+doiurl}{\mkbibemph{#1}}}
\DeclareFieldFormat[article,incollection]{title}{\usebibmacro{string+doiurl}{\mkbibquote{#1}}}
为了让书目恢复正常,我们随后发布
\AtBeginBibliography{
\DeclareFieldFormat{title}{\mkbibemph{#1}}
\DeclareFieldFormat[article,incollection]{title}{\mkbibquote{#1}}
\settoggle{bbx:url}{true}
\settoggle{bbx:doi}{true}
\renewbibmacro*{url+urldate}{%
\usebibmacro{url}%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}}}
}
切换 URL 和 DOI(并恢复旧url
宏)并返回到没有超链接的旧标题格式。
平均能量损失
\documentclass{article}
\usepackage[style=authoryear,doi=false,url=false]{biblatex}
\usepackage[colorlinks]{hyperref}
\renewbibmacro*{url+urldate}{}
\newbibmacro{string+doiurl}[1]{%
\iffieldundef{doi}{%
\iffieldundef{url}{%
#1%
}{%
\href{\thefield{url}}{#1}%
}%
}{%
\href{http://dx.doi.org/\thefield{doi}}{#1}%
}%
}
\DeclareFieldFormat{title}{\usebibmacro{string+doiurl}{\mkbibemph{#1}}}
\DeclareFieldFormat[article,incollection]{title}{\usebibmacro{string+doiurl}{\mkbibquote{#1}}}
\AtBeginBibliography{
\DeclareFieldFormat{title}{\mkbibemph{#1}}
\DeclareFieldFormat[article,incollection]{title}{\mkbibquote{#1}}
\settoggle{bbx:url}{true}
\settoggle{bbx:doi}{true}
\renewbibmacro*{url+urldate}{%
\usebibmacro{url}%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}}}
}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem\footfullcite{sigfridsson} ipsum\footfullcite{markey} dolor sit\footfullcite{cicero} amet.
\printbibliography
\end{document}