我对 有疑问tdclock
。在一篇帖子我看到,它可以用一些命令替换。有人能帮我怎么做吗?我需要把这些命令放在 CMD 或其他地方吗?请帮忙。
答案1
更新
此处报告的问题已由软件包作者在最新版本 2.5 (2014-02-21) 中修复。不再需要进行下面列出的手动更改。
这是一个错误tdclock
:每当在 AdobeReader 中同时打开两个带有活动时钟的文档时,其中至少有一个文档无法正确呈现时钟。
另一个烦恼是工作时钟的背景阴影。可以通过将文本字段设置为只读来解决此问题tdclock.sty
。
要解决这两个问题,您可以应用补丁文件下面使用patch
,或通过sed
命令行实用程序,如下所示https://tex.stackexchange.com/a/76145。这两个命令在标准 Linux 机器和 Windows PC 的 Cygwin 环境中均可用。sed
也可用作独立二进制适用于 Windows 的可直接使用的CMD
。
--- tdclock.sty 2013-12-05 08:41:41.000000000 +0100 +++tdclock.sty.fix 2013-12-05 08:43:00.000000000 +0100 @@ -1,4 +1,4 @@ -\ProvidesPackage{tdclock} [2009/06/01 v2.2 时钟配件] +\ProvidesPackage{tdclock} [2013/12/05 v2.3 时钟配件] % % 路易斯·兰德斯 [电子邮件保护] @@ -154,21 +154,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 宽度 0pt 高度 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, 值={}]{}\kern-60pt\kern \a@a pt\kern \b@b\clock@fontsize\kern \b@b\clock@fontsize\vrule 宽度 0pt 高度 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 宽度 0pt 高度 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,值=/]{}\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 宽度 0pt 高度 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,值=:]{}\kern-0.90\clock@fontsize\kern\a@one pt\kern \b@one\clock@fontsize\vrule width 0pt height 2pt}}}}% @@ -176,7 +176,7 @@ \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 宽度 0pt 高度 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, 值={}]{}\kern-1.31\clock@fontsize\kern\a@a pt\kern \b@b\clock@fontsize\vrule 宽度 0pt 高度 2pt}}}% @@ -191,23 +191,23 @@ \def\initfields{% \begin{表格} -\mbox{\TextField[format=\startclock,name=resultado2, hidden=true, width=0truecm, height=0truecm, bordercolor= 1 1 1, backgroundcolor= 1 1 1,value={}]{}} +\mbox{\TextField[readonly=true,format=\startclock,name=resultado2, hidden=true, width=0truecm, height=0truecm, bordercolor= 1 1 1, backgroundcolor= 1 1 1,value={}]{}} \end{表格}% -%\TextField[name=resultado1, hidden=true, width=0pt, height=0pt,charsize=0pt]{} -\TextField[名称=hours, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt]{}% -\TextField[名称=分钟,隐藏=真,宽度=0pt,高度=0pt,字符大小=0pt]{}% -\TextField[名称=秒,隐藏=真,宽度=0pt,高度=0pt,字符大小=0pt]{}% -\TextField[名称=cronohours, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt]{}% -\TextField[名称=cronominutes, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt]{}% -\TextField[名称=crseconds, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt]{}% -\TextField[名称=day, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt]{}% -\TextField[名称=月份,隐藏=真,宽度=0pt,高度=0pt,字符大小=0pt]{}% -\TextField[名称=年份, 隐藏=真, 宽度=0pt, 高度=0pt, 字符大小=0pt]{}% +%\TextField[readonly=true,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[name=separatordate, hidden=true, width=0pt, height=0pt,charsize=0pt, value=/]{}% -\TextField[名称=separatortime, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt, 值=:]{}% -\TextField[名称=cronobox, hidden=true, 宽度=0pt, 高度=0pt, 字符大小=0pt, 值= ]{}% +\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{% @@ -230,11 +230,11 @@ % \def\startclock{% % -全局.iop; -全球.fuente; -全局.间隔; -全局.持续时间; -全球.死亡; +%iop; +%源; +%间隔; +%持续时间; +%死亡; % var iop=1; var fuente = eval(\clock@font); @@ -251,9 +251,9 @@ 函数 rresett() { var fObj0 = new Date(); -global.horas0 = fObj0.getHours(); -global.minutos0 = fObj0.getMinutes(); -global.segundos0 = fObj0.getSeconds(); +horas0 = fObj0.获取小时数(); +minutos0 = fObj0.获取分钟数(); +segundos0 = fObj0.getSeconds(); } % 函数 alerta(kolor,kolorfill) @@ -284,7 +284,7 @@ 分钟数 = formateo(分钟数); 秒 = formateo(秒); % -resta = (eval(horas1-global.horas0)*60+eval(minutos1-global.minutos0))*60+eval(segundos1-global.segundos0); +resta = (eval(时间1-时间0)*60+eval(分钟1-分钟0))*60+eval(秒1-秒0); h = Math.floor(resta/3600); htexto=formateo(h); m = Math.floor((resta-3600*h)/60); mtexto=formateo(m); s = 休息-3600*小时-60*米; stexto=格式(s);