2

I've got a problem:

I want to cite a page, but in my document there comes this: Citation `Lehrer2000' on page 1 undefined

My LaTeX:

\documentclass[12pt,a4paper,titlepage]{article}
\usepackage[round]{natbib}
\bibliographystyle{natdin}

\begin{document}
\citep{Lehrer2000}
\addcontentsline{toc}{section}{Literaturverzeichnis}
\bibliography{lit2}
\end{document}

My Bibtex:

@ONLINE{Lehrer2000,
    AUTHOR = "Lehrerinnenfortbildung",
    TITLE = "Projektkompetenz. Definition Methoden",
    HOWPUBLISHED = "https://lehrerfortbildung-bw.de/st_kompetenzen/weiteres/projekt/projektkompetenz/methoden/index.htm [11.10.2019]",
}
  • Did you run bibtex? – Peter Wilson Oct 11 at 16:22
  • Yes and another citation worked before – user199175 Oct 11 at 16:41
  • What's the output from the bibtex run? – cfr Oct 11 at 20:11
2

The presence of an _ (underscore) character in the URL throws off BibTeX and LaTeX. You should (a) change

HOWPUBLISHED = "https://lehrerfortbildung-bw.de/st_kompetenzen/weiteres/projekt/projektkompetenz/methoden/index.htm [11.10.2019]",

to

HOWPUBLISHED = "\url{https://lehrerfortbildung-bw.de/st_kompetenzen/weiteres/projekt/projektkompetenz/methoden/index.htm} [11.10.2019]",

and (b) load the xurl package in the preamble.

enter image description here

\documentclass[12pt,a4paper,titlepage]{article}
\begin{filecontents}{lit4.bib}
@ONLINE{Lehrer2000,
    AUTHOR = "Lehrerinnenfortbildung",
    year   = "(no year)",
    TITLE  = "Projektkompetenz. Definition Methoden",
    HOWPUBLISHED = "\url{https://lehrerfortbildung-bw.de/st_kompetenzen/weiteres/projekt/projektkompetenz/methoden/index.htm} [11.10.2019]",
}
\end{filecontents}

\usepackage[ngerman]{babel}
\usepackage{xurl}
\usepackage[round,numbers]{natbib}
\bibliographystyle{natdin}
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional

\begin{document}
\cite{Lehrer2000}
\bibliography{lit4}
\end{document}
  • Thank you it's working now – user199175 Oct 12 at 15:06

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.