# Why is the \url{} command not recognised here?

The \url command in the bibliography file seems not to be recognised as a command to execute. At least, the source is not linked with the corresponding internet site and the command's characters were written (after some escaping).

The template was proposed (in this way or in a similar one) by the wikimedia citation tool. It didn't matter wether loading hyperref additionally or not. I've compiled the document successfully through calling XeLaTeX -- biber -- XeLaTeX.

Important piece of the result: exportiert]. 2017. url: %5Curl%7Bhttps:

main.tex:

\documentclass[draft, german, hyperref = {hidelinks}, graphicx = {xelatex}]{beamer} % use larger type; default would be 10pt

% Reihenfolge: url -- hyperref -- biblatex  ???

\usepackage{url}  % Erleichtert das Setzen von URLs
\usepackage{biblatex}  % für die ISBN-Nummer

\begin{document}
\begin{frame}
\frametitle{Quellen}
\nocite{*}
\printbibliography
\end{frame}
\end{document}


quellen.bib:

@misc{wiki:cclasses,
author = "Wikimedia Commons",
title = "File:Complexity classes (de).svg --- Wikimedia Commons{,} the free media repository",
year = "2017",
url = {\url{https://commons.wikimedia.org/w/index.php?title=File:Complexity_classes_(de).svg&oldid=249414083}},
note = "[Online; zuletzt aufgerufen am 15. November 2017; Mittels Inkscape als PNG exportiert]",
}


Please write where I have made an error and why this behaviour occurs. Many thanks in advance!

• The url field is already treated as such by biblatex, so you don't need url = {\url{... rather url = {https... should be enough. With this the url is correctly printed. Nov 22 '17 at 15:55

The url field is already treated as such by biblatex, so you don't need url = {\url{... rather url = {https... should be enough. With this the url is correctly printed.

Furthermore, the draft option omits the actual link. So, if you want it, you should remove the option.

\documentclass[german, hyperref = {hidelinks}, graphicx = {xelatex}]{beamer} % use larger type; default would be 10pt

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{wiki:cclasses,
author = "Wikimedia Commons",
title = "File:Complexity classes (de).svg --- Wikimedia Commons{,} the free media repository",
year = "2017",
url = {https://commons.wikimedia.org/w/index.php?title=File:Complexity_classes_(de).svg&oldid=249414083},
note = "[Online; zuletzt aufgerufen am 15. November 2017; Mittels Inkscape als PNG exportiert]",
}
\end{filecontents}

% Reihenfolge: url -- hyperref -- biblatex  ???
% In most cases, hyperref should be loaded last. See https://tex.stackexchange.com/q/1863/105447

%\usepackage{url}  % Erleichtert das Setzen von URLs
% Not needed, as long as you load hyperref, for hyperref loads it by itself (and better not duplicate the call).

\usepackage{biblatex}  % für die ISBN-Nummer

% Not needed, because beamer already calls hyperref.

\begin{document}
\begin{frame}
\frametitle{Quellen}
\nocite{*}
\printbibliography
\end{frame}
\end{document}


• It works without explicitely loading hyperref with \usepackage{}, perhaps because it is already loaded within \documentclass{}. Then it works. The remaining question: Why does the wikimedia citation tool generate invalid code? :-) Nov 22 '17 at 16:11
• @user7427029, in this case the call of the package url would be enough. But if you load hyperref alone (as explained in the comments of the code in the answer) it takes care of url also. Nov 22 '17 at 16:15
• @user7427029, true, but it is because beamer calls hyperref. So you actually don't need to do it explicitly. Nov 22 '17 at 16:19