summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex
blob: c90ed74894ec2c8ec4a3b9e4306fc00161b26e87 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
\documentclass[10pt]{beamer}
%\usepackage[font=Times, timeinterval=10]{tickingclock}
%\usepackage[font=Cour, timeinterval=10]{tickingclock}
%\usepackage[font=Helv, timeinterval=30]{tickingclock}
\usepackage[font=Times,timeinterval=10, timeduration=2.0, timedeath=0, fillcolorwarningsecond=white!60!yellow,
timewarningfirst=50,timewarningsecond=80]{tdclock}
%\usepackage{times}
%\usepackage{helvet}

\usetheme{Madrid}


\title{An example of using Ticking Digital Clock in Beamer}
\author{Luis R\'{a}ndez \& Juan I. Montijano}
\institute[IUMA]{IUMA \\ Universidad de Zaragoza }
\date{\today}


\begin{document}

\frame{\titlepage}

\begin{frame}[t]
\frametitle{Introduction}

\initclock  % This must be used one time to initialize the clock

We are putting here a clock with the macro  \quad
\structure{\texttt{$\backslash$tdclock}}:

\bigskip

\tdclock

\bigskip

Before that, the macro \quad  \structure{\texttt{$\backslash$initclock}}
\quad must have been used (only one time !).

\end{frame}

% This is an example of inserting
% the clock at the place reserved to the date, the foot line in the
% case of Madrid theme.
%

\date{\tddate\ \ \tdtime}

\begin{frame}


Here we have inserted the clock at the place reserved to the date, the foot line in the case of Madrid theme.

\medskip

To do that, we have redefined the date contents with the order
\medskip

\centerline{\structure{\texttt{$\backslash$date\{$\backslash$tddate$\backslash$ $\backslash$ $\backslash$tdtime\}}} }

\medskip

Note that color and font size are adjusted according to the theme.

\medskip

Look at the foot!, the clock must be running.

\end{frame}

\begin{frame}


Next, we have inserted a button to toggle between clock and stopwatch,
and a button to reset the stopwatch to zero.

\medskip
\toggleclock{\beamerbutton{toggle}}
\tdtime
\resetcrono{\beamerbutton{reset}}

\medskip

Click at the left button, see what happens (you must wait 10 seconds),
then click at the right button and see the result.
Finally, click at the left button again to recover the current time

\bigskip

To do that, we have used

\medskip

\structure{
\texttt{$\backslash$toggleclock\{$\backslash$beamerbutton\{toggle\}\}} \\%
\texttt{$\backslash$tdtime} \\
\texttt{$\backslash$resetcrono\{$\backslash$beamerbutton\{reset\}\}}
}


\end{frame}

%
% Here we change the colors and size of the clock

\begin{frame}

Here we change the color and size of the clock with
standard \LaTeX commands.

\structure{\texttt{$\backslash$textcolor\{blue\}\{$\backslash$Large $\backslash$tdhours.$\backslash$tdminutes\}\}}}: %
\textcolor{green}{\Large \tdhours.\tdminutes}

\bigskip

Here a huge yellow clock showing only hours and minutes, inside a red box

\structure{$\backslash$hhmm $\backslash$factorclockfont\{6.0\} $\backslash$tdtime}

\begin{center}
\colorbox{red}{\color{yellow} \hhmm \factorclockfont{6.0} \tdtime}
\end{center}

\end{frame}

\begin{frame}

\centerline{Time-Date-Crono macros}
\begin{tabular}{|l|l|l|}
\hline
 \structure{$\backslash$initclock}        &                                      & initialize  clock   \\ \hline
 \structure{$\backslash$tickingclock}     & \tdclock                        & complete clock  \\ \hline
 \structure{$\backslash$tickingtime}      & \tdtime                         & current time    \\ \hline
 \structure{$\backslash$tickingdate}      & \tddate                         & current date    \\ \hline
 \structure{$\backslash$tickingday}       & \tdday                          & current day     \\\hline
 \structure{$\backslash$tickingmonth}     & \tdmonth                        & current month   \\\hline
 \structure{$\backslash$tickingyear}      & \tdyear                         & current year    \\\hline
 \structure{$\backslash$tickinghours}     & \tdhours                        & current hours   \\\hline
 \structure{$\backslash$tickingminutes}   & \tdminutes                      & current minutes \\\hline
 \structure{$\backslash$tickingseconds}   & \tdseconds                      & current seconds \\\hline
 \structure{$\backslash$crono}            & \crono                               & stopwatch       \\ \hline
 \structure{$\backslash$cronohours}       & \cronohours                          & crono hours   \\\hline
 \structure{$\backslash$cronominutes}     & \cronominutes                        & crono minutes \\\hline
 \structure{$\backslash$cronoseconds}     & \cronoseconds                        & crono seconds \\\hline
 \structure{$\backslash$resetcrono}       & \resetcrono{\beamerbutton{reset}}     & sets crono time to zero    \\\hline
 \structure{$\backslash$toggleclock}      & \toggleclock{\beamerbutton{toggle}}    & toggle time-crono   \\\hline
\end{tabular}

\end{frame}

\begin{frame}

\centerline{Formatting macros}
\begin{tabular}{|l|l|l|}
\hline
 \structure{$\backslash$hhmm}             & \hhmm\tdtime                    & format time   \\ \hline
 \structure{$\backslash$hhmmss}           & \hhmmss\tdtime                  & format time   \\ \hline
 \structure{$\backslash$mmddyyyy}         & \mmddyyyy\tddate                & format date   \\ \hline
 \structure{$\backslash$ddmmyyyy}         & \ddmmyyyy\tddate                & format date   \\ \hline
 \structure{$\backslash$dateseparator}    & \def\dateseparator{--}\tddate   & separator for date   \\ \hline
 \structure{$\backslash$timeseparator}    & \def\timeseparator{.}\tdtime    & separator for time   \\ \hline
 \structure{$\backslash$pdfslash}         & \pdfslash                            & slash in pdf font  \\ \hline
 \structure{$\backslash$pdfcolon}         & \pdfcolon                            & colon in pdf font   \\ \hline
 \structure{$\backslash$factorclockfont\{factor\}}     & \factorclockfont{2.0}\tdtime          & format date   \\ \hline
\end{tabular}

\end{frame}

\end{document}