-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpg2paper.tex
50 lines (39 loc) · 1.04 KB
/
gpg2paper.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\documentclass{article}
\usepackage{float}
\usepackage{graphicx}
\usepackage{pgffor}
\usepackage{blindtext}
\usepackage{subcaption}
\usepackage[a4paper, margin=0.2in]{geometry}
\providecommand{\gptitle}{Content Description}
\providecommand{\gpkeyfinger}{}
\providecommand{\gpfile}{}
\title{\gptitle\\\gpkeyfinger}
\date{\today}
\newcommand\gpgtopng{
\immediate\write18{cat \gpfile | base64 > G2PTEMP}
\immediate\write18{split G2PTEMP -n 4 G2PIMG}
\immediate\write18{for f in G2PIMG*; do cat $f | qrencode -l L -o /tmp/$f.png; done}
\immediate\write18{rm G2PIMG* G2PTEMP}
}
\gpgtopng
\begin{document}
\maketitle
\begin{figure}[H]
\centering
\foreach \l in {a, ..., b} {
\begin{subfigure}{0.4\textwidth}
\centering
\includegraphics[width=\textwidth]{/tmp/G2PIMGa\l.png}
\caption{}
\end{subfigure}%
}
\foreach \l in {c, ..., d} {
\begin{subfigure}{0.4\textwidth}
\centering
\includegraphics[width=1.0\textwidth]{/tmp/G2PIMGa\l.png}
\caption{}
\end{subfigure}%
}
\end{figure}
\end{document}