1

Directory contents

These are the contents of my directory:

.
├── bibliography.bib
├── Makefile
└── template.tex

I outline the contents of each file below.

bibliography.bib

@misc{
  formal_language_proofwiki,
  title={{Definition:Formal_Language - ProofWiki}},
  author={{ProofWiki}},
  howpublished={\href{https://proofwiki.org/wiki/Definition:Formal_Language}{link}},
  journal={{ProofWiki}},
  year={2021}
}

Makefile

compile_pdf:
        latexmk -pdflatex template.tex
clean:
         find . -maxdepth 1 -type f ! -name "*.tex" ! -name "*.pdf" ! -name "*.bib" ! -name "Makefile" -delete
spellcheck:
         aspell --mode=tex -c template.tex

template.tex

\documentclass[12pt, a4paper]{article}
\usepackage{cite}
\usepackage{hyperref}
\usepackage{amsthm}

\theoremstyle{definition} %first argument to \newtheorem is the environment name which the author would like to use for this element. The second argument is the heading text. \newtheorem*{definition}{Definition}

\begin{document} \begin{definition}[{\cite{formal_language_proofwiki}}] A formal language is a structure $\mathcal L$ which comprises of the following: \end{definition} \clearpage \bibliography{bibliography} \bibliographystyle{abbrv}

\end{document}

Problem

In template.tex on line 11 I have a citation inside the definition environment. This should be possible as per page 3 of the amsthm docs. However, when I attempt to compile using make compile_pdf, the compilation fails:

LaTeX Warning: Citation `formal_language_proofwiki' on page 1 undefined on inpu
t line 11.

[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./template.bbl ! Missing $ inserted. <inserted text> $ l.5 \newblock {Definition:Formal_ Language - ProofWiki}. ?

Why does this occur and how can I fix it?

user32882
  • 1,594

0 Answers0