summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/tdclock/Changelog12
-rw-r--r--Master/texmf-dist/doc/latex/tdclock/README11
-rw-r--r--Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.pdfbin131164 -> 87447 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex22
-rw-r--r--Master/texmf-dist/doc/latex/tdclock/tdclock-doc.pdfbin135432 -> 157446 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tdclock/tdclock-doc.tex25
-rw-r--r--Master/texmf-dist/tex/latex/tdclock/tdclock.sty130
7 files changed, 150 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/latex/tdclock/Changelog b/Master/texmf-dist/doc/latex/tdclock/Changelog
new file mode 100644
index 00000000000..4a9a25e4cba
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/tdclock/README b/Master/texmf-dist/doc/latex/tdclock/README
index 23d0f1ce1ec..95a1fda9f47 100644
--- a/Master/texmf-dist/doc/latex/tdclock/README
+++ b/Master/texmf-dist/doc/latex/tdclock/README
@@ -1,12 +1,13 @@
Package name: tdclock (The LaTeX tdclock)
Package authors: Luis Randez, Juan I. Montijano
-Version/Release: 2.2
+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.
+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:
@@ -14,4 +15,4 @@ Installation:
Copy the package file tdclock.sty to a directory where LATEX can find it.
-June 2009 \ No newline at end of file
+February 2014
diff --git a/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.pdf b/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.pdf
index 2e9628a2600..4e0c72d4a7f 100644
--- a/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.pdf
+++ b/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex b/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex
index c90ed74894e..b12ffba4e8d 100644
--- a/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex
+++ b/Master/texmf-dist/doc/latex/tdclock/tdclock-beamer-example.tex
@@ -3,7 +3,7 @@
%\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}
+timewarningfirst=50,timewarningsecond=80,resetatpages=2]{tdclock}
%\usepackage{times}
%\usepackage{helvet}
@@ -19,6 +19,7 @@ timewarningfirst=50,timewarningsecond=80]{tdclock}
\begin{document}
\frame{\titlepage}
+%\pagereset{-1}
\begin{frame}[t]
\frametitle{Introduction}
@@ -37,6 +38,24 @@ We are putting here a clock with the macro \quad
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
@@ -97,7 +116,6 @@ To do that, we have used
\texttt{$\backslash$resetcrono\{$\backslash$beamerbutton\{reset\}\}}
}
-
\end{frame}
%
diff --git a/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.pdf b/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.pdf
index 8fd4a8d8d35..42978bfed65 100644
--- a/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.pdf
+++ b/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.tex b/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.tex
index 2c851f48a9e..134b1b7634b 100644
--- a/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.tex
+++ b/Master/texmf-dist/doc/latex/tdclock/tdclock-doc.tex
@@ -4,9 +4,9 @@
\usepackage{hyperref}
\usepackage{xkeyval}
\usepackage[font=Times,timeinterval=10,timeduration=2.0, timewarningfirst=50,timewarningsecond=70,
-fillcolorwarningsecond=white!60!yellow, timedeath=0]{tdclock}
+fillcolorwarningsecond=white!60!yellow, timedeath=0,resetatpages=3]{tdclock}
-\title{The Ticking Digital Clock \texttt{tdclock} package v2.2}
+\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}
@@ -101,6 +101,25 @@ time orders.
\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
@@ -321,4 +340,4 @@ macro & result & action \\
\texttt{$\backslash$factorclockfont\{2.0\}$\backslash$tdtime} & \factorclockfont{2.0}\tdtime \\ \hline
\end{tabular}
-\end{document} \ No newline at end of file
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/tdclock/tdclock.sty b/Master/texmf-dist/tex/latex/tdclock/tdclock.sty
index 3608eb4c534..e70e6747ef1 100644
--- a/Master/texmf-dist/tex/latex/tdclock/tdclock.sty
+++ b/Master/texmf-dist/tex/latex/tdclock/tdclock.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{tdclock} [2009/06/01 v2.2 clock accessory]
+\ProvidesPackage{tdclock} [2014/02/21 v2.5 clock accessory]
%
% Luis Randez randez@unizar.es
@@ -27,7 +27,9 @@
\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}}
@@ -39,9 +41,15 @@
\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}
@@ -154,21 +162,21 @@
\def\tdyear{%
\clock@setfonsize\clock@setheight\clock@setfontcolor%\clock@setwidth
-\setbox\sizebox=\hbox{\TextField[name=year, width=60pt, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize]{}}%
+\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[ width=60pt, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize,value=/]{}}%
+\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[name=separatortime, width=0.90\clock@fontsize, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize,value=:]{}}%
+\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}}}}%
@@ -176,7 +184,7 @@ readonly=true,value=:]{}\kern-0.90\clock@fontsize\kern\a@one pt\kern \b@one\cloc
\def\clockfield#1{%
\clock@setfonsize\clock@setheight\clock@setfontcolor%\clock@setwidth
-\setbox\sizebox=\hbox{\TextField[name=#1, width=1.31\clock@fontsize, height=\clock@height, align = 0, color =\clock@fontcolor, charsize = \clock@fontsize]{}}%
+\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}}}}%
@@ -186,7 +194,7 @@ value={}]{}\kern-1.31\clock@fontsize\kern\a@a pt\kern \b@b\clock@fontsize\vrule
\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[name=cronobox, width=1.01\wd\sizebox, height=1.08\ht\sizebox, align = 0, readonly=true,value= ]{}}}}%
+{\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{%
@@ -194,22 +202,22 @@ value={}]{}\kern-1.31\clock@fontsize\kern\a@a pt\kern \b@b\clock@fontsize\vrule
\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[name=hours, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=minutes, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=seconds, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=cronohours, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=cronominutes, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=crseconds, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=day, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=month, hidden=true, width=0pt, height=0pt,charsize=0pt]{}%
-\TextField[name=year, 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[name=separatordate, hidden=true, width=0pt, height=0pt,charsize=0pt, value=/]{}%
-\TextField[name=separatortime, hidden=true, width=0pt, height=0pt,charsize=0pt, value=:]{}%
-\TextField[name=cronobox, hidden=true, width=0pt, height=0pt,charsize=0pt, value= ]{}%
+\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%
@@ -217,24 +225,18 @@ value={}]{}\kern-1.31\clock@fontsize\kern\a@a pt\kern \b@b\clock@fontsize\vrule
\unskip
}
%
-%
\def\resetclock{%
fecha1 = rresett();
-}%
-%
+}
%
\def\auxiliar{%
var iop= -iop;
}%
%
-%
\def\startclock{%
%
-global.iop;
-global.fuente;
-global.interval;
-global.duration;
-global.death;
+%global.page;
+%global.run;
%
var iop=1;
var fuente=eval(\clock@font);
@@ -242,18 +244,34 @@ var duration=eval(\clock@duration)*60;
var firstwarning=eval(\clock@timewarningfirst)/100;
var secondwarning=eval(\clock@timewarningsecond)/100;
var death=eval(\clock@death);
-%var interval=eval(#2);
-%var fuente="clock";
+%
+var page=0;
+var all="all";
+var none="none";
+var resetatpages=[\clock@resetatpages];
+%
fecha1 = rresett();
fecha1 = reloj();
-run = app.setInterval("reloj();",\clock@interval000);
+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();
-global.horas0 = fObj0.getHours();
-global.minutos0 = fObj0.getMinutes();
-global.segundos0 = fObj0.getSeconds();
+horas0 = fObj0.getHours();
+minutos0 = fObj0.getMinutes();
+segundos0 = fObj0.getSeconds();
}
%
function alerta(kolor,kolorfill)
@@ -268,9 +286,42 @@ this.getField("separatortime").textColor=kolor;
this.getField("cronobox").fillColor=kolorfill;
}
%
-function reloj()
+%
+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());
@@ -284,7 +335,8 @@ 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-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);
@@ -308,7 +360,7 @@ if ( cociente >= firstwarning) {
}
if( (death == 1) && ( resta > duration*1.10 )) { closeDoc();}
%
-console.println("aaa " + fuente+ " " + duration);
+%console.println("aaa " + fuente+ " " + duration);
if (iop == 1)
{fecha1= dia+"/"+mes+"/"+year+ " "+horas + ":"+minutos+":"+segundos;
casio1=horas;casio2=minutos;casio3=segundos;}
@@ -377,7 +429,6 @@ this.getField("button1").strokeColor=["T"];
%this.getField("button2").textFont=fuente;
this.getField("button2").fillColor=["T"];
this.getField("button2").strokeColor=["T"];
-%
}
%
function formateo(uin)
@@ -390,4 +441,3 @@ return uin;
%\initclock
%
\endinput
-