Instructions
Print your GPG key fingerprint with LaTeX, and be better prepared for ad hoc signings at the next key signing party!
Install LaTeX with koma-script
and forloop
if haven’t already done so. On Debian based systems, the installation
command is:
apt-get install texlive-latex-extra
Download the LaTeX code which is public domain:
Adjust the key ID so it will print your own key rather than mine. Also adjust the number of repetitions to fill the page:
% Key ID to print
\newcommand{\keyid}{5F8990AF}
% Number of repetitions
\newcommand{\repetitions}{8}
Finally, generate the PDF file:
sh fingerprint.tex
The result is shown below. Have fun!
Related Projects
gpg-key2ps
from the signing-party package
Internals
The short command sh fingerprint.tex
works because the LaTeX code is
written in a special way, so
it is also a working shell script
which executes pdflatex
and removes all temporary files.
Of course, you can also call pdflatex
by hand. In that case, don’t
forget to provide the --shell-escape
option, otherwise the LaTeX file
isn’t allowed to run GPG
to retrieve your key fingerprint:
pdflatex --shell-escape fingerprint.tex
Result
(In case you want to know, the preview image was generated with
GraphicsMagick:
gm convert -density 60 example.pdf example.png
)