summaryrefslogtreecommitdiff
path: root/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2018-07-11 11:07:49 +0900
committerNorbert Preining <norbert@preining.info>2018-07-11 11:09:14 +0900
commit5ac17938ed66a9c6aa7bedeb0e10f7337b0da25b (patch)
treeb15692b5e345e60a6a5e03b56007f6721070555f /texmf-dist
parent8593cff280f56b5bf84d6569e8fb35d3dbb0d60b (diff)
datepicker-pro update
Diffstat (limited to 'texmf-dist')
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/README.md6
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/datepicker-pro.pdfbin0 -> 98591 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.pdfbin399987 -> 575036 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.tex172
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.pdfbin0 -> 355568 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.tex40
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/icons/dp_icon3.pdfbin0 -> 21672 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/icons/dp_icon4.pdfbin0 -> 32733 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/icons/dp_icon5.pdfbin0 -> 22993 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/icons/dp_icon6.pdfbin0 -> 36598 bytes
-rw-r--r--texmf-dist/doc/latex/datepicker-pro/icons/dp_icon7.pdfbin0 -> 36542 bytes
-rw-r--r--texmf-dist/source/latex/datepicker-pro/datepicker-pro.dtx218
-rw-r--r--texmf-dist/source/latex/datepicker-pro/datepicker-pro.ins2
-rw-r--r--texmf-dist/tex/latex/datepicker-pro/datepicker-pro.sty176
-rw-r--r--texmf-dist/tex/latex/datepicker-pro/dp-pro.cfg7
15 files changed, 391 insertions, 230 deletions
diff --git a/texmf-dist/doc/latex/datepicker-pro/README.md b/texmf-dist/doc/latex/datepicker-pro/README.md
index e35a0b87..2492c465 100644
--- a/texmf-dist/doc/latex/datepicker-pro/README.md
+++ b/texmf-dist/doc/latex/datepicker-pro/README.md
@@ -1,6 +1,6 @@
The datepicker-pro Package
Author: D. P. Story
-Dated: 2016/05/06
+Dated: 2018-07-02
One of the (many) deficiencies of Adobe Acrobat Reader/Adobe Acrobat is that
they have never supported a proper date picker. This package now supplies
@@ -17,7 +17,9 @@ As with all such special features, to experience the datepicker, Adobe Reader
or Acrobat are needed. Most other PDF readers do not support form field, rich
media annotations, and JavaScript.
-Unpack the distribution by latexing datepicker-pro.ins.
+What's New (2018/07/02) Fixed a problem when the month data contain glyphs
+beyond Basic Latin. Specify this using unicode, eg, M\u00E4rz (German for
+March).
Enjoy.
diff --git a/texmf-dist/doc/latex/datepicker-pro/datepicker-pro.pdf b/texmf-dist/doc/latex/datepicker-pro/datepicker-pro.pdf
new file mode 100644
index 00000000..a5220367
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/datepicker-pro.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.pdf b/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.pdf
index 56478178..891c636d 100644
--- a/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.pdf
+++ b/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.tex b/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.tex
index 19f5828a..76e9f4d9 100644
--- a/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.tex
+++ b/texmf-dist/doc/latex/datepicker-pro/datepickerpro_man.tex
@@ -17,6 +17,7 @@
forcolorpaper,tight*,latextoc,pro},%usesf,
eforms,uselayers,graphicxsp={showembeds},aebxmp
]{aeb_pro}
+\usepackage{xbmks}
%\usepackage{myriadpro} %[usecmtt]
\usepackage[altbullet]{lucidbry}
\usepackage{datepicker-pro}
@@ -25,9 +26,12 @@
tex/latex/aeb/aebpro/datepicker-pro/swf}
\setpickerIcon{../icons/dp_icon1.pdf}{date1,PickADate}
\setpickerIcon{../icons/dp_icon2.pdf}{GERDate}
-\setlength{\marginparwidth}{2in}
+\setlength{\marginparwidth}{1.25in}
%\usepackage{array}
+\DeclareInitView{layoutmag={navitab:UseOutlines}}
+\xbmksetup{colors={int=red},styles={intbf}}
+
%\usepackage{makeidx}
%\makeindex
@@ -45,13 +49,13 @@
\DeclareDocInfo
{
university={\AcroTeX.Net},
- title={\texorpdfstring{datepicker-pro\\[1em]}
+ title={\texorpdfstring{The \textsf{datepicker-pro} Package\\[1em]}
{datepicker-pro: }Picking a date using Flash},
author={D. P. Story},
email={dpstory@acrotex.net},
subject={Documentation of datepicker-pro from for AeB Pro},
talksite={\url{www.acrotex.net}},
- version={1.0},
+ version={1.3, 2018/07/02},
keywords={AeB, Adobe Acrobat, JavaScript, datepicker, FLEX},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, D. P. Story},
@@ -73,11 +77,38 @@
%\pagestyle{empty}
%\parindent0pt\parskip\medskipamount
+\chngDocObjectTo{\newDO}{doc}
\begin{docassembly}
+var titleOfManual="The Datepicker Pro Manual";
+var manualfilename="Manual_BG_Print_ddp.pdf";
+var manualtemplate="Manual_BG_Blue.pdf"; // Blue, Green, Brown
+var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate;
+var doc;
+var buildIt=false;
+if ( buildIt ) {
+ console.println("Creating new " + manualfilename + " file.");
+ doc = \appopenDoc({cPath: _pathToBlank, bHidden: true});
+ var _path=this.path;
+ var pos=_path.lastIndexOf("/");
+ _path=_path.substring(0,pos)+"/"+manualfilename;
+ \docSaveAs\newDO ({ cPath: _path });
+ doc.closeDoc();
+ doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true});
+ f=doc.getField("ManualTitle");
+ f.value=titleOfManual;
+ doc.flattenPages();
+ \docSaveAs\newDO({ cPath: manualfilename });
+ doc.closeDoc();
+} else {
+ console.println("Using the current "+manualfilename+" file.");
+}
+var _path=this.path;
+var pos=_path.lastIndexOf("/");
+_path=_path.substring(0,pos)+"/"+manualfilename;
\addWatermarkFromFile({
bOnTop:false,
-% cDIPath:"/C/AcroTeX/AcroTeX/ManualBGs/Manual_BG_Print_AeB.pdf"
- cDIPath:"C:/Users/Public/Documents/ManualBGs/Manual_BG_Print_AeB.pdf"
+ bOnPrint:false,
+ cDIPath:_path
});
\executeSave();
\end{docassembly}
@@ -86,6 +117,15 @@
\maketitle
+\pdfbookmarkx[1]{Title Page}[action={\Named{FirstPage}}]{TitlePage}
+\pdfbookmarkx[1]{Links to AcroTeX.Net}[action={/S/GoTo/D(undefined)},%
+ color=magenta,style={bf}]{acrotex}
+\belowpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},%
+ color=magenta,style={bf}]{home}
+\belowpdfbookmarkx{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},%
+ color=magenta,style={bf}]{blog}
+
+
\selectColors{linkColor=black}
\tableofcontents
\selectColors{linkColor=webgreen}
@@ -118,6 +158,45 @@ optional. The first argument is used to modify the date picker, the second
is a unique name (\texttt{date1} in the above example), these are followed
by the width and height of the text input field.
+\paragraph*{Evolution of date picking.} It has been several years since I first issued
+the \pkg{datepicker-pro} package. Over that period, two events impact this package:
+\begin{enumerate}
+ \item Adobe has finally provided native support for date picking
+ through its \app{Acrobat Reader DC} application (and in
+ \app{Acrobat} itself, of course). Experience the date field below.
+\begin{quote}%\previewOn
+ \textField[\AA{%
+ \AAKeystroke{AFDate_KeystrokeEx("m/d/yy")}
+ \AAFormat{AFDate_FormatEx("m/d/yy")}
+ }]{goNatDate}{1in}{11bp}\quad
+\begin{minipage}[t]{2in}\small
+\begin{Verbatim}
+\textField[\AA{%
+ \AAKeystroke{AFDate_KeystrokeEx("m/d/yy")}
+ \AAFormat{AFDate_FormatEx("m/d/yy")}
+}]{goNatDate}{1in}{11bp}
+\end{Verbatim}
+\end{minipage}
+\end{quote}
+This feature has been long in coming and is finally here. Of course, this
+date picking feature is not supported in any other PDF viewer, but then,
+these non-Adobe PDF viewers do not support the approach taken by this package
+either.
+
+To my knowledge, there is no way to control the design of the calendar that
+appears as a popup; for example, a calendar in the German language cannot
+be specified. Going under the assumption that the calendar will be in the
+language of the \app{Reader DC} being used, I downloaded the German version
+of \app{Reader DC} and determined that the calendar is not
+localized to the viewer language. That's not good.
+
+\item This package uses \app{Flash} technology, which is still supported by
+ Adobe, but it has drawn some of the (user-interface) features offered
+ to \app{Acrobat} users. \app{Flash} is probably not supported by any
+ other PDF viewer.
+\end{enumerate}
+To take full advantage of this package, the end-user must use \app{Reader DC}
+or higher.
\section{Requirements}
@@ -154,20 +233,20 @@ creation of PostScript using \textsf{dvips} and
\subsection{Transparency requirements}
-Transparency is only required to make the RMA transparent; unlike a form
-field, a RMA does not have a hidden property, so we try to make it
+Transparency is only required to make the \EXT{RMA} transparent; unlike a form
+field, a \EXT{RMA} does not have a hidden property, so we try to make it
transparent.
-To get the transparency effect, you must distill using a JOBOPTIONS file
+To get the transparency effect, you must distill using a \EXT{JOBOPTIONS} file
that supports transparency. The \pkg{datepicker-pro} package comes with an
-\textbf{Distiller} job options file named
+\app{Distiller} job options file named
\texttt{Standard\_transparency.joboptions}. Instead of going through
the above rather tedious instructions, drop this file in the place
-where Distiller expects to find its own {JOBOPTIONS}
-files.\footnote{Go to Settings \texttt{>} Edit Adobe PDF Settings\dots
-in the Distiller application window, then click the \texttt{SaveAs}
+where \app{Distiller} expects to find its own \EXT{JOBOPTIONS}
+files.\footnote{Go to \textsf{Settings > Edit Adobe PDF Settings}
+in the \app{Distiller} application window, then click the \textsf{SaveAs}
button. A \textsf{Save Adobe PDF Settings As} dialog box opens and
-you can then see where \textbf{Distiller} likes to save its
+you can then see where \app{Distiller} likes to save its
\texttt{.joboptions} file. Copy the provided \texttt{.joboptions} to
the folder and restart Distiller, the \texttt{Standard\_transparency}
should now be visible in the drop down \textsf{Default Settings}
@@ -176,15 +255,16 @@ list.}
If you distill without this \texttt{Standard\_transparency}, you get an
error message in the \textbf{Distiller} log that reads like this:
\begin{small}
-\begin{verbatim}
+\begin{Verbatim}
%%[Error: The PostScript contains Transparency pdfmark, job aborted.]%%
%%[ /AllowTransparency is false in job option settings.]%%
%%[ Error: undefined; OffendingCommand: pdfmark;
ErrorInfo: Transparency Group ]%%
-\end{verbatim}
+\end{Verbatim}
\end{small}%
-This suggests that you should use a JOBOPTIONS file that
-supports transparency!
+This suggests that you should use a \EXT{JOBOPTIONS} file that supports
+transparency! Look for the \texttt{Standard\_transparency.joboptions} file in
+the \texttt{joboptions} folder of this distribution.
\subsection{Viewing requirements}
@@ -194,11 +274,13 @@ effects of the \pkg{datepicker-pro} package. Most third-party PDF readers do
not support interactive form fields, rich-media annotations, and Acrobat JavaScript API. Consumers
of your document need to use \app{Adobe Reader} or \app{Acrobat}.
-\section{Options of this package}
+%\section{Options of this package}
+%There are no options for this package.
-There are no options for this package.
+\section{The \texorpdfstring{\protect\pkg{datepicker-pro}}{datepicker-pro} commands}
-\section{The datepicker-pro commands}
+We document the commands required in the preamble, the configuration file, and one that can
+be placed in the preamble or the body of the document.
\subsection{Commands for the preamble}
@@ -245,7 +327,8 @@ is the \texttt{rmannot} option for \pkg{aeb\_pro}.
\end{dCmd}
\endgroup\noindent
The \cs{useFLEXVer}\DM{useFLEXVer} command declare what version of \EXT{FLEX}
-is to be used, choices are 3 or 4, corresponding to \EXT{FLEX~3.6} and
+is to be used,\footnote{Adobe has since re-branded \EXT{FLEX} to \app{Adobe
+Flash Builder}.} choices are 3 or 4, corresponding to \EXT{FLEX~3.6} and
\EXT{FLEX~4.5}, respectively. I've found the version~4 is very slow in
loading; not recommended. If \cs{useFLEXVer} is not present in the preamble,
version~3 is used by default.
@@ -257,7 +340,9 @@ command is defined in \pkg{eforms} is simply allows you construct paths
with normally forbidden characters. The \cs{dppPath} command is expected
by \pkg{datepicker-pro} to be defined; otherwise, the file will not
compile. The \meta{path} needs to be an \emph{absolute path} on your file
-system that points to the location of the \EXT{SWF} files.
+system that points to the location of the \EXT{SWF} files. The declaration
+of the path \cs{dppPath} may be moved to the configuration file\marginpar{\small\raggedleft{config file}},
+the topic of \hyperref[s:config]{Section~\ref*{s:config}}
Finally, the \cs{setpickerIcon}\DM{setpickerIcon} declares the \meta{path} to
the date picker icon; this is a relative (or absolute) path and includes the
@@ -269,8 +354,9 @@ The dimensions of the icon are determined by the command declarations
\cs{setpickerIconWidth} and \cs{setpickerIconHeight}, these are discussed in
\hyperref[s:PB]{Section~\ref*{s:PB}}. These latter two commands may be
declared in the preamble or in the body of the document. This package
-distribution provides to icon files \texttt{dp\_icon1.pdf} and
-\texttt{dp\_icon2.pdf} found in the \texttt{icons} folder.
+distribution provides to icon files \texttt{dp\_icon1.pdf},
+\texttt{dp\_icon2.pdf}, \dots, \texttt{dp\_icon7.pdf}, found in the \texttt{icons} folder.\footnote{My thanks to
+J\"{u}rgen Gilg for providing additional icon files.}
\newtopic\noindent
@@ -285,13 +371,28 @@ In this example, there are three date fields created, each of them is
given the appearance of the icon file \texttt{dp\_icon2.pdf}.
Or, we can declare,
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()]
-\definePath{\dppPath}{C:/Users/Public/Documents/My TeX Files/%
- tex/latex/aeb/aebpro/datepicker-pro/swf}
+% !normalfont!texttt(\dppPath) moved to !texttt(dp-pro.cfg), see !hyperref[s:config](Section !ref(s:config)).
\setpickerIcon{../icons/dp_icon1.pdf}{date1,PickADate}
\setpickerIcon{../icons/dp_icon2.pdf}{GERDate}
\end{Verbatim}
where a different icon is used for the \texttt{GerDate} date picker.
+\subsection{The configuration file}\label{s:config}
+
+Rather than placing the path to the \texttt{swf} folder of this distribution in each
+file, you can place the declared path in the package configuration file, \texttt{dp-pro.cfg}.
+The file is found in the root directory of the package distribution. An example of its contents
+is given below.
+\begin{Verbatim}
+%
+% datepicker-pro configuration file
+%
+\definePath{\dppPath}{C:/Users/Public/Documents/My TeX Files/%
+ tex/latex/aeb/aebpro/datepicker-pro/swf}
+\end{Verbatim}
+Edit this file to reflect the absolute path to the \texttt{swf} folder of
+this distribution on your file system.
+
\subsection{Commands for the body of the document}
Within the body of the document, there is only one command, \cs{datepicker}:
@@ -302,7 +403,7 @@ Within the body of the document, there is only one command, \cs{datepicker}:
\endgroup\noindent
The \meta{name} argument should consist only of letters or numbers
(however, a number must not be the first character in the name); for
-example, \texttt{date1} or \texttt{PickADate} are acceptable. The
+example, \texttt{date1} or \texttt{PickADate} is acceptable. The
\meta{name} argument is used to build names for the components of
the date picker field. The input text field, which is set to read only, is
named \texttt{txt\anglemeta{name}}, the push button is named
@@ -315,7 +416,7 @@ to the input text field only.
Now for the \meta{options} argument of \cs{datepicker}. The options consist
of key-value pairs (\texttt{key=value}) and are rather numerous.
\begin{itemize}\def\DescribeMacro#1{}
-\item \textbf{Format date string.}
+\item \textbf{Format date string}\vskip-.5\baselineskip\kern0pt
\begin{itemize}
\item\texttt{formatstring}: The value of the \texttt{formatstring} key
uses various combinations of \texttt{M}, \texttt{D}, \texttt{Y},
@@ -335,7 +436,6 @@ of key-value pairs (\texttt{key=value}) and are rather numerous.
\item[] One example is \verb!formatstring={EEEE, DD. MMMM YYYY}!. The default
formatting string is \verb!formatstring={MM/DD/YYYY}!.
\end{itemize}
-%\define@key{ddp}{formatstring}[MM/DD/YYYY]{\def\dpp@FormatStr{#1}}
\item \textbf{Formatting the calendar.} The \textsf{dateChooser} control that
is used in the \EXT{SWF} file contains the name of the month at the top
and the names of the days of the week just below it. By default, the
@@ -343,6 +443,10 @@ formatting string is \verb!formatstring={MM/DD/YYYY}!.
and the usual English days of the week names are used (Sunday, Monday,
\dots,Saturday). However, these can be changed through the use of
\texttt{monthnames} and \texttt{daynames} key.
+
+ \textbf{A note on Unicode.} Any glyph outside the range of Basic Latin (U0020-U007F), unicode notation may
+ be used. For example the German word for March is M\"{a}rz; it must be
+ specified as \verb~M\u00E4rz~, see the example of German dates presented below.
\begin{itemize}
\item \texttt{daynames}: The names of the days that appear on the
popup calendar. The value of \texttt{daynames} is a
@@ -415,10 +519,10 @@ On the German calendar, \emph{Montag} (\emph{Mo}) is the first day of the week.
daynamesLong={Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,%
Freitag,Samstag},
daynamesShort={So,Mo,Di,Mi,Do,Fr,Sa},
-monthnamesLong={Januar,Februar,März,April,Mai,Juni,Juli,%
- August,September,Oktober,November,Dezember},
+monthnamesLong={Januar,Februar,M\u00E4rz,April,Mai,Juni,%
+ Juli,August,September,Oktober,November,Dezember},
monthnamesShort={Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,%
- Okt,Nov,Dez},
+ Okt,Nov,Dez},
\end{Verbatim}
\item[] Again, always list January (\textsl{Januar}/\textsl{Jan}) and
Sunday (\textsl{Sonntag}/\textsl{So}) first.
@@ -467,7 +571,7 @@ of the German calendar illustrates.
daynamesLong={Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,%
Freitag,Samstag},
daynamesShort={So,Mo,Di,Mi,Do,Fr,Sa},
- monthnamesLong={Januar,Februar,März,April,Mai,Juni,Juli,%
+ monthnamesLong={Januar,Februar,M\u00E4rz,April,Mai,Juni,Juli,%
August,September,Oktober,November,Dezember},
monthnamesShort={Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,%
Sep,Okt,Nov,Dez},
@@ -491,7 +595,7 @@ The verbatim listing of this last field is given below.
daynamesLong={Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,%
Freitag,Samstag},
daynamesShort={So,Mo,Di,Mi,Do,Fr,Sa},
- monthnamesLong={Januar,Februar,März,April,Mai,Juni,Juli,%
+ monthnamesLong={Januar,Februar,M\u00E4rz,April,Mai,Juni,Juli,%
August,September,Oktober,November,Dezember},
monthnamesShort={Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,%
Sep,Okt,Nov,Dez},
diff --git a/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.pdf b/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.pdf
new file mode 100644
index 00000000..e297fcbd
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.tex b/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.tex
index df4bf011..58911a37 100644
--- a/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.tex
+++ b/texmf-dist/doc/latex/datepicker-pro/examples/datepicker_tst.tex
@@ -3,20 +3,25 @@
web={extended,tight*,usesf},
eforms,graphicxsp={showembeds}
]{aeb_pro}
+\usepackage{fancyvrb}
\usepackage{rmannot}
\usepackage{datepicker-pro}
\margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
\screensize{5in}{5.5in} % height,width dimensions
+\renewcommand{\hproportionwebtitle}{.5}
+
+\iconBenOpts{\F{-\FPrint}}
+
\DeclareDocInfo
{
- title=The datepicker-pro Package,
+ title=The datepicker-pro Package\texorpdfstring{\\[6pt]}{: }A date picker built by Adobe Flash Builder and AeB Pro,
author=D. P. Story,
university=Acro\negthinspace\TeX.Net,
email=dpstory@acrotex.net,
subject={Demo of the datepicker-pro package, SWF, rmannot, aeb\_pro, AcroTeX},
- keywords={Adobe Acrobat;JavaScript;Adobe FLEX 3;ActionScript},
+ keywords={Adobe Acrobat;JavaScript;Adobe Flash Builder;Flex;ActionScript},
talksite=\url{http://www.acrotex.net},
talkdate={\today},
copyrightStatus=True,
@@ -28,8 +33,11 @@
\parindent=0pt\parskip6pt\pagestyle{empty}
\useFLEXVer{3} % 3 or 4
-\definePath{\dppPath}{C:/Users/Public/Documents/My TeX Files/%
- tex/latex/aeb/aebpro/datepicker-pro/swf}
+% This path has been move to the dp-pro.cfg configuration file. Find
+% that file in the top level of this distribution and edit it to reflect
+% the path to the SWF folder of this distribution, it must be an absolution path.
+%\definePath{\dppPath}{C:/Users/Public/Documents/My TeX Files/%
+% tex/latex/aeb/aebpro/datepicker-pro/swf}
\setpickerIcon{../icons/dp_icon1.pdf}{PickADate}
\setpickerIcon{../icons/dp_icon2.pdf}{GERDate}
@@ -37,10 +45,9 @@
\maketitle
-\begin{center}\color{blue}\bfseries\large
-A date picker built by FLEX and AeB Pro\\[1em]
-D. P. Story
-\end{center}
+In this short demonstration file, we present two date field styles, one for the U.S.\
+and the another for German.
+
\begin{flushleft}
U.S.-style: Pick a date:\ \kern1bp\datepicker{PickADate}{1in}{11bp}\quad
(MM/DD/YYYY)
@@ -57,14 +64,14 @@ This is the default style: \verb!\datepicker{PickADate}{1in}{11bp}!
daynamesLong={Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,%
Freitag,Samstag},
daynamesShort={So,Mo,Di,Mi,Do,Fr,Sa},
- monthnamesLong={Januar,Februar,März,April,Mai,Juni,Juli,%
+ monthnamesLong={Januar,Februar,M\u00E4rz,April,Mai,Juni,Juli,%
August,September,Oktober,November,Dezember},
monthnamesShort={Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,%
Sep,Okt,Nov,Dez},
firstday=1,
widthOfWindow=200,
heightOfWindow=200,
-% voffset=-100
+ voffset=-100
}
% Di, 13. August 2013
@@ -73,9 +80,12 @@ This is the default style: \verb!\datepicker{PickADate}{1in}{11bp}!
German-style: Pick a date:\ \kern1bp\datepicker[\germanDates]{GERDate}{2in}{11bp}\quad
%(EEEE, DD. MMMM YYYY)
\end{flushleft}
+
+\end{document}
+
+
A custom style, the verbatim listing of this field is given below:
-\begingroup\small
-\begin{verbatim}
+\begin{Verbatim}[xleftmargin=\leftmargini,fontsize=\small,commandchars=!()]
\newcommand{\germanDates}
{%
formatstring={EEEE, DD. MMMM YYYY},
@@ -84,13 +94,13 @@ A custom style, the verbatim listing of this field is given below:
daynamesLong={Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,
Freitag,Samstag},
daynamesShort={So,Mo,Di,Mi,Do,Fr,Sa},
- monthnamesLong={Januar,Februar,März,April,Mai,Juni,Juli,
+ monthnamesLong={Januar,Februar,M!"(a)rz,April,Mai,Juni,Juli,
August,September,Oktober,November,Dezember},
monthnamesShort={Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,
Okt,Nov,Dez},
firstday=1,widthOfWindow=200,heightOfWindow=200
}
\datepicker[\germanDates]{GERDate}{2in}{11bp}
-\end{verbatim}
-\par\endgroup
+\end{Verbatim}
\end{document}
+
diff --git a/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon3.pdf b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon3.pdf
new file mode 100644
index 00000000..2862848a
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon3.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon4.pdf b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon4.pdf
new file mode 100644
index 00000000..7aa21bc7
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon4.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon5.pdf b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon5.pdf
new file mode 100644
index 00000000..fa85ae13
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon5.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon6.pdf b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon6.pdf
new file mode 100644
index 00000000..a89dc7da
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon6.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon7.pdf b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon7.pdf
new file mode 100644
index 00000000..5ffc168b
--- /dev/null
+++ b/texmf-dist/doc/latex/datepicker-pro/icons/dp_icon7.pdf
Binary files differ
diff --git a/texmf-dist/source/latex/datepicker-pro/datepicker-pro.dtx b/texmf-dist/source/latex/datepicker-pro/datepicker-pro.dtx
index ab133139..dff9da79 100644
--- a/texmf-dist/source/latex/datepicker-pro/datepicker-pro.dtx
+++ b/texmf-dist/source/latex/datepicker-pro/datepicker-pro.dtx
@@ -3,20 +3,20 @@
% makeindex -s gind.ist -o datepicker-pro.ind datepicker-pro.idx
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% datepicker-pro.sty package, 2016-05-06 %%
-%% Copyright (C) 2013-16 D. P. Story %%
+%% datepicker-pro.sty package, %%
+%% Copyright (C) 2013-2018 %%
%% dpstory@acrotex.net %%
%% %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
%% Distributed from CTAN archives in directory %%
-%% macros/latex/base/lppl.txt; either version 1 of the %%
-%% License, or (at your option) any later version. %%
+%% macros/latex/base/lppl.txt; either version 1.2 of %%
+%% the License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{datepicker-pro}
-%<package> [2016/05/06 v1.0 Date picker using FLEX]
+%<package> [2018/07/02 v1.3 Date picker using Adobe Flash Builder]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -37,11 +37,11 @@
\tableofcontents
\DocInput{\jobname.dtx}
\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
- \texttt{makeindex -s gind.ist -o aeb\_pro.ind aeb\_pro.idx} on the command line and recompile
- \texttt{aeb\_pro.dtx}.}
+ \texttt{makeindex -s gind.ist -o datepicker-pro.ind datepicker-pro.idx} on the command line and recompile
+ \texttt{datepicker-pro.dtx}.}
\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
- \texttt{makeindex -s gglo.ist -o aeb\_pro.gls aeb\_pro.glo} on the command line and recompile
- \texttt{aeb\_pro.dtx}.}
+ \texttt{makeindex -s gglo.ist -o datepicker-pro.gls datepicker-pro.glo} on the command line and recompile
+ \texttt{datepicker-pro.dtx}.}
\end{document}
%</driver>
% \fi
@@ -99,6 +99,7 @@
% \end{macrocode}
% \DescribeMacro{\dppToolTip} is used for setting the tool tip of the
% icon push button.
+% \changes{v1.2}{2016/05/17}{Added \string\cs{iconBenOpts} access to custom options for btn}
% \begin{macrocode}
\newcommand{\dppToolTip}[1]{\def\dpp@ToolTip{#1}}
\dppToolTip{Date Picker\n Click to toggle open and close\n
@@ -107,6 +108,8 @@
\pickerOpts{}
\newcommand{\pickerInputOpts}[1]{\def\dpp@pickerInputOpts{#1}}
\pickerInputOpts{}
+\newcommand{\iconBenOpts}[1]{\def\dpp@iconBenOpts{#1}}
+ \iconBenOpts{}
\newcommand{\pickersep}{3bp}
% \end{macrocode}
% Options passed through the first optional argument of \cs{datepicker}.
@@ -115,11 +118,11 @@
% combinations of \texttt{M}, \texttt{D}, \texttt{Y}, and possible
% \texttt{E} as well as spaces and delimiters to format the date string.
% The following table was extracted from the page:
-%\begin{quote}\small
+%\begin{flushleft}\small
% \nolinkurl{http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/formatters/DateFormatter.html}
% (found \href{http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/formatters/DateFormatter.html}{here})
-%\end{quote}
-%\begin{tabular}{cp{2in}cp{2in}}
+%\end{flushleft}
+%\par\noindent\begin{tabular}{cp{1in}cp{1in}}
% \textbf{Pattern} & \textbf{Examples} &\textbf{Pattern} & \textbf{Examples}\\
% \texttt{Y} & \texttt{YY = 05}\par \texttt{YYY=2005}\par\texttt{YYY=02005}&
% \texttt{D} &\texttt{D = 4}\par \texttt{DD=04}\\
@@ -182,15 +185,15 @@
% \IndexKey{daynamesLong}\texttt{daynamesLong} is used for formatting \texttt{DDDD}
% and \IndexKey{daynamesShort}\texttt{daynamesShort} is used with \texttt{DDD}.
% The values of each of these keys is a comma-delimited list of month or day names, for example
-%\begin{verbatim}
-% daynamesLong={Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,%
-% Freitag,Samstag},
-% daynamesShort={So,Mo,Di,Mi,Do,Fr,Sa},%
-% monthnamesLong={Januar,Februar,März,April,Mai,Juni,Juli,%
-% August,September,Oktober,November,Dezember},
-% monthnamesShort={Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,%
-% Okt,Nov,Dez},
-%\end{verbatim}
+%\begin{quote}\ttfamily\def\{{\char`\{}\def\}{\char`\}}
+% daynamesLong=\{Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,\%\\\null\qquad
+% Freitag,Samstag\},\\
+% daynamesShort=\{So,Mo,Di,Mi,Do,Fr,Sa\},\\
+% monthnamesLong=\{Januar,Februar,M\"arz,April,Mai,Juni,Juli,\%\\\null\qquad
+% August,September,Oktober,November,Dezember\},\\
+% monthnamesShort=\{Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,\%\\\null\qquad
+% Okt,Nov,Dez\},
+%\end{quote}
% \begin{macrocode}
\define@key{ddp}{monthnamesLong}[]{\def\ddp@monthnamesLong{#1}}
\define@key{ddp}{monthnamesShort}[]{\def\ddp@monthnamesShort{#1}}
@@ -218,16 +221,20 @@
% \end{macrocode}
% \DescribeMacro{\setPickerOpts} can be used to globally set picker options.
% \begin{macrocode}
-\newcommand{\setPickerOpts}[1]{%
- \edef\@tempexp{\noexpand\setkeys{ddp}{#1}}\@tempexp}
+\newcommand{\setPickerOpts}[1]{\let\ddp@bsSAVE\\\let\ddp@uSAVE\u
+ \def\\{\eqbs\eqbs}\def\u{\\u}%
+ \edef\x{\noexpand\setkeys{ddp}{#1}}\x
+ \let\\\ddp@bsSAVE\let\u\ddp@uSAVE
+}
% \end{macrocode}
% \DescribeMacro{\setPickerOptsToDefaults}resets picker options back to their
% original defaults.
% \begin{macrocode}
-\newcommand{\setPickerOptsToDefaults}{%
- \setkeys{ddp}{formatstring,daynames,monthnames,firstday,halign,%
- valign,hoffset,voffset,widthOfWindow,heightOfWindow,%
- monthnamesLong,monthnamesShort,daynamesLong,daynamesShort}%
+\newcommand{\setPickerOptsToDefaults}{\let\ddp@bsSAVE\\\let\ddp@uSAVE\u
+ \setkeys{ddp}{formatstring,daynames,monthnames,firstday,halign,%
+ valign,hoffset,voffset,widthOfWindow,heightOfWindow,%
+ monthnamesLong,monthnamesShort,daynamesLong,daynamesShort}%
+ \let\\\ddp@bsSAVE\let\u\ddp@uSAVE
}
\setPickerOptsToDefaults
% \end{macrocode}
@@ -236,21 +243,15 @@
% and closes the RMA.
% \begin{macrocode}
\def\dppBtnAction#1{%
- var annot = this.getAnnotRichMedia(this.pageNum,"#1");\r
- if (event.shift){\r\t
- this.resetForm(["txt#1"]);\r\t
- annot.activated=false;\r
- } else {
-% \end{macrocode}
-% If widget is already activated close it.
-% \begin{macrocode}
- if ( annot.activated )
- annot.activated=false;
+ var annot = this.getAnnotRichMedia(this.pageNum,"#1");\r
+ if (event.shift){\r\t
+ this.resetForm(["txt#1"]);\r\t
+ annot.activated=false;\r
+ } else
% \end{macrocode}
-% Else, if it is not open, open it.
+% If widget is already activated close it, otherwise open it.
% \begin{macrocode}
- else annot.activated=true;
- }
+ annot.activated=( annot.activated )?false:true;
}
% \end{macrocode}
% \DescribeMacro{\datepicker} is the primary command for this package. It produces
@@ -264,59 +265,62 @@
% \texttt{btn\#2}. There is also a hidden text field named \texttt{htxt\#2}.
% \begin{macrocode}
\newcommand{\datepicker}[4][]{\begingroup
+ \def\\{\eqbs\eqbs}\def\u{\\u}
% \end{macrocode}
% Expand \texttt{\#1} then get options. Useful if options are passed as a macro.
% \begin{macrocode}
- \edef\@tempexp{\noexpand\setkeys{ddp}{#1}}\@tempexp
+ \edef\x{\noexpand\setkeys{ddp}{#1}}\x
% \end{macrocode}
% Set window related parameters.
% \begin{macrocode}
- \setWindowDimPos{width={default=\ddp@widthOfWindow},%
- height={default=\ddp@heightOfWindow},%
- position={halign=\ddp@halign,valign=\ddp@valign,
- hoffset=\ddp@hoffset,voffset=\ddp@voffset}}%
+ \setWindowDimPos{width={default=\ddp@widthOfWindow},%
+ height={default=\ddp@heightOfWindow},%
+ position={halign=\ddp@halign,valign=\ddp@valign,
+ hoffset=\ddp@hoffset,voffset=\ddp@voffset}}%
% \end{macrocode}
% This hidden field holds the date selected in a standard format of \texttt{MM/DD/YYYY},
% this helps me to highlight the date when the user opens the date picker again.
% \begin{macrocode}
- \makebox[0pt][l]{\textField[\F{\FHidden}\BC{}\BG{}\W0
- ]{htxt#2}{1bp}{1bp}}%
+ \makebox[0pt][l]{\textField[\F{\FHidden}\BC{}\BG{}\W0
+ ]{htxt#2}{1bp}{1bp}}%
% \end{macrocode}
% The text field that holds the date selected by the user through the date package.
% \begin{macrocode}
\expandafter\textField\expandafter[\dpp@pickerInputOpts\Ff{\FfReadOnly}
- \AA{\AAValidate{%
- this.getAnnotRichMedia(this.pageNum,"#2").activated=false;}
- }]{txt#2}{#3}{#4}\makebox[0pt][r]{%
+ \AA{\AAValidate{%
+ this.getAnnotRichMedia(this.pageNum,"#2").activated=false;}
+ }]{txt#2}{#3}{#4}\makebox[0pt][r]{%
% \end{macrocode}
% Followed by the SWF widget, very small, invisible, transparent, and hidden by the
% text field.
% \begin{macrocode}
\rmAnnot[invisible,transparentBG,deactivated=pageclose,
- passcontext,\dpp@pickerOpts,windowed,name=#2,
- flashvars={field=txt#2&formatstring=\dpp@FormatStr
- \ifx\ddp@DayNames\@empty\else
- &daynames=\ddp@DayNames\fi
- \ifx\ddp@MonthNames\@empty\else
- &monthnames=\ddp@MonthNames\fi
- \ifnum\ddp@FirstDayOfWeek=0 \else
- &firstday=\ddp@FirstDayOfWeek\fi
- \ifx\ddp@monthnamesLong\@empty\else
- &monthnamesLong=\ddp@monthnamesLong\fi
- \ifx\ddp@monthnamesShort\@empty\else
- &monthnamesShort=\ddp@monthnamesShort\fi
- \ifx\ddp@daynamesLong\@empty\else
- &daynamesLong=\ddp@daynamesLong\fi
- \ifx\ddp@daynamesShort\@empty\else
- &daynamesShort=\ddp@daynamesShort\fi
- }
- ]{4bp}{4bp}{dppDatePicker}}\kern\pickersep
+ passcontext,\dpp@pickerOpts,windowed,name=#2,
+ flashvars={field=txt#2&formatstring=\dpp@FormatStr
+ \ifx\ddp@DayNames\@empty\else
+ &daynames=\ddp@DayNames\fi
+ \ifx\ddp@MonthNames\@empty\else
+ &monthnames=\ddp@MonthNames\fi
+ \ifnum\ddp@FirstDayOfWeek=0 \else
+ &firstday=\ddp@FirstDayOfWeek\fi
+ \ifx\ddp@monthnamesLong\@empty\else
+ &monthnamesLong=\ddp@monthnamesLong\fi
+ \ifx\ddp@monthnamesShort\@empty\else
+ &monthnamesShort=\ddp@monthnamesShort\fi
+ \ifx\ddp@daynamesLong\@empty\else
+ &daynamesLong=\ddp@daynamesLong\fi
+ \ifx\ddp@daynamesShort\@empty\else
+ &daynamesShort=\ddp@daynamesShort\fi
+ }
+ ]{4bp}{4bp}{dppDatePicker}}\kern\pickersep
% \end{macrocode}
% Finally, the push button that has an icon for its appearance.
+% \changes{v1.2}{2016/05/17}{Added access to custom options for btn}
% \begin{macrocode}
- \pushButton[\TU{\dpp@ToolTip}\H{O}\S{S}\BC{}\BG{}
- \FB{true}\I{null}\TP{1}\A{\JS{\dppBtnAction{#2}}}
- ]{btn#2}{\dp@iconWidth}{\dp@iconHeight}\endgroup
+ \expandafter\pushButton\expandafter[\dpp@iconBenOpts\TU{\dpp@ToolTip}
+ \H{O}\S{S}\BC{}\BG{}\FB{true}\I{null}\TP{1}
+ \A{\JS{\dppBtnAction{#2}}}
+ ]{btn#2}{\dp@iconWidth}{\dp@iconHeight}\endgroup
}
% \end{macrocode}
% \paragraph*{Installing the picker icon.} We use \cs{declareMultiImages} from AeB Pro
@@ -331,24 +335,24 @@
% of the \cs{datepicker} command).
% \begin{macrocode}
\newcommand{\setpickerIcon}[2]{% #1=path, #2=placement
- \let\@thesetoks\@empty
- \@for\@dppName:=#2\do{\edef\@thesetoks{\@thesetoks btn\@dppName,}}%
- \def\stripOffComma##1,\@nil{\def\@placeIcons{##1}}%
- \expandafter\stripOffComma\@thesetoks\@nil
- \declareImageAndPlacement{name=dppIcon,path=#1,%
- placement={\@placeIcons}}%
+ \let\@thesetoks\@empty
+ \@for\@dppName:=#2\do{\edef\@thesetoks{\@thesetoks btn\@dppName,}}%
+ \def\stripOffComma##1,\@nil{\def\@placeIcons{##1}}%
+ \expandafter\stripOffComma\@thesetoks\@nil
+ \declareImageAndPlacement{name=dppIcon,path=#1,%
+ placement={\@placeIcons}}%
% \end{macrocode}
% We then write a \texttt{execJS} environment to a CUT file, then
% input it back in immediately. Here, I'm using the write handle
% from the \textsf{comment} package, brought in by \textsf{AeB Pro}.
% At this moment, it is not being used.
% \begin{macrocode}
- \immediate\openout\CommentStream=ddpdocassmbly.cut
- \immediate\write\CommentStream{\string\begin{execJS}{dppicons}}%
- \immediate\write\CommentStream{\string\insertPreDocAssembly}%
- \immediate\write\CommentStream{\string\end{execJS}}%
- \immediate\closeout\CommentStream
- \input{ddpdocassmbly.cut}%
+ \immediate\openout\CommentStream=ddpdocassmbly.cut
+ \immediate\write\CommentStream{\string\begin{execJS}{dppicons}}%
+ \immediate\write\CommentStream{\string\insertPreDocAssembly}%
+ \immediate\write\CommentStream{\string\end{execJS}}%
+ \immediate\closeout\CommentStream
+ \input{ddpdocassmbly.cut}%
}
\@onlypreamble\setpickerIcon
% \end{macrocode}
@@ -374,16 +378,28 @@
% \texttt{value} is the value of the field that will appear to the user, and \texttt{svalue}
% is the value formatted using the date template \texttt{MM/DD/YYYY}. This latter value is used
% to highlight this date if the user returns to the same calendar to change the date.
+% \changes{v1.3}{2018/07/02}{Handle non-ascii glyphs with unicode representation}
% \begin{macrocode}
+function _dppConvUnicode(v){
+ var fm,re,str=v;
+ re=/\\u([0-8A-Fa-f]{4})/g
+ while ((fm=str.search(re))!=-1) {
+ str=str.substring(0,fm)
+ +eval("String.fromCharCode(0x"
+ +str.substring(fm+2,fm+6)+")")
+ +str.substring(fm+6);
+ }
+ return str;
+}
function setDateField(fname,value,svalue) {
%console.println("setDateField: fname="+fname
% +", value="+value+", svalue="+svalue);
- var f = this.getField(fname);
- var g = this.getField("h"+fname);
- if (f !=null ) {
- f.value = value;
- g.value = svalue;
- }
+ var f = this.getField(fname);
+ var g = this.getField("h"+fname);
+ if (f !=null ) {
+ f.value = _dppConvUnicode(value);
+ g.value = svalue;
+ }
}
% \end{macrocode}
%\DescribeMacro{getDateValue}The JavaScript function \texttt{getDateValue} is also called
@@ -392,12 +408,12 @@ function setDateField(fname,value,svalue) {
% \begin{macrocode}
function getDateValue(fname) {
%console.println("getDateValue: fname="+fname);
- var f = this.getField(fname);
- var g = this.getField("h"+fname);
- var value;
- if ( f != null )
- value = { value: f.value, svalue: g.value };
- return value;
+ var f = this.getField(fname);
+ var g = this.getField("h"+fname);
+ var value;
+ if ( f != null )
+ value = { value: f.value, svalue: g.value };
+ return value;
}
\end{insDLJS}
% \end{macrocode}
@@ -410,14 +426,18 @@ function getDateValue(fname) {
%\end{verbatim}
% \begin{macrocode}
\def\dpp@initdpp{%
- \@ifundefined{dppPath}{\PackageError{datepicker-pro}
- {You must specify the path to datepicker\flexVer.swf\MessageBreak
- by defining \string\dppPath, see documentation}{}}
- {\saveNamedPath{dppDatePicker}{\dppPath/datepicker\flexVer.swf}}%
+ \@ifundefined{dppPath}{\PackageError{datepicker-pro}
+ {You must specify the path to datepicker\flexVer.swf\MessageBreak
+ by defining \string\dppPath\space in the configuration file\MessageBreak
+ dp-pro.cfg, see documentation}{}}
+ {\saveNamedPath{dppDatePicker}{\dppPath/datepicker\flexVer.swf}}%
}
\AtBeginDocument{\dpp@initdpp}
% \end{macrocode}
+%\changes{v1.1}{2016/05/07}{Added the configuration file \string\texttt{dp-pro.cfg}, used
+%for specifying the path to SWF.}
% \begin{macrocode}
+\InputIfFileExists{dp-pro.cfg}{}{}
%</package>
% \end{macrocode}
%\Finale
diff --git a/texmf-dist/source/latex/datepicker-pro/datepicker-pro.ins b/texmf-dist/source/latex/datepicker-pro/datepicker-pro.ins
index 7cefaca2..98667206 100644
--- a/texmf-dist/source/latex/datepicker-pro/datepicker-pro.ins
+++ b/texmf-dist/source/latex/datepicker-pro/datepicker-pro.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 2016 D. P. Story
+%% Copyright 2016--2018 D. P. Story
%% -------------------------------------------
%%
%% It may be distributed under the conditions of the LaTeX Project Public
diff --git a/texmf-dist/tex/latex/datepicker-pro/datepicker-pro.sty b/texmf-dist/tex/latex/datepicker-pro/datepicker-pro.sty
index 705a3c70..54d43c3c 100644
--- a/texmf-dist/tex/latex/datepicker-pro/datepicker-pro.sty
+++ b/texmf-dist/tex/latex/datepicker-pro/datepicker-pro.sty
@@ -7,19 +7,19 @@
%% datepicker-pro.dtx (with options: `copyright,package')
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% datepicker-pro.sty package, 2016-05-06 %%
-%% Copyright (C) 2013-16 D. P. Story %%
+%% datepicker-pro.sty package, %%
+%% Copyright (C) 2013-2018 %%
%% dpstory@acrotex.net %%
%% %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
%% Distributed from CTAN archives in directory %%
-%% macros/latex/base/lppl.txt; either version 1 of the %%
-%% License, or (at your option) any later version. %%
+%% macros/latex/base/lppl.txt; either version 1.2 of %%
+%% the License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{datepicker-pro}
- [2016/05/06 v1.0 Date picker using FLEX]
+ [2018/07/02 v1.3 Date picker using Adobe Flash Builder]
\RequirePackage{aeb_pro}[2013/08/05]
\RequirePackage{eforms}[2013/06/05]
\RequirePackage{rmannot}[2011/09/11]
@@ -36,6 +36,8 @@
\pickerOpts{}
\newcommand{\pickerInputOpts}[1]{\def\dpp@pickerInputOpts{#1}}
\pickerInputOpts{}
+\newcommand{\iconBenOpts}[1]{\def\dpp@iconBenOpts{#1}}
+ \iconBenOpts{}
\newcommand{\pickersep}{3bp}
\define@key{ddp}{formatstring}[MM/DD/YYYY]{\def\dpp@FormatStr{#1}}
\define@key{ddp}{daynames}[]{\def\ddp@DayNames{#1}}
@@ -63,73 +65,76 @@
\define@key{ddp}{voffset}[0]{\def\ddp@voffset{#1}}
\define@key{ddp}{widthOfWindow}[180]{\def\ddp@widthOfWindow{#1}}
\define@key{ddp}{heightOfWindow}[180]{\def\ddp@heightOfWindow{#1}}
-\newcommand{\setPickerOpts}[1]{%
- \edef\@tempexp{\noexpand\setkeys{ddp}{#1}}\@tempexp}
-\newcommand{\setPickerOptsToDefaults}{%
- \setkeys{ddp}{formatstring,daynames,monthnames,firstday,halign,%
- valign,hoffset,voffset,widthOfWindow,heightOfWindow,%
- monthnamesLong,monthnamesShort,daynamesLong,daynamesShort}%
+\newcommand{\setPickerOpts}[1]{\let\ddp@bsSAVE\\\let\ddp@uSAVE\u
+ \def\\{\eqbs\eqbs}\def\u{\\u}%
+ \edef\x{\noexpand\setkeys{ddp}{#1}}\x
+ \let\\\ddp@bsSAVE\let\u\ddp@uSAVE
+}
+\newcommand{\setPickerOptsToDefaults}{\let\ddp@bsSAVE\\\let\ddp@uSAVE\u
+ \setkeys{ddp}{formatstring,daynames,monthnames,firstday,halign,%
+ valign,hoffset,voffset,widthOfWindow,heightOfWindow,%
+ monthnamesLong,monthnamesShort,daynamesLong,daynamesShort}%
+ \let\\\ddp@bsSAVE\let\u\ddp@uSAVE
}
\setPickerOptsToDefaults
\def\dppBtnAction#1{%
- var annot = this.getAnnotRichMedia(this.pageNum,"#1");\r
- if (event.shift){\r\t
- this.resetForm(["txt#1"]);\r\t
- annot.activated=false;\r
- } else {
- if ( annot.activated )
- annot.activated=false;
- else annot.activated=true;
- }
+ var annot = this.getAnnotRichMedia(this.pageNum,"#1");\r
+ if (event.shift){\r\t
+ this.resetForm(["txt#1"]);\r\t
+ annot.activated=false;\r
+ } else
+ annot.activated=( annot.activated )?false:true;
}
\newcommand{\datepicker}[4][]{\begingroup
- \edef\@tempexp{\noexpand\setkeys{ddp}{#1}}\@tempexp
- \setWindowDimPos{width={default=\ddp@widthOfWindow},%
- height={default=\ddp@heightOfWindow},%
- position={halign=\ddp@halign,valign=\ddp@valign,
- hoffset=\ddp@hoffset,voffset=\ddp@voffset}}%
- \makebox[0pt][l]{\textField[\F{\FHidden}\BC{}\BG{}\W0
- ]{htxt#2}{1bp}{1bp}}%
+ \def\\{\eqbs\eqbs}\def\u{\\u}
+ \edef\x{\noexpand\setkeys{ddp}{#1}}\x
+ \setWindowDimPos{width={default=\ddp@widthOfWindow},%
+ height={default=\ddp@heightOfWindow},%
+ position={halign=\ddp@halign,valign=\ddp@valign,
+ hoffset=\ddp@hoffset,voffset=\ddp@voffset}}%
+ \makebox[0pt][l]{\textField[\F{\FHidden}\BC{}\BG{}\W0
+ ]{htxt#2}{1bp}{1bp}}%
\expandafter\textField\expandafter[\dpp@pickerInputOpts\Ff{\FfReadOnly}
- \AA{\AAValidate{%
- this.getAnnotRichMedia(this.pageNum,"#2").activated=false;}
- }]{txt#2}{#3}{#4}\makebox[0pt][r]{%
+ \AA{\AAValidate{%
+ this.getAnnotRichMedia(this.pageNum,"#2").activated=false;}
+ }]{txt#2}{#3}{#4}\makebox[0pt][r]{%
\rmAnnot[invisible,transparentBG,deactivated=pageclose,
- passcontext,\dpp@pickerOpts,windowed,name=#2,
- flashvars={field=txt#2&formatstring=\dpp@FormatStr
- \ifx\ddp@DayNames\@empty\else
- &daynames=\ddp@DayNames\fi
- \ifx\ddp@MonthNames\@empty\else
- &monthnames=\ddp@MonthNames\fi
- \ifnum\ddp@FirstDayOfWeek=0 \else
- &firstday=\ddp@FirstDayOfWeek\fi
- \ifx\ddp@monthnamesLong\@empty\else
- &monthnamesLong=\ddp@monthnamesLong\fi
- \ifx\ddp@monthnamesShort\@empty\else
- &monthnamesShort=\ddp@monthnamesShort\fi
- \ifx\ddp@daynamesLong\@empty\else
- &daynamesLong=\ddp@daynamesLong\fi
- \ifx\ddp@daynamesShort\@empty\else
- &daynamesShort=\ddp@daynamesShort\fi
- }
- ]{4bp}{4bp}{dppDatePicker}}\kern\pickersep
- \pushButton[\TU{\dpp@ToolTip}\H{O}\S{S}\BC{}\BG{}
- \FB{true}\I{null}\TP{1}\A{\JS{\dppBtnAction{#2}}}
- ]{btn#2}{\dp@iconWidth}{\dp@iconHeight}\endgroup
+ passcontext,\dpp@pickerOpts,windowed,name=#2,
+ flashvars={field=txt#2&formatstring=\dpp@FormatStr
+ \ifx\ddp@DayNames\@empty\else
+ &daynames=\ddp@DayNames\fi
+ \ifx\ddp@MonthNames\@empty\else
+ &monthnames=\ddp@MonthNames\fi
+ \ifnum\ddp@FirstDayOfWeek=0 \else
+ &firstday=\ddp@FirstDayOfWeek\fi
+ \ifx\ddp@monthnamesLong\@empty\else
+ &monthnamesLong=\ddp@monthnamesLong\fi
+ \ifx\ddp@monthnamesShort\@empty\else
+ &monthnamesShort=\ddp@monthnamesShort\fi
+ \ifx\ddp@daynamesLong\@empty\else
+ &daynamesLong=\ddp@daynamesLong\fi
+ \ifx\ddp@daynamesShort\@empty\else
+ &daynamesShort=\ddp@daynamesShort\fi
+ }
+ ]{4bp}{4bp}{dppDatePicker}}\kern\pickersep
+ \expandafter\pushButton\expandafter[\dpp@iconBenOpts\TU{\dpp@ToolTip}
+ \H{O}\S{S}\BC{}\BG{}\FB{true}\I{null}\TP{1}
+ \A{\JS{\dppBtnAction{#2}}}
+ ]{btn#2}{\dp@iconWidth}{\dp@iconHeight}\endgroup
}
\newcommand{\setpickerIcon}[2]{% #1=path, #2=placement
- \let\@thesetoks\@empty
- \@for\@dppName:=#2\do{\edef\@thesetoks{\@thesetoks btn\@dppName,}}%
- \def\stripOffComma##1,\@nil{\def\@placeIcons{##1}}%
- \expandafter\stripOffComma\@thesetoks\@nil
- \declareImageAndPlacement{name=dppIcon,path=#1,%
- placement={\@placeIcons}}%
- \immediate\openout\CommentStream=ddpdocassmbly.cut
- \immediate\write\CommentStream{\string\begin{execJS}{dppicons}}%
- \immediate\write\CommentStream{\string\insertPreDocAssembly}%
- \immediate\write\CommentStream{\string\end{execJS}}%
- \immediate\closeout\CommentStream
- \input{ddpdocassmbly.cut}%
+ \let\@thesetoks\@empty
+ \@for\@dppName:=#2\do{\edef\@thesetoks{\@thesetoks btn\@dppName,}}%
+ \def\stripOffComma##1,\@nil{\def\@placeIcons{##1}}%
+ \expandafter\stripOffComma\@thesetoks\@nil
+ \declareImageAndPlacement{name=dppIcon,path=#1,%
+ placement={\@placeIcons}}%
+ \immediate\openout\CommentStream=ddpdocassmbly.cut
+ \immediate\write\CommentStream{\string\begin{execJS}{dppicons}}%
+ \immediate\write\CommentStream{\string\insertPreDocAssembly}%
+ \immediate\write\CommentStream{\string\end{execJS}}%
+ \immediate\closeout\CommentStream
+ \input{ddpdocassmbly.cut}%
}
\@onlypreamble\setpickerIcon
\newcommand\pickerIconWidth[1]{\def\dp@iconWidth{#1}}
@@ -137,30 +142,43 @@
\newcommand\pickerIconHeight[1]{\def\dp@iconHeight{#1}}
\pickerIconHeight{12bp}
\begin{insDLJS}{dppdljs}{JavaScript for Date Picker Pro}
+function _dppConvUnicode(v){
+var fm,re,str=v;
+re=/\\u([0-8A-Fa-f]{4})/g
+ while ((fm=str.search(re))!=-1) {
+ str=str.substring(0,fm)
+ +eval("String.fromCharCode(0x"
+ +str.substring(fm+2,fm+6)+")")
+ +str.substring(fm+6);
+ }
+return str;
+}
function setDateField(fname,value,svalue) {
- var f = this.getField(fname);
- var g = this.getField("h"+fname);
- if (f !=null ) {
- f.value = value;
- g.value = svalue;
- }
+ var f = this.getField(fname);
+ var g = this.getField("h"+fname);
+ if (f !=null ) {
+ f.value = _dppConvUnicode(value);
+ g.value = svalue;
+ }
}
function getDateValue(fname) {
- var f = this.getField(fname);
- var g = this.getField("h"+fname);
- var value;
- if ( f != null )
- value = { value: f.value, svalue: g.value };
- return value;
+ var f = this.getField(fname);
+ var g = this.getField("h"+fname);
+ var value;
+ if ( f != null )
+ value = { value: f.value, svalue: g.value };
+ return value;
}
\end{insDLJS}
\def\dpp@initdpp{%
- \@ifundefined{dppPath}{\PackageError{datepicker-pro}
- {You must specify the path to datepicker\flexVer.swf\MessageBreak
- by defining \string\dppPath, see documentation}{}}
- {\saveNamedPath{dppDatePicker}{\dppPath/datepicker\flexVer.swf}}%
+ \@ifundefined{dppPath}{\PackageError{datepicker-pro}
+ {You must specify the path to datepicker\flexVer.swf\MessageBreak
+ by defining \string\dppPath\space in the configuration file\MessageBreak
+ dp-pro.cfg, see documentation}{}}
+ {\saveNamedPath{dppDatePicker}{\dppPath/datepicker\flexVer.swf}}%
}
\AtBeginDocument{\dpp@initdpp}
+\InputIfFileExists{dp-pro.cfg}{}{}
\endinput
%%
%% End of file `datepicker-pro.sty'.
diff --git a/texmf-dist/tex/latex/datepicker-pro/dp-pro.cfg b/texmf-dist/tex/latex/datepicker-pro/dp-pro.cfg
new file mode 100644
index 00000000..9b1fce47
--- /dev/null
+++ b/texmf-dist/tex/latex/datepicker-pro/dp-pro.cfg
@@ -0,0 +1,7 @@
+%
+% datepicker-pro configuration file,
+% uncomment the lines below and edit appropriately
+%
+%\definePath{\dppPath}{C:/Users/Public/Documents/My TeX Files/%
+% tex/latex/aeb/aebpro/datepicker-pro/swf}
+\endinput