4

Using \DeclareFieldFormat to add the URL to titles as a href doesn't work on a @techreport entry, though it works fine on, for instance, @phdthesis. Why would that be, I wonder?

Screenshot of the MNWE.  Title of tech report is not a link.

\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 Answer 1

3

techreport is an alias for report; you don't get the URL in the phdthesis if you comment out the type thesis, for instance.

So, add report to the types:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .