我想使用包 制作二维码qrcode
。二维码应包含不同命令(来自包latexgit
)的输出,而不是静态文本。如何做到这一点?
最小示例:使用 Git 存储库中的当前提交 ID 生成二维码:
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{qrcode}
\usepackage{latexgit} % typeset with "pdflatex --shell-escape <filename.tex>. Add and commit before typesetting!
\begin{document}
This is some text …
Short commit-ID as text: \gitcommithash % Print short commit-ID, from package latexgit
A "static" QR-Code: % This works with qrcode-package:
\qrcode[height=1cm]{This is static text.}
A QR-Code with output of different command -- this fails typsetting:
% This fails typesetting -- help!}
\qrcode[height=1cm]{\gitcommithash} % Make a QR-Code with commit-ID.
How can this be made working?
\end{document}