2

I want to get my references straight. I use Biber and it recognizes the .bib file and correctly refers to them when I cite them. However, when I want to print the references using \printbibliography, it causes the following error:

Missing $ inserted

on the line below the \printbibliography command. This is my structure:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage[style = numeric, backend = biber]{biblatex}
\addbibresource{mybib.bib}

\author{Simon Götz}
\title{Muziek Genre Classificatie: Een Vergelijking Tussen Album Covers en 
Ander Beeldmateriaal}

\begin{document}
\maketitle
\section{Abstract}
\cite{Oramas}
\cite{Manning}
\cite{Downie}
\cite{Schedl}
\cite{humming}
\section{Introductie}
lorem ipsum
\section{Verwante literatuur}
\section{Referenties}
\printbibliography
\end{document}

This is a screenshot of the errors I get: enter image description here

EDIT: the code below is the mybib.bib file I use

@InProceedings{humming,
author = {T., Kageyama and K., Mochizuki and Y., Takashima},
title = { Melody Retrieval with Humming.},
booktitle = { Proceedings Int. Computer Music
Conference (ICMC)},
    pages = {349-351},
    year = {1993}
}

@Article{Oramas,
    author = {S., Oramas and F., Barbieri and X., Serra},
    title = {Multimodal Deep Learning for Music Genre Classification},
    journal = {Transactions of the International Society for Music Information Retrieval},
    year = {2018},
    volume = {1},
    number = {1},
    pages = {4-21}
}

@Article{Libeks,
    author = {J., Libeks and D., Turnbull},
    title = {You can judge an artist by an album cover: Using images for musicannotation.},
    journal = {IEEE MultiMedia},
    year = {2011},
    volume = {18},
    number = {4},
    pages = {30-37}
}

@Article{Schedl,
    author = {M., Schedl and E., Gómez and J., Urbano},
    title = { Music information retrieval: Recent developments and
applications.},
    journal = { Foundations and Trends® in Information Retrieval},
    volume = {8},
    number = {3},
    pages = {127 - 261}
}

@Article{Downie,
    author = {J.S., Downie},
    title = {Music information retrieval.},
    journal = {Annual Review of Information Science and
Technology},
    volume = {37},
    pages = {295-340},
    note = {Available from http://music-ir.org/downie_mir_arist37.pdf}
}

@Book{Manning,
author = {C.D., Manning and P., Raghavan and H., Schütze},
title = {Introduction to Information Retrieval},
publisher = {Cambridge University Press},
year = {2008},
}
5
  • Welcome to TeX.SX! The code above, alone, doesn't produce the error you reported, so my guess is that the issue is with the mybib.bib. Look at the output pdf and try to find where the bibliography gets messed up (text becomes italicized and without spaces), then you'll find out in which bibliography entry the problem is in. If you can't find out, please show us your mybib.bib file. Sep 26 '18 at 11:09
  • 4
    My money is on note = {Available from http://music-ir.org/downie_mir_arist37.pdf}. _ is a special character that can usually only be used in math mode. If you want to give a URL for an entry, use the url field.
    – moewe
    Sep 26 '18 at 11:16
  • The name format in author = {M., Schedl and E., Gómez and J., Urbano}, is almost certainly wrong. The first name in the list will be parsed as family (last) name "M." and given (first) name "Schedl".
    – moewe
    Sep 26 '18 at 11:17
  • Load url package to type URL: \url{}.
    – Sigur
    Sep 26 '18 at 11:21
  • Thank you all for the fast comments! I solved the problem :); I used google scholar to find each bibtex file and replaced each reference. I was not aware of this function google scholar had and initially typed in all the fields myself (thus probably resulting in the mentioned url errors).
    – SimonGötz
    Sep 26 '18 at 11:27
2

The error is caused by a URL in the note field like in Downie

note = {Available from http://music-ir.org/downie_mir_arist37.pdf}

Some URLs contain special characters like _ or # that might throw LaTeX off (_ will land you in math mode for example). Since you use biblatex you should use the url field

url = {http://music-ir.org/downie_mir_arist37.pdf},

instead. Then the URL will by typeset using url's \url command which can deal with these special characters without escaping.


Your name fields look wrong.

author = {J.S., Downie},

would be parsed as a name with family/last name "J.S." and given/first name "Downie", but I assume it should be the other way round. You want

author = {J. S. Downie},

or

author = {Downie, J. S.},

where the latter form is sometimes said to be preferred (and at times is necessary if the name involves junior parts). See How should I type author names in a bib file? How to properly write multiple authors in bibtex file?.


It is usually not required to end title fields and the like with a full stop (.). In some situations that may actually be detrimental and give undesired output (double punctuation/punctuation clash).

0

Try https://flamingtempura.github.io/bibtex-tidy/ and check "Encode URLs" and "Escape special characters" options. It fixed "missing $ inserted" error in my case. (It also makes the .bib file look pretty good though)

Disclaimer: I am not affiliated with this tool.

1
  • 2
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 23 '21 at 10:03

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.