I need to cite a wiki page. I cited like:

        author = {Wikipedia},
        title = {Pairing function {@MISC}},
        month = May,
        year = {2016},
        url = {https://en.wikipedia.org/wiki/Pairing_function/}

But this error appears:

TeX capacity exceeded, sorry [input stack size=5000]. .../en.wikipedia.org/wiki/function}}
  • To cite websites, I often used the misc class but instead of using the url field, I used the "Howpublished" field. Also make sure that you escape all LaTeX specific characters like the "_" in your wikipedia url with a \ in front of it. The real problem is probably the not-escaped _ - try escaping it like so: https://en.wikipedia.org/wiki/Pairing\_function/ – Hug Aug 3 '16 at 14:59

I think you just missed to call package url. Then urls including _ are set without problems.

See the following MWE

  author = {Wikipedia},
  title  = {Pairing function {@MISC}},
  month  = May,
  year   = {2016},
  url    = {https://en.wikipedia.org/wiki/Pairing_function/},


\usepackage[hyphens]{url} % <=========================================

\title{This document}
\author{This author}




I have cited this document \cite{wiki}


with the result:

enter image description here

compiled without errors and only one warning (okay!), resulting from package filecontents, to have bib file and tex code together in one compilable MWE.

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.