summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ticket/doc/ex_flashcard.tex
blob: 31b1e46508995c6144699aba58457ed02173aedb (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
%%%
%
% ticket.sty example file for flashcards for word learning
%
%%%%
% use the corresponding paper size for your ticket definition
\documentclass[a4paper,10pt]{letter}

\usepackage[flashCard,boxed]{ticket}
\usepackage{graphicx}  % load misc stuff
\usepackage{syntonly}  %to test without output
\usepackage{fancybox}

% make your default ticket. \ticketdefault is somewhat like a background
\renewcommand{\ticketdefault}{%no background
}

% now what do you like to put in your ticket
\newcommand{\card}[2]{\ticket{%
    \put(32.5,15){\makebox[0mm]{\centering{\huge{\textbf{#1}}}}}
 }}

\newcommand{\entryroot}[2]{}

\newcommand{\raiz}[3]{\ticket{%
    \put(2,31){{$\sqrt{\enspace}$}}
    \put(32.5,15){\makebox[0mm]{{\huge{\textit{{ #1 }}}}}}
}}

%puts a bullet on the word.
\newcommand{\blt}{$\bullet$\enspace}

%command for the synonyms
\newcommand{\syn}[1]{
  \begin{center}
     \fbox{\parbox[t]{50mm}{\centering{#1}}}
  \end{center}
}

%command for the related words.
\newcommand{\relwords}[1]{$\mathbf{\sim}$ #1}

%command for the examples
\newcommand{\example}[1]{\\[1.5mm]\textit{#1}}




%% you can generate this part from a database!
\begin{document}
\input{words}
% change the commands for the backside
\renewcommand{\card}[2]{\ticket{%
    \put(3,30){\parbox{58mm}{\large{\textbf{ #1:}}}}%
    \put(4,23){\parbox[t]{58mm} {\small {\blt #2}}}%
 }}

\renewcommand{\entryroot}[2]{\small{\textbf{#1 }}\textit{\scriptsize{{#2}}}$\|$}

\renewcommand{\raiz}[3]{\ticket{%
    \put(3,30){\parbox{58mm}{\textbf{#1:} #2}}%
    \put(3,13){\parbox{58mm}{#3}}%
 }}

\backside%
\oddsidemargin=8pt
\input{words}
\end{document}