Debian Codegraph @

texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex

raw
1 \documentclass[10pt]{beamer}
2 %\usepackage[font=Times, timeinterval=10]{tickingclock}
3 %\usepackage[font=Cour, timeinterval=10]{tickingclock}
4 %\usepackage[font=Helv, timeinterval=30]{tickingclock}
5 \usepackage[font=Times,timeinterval=10, timeduration=2.0, timedeath=0, fillcolorwarningsecond=white!60!yellow,
6 timewarningfirst=50,timewarningsecond=80,resetatpages=2]{tdclock}
7 %\usepackage{times}
8 %\usepackage{helvet}
9
10 \usetheme{Madrid}
11
12
13 \title{An example of using Ticking Digital Clock in Beamer}
14 \author{Luis R\'{a}ndez \& Juan I. Montijano}
15 \institute[IUMA]{IUMA \\ Universidad de Zaragoza }
16 \date{\today}
17
18
19 \begin{document}
20
21 \frame{\titlepage}
22 %\pagereset{-1}
23
24 \begin{frame}[t]
25 \frametitle{Introduction}
26
27 \initclock % This must be used one time to initialize the clock
28
29 We are putting here a clock with the macro \quad
30 \structure{\texttt{$\backslash$tdclock}}:
31
32 \bigskip
33
34 \tdclock
35
36 \bigskip
37
38 Before that, the macro \quad \structure{\texttt{$\backslash$initclock}}
39 \quad must have been used (only one time !).
40
41 \bigskip
42 This document uses the option \structure{\texttt{resetatpages=2}}. This means
43 that the crono is reset to zero at page 2.
44
45 Below you can see a crono advancing. Every time you access to this page,
46 the crono should be reset to 0 (the output is updated every 10 seconds, as indicated
47 with the option \structure{\texttt{timeinterval=10}}, so it could appear
48 some non zero seconds, not greater than 10)
49
50 \bigskip
51 Crono: \quad\cronominutes\pdfcolon\cronoseconds
52
53 \bigskip
54
55 Wait some seconds until you see the crono advancing, then go to the next page, go back
56 to this page again and wait some seconds to see
57 how the crono is reset.
58
59 \end{frame}
60
61 % This is an example of inserting
62 % the clock at the place reserved to the date, the foot line in the
63 % case of Madrid theme.
64 %
65
66 \date{\tddate\ \ \tdtime}
67
68 \begin{frame}
69
70
71 Here we have inserted the clock at the place reserved to the date, the foot line in the case of Madrid theme.
72
73 \medskip
74
75 To do that, we have redefined the date contents with the order
76 \medskip
77
78 \centerline{\structure{\texttt{$\backslash$date\{$\backslash$tddate$\backslash$ $\backslash$ $\backslash$tdtime\}}} }
79
80 \medskip
81
82 Note that color and font size are adjusted according to the theme.
83
84 \medskip
85
86 Look at the foot!, the clock must be running.
87
88 \end{frame}
89
90 \begin{frame}
91
92
93 Next, we have inserted a button to toggle between clock and stopwatch,
94 and a button to reset the stopwatch to zero.
95
96 \medskip
97 \toggleclock{\beamerbutton{toggle}}
98 \tdtime
99 \resetcrono{\beamerbutton{reset}}
100
101 \medskip
102
103 Click at the left button, see what happens (you must wait 10 seconds),
104 then click at the right button and see the result.
105 Finally, click at the left button again to recover the current time
106
107 \bigskip
108
109 To do that, we have used
110
111 \medskip
112
113 \structure{
114 \texttt{$\backslash$toggleclock\{$\backslash$beamerbutton\{toggle\}\}} \\%
115 \texttt{$\backslash$tdtime} \\
116 \texttt{$\backslash$resetcrono\{$\backslash$beamerbutton\{reset\}\}}
117 }
118
119 \end{frame}
120
121 %
122 % Here we change the colors and size of the clock
123
124 \begin{frame}
125
126 Here we change the color and size of the clock with
127 standard \LaTeX commands.
128
129 \structure{\texttt{$\backslash$textcolor\{blue\}\{$\backslash$Large $\backslash$tdhours.$\backslash$tdminutes\}\}}}: %
130 \textcolor{green}{\Large \tdhours.\tdminutes}
131
132 \bigskip
133
134 Here a huge yellow clock showing only hours and minutes, inside a red box
135
136 \structure{$\backslash$hhmm $\backslash$factorclockfont\{6.0\} $\backslash$tdtime}
137
138 \begin{center}
139 \colorbox{red}{\color{yellow} \hhmm \factorclockfont{6.0} \tdtime}
140 \end{center}
141
142 \end{frame}
143
144 \begin{frame}
145
146 \centerline{Time-Date-Crono macros}
147 \begin{tabular}{|l|l|l|}
148 \hline
149 \structure{$\backslash$initclock} & & initialize clock \\ \hline
150 \structure{$\backslash$tickingclock} & \tdclock & complete clock \\ \hline
151 \structure{$\backslash$tickingtime} & \tdtime & current time \\ \hline
152 \structure{$\backslash$tickingdate} & \tddate & current date \\ \hline
153 \structure{$\backslash$tickingday} & \tdday & current day \\\hline
154 \structure{$\backslash$tickingmonth} & \tdmonth & current month \\\hline
155 \structure{$\backslash$tickingyear} & \tdyear & current year \\\hline
156 \structure{$\backslash$tickinghours} & \tdhours & current hours \\\hline
157 \structure{$\backslash$tickingminutes} & \tdminutes & current minutes \\\hline
158 \structure{$\backslash$tickingseconds} & \tdseconds & current seconds \\\hline
159 \structure{$\backslash$crono} & \crono & stopwatch \\ \hline
160 \structure{$\backslash$cronohours} & \cronohours & crono hours \\\hline
161 \structure{$\backslash$cronominutes} & \cronominutes & crono minutes \\\hline
162 \structure{$\backslash$cronoseconds} & \cronoseconds & crono seconds \\\hline
163 \structure{$\backslash$resetcrono} & \resetcrono{\beamerbutton{reset}} & sets crono time to zero \\\hline
164 \structure{$\backslash$toggleclock} & \toggleclock{\beamerbutton{toggle}} & toggle time-crono \\\hline
165 \end{tabular}
166
167 \end{frame}
168
169 \begin{frame}
170
171 \centerline{Formatting macros}
172 \begin{tabular}{|l|l|l|}
173 \hline
174 \structure{$\backslash$hhmm} & \hhmm\tdtime & format time \\ \hline
175 \structure{$\backslash$hhmmss} & \hhmmss\tdtime & format time \\ \hline
176 \structure{$\backslash$mmddyyyy} & \mmddyyyy\tddate & format date \\ \hline
177 \structure{$\backslash$ddmmyyyy} & \ddmmyyyy\tddate & format date \\ \hline
178 \structure{$\backslash$dateseparator} & \def\dateseparator{--}\tddate & separator for date \\ \hline
179 \structure{$\backslash$timeseparator} & \def\timeseparator{.}\tdtime & separator for time \\ \hline
180 \structure{$\backslash$pdfslash} & \pdfslash & slash in pdf font \\ \hline
181 \structure{$\backslash$pdfcolon} & \pdfcolon & colon in pdf font \\ \hline
182 \structure{$\backslash$factorclockfont\{factor\}} & \factorclockfont{2.0}\tdtime & format date \\ \hline
183 \end{tabular}
184
185 \end{frame}
186
187 \end{document}
188