使用\DeclareFieldFormat
将 URL 添加到标题中对条目href
不起作用@techreport
,尽管它可以在例如 上使用@phdthesis
。我想知道为什么会这样?
\documentclass{article}
\usepackage[english, american]{babel}
\usepackage{filecontents}
\usepackage[url=false]{biblatex}
\DeclareFieldFormat
[article,
inbook,
incollection,
inproceedings,
patent,
thesis,
unpublished,
techreport, % some problem here?
misc,
phdthesis]
{title}{\href{\thefield{url}}{#1}}
\usepackage{hyperref}
\begin{filecontents}{myreferences.bib}
@techreport{probation-report,
title={{Problem solving and mathematical knowledge}},
author={Joseph Corneli},
institution={Knowledge Media Institute},
url={http://kmi.open.ac.uk/publications/techreport/kmi-10-03},
year={2010},
}
@phdthesis{corneli-thesis,
title = {Peer produced peer learning: {A} mathematics case study},
school = {The Open University (submitted)},
author = {Corneli, Joseph},
year = {2013},
url={http://metameso.org/~joe/docs/submitted-version.pdf},
},
\end{filecontents}
\bibliography{myreferences.bib}
\begin{document}
My probation report --- \fullcite{probation-report} --- doesn't
actually resemble my thesis that closely ---
\fullcite{corneli-thesis}.
\end{document}
答案1
techreport
是 的别名;例如,如果您注释掉类型,report
那么您就无法获得 中的 URL 。phdthesis
thesis
因此,添加report
类型:
\DeclareFieldFormat
[article,
inbook,
incollection,
inproceedings,
patent,
thesis, % also phdthesis
unpublished,
report, % also techreport
misc,
]{title}{\href{\thefield{url}}{#1}}