OR-Code im Literaturverzeichnis
Verfasst: Sa 21. Sep 2019, 12:26
Wie wird ein OR-Code oder eine Grafik (.png) gleitend in ein Literaturverzeichnis eingefügt?[/b]
Code: Alles auswählen
\documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\usepackage{qrcode}
\qrset{height=1.4cm}
\usepackage{hyperref}
\makeatletter
% copied from biblatex-ext-oa.sty
% based on egreg's (https://tex.stackexchange.com/users/4427/egreg)
% answer to https://tex.stackexchange.com/a/123451/35864
% originally CC BY-SA 3.0, but dual-licensed under LPPL
% see https://tex.meta.stackexchange.com/a/3333/35864
\newcommand{\extblx@oa@marginmark}[1]{%
\strut\vadjust{\extblx@oa@marginmark@do{#1}}}
\newcommand{\extblx@oa@marginmark@do}[1]{%
\vbox to 0pt{%
\kern-3\dp\strutbox
\strut
\hfill
\rlap{\kern1em #1}%
\vss
}%
}
\newcommand*{\marginmark}{\extblx@oa@marginmark}
\makeatother
\DeclareFieldFormat{qrdoi}{\qrcode{https://doi.org/#1}}
\renewbibmacro{begentry}{%
\iffieldundef{doi}
{}
{\marginmark{\printfield[qrdoi]{doi}}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}