-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathten-up.tex
64 lines (54 loc) · 1.86 KB
/
ten-up.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% ten cards on an 8.5" x 11" page
% works with Avery business card template for print-n-play version
\documentclass[avery5371, backs]{flashcards}
\usepackage{tikz}
\usepackage{csvsimple}
\usepackage{qrcode}
\usepackage{ifthen}
% don't hyphenate
\tolerance=1
\hyphenpenalty=10000
\hbadness=10000
% level variables
\newcommand{\level}{starter}
\newcommand{\leveltext}{Starter}
\newcommand{\backgroundpath}{assets/single-\level-background.pdf}
\definecolor{spotcolor}{cmyk}{.40,0,.70,0}
\begin{filecontents*}{test-phrases.csv}
num, phrase, link
1, I like to drink coffee all night long., http://www.mightyverse.com
2, Bees have four wings., http://bit.ly/1Ndo9Z6
3, I like to eat scrambled eggs for breakfast when I wake up in the morning.,
4, I would like to sit down.,
5, I like to travel.,
6, I play cards.,
7, I am hungry.,
8, This is a book.,
9, The fireworks are beautiful.,
10, I walk to work every day.,
\end{filecontents*}
\begin{document}
\cardfrontstyle{empty}
\csvreader[
head to column names
]{test-phrases.csv}{}{
\begin{flashcard}{}
\message {\phrase} % write phrase to the log file
\begin{tikzpicture}
\node[inner ysep=-.13in,inner xsep=-.14in]{\includegraphics[width=3.5in, height=2in]{\backgroundpath}};
\node [align=center,midway, text width=3.1in] {
\phrase
};
\ifthenelse{\equal{\link}{}}{
% no URL, omit QR code
}{
\node [anchor=south east, fill=white] (code) at (1.27in,-.68in) {
\qrcode[hyperlink,height=0.4in] {\link};
};
}
\node [anchor=north west, align=center, text width=.2in, white, fill=spotcolor, rounded corners=3pt, inner sep=4pt, font=\sffamily] (level) at (-1.27in,.68in) {\tiny {\num}};
\node [anchor=south west, white, fill=spotcolor, rounded corners=3pt, inner sep=4pt, font=\sffamily] (level) at (-1.27in,-.68in) {\tiny\MakeUppercase {\leveltext}};
\end{tikzpicture}
\end{flashcard}
}
\end{document}