diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/tdclock |
Initial commit
Diffstat (limited to 'macros/latex/contrib/tdclock')
-rw-r--r-- | macros/latex/contrib/tdclock/Changelog | 12 | ||||
-rw-r--r-- | macros/latex/contrib/tdclock/README | 18 | ||||
-rw-r--r-- | macros/latex/contrib/tdclock/tdclock-beamer-example.pdf | bin | 0 -> 87447 bytes | |||
-rw-r--r-- | macros/latex/contrib/tdclock/tdclock-beamer-example.tex | 188 | ||||
-rw-r--r-- | macros/latex/contrib/tdclock/tdclock-doc.pdf | bin | 0 -> 157446 bytes | |||
-rw-r--r-- | macros/latex/contrib/tdclock/tdclock-doc.tex | 343 | ||||
-rw-r--r-- | macros/latex/contrib/tdclock/tdclock.sty | 443 |
7 files changed, 1004 insertions, 0 deletions
diff --git a/macros/latex/contrib/tdclock/Changelog b/macros/latex/contrib/tdclock/Changelog new file mode 100644 index 0000000000..4a9a25e4cb --- /dev/null +++ b/macros/latex/contrib/tdclock/Changelog @@ -0,0 +1,12 @@ + +tdclock.sty 2.5 (released 2014-2-21) + +This is a stable release. The following items were fixed and/or added: + + - Added the option resetatpages="pages" to the package. With this option we can specify the pages at + which the crono counter is reset to zero. + + - We have taken into account the suggestions given in + http://tex.stackexchange.com/questions/148453/problem-with-boxes-in-tdclock + + diff --git a/macros/latex/contrib/tdclock/README b/macros/latex/contrib/tdclock/README new file mode 100644 index 0000000000..95a1fda9f4 --- /dev/null +++ b/macros/latex/contrib/tdclock/README @@ -0,0 +1,18 @@ +Package name: tdclock (The LaTeX tdclock) +Package authors: Luis Randez, Juan I. Montijano +Version/Release: 2.5 + +Features: + +The tdclock package allows the users to insert into a LATEX +generated pdf document a ticking digital clock showing the +date and/or time at the moment in which the document is +being read. + + +Installation: + +Copy the package file tdclock.sty to a directory where LATEX can find it. + + +February 2014 diff --git a/macros/latex/contrib/tdclock/tdclock-beamer-example.pdf b/macros/latex/contrib/tdclock/tdclock-beamer-example.pdf Binary files differnew file mode 100644 index 0000000000..4e0c72d4a7 --- /dev/null +++ b/macros/latex/contrib/tdclock/tdclock-beamer-example.pdf diff --git a/macros/latex/contrib/tdclock/tdclock-beamer-example.tex b/macros/latex/contrib/tdclock/tdclock-beamer-example.tex new file mode 100644 index 0000000000..b12ffba4e8 --- /dev/null +++ b/macros/latex/contrib/tdclock/tdclock-beamer-example.tex @@ -0,0 +1,188 @@ +\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,resetatpages=2]{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} +%\pagereset{-1} + +\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 !). + +\bigskip +This document uses the option \structure{\texttt{resetatpages=2}}. This means +that the crono is reset to zero at page 2. + +Below you can see a crono advancing. Every time you access to this page, +the crono should be reset to 0 (the output is updated every 10 seconds, as indicated +with the option \structure{\texttt{timeinterval=10}}, so it could appear +some non zero seconds, not greater than 10) + +\bigskip +Crono: \quad\cronominutes\pdfcolon\cronoseconds + +\bigskip + +Wait some seconds until you see the crono advancing, then go to the next page, go back +to this page again and wait some seconds to see +how the crono is reset. + +\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} + diff --git a/macros/latex/contrib/tdclock/tdclock-doc.pdf b/macros/latex/contrib/tdclock/tdclock-doc.pdf Binary files differnew file mode 100644 index 0000000000..42978bfed6 --- /dev/null +++ b/macros/latex/contrib/tdclock/tdclock-doc.pdf diff --git a/macros/latex/contrib/tdclock/tdclock-doc.tex b/macros/latex/contrib/tdclock/tdclock-doc.tex new file mode 100644 index 0000000000..134b1b7634 --- /dev/null +++ b/macros/latex/contrib/tdclock/tdclock-doc.tex @@ -0,0 +1,343 @@ +\documentclass{article} + +\usepackage{xcolor} +\usepackage{hyperref} +\usepackage{xkeyval} +\usepackage[font=Times,timeinterval=10,timeduration=2.0, timewarningfirst=50,timewarningsecond=70, +fillcolorwarningsecond=white!60!yellow, timedeath=0,resetatpages=3]{tdclock} + +\title{The Ticking Digital Clock \texttt{tdclock} package v2.3} +\author{Luis R\'{a}ndez \& Juan I. Montijano} +%\affiliation[IUMA]{IUMA \\ Universidad de Zaragoza } +\date{\today} + + + +\begin{document} + +\maketitle + +\initclock + +\section{The package} +The \texttt{tdclock} package is a \LaTeX2e package that +allows the users to insert into a \LaTeX\/ generated pdf document +a ticking digital clock showing the date and/or time at +the moment in which the document +is being read, for example the one next: \quad \tdclock. + +\smallskip +The package is loaded by \texttt{$\backslash$usepackage[``options'']\{tdclock\}} + +\medskip + +\noindent Options: + +\begin{itemize} +\item timeinterval=$n$ +\item[] +$n$ can be any positive integer. The clock will update its internal status every $n$ seconds. Thus, if we load +the package with \texttt{[timeinterval=120]}, the clock will update its display every 2 minutes. +The default time interval is set to 29 seconds. + +Note that for low values of $n$ the memory used by Adobe increases during the time the document remains opened and can +become very high. Then, values of $n$ below 10 are not recommended. + +\item font=``adobe font'' +\item[] +``adobe font'' is one of the following 9 adobe name fonts:\\[5pt] +\begin{tabular}{llllll} +Helv & HelvI & HelvBI & +Times & TimesI & TimesBI \\ +Cour & CourI & CourBI &&& +\end{tabular} + +\item[]At the moment no other fonts, like \TeX\ ones, can be used. This restriction comes from the fact that the +``dynamic'' clock is based on javascript code embedded into the pdf document. + +\item timeduration=``time (in mimutes)'' +\item[] +``time'' can be any integer or decimal number. This option is intended to be used in presentations (beamer for example). +Its value specifies the time the presentation should last. This option has sense in conjunction with the next options. + +\item timewarningfirst= $n$ +\item[] +$n$ can be any integer between 1 and 100. With this option set, after $n$\% of the time specified in timeduration, +the color and background of the tdclock time will change, according to the next options. +This can be used as a first warning that you are running out time for the presentation. The default is set to 90. + +\item timewarningsecond= $n$ +\item[] +$n$ can be any integer between 1 and 100 (usually greater than timewarningfirst). With this option set, after $n$\% of the time specified in timeduration, +the color and background of the tdclock time will change, according to the next options. +This can be used +as a second warning that you have little time to finish the presentation. The default is set to 95. + +\item colorwarningfirst= ``color'' +\item[] +This option specifies the color for the tdclock time after the time specified by +timeduration and timewarningfirst options. The default is orange. + +\item fillcolorwarningfirst= ``color'' +\item[] +This option specifies the color background for the tdclock time after the time specified by +timeduration and timewarningfirst options. The default is ``transparent''. +This has only effect on time specified by $\backslash$crono, $\backslash$tdclock and $\backslash$tdtime +time orders. + +\item colorwarningsecond= ``color'' +\item[] +This option specifies the color for the tdclock time after the time specified by +timeduration and timewarningsecond options. The default is red. + +\item fillcolorwarningsecond= ``color'' +\item[] +This option specifies the color background for the tdclock time after the time specified by +timeduration and timewarningsecond options. The default is ``transparent''. +This has only effect on time specified by $\backslash$crono, $\backslash$tdclock and $\backslash$tdtime +time orders. + +\item timedeath= 0 or 1 +\item[] +If this option is set to 1, after 110\% of the time specified in timeduration, +the pdf document will be closed. The default is set to 0 (the document is not closed). + +\item resetatpages= ``pages where the crono is reset to zero'' +\item[] +\begin{tabular}{lp{6.5cm}} +resetatpages= none & does nothing (the default). \\ +resetatpages= all & the crono is reset to zero every time you changes the page. \\ +resetatpages= $n$ & the crono is reset to zero every time you go to the page $n$. \\ +resetatpages= $\{n1, n2, \ldots \}$ & the crono is reset to zero every time you go to any of the pages $n1, n2, \ldots$ +\end{tabular} +\item pageresetcontrol= ``The way the pages are specified'' +\item[] +\begin{tabular}{lp{6.5cm}} +pageresetcontrol= pdfpagelabels & The pdf labels must be used (the default). You should put the page number or label LaTex puts on the page. +Usually, this is the number that appears as page number in the final document. For this page for example is 3. +In beamer, when overlays are used, all sub-slides have the same pdfpagelabel, the one of the frame.\\ +pageresetcontrol= pdfpagenumbers & The internal pdf page number must be used. First page has page number 0, the second one has 1 and so on. +In beamer, when overlays are used, every sub-slide have different pdfpagenumber, in consecutive order. The page number in the document does not +coincides with the internal pdf page number. In this docunment, this page 3 has internal pdf page number 2\\ +\end{tabular} +\end{itemize} + +Some examples of using the options + +\begin{itemize} +\item +{\bf $\backslash$usepackage[font=Times, timeinterval=59]\{tdclock\} } + +\item[] Only the font (Times) and the time (59 seconds) for updating the clock is specified. No warning indicating +that the time for the presentation is finishing will be given. + +\item +{\bf $\backslash$usepackage[font=Times, timeinterval=30, timeduration=20, \\ +timewarningfirst=85, timewarningsecond=90, \\ +fillcolorwarningsecond=white!60!yellow]\{tdclock\} } + +\item[] In addition to the font (Times) and the time (30 seconds) for updating the clock, a duration of the presentation of 20 minutes is specified. The color of the clock font will be set to orange after 17 minutes (85\% of 20). This color will be changed to red, + and the background to white!60!yellow after 18 minutes(90\% of 20). + +\item +{\bf $\backslash$usepackage[timeduration=60, timewarningfirst=90, \\ +timewarningsecond=95, colorwarningfirst=blue, \\ +fillcolorwarningfirst=white!60!yellow, \\ +fillcolorwarningsecond=white!10!yellow, timedeath=1]\{tdclock\} } + +\item[] A duration of the presentation of 60 minutes is specified. The color of the clock font will be set to blue +after 54 minutes (90\% of 60) with a background white!60!yellow. The font color will be changed to red after +57 minutes and the background to white!10!yellow. The document will close automatically after 66 minutes +(110\% of 60). + +\end{itemize} + +\section{Restrictions--requirements} +The package requires hyperref, xkeyval and xcolor packages. It works with PDF\LaTeX\/ as well as with \LaTeX\/$\to$DviPs$\to$Ps2pdf sequence. +In documents generated by Dvipdfm, the clock does not work properly. + +Since it uses javascript code, and not all pdf readers can interpret javascript, +only some of them will display the documents properly. We have tested the package with +Adobe reader and Adobe acrobat under windows and Linux. + +\section{Installation} +Copy the package file tdclock.sty to a directory where \LaTeX\/ can find it. + +\section{Getting the package} + +The package can be downloaded at http://pcmap.unizar.es/numerico/software + +\section{Macros} + +The clock must be initialized with \texttt{$\backslash$initclock}, usually at the beginning of the document, after +\texttt{$\backslash$begin\{document\}}. + +The following macros display dynamically the current date and/or time: + +\begin{center} +\begin{tabular}{|l|l|} +\hline + \bf command & \bf action \\ +\hline +\texttt{ $\backslash$tdclock} & displays a complete clock \\ \hline +\texttt{ $\backslash$tdtime} & displays the current time \\ \hline +\texttt{ $\backslash$tddate} & displays the current date \\ \hline +\texttt{ $\backslash$tdday} & displays the current day \\\hline +\texttt{ $\backslash$tdmonth} & displays the current month \\\hline +\texttt{ $\backslash$tdyear} & displays the current year \\\hline +\texttt{ $\backslash$tdhours} & displays the current hour \\\hline +\texttt{ $\backslash$tdminutes} & displays the current minute \\\hline +\texttt{ $\backslash$tdseconds} & displays the current second \\\hline +\end{tabular} +\end{center} + +The package also provides macros to display a stopwatch. This can be done +by means of the following macros: + +\begin{center} +\begin{tabular}{|l|l|} +\hline +\bf command & \bf action \\ +\hline +\texttt{ $\backslash$crono} & displays a stopwatch \\ \hline +\texttt{ $\backslash$cronohours} & displays a crono (only hours) \\\hline +\texttt{ $\backslash$cronominutes} & displays a crono (only minutes) \\\hline +\texttt{ $\backslash$cronoseconds} & displays a crono (only seconds) \\\hline +\end{tabular} +\end{center} + +In addition, the package includes two macros that display buttons. With one of them, by pressing it, +you reset the stopwatch to zero values. The form of the command is \texttt{$\backslash$resetcrono\{``button''\}}. +For example, \texttt{$\backslash$resetcrono\{$\backslash$fbox\{reset\}\} $\backslash$crono} produces (press the button to see what happens): +\resetcrono{\fbox{reset}} \crono + +The other lets you toggle from current time to stopwatch. For example, +\texttt{$\backslash$toggleclock\{$\backslash$fbox\{toggleclock\}\} $\backslash$tdtime} produces (press the button to see what happens): +\toggleclock{\fbox{toggle}} \tdtime. + +Note that \texttt{$\backslash$toggleclock} only has effect on \texttt{$\backslash$tdtime} command, and not on \texttt{$\backslash$crono}. + +\subsection{Formatting the output} + +\subsubsection{Size and color} +The size and color of the characters forming the time or date are the \LaTeX\/ +current font size and color. Thus, for example + +\noindent\texttt{ +$\backslash$centerline\{$\backslash$textcolor\{blue\}\{$\backslash$Huge $\backslash$tdclock\}\} +} gives: + +\centerline{\textcolor{blue}{\Huge \tdtime} } + +\smallskip + +There is another macro, \texttt{$\backslash$factorclockfont\{``factor''\}}, that increases the size of the clock +by a desired factor. To set the size of the clock to its original size, use +\texttt{$\backslash$factorclockfont\{1\}} + +\subsubsection{Formatting the display} +There are two commands that change the effect of \texttt{$\backslash$time} and +\texttt{$\backslash$crono}. +\begin{itemize} +\item \texttt{$\backslash$hhmmss} redefine the commands to show the hours,minutes and seconds (this is the default), +\item \texttt{$\backslash$hhmm} redefine them so that they will only show hours and minutes. +\end{itemize} + +Hours, minutes and seconds are separated by the character defined in the macro \texttt{$\backslash$timeseparator}. +Therefore, the time separator can be set by redefining this macro. For example, + +\centerline{\texttt{$\backslash$renewcommand\{$\backslash$timeseparator\}\{;\}$\backslash$tdtime}} + +gives + +\centerline{\renewcommand{\timeseparator}{;}\tdtime} + +Different types of formats for time can be achieved by means of the macros \texttt{$\backslash$tdhours}, \texttt{$\backslash$tdminutes} and\texttt{$\backslash$seconds}. For example, + +\noindent\texttt{$\backslash$minutes}.\texttt{$\backslash$seconds} +produces: \quad \tdminutes.\tdseconds + +Different types of formats for the stopwatch can be achieved by means of the macros \texttt{$\backslash$cronohours}, \texttt{$\backslash$cronominutes} and\texttt{$\backslash$cronoseconds}. For example, + +\noindent\texttt{$\backslash$cronominutes}.\texttt{$\backslash$cronoseconds} +produces: \quad \cronominutes.\cronoseconds + +In fact, \texttt{$\backslash$tdtime} and \texttt{$\backslash$crono} are defined by default to \\ +\texttt{$\backslash$tdhours$\backslash$timeseparator$\backslash$tdminutes$\backslash$timeseparator$\backslash$tdseconds}\\ and \\ +\texttt{$\backslash$cronohours$\backslash$timeseparator$\backslash$cronominutes$\backslash$timeseparator$\backslash$cronoseconds}\\ respectively. + +\bigskip + +Regarding the date, there are two commands that change the effect of \texttt{$\backslash$tddate}. +\begin{itemize} +\item \texttt{$\backslash$ddmmyyyy} redefine the command to show the day,month and year (this is the default), +\item \texttt{$\backslash$mmddyyyy} redefine it to show month, day and year. +\end{itemize} + +Day, month and year are separated by the character defined in the macro \texttt{$\backslash$dateseparator}. +Therefore, the date separator can be set by redefining this macro. For example, + +\centerline{\texttt{$\backslash$renewcommand\{$\backslash$dateseparator\}\{;\}$\backslash$tddate}} + +gives + +\centerline{\renewcommand{\dateseparator}{;}\tddate} + +Different types of formats for date can be achieved by means of the macros \texttt{$\backslash$tdday}, \texttt{$\backslash$tdmonth} and\texttt{$\backslash$tdyear}. For example, + +\noindent\texttt{$\backslash$day}--\texttt{$\backslash$month} +produces: \quad \tdday--\tdmonth + +By default, \texttt{$\backslash$tddate} is defined by default to \\ +\texttt{$\backslash$tdday$\backslash$dateseparator$\backslash$tdmonth$\backslash$dateseparator$\backslash$tdyear}. + +Since the font used to display the dynamic date and time is one of the adobe fonts, we have included two commands \texttt{$\backslash$pdfslash} and \texttt{$\backslash$pdfcolon} to provide the charactrers ``slash'' and ``colon'' so that defining +\texttt{$\backslash$renewcommand\{$\backslash$timeseparator\}\{$\backslash$pdfcolon\}} +the command \texttt{$\backslash$tdtime} will have all their characters in the same font. +The same for \texttt{$\backslash$tddate} if we use \texttt{$\backslash$pdfslash} as separator. + +\newpage +\section{Summary of macros} + +\bigskip +\centerline{Time-Date macros} +\begin{tabular}{|l|l|l|} +\hline +macro & result & action \\ +\hline + $\backslash$initclock & & initialize clock \\ \hline + $\backslash$tdclock & \tdclock & complete clock \\ \hline + $\backslash$tdtime & \tdtime & current time \\ \hline + $\backslash$tddate & \tddate & current date \\ \hline + $\backslash$tdday & \tdday & current day \\\hline + $\backslash$tdmonth & \tdmonth & current month \\\hline + $\backslash$tdyear & \tdyear & current year \\\hline + $\backslash$tdhours & \tdhours & current hours \\\hline + $\backslash$tdminutes & \tdminutes & current minutes \\\hline + $\backslash$tdseconds & \tdseconds & current seconds \\\hline + $\backslash$crono & \crono & stopwatch \\ \hline + $\backslash$cronohours & \cronohours & crono hours \\\hline + $\backslash$cronominutes & \cronominutes & crono minutes \\\hline + $\backslash$tdwarningbox\{$\backslash$cronominutes\} & \tdwarningbox{\cronominutes} & warning boxed crono minutes \\\hline + $\backslash$cronoseconds & \cronoseconds & crono seconds \\\hline + $\backslash$resetcrono\{``button''\} & \resetcrono{\fbox{reset}} & sets crono time to zero \\\hline + $\backslash$toggleclock\{``button''\} & \toggleclock{\fbox{toggle}} & toggle time-crono \\\hline +\end{tabular} + +\bigskip + +\centerline{Formatting macros} +\begin{tabular}{|l|l|} +\hline + \texttt{$\backslash$hhmm$\backslash$tdtime} & \hhmm\tdtime \\ \hline + \texttt{$\backslash$hhmmss$\backslash$tdtime} & \hhmmss\tdtime \\ \hline + \texttt{$\backslash$mmddyy$\backslash$tddate} & \mmddyyyy\tddate \\ \hline + \texttt{$\backslash$ddmmyy$\backslash$tddate} & \ddmmyyyy\tddate \\ \hline + \texttt{$\backslash$renewcommand\{$\backslash$dateseparator\}\{--\}$\backslash$tddate} & \renewcommand{\dateseparator}{--}\tddate \\ \hline + \texttt{$\backslash$renewcommand\{$\backslash$timeseparator\}\{.\}$\backslash$tdtime} & \renewcommand{\timeseparator}{.}\tdtime \\ \hline + \texttt{$\backslash$pdfslash} & \pdfslash \\ \hline + \texttt{$\backslash$pdfcolon} & \pdfcolon \\ \hline + \texttt{$\backslash$factorclockfont\{2.0\}$\backslash$tdtime} & \factorclockfont{2.0}\tdtime \\ \hline +\end{tabular} + +\end{document} diff --git a/macros/latex/contrib/tdclock/tdclock.sty b/macros/latex/contrib/tdclock/tdclock.sty new file mode 100644 index 0000000000..e70e6747ef --- /dev/null +++ b/macros/latex/contrib/tdclock/tdclock.sty @@ -0,0 +1,443 @@ +\ProvidesPackage{tdclock} [2014/02/21 v2.5 clock accessory] + +% +% Luis Randez randez@unizar.es +% Juan I. Montijano monti@unizar.es +% +% This program can be redistributed and/or modified under the terms +% of the GNU Public License, version 2. + + +\RequirePackage{hyperref} +\RequirePackage{xcolor}[2004/05/09] +\RequirePackage{xkeyval} + + +\ifdefined\clock@font\else\def\clock@font{"font.Helv"}\fi +\ifdefined\clock@interval\else\def\clock@interval{29}\fi +\ifdefined\clock@duration\else\def\clock@duration{6000.0}\fi +\ifdefined\clock@timewarningfirst\else\def\clock@timewarningfirst{90}\fi +\ifdefined\clock@timewarningsecond\else\def\clock@timewarningsecond{95}\fi +\ifdefined\clock@death\else\def\clock@death{0}\fi +\ifdefined\clock@colorwarningfirst\else\def\clock@colorwarningfirst{orange}\fi +\ifdefined\clock@colorwarningsecond\else\def\clock@colorwarningsecond{red}\fi +\ifdefined\clock@fillcolorwarningfirst\else\def\clock@fillcolorwarningfirst{"T"}\fi +\ifdefined\clock@fillcolorwarningsecond\else\def\clock@fillcolorwarningsecond{"T"}\fi +% +\ifdefined\clock@fontsize\else\newdimen\clock@fontsize\clock@fontsize=\f@size pt\fi +\ifdefined\clock@height\else\newdimen\clock@height\fi +%\ifdefined\clock@fontcolor\else\newcommand{\clock@fontcolor}{0 0 0}\fi +% +\ifdefined\clock@resetatpages\else\def\clock@resetatpages{none}\fi +\ifdefined\clock@pdfpagetype\else\def\clock@pdfpagetype{pdfpagelabels}\fi + +\DeclareOptionX{font}{\def\clock@font{"font.#1"}} +\DeclareOptionX{timeinterval}{\renewcommand{\clock@interval}{#1}} +\DeclareOptionX{timeduration}{\renewcommand{\clock@duration}{#1}} +\DeclareOptionX{timewarningfirst}{\renewcommand{\clock@timewarningfirst}{#1}} +\DeclareOptionX{timewarningsecond}{\renewcommand{\clock@timewarningsecond}{#1}} +\DeclareOptionX{timedeath}{\renewcommand{\clock@death}{#1}} +\DeclareOptionX{colorwarningfirst}{\renewcommand{\clock@colorwarningfirst}{#1}} +\DeclareOptionX{colorwarningsecond}{\renewcommand{\clock@colorwarningsecond}{#1}} +\DeclareOptionX{fillcolorwarningfirst}{\renewcommand{\clock@fillcolorwarningfirst}{#1}} +\DeclareOptionX{fillcolorwarningsecond}{\renewcommand{\clock@fillcolorwarningsecond}{#1}} +\DeclareOptionX{resetatpages}{\renewcommand{\clock@resetatpages}{#1}} +\DeclareOptionX{pageresetcontrol}{\renewcommand{\clock@pdfpagetype}{#1}} + +% + +\ProcessOptionsX + +%\def\resetatthispage{\def\clock@resetatpages{\clock@resetatpages,\HyPL@thisLabel}} + +\def\a@a{1.0} +\def\b@b{1.080} +\def\a@one{1.1} +\def\b@one{0.3} +\def\a@h{0.1} +\def\b@h{0.1} + +\def\@Helv{"font.Helv"} +\def\@HelvB{"font.HelvB"} +\def\@HelvI{"font.HelvI"} +\def\@HelvBI{"font.HelvBI"} +\def\@Times{"font.Times"} +\def\@TimesB{"font.TimesB"} +\def\@TimesI{"font.TimesI"} +\def\@TimesBI{"font.TimesBI"} +\def\@Cour{"font.Cour"} +\def\@CourB{"font.CourB"} +\def\@CourI{"font.CourI"} +\def\@CourBI{"font.CourBI"} +\ifx\clock@font\@Helv \def\@hfac{0.9}\def\a@a{1.1}\def\b@b{1.080}\def\a@one{1.1}\def\b@one{0.300}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@HelvB \def\@hfac{0.9}\def\a@a{1.1}\def\b@b{1.080}\def\a@one{1.1}\def\b@one{0.300}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@HelvI \def\@hfac{0.9}\def\a@a{1.1}\def\b@b{1.080}\def\a@one{1.1}\def\b@one{0.300}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@HelvBI \def\@hfac{0.9}\def\a@a{1.1}\def\b@b{1.080}\def\a@one{1.1}\def\b@one{0.300}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@Times \def\@hfac{0.9}\def\a@a{1.0}\def\b@b{1.000}\def\a@one{1.10}\def\b@one{0.280}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@TimesB \def\@hfac{0.9}\def\a@a{1.0}\def\b@b{1.000}\def\a@one{1.10}\def\b@one{0.280}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@TimesI \def\@hfac{0.9}\def\a@a{1.0}\def\b@b{1.000}\def\a@one{1.10}\def\b@one{0.280}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@TimesBI \def\@hfac{0.9}\def\a@a{1.0}\def\b@b{1.000}\def\a@one{1.10}\def\b@one{0.280}\def\a@h{0.10}\def\b@h{0.10}\fi +\ifx\clock@font\@Cour \def\@hfac{0.8}\def\a@a{1.0}\def\b@b{1.200}\def\a@one{1.1}\def\b@one{0.590}\def\a@h{0.04}\def\b@h{0.07}\fi +\ifx\clock@font\@CourB \def\@hfac{0.8}\def\a@a{1.0}\def\b@b{1.200}\def\a@one{1.1}\def\b@one{0.590}\def\a@h{0.04}\def\b@h{0.07}\fi +\ifx\clock@font\@CourI \def\@hfac{0.8}\def\a@a{1.0}\def\b@b{1.200}\def\a@one{1.1}\def\b@one{0.590}\def\a@h{0.04}\def\b@h{0.07}\fi +\ifx\clock@font\@CourBI \def\@hfac{0.8}\def\a@a{1.0}\def\b@b{1.200}\def\a@one{1.1}\def\b@one{0.590}\def\a@h{0.04}\def\b@h{0.07}\fi + +\def\clock@temp#1{\def\clock@tempa##1,##2,##3\@nil{##1 ##2 ##3}% +\extractcolorspec{#1}\clock@tempb\expandafter\convertcolorspec\clock@tempb{rgb}% +\clock@tempb\edef\clock@tempa{\expandafter\clock@tempa\clock@tempb\@nil}} + +\def\fac@font{1.0} +\def\factorclockfont#1{\def\fac@font{#1}} + +\def\clock@setfonsize{\clock@fontsize=\f@size pt\clock@fontsize=\fac@font\clock@fontsize} +\def\clock@setfontcolor{\clock@temp{.}\let\clock@fontcolor=\clock@tempa} +\def\clock@setheight{\clock@height=\@hfac\clock@fontsize} + +\def\clock@tempf#1{\def\clock@tempaf##1,##2,##3\@nil{##1 ##2 ##3}% +\extractcolorspec{#1}\clock@tempbf\expandafter\convertcolorspec\clock@tempbf{rgb}% +\clock@tempbf\edef\clock@tempaf{\expandafter\clock@tempaf\clock@tempbf\@nil}} + +\def\clock@tempff#1{\def\clock@tempaff##1,##2,##3\@nil{##1 ##2 ##3}% +\extractcolorspec{#1}\clock@tempbff\expandafter\convertcolorspec\clock@tempbff{rgb}% +\clock@tempbff\edef\clock@tempaff{\expandafter\clock@tempaff\clock@tempbff\@nil}} + +\def\clock@tempfff#1{\def\clock@tempafff##1,##2,##3\@nil{##1 ##2 ##3}% +\extractcolorspec{#1}\clock@tempbfff\expandafter\convertcolorspec\clock@tempbfff{rgb}% +\clock@tempbfff\edef\clock@tempafff{\expandafter\clock@tempafff\clock@tempbfff\@nil}} + +\def\@Transp{"T"} +\clock@temp{\clock@colorwarningfirst}\def\colorninety{["RGB",\clock@tempb]} +\clock@tempf{\clock@colorwarningsecond}\def\colorninetyfive{["RGB",\clock@tempbf]} +\ifx\clock@fillcolorwarningfirst\@Transp\def\fillcolorninety{["T"]}% +\else\clock@tempff{\clock@fillcolorwarningfirst}\def\fillcolorninety{["RGB",\clock@tempbff]}\fi +\ifx\clock@fillcolorwarningsecond\@Transp\def\fillcolorninetyfive{["T"]}% +\else\clock@tempfff{\clock@fillcolorwarningsecond}\def\fillcolorninetyfive{["RGB",\clock@tempbfff]}\fi + +% +\def\toggleclock#1{\PushButton[name=button1, onclick={\auxiliar;}]{#1}} +\def\resetcrono#1{\PushButton[name=button2, onclick={\resetclock;}]{{#1}}} + +\def\dateseparator{\pdfslash} +\def\timeseparator{\pdfcolon} +% +\def\tdclock{\tddate\ \ \tdtime} +\def\tddate{\tdday\dateseparator\tdmonth\dateseparator\tdyear} +\def\tdtime{\tdwarningbox{\tdhours\timeseparator\tdminutes\timeseparator\tdseconds}} +\def\crono{\tdwarningbox{\cronohours\timeseparator\cronominutes\timeseparator\cronoseconds}} +%\def\crono{\cronohours\timeseparator\cronominutes\timeseparator\cronoseconds} +%\def\tdtime{\tdhours\timeseparator\tdminutes\timeseparator\tdseconds} +% +\def\mm{% +\def\tdtime{\tdwarningbox{\tdminutes}}% +\def\crono{\tdwarningbox{\cronominutes}}% +} +% +\def\hhmm{% +\def\tdtime{\tdwarningbox{\tdhours\timeseparator\tdminutes}}% +\def\crono{\tdwarningbox{\cronohours\timeseparator\cronominutes}}% +} +% +\def\hhmmss{% +\def\tdtime{\tdwarningbox{\tdhours\timeseparator\tdminutes\timeseparator\tdseconds}}% +\def\crono{\tdwarningbox{\cronohours\timeseparator\cronominutes\timeseparator\cronoseconds}}% +} + +\def\mmddyyyy{% +\def\tddate{\tdmonth\dateseparator\tdday\dateseparator\tdyear}% +} +\def\ddmmyyyy{% +\def\tddate{\tdday\dateseparator\tdmonth\dateseparator\tdyear}% +} + +\def\tdday{\clockfield{day}} +\def\tdmonth{\clockfield{month}} +\def\tdhours{\clockfield{hours}} +\def\tdminutes{\clockfield{minutes}} +\def\tdseconds{\clockfield{seconds}} +\def\cronohours{\clockfield{cronohours}} +\def\cronominutes{\clockfield{cronominutes}} +\def\cronoseconds{\clockfield{crseconds}} + +\newbox\sizebox + +\def\tdyear{% +\clock@setfonsize\clock@setheight\clock@setfontcolor%\clock@setwidth +\setbox\sizebox=\hbox{\TextField[readonly=true,name=year, width=60pt, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize]{}}% +\vrule width 0pt height 2pt\kern-1pt\kern-\wd\sizebox\kern 60pt{\raisebox{-\b@h\clock@fontsize}{\raisebox{-\a@h pt}{\mbox{\TextField[name=year, width=60pt, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize,readonly=true, +value={}]{}\kern-60pt\kern \a@a pt\kern \b@b\clock@fontsize\kern \b@b\clock@fontsize\vrule width 0pt height 2pt}}}}% +} + +\def\pdfslash{% +\clock@setfonsize\clock@setheight\clock@setfontcolor%\clock@setwidth +\setbox\sizebox=\hbox{\TextField[readonly=true, width=60pt, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize,value=/]{}}% +\vrule width 0pt height 2pt\kern-0.75pt\kern-\wd\sizebox\kern 60pt{\raisebox{-\b@h\clock@fontsize}{\raisebox{-\a@h pt}{\mbox{\TextField[name=separatordate, width=60pt, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize, +readonly=true,value=/]{}\kern-60pt\kern \a@one pt\kern \b@one\clock@fontsize\vrule width 0pt height 2pt}}}}% +} + +\def\pdfcolon{% +\clock@setfonsize\clock@setheight\clock@setfontcolor%\clock@setwidth +\setbox\sizebox=\hbox{\TextField[readonly=true, name=separatortime, width=0.90\clock@fontsize, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize,value=:]{}}% +\vrule width 0pt height 2pt\kern-0.4pt\kern-\wd\sizebox\kern 0.90\clock@fontsize{\raisebox{-\b@h\clock@fontsize}{\raisebox{-\a@h pt}% +{\mbox{\TextField[name=separatortime, width=0.90\clock@fontsize, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize, +readonly=true,value=:]{}\kern-0.90\clock@fontsize\kern\a@one pt\kern \b@one\clock@fontsize\vrule width 0pt height 2pt}}}}% +} + +\def\clockfield#1{% +\clock@setfonsize\clock@setheight\clock@setfontcolor%\clock@setwidth +\setbox\sizebox=\hbox{\TextField[readonly=true, name=#1, width=1.31\clock@fontsize, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize]{}}% +\vrule width 0pt height 2pt\kern-\a@a pt\kern-\wd\sizebox\kern 1.31\clock@fontsize{\raisebox{-\b@h\clock@fontsize}% +{\raisebox{-\a@h pt}{\mbox{\TextField[name=#1, width=1.31\clock@fontsize, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize,readonly=true, +value={}]{}\kern-1.31\clock@fontsize\kern\a@a pt\kern \b@b\clock@fontsize\vrule width 0pt height 2pt}}}}% +} + +\def\tdwarningbox#1{% +\clock@setfonsize\clock@setheight\clock@setfontcolor% +\setbox\sizebox=\hbox{#1}% +\vrule width 0pt height 2pt\kern-2pt\kern-\a@a pt\raisebox{-\dp\sizebox}{\raisebox{-\a@h pt}% +{\mbox{\TextField[readonly=true, name=cronobox, width=1.01\wd\sizebox, height=1.08\ht\sizebox, align = 0, readonly=true,value= ]{}}}}% +\vrule width 0pt height 2pt\kern0.1pt\kern-1.01\wd\sizebox\vrule width 0pt height 2pt#1\kern 1pt} + +\def\initfields{% +\begin{Form} +\mbox{\TextField[format=\startclock,name=resultado2, hidden=true, width=0truecm, height=0truecm, bordercolor= 1 1 1, backgroundcolor= 1 1 1,value={}]{}} +\end{Form}% +%\TextField[name=resultado1, hidden=true, width=0pt, height=0pt,charsize=0pt]{} +\TextField[readonly=true,name=hours, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=minutes, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=seconds, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=cronohours, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=cronominutes, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=crseconds, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=day, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=month, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\TextField[readonly=true,name=year, hidden=true, width=0pt, height=0pt,charsize=0pt]{}% +\PushButton[name=button1, onclick={\auxiliar;},hidden=true]{}% +\PushButton[name=button2, onclick={\resetclock;},hidden=true]{}% +\TextField[readonly=true,name=separatordate, hidden=true, width=0pt, height=0pt,charsize=0pt, value=/]{}% +\TextField[readonly=true,name=separatortime, hidden=true, width=0pt, height=0pt,charsize=0pt, value=:]{}% +\TextField[readonly=true,name=cronobox, hidden=true, width=0pt, height=0pt,charsize=0pt, value= ]{}% +} +% +\def\initclock{% +\setbox\sizebox=\hbox{\initfields}% +\initfields% +\kern -\wd\sizebox% +\unskip +} +% +\def\resetclock{% +fecha1 = rresett(); +} +% +\def\auxiliar{% +var iop= -iop; +}% +% +\def\startclock{% +% +%global.page; +%global.run; +% +var iop=1; +var fuente=eval(\clock@font); +var duration=eval(\clock@duration)*60; +var firstwarning=eval(\clock@timewarningfirst)/100; +var secondwarning=eval(\clock@timewarningsecond)/100; +var death=eval(\clock@death); +% +var page=0; +var all="all"; +var none="none"; +var resetatpages=[\clock@resetatpages]; +% +fecha1 = rresett(); +fecha1 = reloj(); +run = app.setInterval("reloj();",1000*\clock@interval); +%run= app.setTimeOut("reloj();",\clock@interval020); +% app.clearTimeOut(global.run); +%run= app.setTimeOut("reloj();",\clock@interval020); +%fecha1=b(); +%function b() { +% run = app.setTimeOut("reloj();app.clearTimeOut(run);b()",\clock@interval000); +%} +% +if (resetatpages[0] !="none") +{ + run2 =app.setInterval("pagina(this);",1000); +} +% +function rresett() +{ +var fObj0 = new Date(); +horas0 = fObj0.getHours(); +minutos0 = fObj0.getMinutes(); +segundos0 = fObj0.getSeconds(); +} +% +function alerta(kolor,kolorfill) +{ +this.getField("minutes").textColor=kolor; +this.getField("hours").textColor=kolor; +this.getField("seconds").textColor=kolor; +this.getField("cronominutes").textColor=kolor; +this.getField("cronohours").textColor=kolor; +this.getField("crseconds").textColor=kolor; +this.getField("separatortime").textColor=kolor; +this.getField("cronobox").fillColor=kolorfill; +} +% +% +function pagina(doc) +{ + var pdfpagelabels=0; + var pdfpagenumbers=1; + if (\clock@pdfpagetype==0) + { + labelold=this.getPageLabel(page); + labelnew=this.getPageLabel(this.pageNum); + } + else + { + labelold=page; + labelnew=this.pageNum; + } + if ( labelold != labelnew) + { + resethere=0; + page=this.pageNum; + for (var j=0;j<resetatpages.length;j++) + { + if (resetatpages[j] == labelnew || resetatpages[j] == "all") + { + resethere=1; + } + } + if (resethere == 1) + { + rresett(); + } + } +} +% +% +function reloj() +{ +% +var fObj = new Date(); +var dia = formateo(fObj.getDate()); +var mes = formateo(fObj.getMonth()+1); +var year = fObj.getFullYear(); +var horas = fObj.getHours(); horas1 = horas; +var minutos = fObj.getMinutes() ; minutos1 = minutos; +var segundos = fObj.getSeconds(); segundos1= segundos; +% +horas = formateo(horas); +minutos = formateo(minutos); +segundos = formateo(segundos); +% +%resta = (eval(horas1-global.horas0)*60+eval(minutos1-global.minutos0))*60+eval(segundos1-global.segundos0); +resta = (eval(horas1-horas0)*60+eval(minutos1-minutos0))*60+eval(segundos1-segundos0); +h = Math.floor(resta/3600); htexto=formateo(h); +m = Math.floor((resta-3600*h)/60); mtexto=formateo(m); +s = resta-3600*h-60*m; stexto=formateo(s); +% +% +% +var cociente = eval(resta/duration); +if ( cociente < firstwarning) { +this.getField("minutes").fillColor=["T"]; +this.getField("hours").fillColor=["T"]; +this.getField("seconds").fillColor=["T"]; +this.getField("cronominutes").fillColor=["T"]; +this.getField("cronohours").fillColor=["T"]; +this.getField("crseconds").fillColor=["T"]; +this.getField("separatortime").fillColor=["T"]; +this.getField("cronobox").fillColor=["T"]; +} +if ( cociente >= firstwarning) { + alerta(\colorninety,\fillcolorninety); + if ( cociente >= secondwarning) {alerta(\colorninetyfive,\fillcolorninetyfive);} +} +if( (death == 1) && ( resta > duration*1.10 )) { closeDoc();} +% +%console.println("aaa " + fuente+ " " + duration); +if (iop == 1) +{fecha1= dia+"/"+mes+"/"+year+ " "+horas + ":"+minutos+":"+segundos; +casio1=horas;casio2=minutos;casio3=segundos;} +else +{fecha1=dia+"/"+mes+"/"+year+ " "+htexto+":"+mtexto+":"+stexto; +casio1=htexto;casio2=mtexto;casio3=stexto;} +%this.getField("resultado1").value=fecha1; +%this.getField("resultado1").textFont=fuente; +%this.getField("resultado1").fillColor=["T"]; +%this.getField("resultado1").strokeColor=["T"]; +% +this.getField("hours").value=casio1; +this.getField("hours").textFont=fuente; +%this.getField("hours").fillColor=["T"]; +this.getField("hours").strokeColor=["T"]; +% +this.getField("minutes").value=casio2; +this.getField("minutes").textFont=fuente; +%this.getField("minutes").fillColor=["T"]; +this.getField("minutes").strokeColor=["T"]; +% +this.getField("seconds").value=casio3; +this.getField("seconds").textFont=fuente; +%this.getField("seconds").fillColor=["T"]; +this.getField("seconds").strokeColor=["T"]; +casio4=htexto; +this.getField("cronohours").value=casio4; +this.getField("cronohours").textFont=fuente; +%this.getField("cronohours").fillColor=["T"]; +this.getField("cronohours").strokeColor=["T"]; +casio5=mtexto; +this.getField("cronominutes").value=casio5; +this.getField("cronominutes").textFont=fuente; +%this.getField("cronominutes").fillColor=["T"]; +this.getField("cronominutes").strokeColor=["T"]; +casio6=stexto; +this.getField("crseconds").value=casio6; +this.getField("crseconds").textFont=fuente; +%this.getField("crseconds").fillColor=["T"]; +this.getField("crseconds").strokeColor=["T"]; +casio7=dia; +this.getField("day").value=casio7; +this.getField("day").textFont=fuente; +this.getField("day").fillColor=["T"]; +this.getField("day").strokeColor=["T"]; +casio8=mes; +this.getField("month").value=casio8; +this.getField("month").textFont=fuente; +this.getField("month").fillColor=["T"]; +this.getField("month").strokeColor=["T"]; +casio9=year; +this.getField("year").value=casio9; +this.getField("year").textFont=fuente; +this.getField("year").fillColor=["T"]; +this.getField("year").strokeColor=["T"]; +this.getField("separatordate").textFont=fuente; +this.getField("separatordate").fillColor=["T"]; +this.getField("separatordate").strokeColor=["T"]; +this.getField("separatortime").textFont=fuente; +%this.getField("separatortime").fillColor=["T"]; +this.getField("separatortime").strokeColor=["T"]; +this.getField("cronobox").strokeColor=["T"]; +%this.getField("button1").textFont=fuente; +this.getField("button1").fillColor=["T"]; +this.getField("button1").strokeColor=["T"]; +%this.getField("button2").textFont=fuente; +this.getField("button2").fillColor=["T"]; +this.getField("button2").strokeColor=["T"]; +} +% +function formateo(uin) +{ +if (uin <= 9) uin = "0" + uin; +return uin; +} +} + +%\initclock +% +\endinput |