1

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[hidelinks]{hyperref}  % (Unscheinbar) verlinktes Inhaltsverzeichnis - sehr nützlich!
\usepackage{biblatex}  % für die ISBN-Nummer
\addbibresource{quellen.bib}

\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!

  • 1
    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. – gusbrs Nov 22 '17 at 15:55
1

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

%\usepackage[hidelinks]{hyperref}  % (Unscheinbar) verlinktes Inhaltsverzeichnis - sehr nützlich!
% Not needed, because beamer already calls hyperref.

\addbibresource{\jobname.bib}

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

enter image description here

  • 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? :-) – user7427029 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. – gusbrs 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. – gusbrs Nov 22 '17 at 16:19

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.