biblatex:将 URL 添加到技术报告标题不起作用

biblatex:将 URL 添加到技术报告标题不起作用

使用\DeclareFieldFormat将 URL 添加到标题中对条目href不起作用@techreport,尽管它可以在例如 上使用@phdthesis。我想知道为什么会这样?

MNWE 的屏幕截图。技术报告的标题不是链接。

\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 。phdthesisthesis

因此,添加report类型:

\DeclareFieldFormat
  [article,
   inbook,
   incollection,
   inproceedings,
   patent,
   thesis, % also phdthesis
   unpublished,
   report, % also techreport
   misc,
  ]{title}{\href{\thefield{url}}{#1}}

相关内容