I am trying to switch to http://www.latextemplates.com/template/masters-doctoral-thesis in my masters thesis, and suddenly my bibliographic references are breaking everything, despite working fine before.

A MWE is: download the template, then

First, (in main.tex) Add Hi\cite{foo}. below \pagestyle{thesis}

Second, (in example.bib) Add

 title = {foo},
 howpublished = {\url{foo%x}},


Compile/bib/compile. It will give

Runaway argument?
{\url {foo\field {title}{foo} \endentry \par ...
... File ended while scanning use of \field.

i.e. the % will have been replaced with \field etc etc etc.

How can I stop that from happening?

  • 5
    You are doing it wrong. The url belongs into the url field url = {[Bibtex and percent sign](http://tex.stackexchange.com/q/319504)}, This can also be seen in the example bibliography – Johannes_B Jul 15 '16 at 8:17
  • 4
    By the way, your MWE is great ;-) – Johannes_B Jul 15 '16 at 8:18
  • 2
    You should use the online entry type, by the way. Details can be found in the biblatex documentation. – Johannes_B Jul 15 '16 at 8:25
  • Thank you!! I thought I tried that though. – Kalle Jul 15 '16 at 8:29
  • 3
    Possible duplicate of "%" symbol in BibTex - Latex – G M Sep 4 at 16:33

Use the url field, as is shown in the exammple bibliography and as is explained in the documentation of biblatex. By the way, i recommend biber to do the sorting instead of BibTeX.

If your entry is solely an internet source, use the online entry type.

        author  = {many},
        title   = {Percent sign},
        url     = {https://en.wikipedia.org/wiki/%25},
        urldate = {2016-07-18},
        author  = {Kalle},
        title   = {Bibtex and percent sign},
        url     = {http://tex.stackexchange.com/questions/319504/},
        date    = {2016-07-15},
        urldate = {2016-07-18},

\addbibresource{\jobname.bib}%jobname NICHT ersetzen


  • @moewe I also wanted to add a screenshot, but my browser doesn't want to work right now. :-/ – Johannes_B Jul 18 '16 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.