summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/ejpecp/README5
-rw-r--r--macros/latex/contrib/ejpecp/ejpecp.dtx26
-rw-r--r--macros/latex/contrib/ejpecp/ejpecp.ins4
-rw-r--r--macros/latex/contrib/ejpecp/ejpecp.pdfbin138470 -> 138139 bytes
-rw-r--r--macros/latex/contrib/ejpecp/sample.pdfbin155520 -> 155743 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/README.md20
-rw-r--r--macros/latex/contrib/ltx4yt/docs/ltx4yt-man.pdfbin0 -> 242168 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/docs/ltx4yt-man.tex675
-rw-r--r--macros/latex/contrib/ltx4yt/docs/ltx4yt.pdfbin0 -> 1838044 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/examples/ltx4yt-1.pdfbin0 -> 109008 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/examples/ltx4yt-1.tex74
-rw-r--r--macros/latex/contrib/ltx4yt/examples/ltx4yt-2.pdfbin0 -> 114454 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/examples/ltx4yt-2.tex98
-rw-r--r--macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.pdfbin0 -> 118148 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.tex82
-rw-r--r--macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.pdfbin0 -> 86073 bytes
-rw-r--r--macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.tex110
-rw-r--r--macros/latex/contrib/ltx4yt/ltx4yt.dtx651
-rw-r--r--macros/latex/contrib/ltx4yt/ltx4yt.ins (renamed from macros/latex/contrib/yt4pdf/yt4pdf.ins)7
-rw-r--r--macros/latex/contrib/yt4pdf/README.md21
-rw-r--r--macros/latex/contrib/yt4pdf/doc/yt4pdf_man.pdfbin347953 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/doc/yt4pdf_man.tex737
-rw-r--r--macros/latex/contrib/yt4pdf/examples/config_intacc.def29
-rw-r--r--macros/latex/contrib/yt4pdf/examples/graphics/MIA9.epsbin290523 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/examples/graphics/MIAX.epsbin400298 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/examples/graphics/trustmanager.epsbin845442 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/examples/graphics/yt_icon_sm.epsbin558266 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/examples/yt4pdf-1.tex93
-rw-r--r--macros/latex/contrib/yt4pdf/examples/yt4pdf-2.tex152
-rw-r--r--macros/latex/contrib/yt4pdf/examples/yt4pdf-3.tex88
-rw-r--r--macros/latex/contrib/yt4pdf/graphics/pdfyt_poster.epsbin850618 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/swf/pdf_tube_basic.swfbin10470 -> 0 bytes
-rw-r--r--macros/latex/contrib/yt4pdf/yt4pdf.cfg10
-rw-r--r--macros/latex/contrib/yt4pdf/yt4pdf.dtx629
-rw-r--r--macros/latex/contrib/yt4pdf/yt4pdf.sty346
35 files changed, 1736 insertions, 2121 deletions
diff --git a/macros/latex/contrib/ejpecp/README b/macros/latex/contrib/ejpecp/README
index 074bb1792d..dc3375cfff 100644
--- a/macros/latex/contrib/ejpecp/README
+++ b/macros/latex/contrib/ejpecp/README
@@ -5,7 +5,7 @@ DESCRIPTION
electronic journals are http://www.imstat.org/ejp/ and http://www.imstat.org/ecp/
COPYRIGHT
- Copyright (c) 2019 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+ Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
@@ -53,6 +53,9 @@ LATEST VERSION
http:/mirror.ctan.org/macros/latex/contrib/ejpecp/
CHANGELOG
+ 2020/07/30 v1.8.2
+ Updated AMS keywords to MSC2020 with url link
+ Updated article no. prefix
2019/04/04 v1.7
Merged changes with production version:
fixltx2e dependency removed
diff --git a/macros/latex/contrib/ejpecp/ejpecp.dtx b/macros/latex/contrib/ejpecp/ejpecp.dtx
index ca4cb819ea..8fd3510c26 100644
--- a/macros/latex/contrib/ejpecp/ejpecp.dtx
+++ b/macros/latex/contrib/ejpecp/ejpecp.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (c) 2019 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+% Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
% Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania
% Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
% Copyright (c), 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
@@ -26,9 +26,9 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{ejpecp}
%<*class>
- [2019/04/04 v1.7 class for EJP and ECP journals]
+ [2020/07/30 v1.8.2 class for EJP and ECP journals]
%</class>
-%<class>\ClassInfo{ejpecp}{Copyright (c) 2019 Edgaras SAKURAS, VTeX, Lithuania.}
+%<class>\ClassInfo{ejpecp}{Copyright (c) 2019-2020 Edgaras SAKURAS, VTeX, Lithuania.}
%<class>\ClassInfo{ejpecp}{Copyright (c) 2018 Deimantas GALCIUS, VTeX, Lithuania.}
%<class>\ClassInfo{ejpecp}{Copyright (c) 2016-2017 Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP.}
%<class>\ClassInfo{ejpecp}{Copyright (c), 2011-2015 BURDZY and CHAFAI for EJP-ECP.}
@@ -47,7 +47,7 @@
%</driver>
% \fi
%
-% \CheckSum{785}
+% \CheckSum{801}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -79,6 +79,7 @@
% \changes{v1.5}{2016/09/06}{hypertexnames=false configuration for hyperref package}
% \changes{v1.6}{2019/03/28}{full url doi, package maintaining and shorttitle info}
% \changes{v1.7}{2019/04/04}{merged with production version: fixltx2e removed, natbib setup with afterpackage, etc}
+% \changes{v1.8.2}{2020/07/30}{no. prefix updated and msc2020}
% \GetFileInfo{ejpecp.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -287,9 +288,11 @@
}%ECPLOGO
\def\@doiprefix{https://doi.org/}
\def\printdoi{\texttt{\href{\@doiprefix\@DOI}{\@doiprefix\@DOI}}}
+\def\msc@url{https://ams.org/mathscinet/msc/msc2020.html}
%% make title long
\renewcommand\title[1]{\gdef\@title{#1}}
%% Macro handling the first page
+\def\papernum@name{no.}
\newcommand{\FIRSTPAGE}{%
\setcounter{page}{\@PAGESTART}%
\title{\small
@@ -297,7 +300,7 @@
\@EJPLOGO
\bigskip
\centerline{\@JOURNALA\ \textbf{\@VOLUME} (\@YEAR),\
- no. \@PAPERNUM, \,\@PAGESTART--\@PAGEEND.}%
+ \papernum@name\ \@PAPERNUM, \,\@PAGESTART--\@PAGEEND.}%
\centerline{ISSN:\ \texttt{\href{http://\@URL/}{\@ISSN}} %
\ifx\@DOI\undefined\else
\ \printdoi
@@ -310,7 +313,7 @@
\else
\parbox[t]{9cm}{%
\@JOURNALA\ \textbf{\@VOLUME} (\@YEAR),
- no. \@PAPERNUM, \@PAGESTART--\@PAGEEND.\\
+ \papernum@name\ \@PAPERNUM, \@PAGESTART--\@PAGEEND.\\
\ifx\@DOI\undefined
\else
\ \printdoi
@@ -336,7 +339,7 @@
\@ABSTRACT\par\vskip 1em\relax
{\footnotesize
\noindent\textbf{Keywords: }\@KEYWORDS.\par
- \noindent\textbf{AMS MSC 2010: }%
+ \noindent\href\msc@url{\textbf{MSC2020 subject classifications: }}%
\ifx\@AMSSUBJSECONDARY\undefined
\noindent
\@AMSSUBJ.\par
@@ -368,10 +371,10 @@
%% Macro setting the PDF title
\newcommand{\PDFFIELDS}{%
\hypersetup{%
- pdftitle={\@JOURNALA\ \@VOLUME\ (\@YEAR), no. \@PAPERNUM, \@doiprefix\@DOI}}%
+ pdftitle={\@JOURNALA\ \@VOLUME\ (\@YEAR), \papernum@name\ \@PAPERNUM, \@doiprefix\@DOI}}%
\hypersetup{pdfkeywords={\@KEYWORDS}}%
\hypersetup{pdfproducer={\@JOURNAL\ Managing Editor http://\@URL/}}%
- \hypersetup{pdfcreator={LaTeX with ejpecp.cls v1.4}}%
+ \hypersetup{pdfcreator={LaTeX with ejpecp.cls v1.8.2}}%
\hypersetup{pdfsubject={Probability Theory}}%
\hypersetup{pdfauthor={Please see \@doiprefix\@DOI}}%
}%END-PDFFIELDS
@@ -530,7 +533,10 @@
\fi
}%
}%
-\InputIfFileExists{ejpecp.cfg}{}{}
+\def\amp{&}%
+\InputIfFileExists{ejpecp.cfg}
+ {}
+ {\def\papernum@name{article no.}}
%% Macros
\AtBeginDocument{\FIRSTPAGE\PDFFIELDS}
\AtEndDocument{\vfill}
diff --git a/macros/latex/contrib/ejpecp/ejpecp.ins b/macros/latex/contrib/ejpecp/ejpecp.ins
index fb44b8d82c..f9d172b204 100644
--- a/macros/latex/contrib/ejpecp/ejpecp.ins
+++ b/macros/latex/contrib/ejpecp/ejpecp.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (c) 2019 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+%% Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
%% Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania for EJP-ECP
%% Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
%% Copyright (c), 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
@@ -24,7 +24,7 @@
This is a generated file.
-Copyright (c) 2019 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
Copyright (c), 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
diff --git a/macros/latex/contrib/ejpecp/ejpecp.pdf b/macros/latex/contrib/ejpecp/ejpecp.pdf
index 4241d28a1e..dbd6387857 100644
--- a/macros/latex/contrib/ejpecp/ejpecp.pdf
+++ b/macros/latex/contrib/ejpecp/ejpecp.pdf
Binary files differ
diff --git a/macros/latex/contrib/ejpecp/sample.pdf b/macros/latex/contrib/ejpecp/sample.pdf
index b832e404a3..dd8aebe890 100644
--- a/macros/latex/contrib/ejpecp/sample.pdf
+++ b/macros/latex/contrib/ejpecp/sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/README.md b/macros/latex/contrib/ltx4yt/README.md
new file mode 100644
index 0000000000..63993ec364
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/README.md
@@ -0,0 +1,20 @@
+The ltx4yt package
+Dated: 2020-07-30
+
+What ltx4yt does is to provide some tools for creating links, dropdown lists,
+popup menus for playing selected YouTube videos in the default browser. Perfect
+for personal use and for academic, professional, or classroom presentations
+that refer to YouTube content.
+
+All workflows are supported: pdflatex, lualatex, xelatex, dvips->distiller,
+and dvips->ps2pdf. In the latter case, the document should not use any
+document JavaScripts.
+
+This package replaces yt4pdf, which is being withdrawn from CTAN.
+
+Now, I simply must get back to my retirement.
+
+Dr. D. P. Story
+www.acrotex.net
+dpstory@uakron.edu
+dpstory@acrotex.net
diff --git a/macros/latex/contrib/ltx4yt/docs/ltx4yt-man.pdf b/macros/latex/contrib/ltx4yt/docs/ltx4yt-man.pdf
new file mode 100644
index 0000000000..672b8292f5
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/docs/ltx4yt-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/docs/ltx4yt-man.tex b/macros/latex/contrib/ltx4yt/docs/ltx4yt-man.tex
new file mode 100644
index 0000000000..aa98bee57d
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/docs/ltx4yt-man.tex
@@ -0,0 +1,675 @@
+% makeindex < aebpro_man.idx > aebpro_man.ind
+\documentclass{article}
+\usepackage[fleqn]{amsmath}
+\usepackage[
+ web={centertitlepage,designv,tight*,usetemplates,
+ forcolorpaper,latextoc,pro},%usesf,
+ eforms,aebxmp
+]{aeb_pro}
+%\usepackage{multicol}
+\usepackage{aeb_mlink}
+\usepackage[usepopup]{ltx4yt}
+\usepackage{array}
+\usepackage[altbullet]{lucidbry}
+
+\usepackage{makeidx}
+\makeindex
+\usepackage{acroman}
+
+\leftmargini\parindent
+
+
+\usepackage[active]{srcltx}
+
+\urlstyle{rm}
+\let\tops\texorpdfstring
+\let\pkg\textsf
+\let\app\textsf
+\let\opt\texttt
+\let\uif\textsf
+\let\env\texttt
+\def\meta#1{\textit{\texttt{#1}}}
+\def\ameta#1{$\langle\textit{\texttt{#1}}\rangle$}
+\newdimen\aebdimen \aebdimen6pt %\partopsep \advance\aebdimen\partopsep
+\newcommand\bVerb[1][]{\begingroup#1\vskip\aebdimen\parindent0pt}%
+\def\eVerb{\vskip\aebdimen\endgroup\noindent}
+\def\SUB#1{\ensuremath{{}_{\text{#1}}}}
+\def\darg#1{\texttt{\{#1\}}}
+\def\takeMeasure{\bgroup\obeyspaces\takeMeasurei}
+\def\takeMeasurei#1{\global\setbox\webtempboxi\hbox{\ttfamily#1}\egroup}
+\def\bxSize{\wd\webtempboxi+2\fboxsep+2\fboxrule}
+\let\amtIndent\leftmargini
+\makeatletter
+\def\setDisplayNumber#1#2{\kern0pt
+ \setlength\abovedisplayshortskip{0pt}%
+ \setlength\belowdisplayshortskip{0pt}%
+ \setlength\abovedisplayskip{0pt}%
+ \setlength\belowdisplayskip{0pt}%
+ \begin{equation}\label{#2}\end{equation}\kern0pt
+}
+\renewenvironment{quote}[1][]
+ {\def\@rgi{#1}\ifx\@rgi\@empty
+ \let\rghtm\@empty\else\def\rghtm{\rightmargin\leftmargin}\fi
+ \list{}{\rghtm} %{\rightmargin\leftmargin}%
+ \item\relax}
+ {\endlist}
+\renewcommand*\descriptionlabel[1]{\hspace\labelsep
+ \normalfont #1}
+\setcounter{secnumdepth}{4}
+\setcounter{tocdepth}{5}
+\renewcommand*{\theparagraph}{\texorpdfstring{\protect\P\protect\ }{\textparagraph}}
+\renewcommand{\paragraph}
+ {\renewcommand{\@seccntformat}[1]{\theparagraph}%
+ \@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}} %\color{\aeb@subsubsectioncolor}
+\renewcommand*\l@paragraph{\@dottedtocline{4}{5.0em}{1em}} %{7.0em}{4.1em}}
+\def\chgCurrLblName#1{\def\@currentlabelname{#1}}
+\def\echgCurrLblName#1{\edef\@currentlabelname{#1}}
+\makeatother
+
+\reversemarginpar
+\def\FmtMP#1{\marginpar{\slshape\raggedleft\small#1}}
+
+
+\newcommand{\YT}{\textsf{YouTube}}
+
+
+%\def\tutpath{doc/tutorial}
+%\def\tutpathi{tutorial}
+
+\DeclareDocInfo
+{
+ university={\AcroTeX.Net},
+ title={The \texorpdfstring{\textsf{ltx4yt} Package\\[1em]}{: }
+ Playing \texorpdfstring{\YT}{YouTube} Videos in the default browser},
+ author={D. P. Story},
+ email={dpstory@acrotex.net},
+ subject={Playing YouTube Videos in PDF},
+ talksite={\url{www.acrotex.net}},
+ version={0.7, 2020/07/30},
+ keywords={AcroTeX, PDF, YouTube, Browser},
+ copyrightStatus=True,
+ copyrightNotice={Copyright (C) \the\year, D. P. Story},
+ copyrightInfoURL={http://www.acrotex.net}
+}
+
+\def\dps{$\hbox{$\mathfrak D$\kern-.3em\hbox{$\mathfrak P$}%
+ \kern-.6em \hbox{$\mathcal S$}}$}
+
+\universityLayout{fontsize=Large}
+\titleLayout{fontsize=LARGE}
+\authorLayout{fontsize=Large}
+\tocLayout{fontsize=Large,color=aeb}
+\sectionLayout{indent=-40pt,fontsize=large,color=aeb} %,afterskip=1sp}
+\subsectionLayout{indent=-20pt,color=aeb} %,afterskip=1sp}
+\subsubsectionLayout{indent=0pt,color=aeb} %,afterskip=1sp}
+\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
+
+\newenvironment{eqComments}[1][\strut]{\smallskip\leftskip-\labelwidth
+\item[]\textbf{\textcolor{blue}{#1}}}{\par\smallskip}
+
+\begin{popupmenu}{YTSea}
+ \puIdTitle{J\"{u}rgen's favorite song*}{mLDF5MBMWHE}
+ \puIdTitle{\Esc"Sea Hunt\Esc" US TV series {(1958-61)} lead-in}{Lz0aMoWh8Q4}
+ \puIdTitle{Theme Song to Sea Hunt*}{2QxXk6X9GDo}
+ \puIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+\end{popupmenu}
+\ytUseMenus{YTSea}
+
+%\pagestyle{empty}
+%\parindent0pt\parskip\medskipamount
+
+\chngDocObjectTo{\newDO}{doc}
+\begin{docassembly}
+var titleOfManual="The ltx4yt MANUAL";
+var manualfilename="Manual_BG_Print_ltx4yt.pdf";
+var manualtemplate="Manual_BG_Brown.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,
+ bOnPrint:false,
+ cDIPath:_path
+});
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\maketitle
+
+\selectColors{linkColor=black}
+\tableofcontents
+\selectColors{linkColor=webgreen}
+
+\section{Introduction}\label{s:intro}
+
+My beautiful package \pkg{yt4pdf} is gone, time has caught up with it: The
+Flash player is no longer in use, anywhere;\footnote{Adobe will formally
+abandon Flash Player in December 2020} \app{Google} discontinued its
+ActionScript 3.0 Player several years ago. It was \app{Acrobat} and
+\app{Google} technologies that were the foundation of the \pkg{yt4pdf}
+package.
+
+We turn over a new leaf by writing and publishing the \pkg{ltx4yt} package:
+{\LaTeX} for \YT. What \pkg{ltx4yt} does is to provide some tools for
+creating links, dropdown lists, popup menus for playing selected {\YT}
+videos in the default browser. Perfect for personal use and for academic,
+professional, or classroom presentations that refer to {\YT} content.
+
+% I believe that I was vaguely aware of the \href{http://code.google.com/apis/youtube/flash_api_reference.html}
+%{{\YT} ActionScript 3.0 Player},\footnote{The YouTube AcrionScript 2.0 Player API
+% has been deprecated as of January 27, 2015; however, it is still supported, for now.} but never pursued it because of my
+%general lack of interest in {\YT} (\url{www.youtube.com}). Recently, I
+%came across a very nice demo PDF that used the API, see
+%%\mlhref{http://www.uvsar.com/pdftube/}{PDF Tube - {\YT} API wrapper for PDF documents}.
+%``PDF Tube - {\YT} API wrapper for PDF documents'' (the page has
+%since been removed).
+%The SWF file and JavaScript are made freely available, so I
+%downloaded it, and was sufficiently impressed to port the example to
+%{\LaTeX} using various members of the {Acro\negthinspace\TeX} Fine Family of Software
+%\verb!:-{)!. The SWF file and JavaScript are due to the good folks at
+%\textbf{UVSAR} (\url{www.uvsar.com}). The \textbf{UVSAR}'s sample demo also appeared in the forums of
+%the \href{http://acrobatusers.com/forum/javascript/embed-youtube-video-pdf}{Acrobat User
+%Community}.
+
+%The \textsf{ltx4yt} package uses the \textsf{rmannot} to embed the \textsf{SWF}
+%file that plays the {\YT} videos. There is a complete set of buttons
+%that come with the package to control the video: play, pause, stop
+%loading, rewind, load a video by its {\YT} video ID, and a button to
+%view a video on the {\YT} web site.\footnote{Some videos do not allow
+%embedded playback, and must be viewed on the {\YT} web site.}
+
+% http://acrobatusers.com/news/youtube-widget-acrobat
+
+\subsection{Sample files}
+
+The following are the sample files shipped with \textsf{ltx4yt}:
+\begin{itemize}
+ \item \texttt{ltx4yt-1.tex} demonstrates links created by \cs{ytvId}
+ and \cs{ytLink}. Such links created in a PDF are pretty much
+ functional for all PDF viewers, including the native PDF viewers of
+ all the modern browsers, and PDF viewers on other devices such as
+ \app{Android} and \app{iPhones}.
+
+ \item \texttt{ltx4yt-2.tex} demonstrates the PDF forms controls related
+ methods of selecting a video to watch. The command pair
+ \cs{ytComboList} and \cs{ytComboBtn} provide support for creating a
+ dropdown list (combo box) for selecting a video by title, the push
+ button takes the selection and passes it to {\YT} for display
+ in the default browser. The sample also includes a popup menu for
+ selecting video by title. Finally, there is a query field in enter
+ query text and to search {\YT} for all related titles.
+
+ This file (\texttt{ltx4yt-2.pdf}) performs as designed in
+ \app{Acrobat}, \app{Adobe Reader DC}, and \app{PDFX-Change Editor},
+ and \emph{will not} be functional in native PDF viewers of
+ browsers. \texttt{ltx4yt-2.pdf} will have no functionality in PDF
+ viewers on hand-held devices such as smart phones or tablets.
+\end{itemize}
+% Advanced examples \href{http://www.math.uakron.edu/~dpstory/aebblog.html}{AeB Blog site}.
+
+\section{Options, Requirements, and Workflows}
+
+\paragraph*{Options.} Currently, this package has two options: \opt{usepopup}\FmtMP{\opt{usepopup}
+option} and \opt{!usepopup}. When \opt{usepopup} is taken, additional
+commands are defined and supporting document Java\-Script is embedded in the
+PDF. See \hyperref[upu]{Section~\ref*{upu}} on page~\pageref*{upu} for details on using popups in the document. The
+\opt{!usepopup} is a convenience option that turns off the \opt{usepopup}
+option. The default is to not use popups in the document (\opt{!usepopup}).
+
+\paragraph*{Requirements.}
+This package requires the \pkg{eforms} package, which is part of \pkg{acrotex}.\footnote{\url{http://www.ctan/pkg/acrotex}}
+If the option \opt{usepopup}, the package \opt{popupmenu} is also input.\footnote{\url{http://www.ctan/pkg/popupmenu}}
+
+\paragraph*{Workflows.} This is a general {\LaTeX} package, any workflows can be used to build
+a \pkg{ltx4yt} document: \app{pdflatex}, \app{lualatex}, \app{xelatex}, or
+\app{dvips\,->\,distiller}.\footnote {\app{dvips\,->\,ps2pdf} can be used if
+only links are used to reference {\YT} videos and the \opt{!usepopup} option
+is in force (no document JavaScript).}
+
+\section{Basic Methods: Playing a {\YT} video using its Video ID}
+
+There are three methods of playing a {\YT} video based on its video ID:
+\begin{itemize}
+ \item \textbf{Using links}
+ \item \textbf{Using dropdown lists}
+ \item \textbf{Using a popup menu}
+\end{itemize}
+In each of the subsequent sections, we discuss each of these methods in turn.
+
+\subsection{Basic Methods: Links with \tops{\protect\cs}{\textbackslash}{ytvId}}
+
+\textbf{Demo files.} The techniques of this section are illustrated by the two files
+\texttt{examples/\allowbreak ltx4yt-1.tex} and \texttt{examples/web-pkg/ltx4yt-w1.tex}.
+
+\newtopic\noindent
+The underlying command that creates links is the \pkg{eforms} command \cs{setLink},
+this command is not seen, but is part of all link commands in this section.
+
+To create a link that references a {\YT} video from its video ID, use the \cs{ytvId} command.
+\bVerb\takeMeasure{\string\ytvId*[\ameta{KV-pairs}]\darg{\ameta{ytvID}}\darg{\ameta{text}}}%
+\begin{minipage}{\linewidth}
+\begin{minipage}{\bxSize}
+\xdef\panelWidth{\the\linewidth}% *[\ameta{opts}]\darg{\ameta{ytvID}}\darg{\ameta{text}}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytvId*[!ameta(KV-pairs)]{!ameta(ytvID)}{!ameta(text)}
+\ytvIdPresets{!ameta(KV-pairs)}
+\end{Verbatim}
+\end{minipage}\hfill
+\begin{minipage}{\linewidth-\panelWidth}
+\setDisplayNumber\label{display:ytvId}
+\end{minipage}\end{minipage}\endgroup
+\PD Use the optional asterisk (\texttt*) when the referenced video
+\emph{cannot be embedded}; \emph{not specifying} the asterisk means the video
+\emph{can be embedded}. \textbf{Embedding is the best way of viewing a video.} The \ameta{KV-pairs} are key-value pairs recognized by the
+underlying \cs{setLinks} command. The \ameta{ytvID} is the {\YT} video ID of
+the video to be played in the default browser. Finally, \ameta{text} is the
+text around of which the link is constructed.
+
+\paragraph*{The \cs{ytvIdPresets} command}
+is a convenient way of setting the link options \emph{uniformly} for all
+links created by \cs{ytvId}. Individual \ameta{KV-pairs} passed though the
+optional argument of \cs{ytvId} will override the preset values. Its default
+definition is,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ytvIdPresets{\linktxtcolor{webbrown}}
+\end{Verbatim}
+This sets the color of the link to a brown color, which is why the links of
+this document are brown.
+
+\paragraph*{An example.} There are two ``Kung-Fu Fighting'' videos of interest: \texttt{GZ9e3Dy7obA} and
+\texttt{jhUkGIsKvn0}; we set up likes for the first and twice for the second:
+\begin{quote}
+ \ytvId{GZ9e3Dy7obA}{Kung-Fu Fighting (Bruce Lee)}\\
+ \verb~\ytvId{GZ9e3Dy7obA}{Kung-Fu Fighting (Bruce Lee)}~\\[3pt]
+ \ytvId{jhUkGIsKvn0}{Kung-Fu Fighting (Carl Douglas)}\\
+ \verb~\ytvId{jhUkGIsKvn0}{Kung-Fu Fighting (Carl Douglas)}~\\[3pt]
+ \ytvId*{jhUkGIsKvn0}{Kung-Fu Fighting* (Carl Douglas)}\\
+ \verb~\ytvId*{jhUkGIsKvn0}{Kung-Fu Fighting* (Carl Douglas)}~
+\end{quote}
+The first link works fine, just the video and nothing else. The second one
+does not, the video poster is loaded, but when you play the video, the
+response is \textsf{Video unavailable}. The third link works fine now. The
+problem here is that the second video cannot be embedded; we have to use the
+\texttt*-option to create a different link, one that goes to the full {\YT}
+web site to see one or more advertisements before the video is allowed to be
+played, additionally, there are numerous extraneous content everywhere on the
+page. When a video \emph{can be embedded}, you get a very clean video
+experience, free of advertisements and extraneous content; \emph{this is the
+best case}. Try using the first link again to enjoy the experience.
+
+There is a multi-line version of \cs{ytvId},
+\bVerb\takeMeasure{\string\ytvIdML*[\ameta{KV-pairs}]\darg{\ameta{ytvID}}\darg{\ameta{text}}}%
+\begin{minipage}{\linewidth}
+\begin{minipage}{\bxSize}
+\xdef\panelWidth{\the\linewidth}% *[\ameta{opts}]\darg{\ameta{ytvID}}\darg{\ameta{text}}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytvIdML*[!ameta(KV-pairs)]{!ameta(ytvID)}{!ameta(text)}
+\ytvIdPresets{!ameta(KV-pairs)}
+\end{Verbatim}
+\end{minipage}\hfill
+\begin{minipage}{\linewidth-\panelWidth}
+\setDisplayNumber\label{display:ytvIdML}
+\end{minipage}\end{minipage}\eVerb This form, which requires \pkg{aeb\_mlink} package and the
+\app{dvips\,->distiller}, creates true multi-line links. Here is an example:
+\ytvIdML{5y9-EVmreU4}{Lori's Corner: Episode \#1, I met her back in the year
+2000, though she probably does not remember.} The applications
+\app{pdflatex}, \app{lualatex}, and \app{xelatex} will break this link cross
+lines, but does so by creating two links. This link is a single link that
+inverts across both lines when clicked. \cs{ytvIdML} uses the same presets
+command \cs{ytIdPresets}.
+
+\subsubsection{How to get the {\YT} video ID}
+
+Go to the {\YT} web site and search for a video of interest. Once found, play, then pause
+the video. Go the browser's URL address bar and you'll see something like this:
+\begin{equation*}
+ \texttt{https://www.youtube.com/watch?v=$\underset{\text{ytvId}}{\underbrace{\texttt{dAgfnK528RA}}}$}
+\end{equation*}
+Copy the ytvId into the first argument of \cs{ytvId} and supply a title: %https://youtu.be/dAgfnK528RA
+\begin{quote}
+ \ytvId{dAgfnK528RA}{Math Antics - Order of Operations}\\
+ \verb~\ytvId{dAgfnK528RA}{Math Antics - Order of Operations}~
+\end{quote}
+Cool! You can also get the video ID by right clicking on the paused video and
+exploring the context menu presented.
+
+\subsubsection{Can the video be embedded?}
+
+I've done a little research on this question, the answer is that there is no
+way of knowing in advance. You need to test each link. In the case of video
+ID \texttt{dAgfnK528RA}, we found it, we created the link with \cs{ytvId},
+we tested it, and it worked! Had it not worked (the dreaded \textsf{Video
+unavailable} appears when you try to play the video), we simply use the
+\texttt*-option. It's just that simple.
+
+\subsection{Basic Methods: dropdown list}
+
+\textbf{Demo files.} The techniques of this section are illustrated by the two files
+\texttt{examples/\allowbreak ltx4yt-2.tex} and \texttt{examples/web-pkg/ltx4yt-w2.tex}.
+
+\newtopic\noindent A dropdown list, a combobox in Adobe's original terminology, is an Adobe form field
+that drops down to display a list of menu items. It takes up less page space,
+and may be a good choice rather than listing a number of links on the page.
+
+\paragraph*{To create a dropdown list}
+
+\begin{enumerate}
+\item
+\textbf{Create a play list.} At any point prior to the dropdown list, declare your play list:
+\bVerb\takeMeasure{\quad\string\ytIdTitle\darg{\ameta{title\SUB{n}}}\darg{\ameta{ytvId\SUB{n}}}}%
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\declarePlayList{!ameta(\plCmd)}{%
+!quad\ytIdTitle{!ameta(title!SUB1)}{!ameta(ytvId!SUB1)}
+!quad...
+!quad\ytIdTitle{!ameta(title!SUB(n))}{!ameta(ytvId!SUB(n))}
+}
+\end{Verbatim}
+\end{minipage}\eVerb If the video referenced by \ameta{ytvId} \emph{cannot be
+embedded}, then place an \FmtMP{use \texttt* in title}\texttt* in the
+\ameta{title} as a single to the underlying JavaScript that the video cannot
+be embedded.
+
+\item \textbf{Set the initial value and playlist} At any point prior to the dropdown list, set the require
+dropdown list information:
+\bVerb\takeMeasure{\string\ytPlayList\darg{\ameta{ytvId}}\darg{\ameta{\string\plCmd}}}%\plCmd
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytPlayList{!ameta(ytvId)}{!ameta(\plCmd)}
+\end{Verbatim}
+\end{minipage}\eVerb
+where \ameta{ytvId} is the video ID of the title initially displayed in the
+dropdown list, and \ameta{\string\plCmd} is a command defined earlier in a
+\cs{declarePlayList} command.
+
+\item \textbf{Place the dropdown list and accompanying \textsf{Play} button.}
+\bVerb\takeMeasure{\string\ytComboList[\ameta{KV-pairs}]\darg{\ameta{name}}\darg{\ameta{wd}}\darg{\ameta{ht}}}%\plCmd
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytComboList[!ameta(KV-pairs)]{!ameta(name)}{!ameta(wd)}{!ameta(ht)}
+\ytComboBtn[!ameta(KV-pairs)]{!ameta(name)}{!ameta(wd)}{!ameta(ht)}
+\end{Verbatim}
+\end{minipage}\eVerb where \ameta{name} is a text string of ASCII letters and numbers. The \ameta{name} is appended
+on to the field names of these two field; The pair \cs{ytComboList} and
+\cs{ytComboBtn} must be passed the same \ameta{name} value. The common
+\ameta{name} ties them together.
+\end{enumerate}
+Below is an abbreviated example, more extensive examples are found in the demo files sited at the beginning of this section.
+
+\declarePlayList{\playList}{% note: put parentheses within braces
+ \ytIdTitle{Kung-Fu Fighting {(Bruce Lee)}}{GZ9e3Dy7obA}
+ \ytIdTitle{Kung-Fu Fighting* {(Carl Douglas)}}{jhUkGIsKvn0}
+ \ytIdTitle{J\"{u}rgen's "favorite" song*}{mLDF5MBMWHE}
+ \ytIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+}
+\ytPlayList{GZ9e3Dy7obA}{\playList}
+
+\paragraph*{Example} A four-item dropdown list: \ytComboList{YT1}{144bp}{11bp}\olBdry\ytComboBtn{YT1}{33bp}{11bp}
+
+\newtopic\noindent The verbatim listing is,\bVerb
+\def\1{\llap{\rlap{\ding{182}}\hskip\amtIndent\relax}}\relax
+\def\2{\llap{\rlap{\ding{183}}\hskip\amtIndent\relax}}\relax
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={!~@}]
+\declarePlayList{\playList}{% note: put parentheses within braces
+!quad\ytIdTitle{Kung-Fu Fighting {(Bruce Lee)}}{GZ9e3Dy7obA}
+!quad\ytIdTitle{Kung-Fu Fighting* {(Carl Douglas)}}{jhUkGIsKvn0}
+!1!quad\ytIdTitle{J\"{u}rgen's "favorite" song*}{mLDF5MBMWHE}
+!2!quad\ytIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+}
+\ytPlayList{GZ9e3Dy7obA}{\playList}
+\paragraph*{Example} A two-item dropdown list:
+ \ytComboList{YT1}{144bp}{11bp}\olBdry\ytComboBtn{YT1}{33bp}{11bp}
+\end{Verbatim}
+\endgroup\noindent There are a several observations to make in this markup: line~\ding{182}
+uses standard {\LaTeX} markup to describe the u-umlaut, the double quote
+requires no special attention; line~\ding{183} the backslash can be expressed
+as \cs{cs\darg{\ameta{text}}}. Also note that two of the titles have an
+\texttt* in them, this signals that these videos cannot be embedded.
+
+\subsection{Basic Methods: popup menus}\label{upu}
+
+\textbf{Demo files.} The techniques of this section are illustrated by the two files
+\texttt{examples/\allowbreak ltx4yt-2.tex} and \texttt{examples/web-pkg/ltx4yt-w2.tex}.
+
+\newtopic\noindent A pop-up menu is a menu list that appears on top of the content of the page, it is generated
+by the JavaScript method \texttt{app.popUpMenuEx()}. The advantage of this
+method is that it take up no space on the page, it is displayed on top of the
+page and is dismissed when an item from the menu list is chosen.
+
+\goodbreak
+\newtopic\noindent\textbf{To create a pop-up menu}
+\begin{enumerate}
+ \item \textbf{Build a menu listing.} Use the \env{popupmenu} environment of
+ the \pkg{popumemnu} package to build/design your menu.
+\bVerb\takeMeasure{\string\begin\darg{submenu}\darg{title=\ameta{submenu-name\SUB{1}}}}%
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\begin{popupmenu}{!ameta(menu-name)}
+\puIdTitle{!ameta(title!SUB1)}{!ameta(ytvId!SUB1)}
+...
+\puIdTitle{!ameta(title!SUB(m))}{!ameta(ytvId!SUB(m))}
+\begin{submenu}{title=!ameta(submenu-name!SUB1)}
+!quad\puIdTitle{!ameta(title!SUB(m+1))}{!ameta(ytvId!SUB(m+1))}
+!quad..
+!quad\puIdTitle{!ameta(title!SUB(m+n))}{!ameta(ytvId!SUB(m+n))}
+\end{submenu}
+...
+\end{popupmenu}
+\end{Verbatim}
+\end{minipage}\eVerb
+You need not have a \env{submenu} structure, but \env{submenu}s are useful for organizing the links.
+The first argument of \cs{puIdTitle} is passed through \cs{pdfstringdef}, this enables you to use
+{\LaTeX} markups for accents, for example. If the second argument (\ameta{ytvId}) is empty, then
+that entry has no action associated with it, and can be used as a menu heading.
+
+\item \textbf{Create the menu data.} Following all \env{popupmenu}
+ environments, yet still in the preamble\FmtMP{preamble}, insert the
+ following command:
+\bVerb\takeMeasure{\string\ytUseMenus\darg{\ameta{menu-name\SUB{1}},...,\ameta{menu-name\SUB{k}}}}%
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytUseMenus{!ameta(menu-name!SUB1),...,!ameta(menu-name!SUB(k))}
+...
+!color(gray)\begin{document}
+\end{Verbatim}
+\end{minipage}\eVerb The argument of \cs{ytUseMenus} is a comma-delimited list
+of \ameta{menu-name}s declared as the first argument of \env{popupmenu}
+environments.
+
+\item \textbf{Place the \cs{ytPopupBtn} command.}
+\bVerb\takeMeasure{\string\ytPopupBtn[\ameta{KV-pairs}]\darg{\ameta{menu-name}\darg{\ameta{wd}}\darg{\ameta{ht}}}}%
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytPopupPresets{!ameta(KV-pairs)}
+\ytPopupBtn[!ameta(KV-pairs)]{!ameta(menu-name)}{!ameta(wd)}{!ameta(ht)}
+\end{Verbatim}
+\end{minipage}\eVerb Employ \cs{ytPopupPresets} as a way to pass \ameta{KV-pairs} to all
+\cs{ytPopupBtn} commands in the document. For an individual \cs{ytPopupBtn}
+command, its \ameta{KV-pairs} argument passes key-values to that
+\cs{ytPopupBtn}, these \ameta{KV-pairs} will override the ones of
+\cs{ytPopupPresets}. The second argument, \ameta{menu-name}, is name of the
+pop-up menu data you want to use. This menu data is created earlier in the
+preamble by the \env{popumenu} environment and referenced again in the argument
+of \cs{ytUseMenus}.
+\end{enumerate}
+
+\paragraph*{Example.} \ytPopupBtn[\CA{Sea Hunt}]{YTSea}{20bp}{5bp}
+Let's create a short pop-up menu, more extensive examples are found
+in \texttt{examples/\allowbreak ltx4yt-2.tex} and \texttt{examples/web-pkg/ltx4yt-w2.tex}.
+\bVerb\def\1{\llap{\rlap{\ding{182}}\hskip\amtIndent\relax}}\relax
+\def\2{\llap{\rlap{\ding{183}}\hskip\amtIndent\relax}}\relax
+\def\3{\llap{\rlap{\ding{184}}\hskip\amtIndent\relax}}\relax
+\def\4{\llap{\rlap{\ding{185}}\hskip\amtIndent\relax}}\relax
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={!~@}]
+\begin{popupmenu}{YTSea}
+!1!quad\puIdTitle{J\"{u}rgen's favorite song*}{mLDF5MBMWHE}
+!2!quad\puIdTitle{\Esc"Sea Hunt\Esc"
+!qquad~US TV series {(1958-61)} lead-in}{Lz0aMoWh8Q4}@
+!quad\puIdTitle{Theme Song to Sea Hunt*}{2QxXk6X9GDo}
+!3!quad\puIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+\end{popupmenu}
+!4\ytUseMenus{YTSea}
+...
+\begin{document}
+...
+...
+\paragraph*{Example.}
+\ytPopupBtn[\CA{Sea Hunt}]{YTSea}{20bp}{5bp} Let's ...
+\end{Verbatim}
+\eVerb The first argument of \cs{puIdTitle} is passed through
+\cs{pdfstringdef}, this enables you to use {\LaTeX} markup on accents, as in
+\ding{182}. In line \ding{183}, a special locally defined command \cs{Esc} is
+used to ``escape'' the double quotes so that we \verb~\"~ to appear in the
+document JavaScript, which is where the menu items appear within the PDF. In
+line~\ding{184} a special locally defined command \cs{cs} is used to create a
+backslash, in a manner similar to {\LaTeX} markup. Note the presence of the
+\FmtMP{\texttt{*} noted}\texttt{*} in the title of two of the menu items;
+this is used to signal to the underlying JavaScript that the title cannot be
+embedded. Finally, we the \env{popupmenu} environment, we declare, in line~\ding{185},
+that we are using the menu named \texttt{YTSea}.
+
+\newlength\ytlength
+
+\section{Advanced Methods: Playing video with \tops{\protect\cs}{\textbackslash}{ytLink}}
+
+The link earlier discussed is \cs{ytvId}, which takes as its first argument
+the video ID of the targeted video. It then constructs a URL one way or
+another, depending on the presence of the \texttt*-option. This method is
+pretty rigid, one size fits all, if you will. A more flexible method of
+constructing links is to use the \cs{ytLink} command.
+\bVerb\takeMeasure{\string\ytLink\darg{\string\embedId\darg{\ameta{ytvId}}\string\params\darg{\ameta{params}}\darg{\ameta{text}}}}%
+\setlength\ytlength{\bxSize}%
+\def\1{\rlap{\hskip\ytlength\relax\ding{182}}}%
+\def\2{\rlap{\hskip\ytlength\relax\ding{183}}}%
+\def\3{\rlap{\hskip\ytlength\relax\ding{184}}}%
+\def\4{\rlap{\hskip\ytlength\relax\ding{185}}}%
+\def\5{\rlap{\hskip\ytlength\relax\ding{186}}}%
+\def\6{\rlap{\hskip\ytlength\relax\llap{\sffamily(presets for \cs{ytvId})\hskip2\fboxsep\hskip2\fboxrule}}}%
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+!1\ytLink{\embedId{!ameta(ytvId)}\params{!ameta(params)}}{!ameta(text)}
+!2\ytLink{\watchId{!ameta(ytvId)}\params{!ameta(params)}}{!ameta(text)}
+!3\ytLink{\embed{!ameta(spec)}}{!ameta(text)}
+!4\ytLink{!ameta(spec)}{!ameta(text)}
+!5\ytLink{\channel{!ameta(name)}}{!ameta(text)}
+!5\ytLink{\user{!ameta(name)}}{!ameta(text)}
+!6\ytvIdPresets{!ameta(KV-pairs)}
+\end{Verbatim}
+\end{minipage}\eVerb Each of these has an optional first argument \ameta{KV-pairs} that is not shown above.
+Let's take a look at each of these in turn and illustrate with examples. Yes,
+{\YT} has a number of parameter is recognizes in its urls, see
+\href{https://developers.google.com/youtube/player_parameters#Parameters}{here}
+for a discussion.
+\begin{enumerate}
+ \item[\ding{182}] Use this form \emph{when you can embed} a video
+ \ameta{ytvId} with additional parameters. (this best type of video).
+ The \cs{params} argument \emph{must follow} the \cs{embedId}, its
+ arguments are any parameters you want to append to the URL. The use
+ of \cs{params} is optional; however, without \cs{params} you
+ should use \verb|\ytvId*{|\ameta{ytvID}\verb|}{|\ameta{text}\verb|}|.
+ For example, we auto play a video with modest branding:\\[3pt]
+ \ytLink{\embedId{5y9-EVmreU4}\params{autoplay=1&modestbranding=1}}{Lori's Corner: Episode \#1}\\\small
+ \verb!\ytLink{\embedId{5y9-EVmreU4}!\\
+ \null\qquad\verb!\params{autoplay=1&modestbranding=1}}{Lori's Corner: Episode \#1}!
+
+ The demo file \texttt{ltx4yt-1.tex} contains an example of this type
+ of link that sets up a small play list of three videos.
+
+ \item[\ding{183}] Use this form \emph{when you \emph{cannot} embed} (or
+ you want to play the video on the main {\YT} site) \ameta{ytvId} with
+ additional parameters. The \cs{params} argument must follow the
+ \cs{watchId}, its argument are any parameters you want to append to
+ the URL. The use of \cs{params} is optional; however, without the
+ \cs{params} you may as well use
+ \verb|\ytvId*{|\ameta{ytvID}\verb|}{|\ameta{text}\verb|}|.
+ \\[3pt]
+ \ytLink{\watchId{5y9-EVmreU4}\params{autoplay=1}}{Lori's Corner: Episode \#1}\\
+ \verb!\ytLink{\watchId{5y9-EVmreU4}!\\
+ \null\qquad\verb!\params{autoplay=1}}{Lori's Corner: Episode \#1}!
+
+ \item[\ding{184}] A more general form that allows you to formulate general URLs. For example, we \emph{search}
+ for {\YT} videos on \app{Adobe Acrobat DC}:\\[3pt]
+ \ytLink{\embed{listType=search&list=Adobe Acrobat DC}}{Search for Adobe Acrobat DC}\\
+ \verb!\ytLink{\embed{listType=search&list=Adobe Acrobat DC}}!\\
+ \null\qquad\verb!{Search for Adobe Acrobat DC}!
+ \item[\ding{185}] The most general form, \ameta{spec} is simply appended, ie,
+ \texttt{https://www.youtube.com/\ameta{spec}}\\[3pt]
+ \ytLink{embed?listType=search&list=LaTeX typesetting}{Totally custom search link}\\
+ \verb|\ytLink{embed?listType=search&list=LaTeX typesetting}|\\
+ \null\qquad\verb|{Totally custom search link}|
+ \item[\ding{186}] There are a couple of URLs for displaying a channel on \YT, at least there are a couple
+ that I have discovered.
+ Use this form to see channel of a particular contributor to {\YT}. For example,\\[3pt]
+ \ytLink{\channel{rocketjump}}{The RocketJump Channel}\\
+ \verb|\ytLink{\channel{rocketjump}}{The RocketJump Channel}|\\[3pt]
+ \ytLink{\user{freddiew}}{Freddie Diew's Channel}\\
+ \verb|\ytLink{\user{freddiew}}{Freddie Diew's channel}|
+
+ To get the true \ameta{name} of a channel, go to {\YT} and search for that channel. For example,
+ search for \textsf{RocketJump}. On the resulting page, click on a RocketJump link and look at the
+ location bar in the browser to see the path, it may come up \texttt{c/rocketjump} or \texttt{user/freddiew}.
+\end{enumerate}
+
+\newtopic\noindent There is a multi-line version of \cs{ytLink}.
+\bVerb\takeMeasure{\string\ytLinkML*[\ameta{KV-pairs}]\darg{\ameta{spec}}\darg{\ameta{text}}}%
+\begin{minipage}{\linewidth}
+\begin{minipage}{\bxSize}
+\xdef\panelWidth{\the\linewidth}% *[\ameta{opts}]\darg{\ameta{ytvID}}\darg{\ameta{text}}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytLinkML*[!ameta(KV-pairs)]{!ameta(spec)}{!ameta(text)}
+\ytvIdPresets{!ameta(KV-pairs)}
+\end{Verbatim}
+\end{minipage}\hfill
+\begin{minipage}{\linewidth-\panelWidth}
+\setDisplayNumber\label{display:ytLinkML}
+\end{minipage}\end{minipage}\eVerb This form, which requires \pkg{aeb\_mlink} package and the
+\app{dvips\,->distiller}, creates true multi-line links. \cs{ytLinkML} has the same variations
+of \cs{ytLink} (lines \ding{182}--\ding{186}) described earlier
+
+\section{Searching {\YT}} %\previewOn
+
+Want to interactively search {\YT} for your favorate video? Search using the commands \cs{ytInputQuery}
+and \cs{ytSearch}:
+\bVerb\takeMeasure{\string\ytInputQuery[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}%
+\begin{minipage}{\linewidth}
+\begin{minipage}{\bxSize}
+\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
+\ytInputQuery[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\ytSearch[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\ytClearQuery[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\end{Verbatim}
+\end{minipage}
+\quad\ytInputQuery{1.5in}{11bp}\olBdry
+\ytSearch{}{11bp}\olBdry
+\ytClearQuery{}{11bp}
+\end{minipage}
+\eVerb \cs{ytInputQuery} is an input box to enter query text; \cs{ytSearch} is a push button that searchs
+{\YT} for the text entered into \cs{ytInputQuery}; and finally, \cs{ytClear} clears \cs{ytInputQuery}.
+
+
+\newtopic\noindent
+That's all for now, I simply must get back to my retirement. {\dps}
+
+\end{document}
diff --git a/macros/latex/contrib/ltx4yt/docs/ltx4yt.pdf b/macros/latex/contrib/ltx4yt/docs/ltx4yt.pdf
new file mode 100644
index 0000000000..19dc2f61d7
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/docs/ltx4yt.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/examples/ltx4yt-1.pdf b/macros/latex/contrib/ltx4yt/examples/ltx4yt-1.pdf
new file mode 100644
index 0000000000..c85e343e39
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/ltx4yt-1.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/examples/ltx4yt-1.tex b/macros/latex/contrib/ltx4yt/examples/ltx4yt-1.tex
new file mode 100644
index 0000000000..2f2a215b3e
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/ltx4yt-1.tex
@@ -0,0 +1,74 @@
+\documentclass{article}
+\usepackage{ltx4yt}
+\usepackage{multicol}
+
+\hypersetup{%
+ pdfpagemode=UseNone,colorlinks,
+ pdftitle={The \texorpdfstring{\textsf{ltx4yt} Package\\[3pt]}{ltx4yt Package: }Playing YouTube in a Browser using links},
+ pdfauthor=D. P. Story,
+ pdfsubject={Play YouTube videos in the default browser},
+ pdfkeywords={YouTube, AeB}
+}
+
+\title{The \texorpdfstring{\textsf{ltx4yt} Package\\[3pt]}{ltx4yt Package: }Playing YouTube videos in a browser using links}
+\author{D. P. Story}
+
+\addtolength{\textwidth}{.5in}
+
+\parindent0pt \parskip6pt
+
+
+\begin{document}
+
+
+
+\maketitle
+
+\textbf{Favorites to play:} Itemized links below use the \verb~\ytvId~ and \verb~\ytvId*~ commands,
+the only \texttt{*} command is ``Kung-Fu Fighting* (Original),'' this one is played with advertisements
+and related/unrelated content. The links in this document should work across all PDF viewers and across all devices.
+\begin{flushleft}\raggedcolumns
+\begin{multicols}{2}\bfseries
+\begin{itemize}
+
+\item \ytvId{GZ9e3Dy7obA}{Kung-Fu Fighting (Bruce Lee)}
+
+\item \ytvId*{jhUkGIsKvn0}{Kung-Fu Fighting* (Original)}
+
+\item \ytvId{_iUnOpPEg0w}{TegrityGuy}
+
+\item \ytvId{eNzrn8-JFSE}{Open at Adobe}
+
+\item \ytvId{q-iiFo-6Vi0}{Digital Signature in 9.0 Pro}
+
+\item \ytvId{5y9-EVmreU4}{Lori's Corner: Episode \#1}
+
+\item \ytvId{T9Yzo_hlwP0}{Intro to PDF Portfolios}
+\end{itemize}
+\end{multicols}
+\end{flushleft}
+What follows are customized links created by \verb~\ytLink~.
+
+\ytLink{\watchId{5y9-EVmreU4}\params{autoplay=1}}{Lori's Corner: Episode \#1} (\verb~\watchId~ and \verb~\params~)
+
+\ytLink{\embedId{5y9-EVmreU4}\params{autoplay=1&modestbranding=1}}{Lori's Corner: Episode \#1} (\verb~\embedId~ and \verb~\params~)
+
+\ytLink{\embed{listType=search&list=Adobe Acrobat DC}}{Search for Adobe Acrobat DC} (\verb~\embed~ custom search)
+
+\ytLink{embed?listType=search&list=table tennis}{Totally custom search link} (surprise topic)
+
+
+\ytLink{\channel{rocketjump}}{The RocketJump Channel} (\verb~\channel~)
+
+\ytLink{\user{freddiew}}{Freddie Diew's channel} (\verb~\user~)
+
+\ytLink{\embedId{5y9-EVmreU4}\params{autoplay=1&controls=1&fs=1&modestbranding=1&playlist=T9Yzo_hlwP0,eNzrn8-JFSE}}{A playlist of three videos}
+
+\textbf{PDF viewers:} \textsf{Acrobat}, \textsf{Acrobat Reader DC}, \textsf{PDFX-Change}, \textsf{SumatraPDF}, \textsf{evince}, \textsf{TeXworks}
+
+\textbf{Browsers:} \textsf{Microsoft Edge}, \textsf{Firefox}, \textsf{Google Chrome}
+
+\textbf{Devices:} \textsf{Android} smart phones, \textsf{iPhones}, \textsf{Android} tablets
+
+\end{document}
+
diff --git a/macros/latex/contrib/ltx4yt/examples/ltx4yt-2.pdf b/macros/latex/contrib/ltx4yt/examples/ltx4yt-2.pdf
new file mode 100644
index 0000000000..fc9ec84a69
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/ltx4yt-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/examples/ltx4yt-2.tex b/macros/latex/contrib/ltx4yt/examples/ltx4yt-2.tex
new file mode 100644
index 0000000000..83ca787605
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/ltx4yt-2.tex
@@ -0,0 +1,98 @@
+\documentclass{article}
+\usepackage[usepopup]{ltx4yt}
+
+
+\hypersetup{pdfpagemode=UseNone,colorlinks,
+ pdfencoding=auto,
+ pdftitle={The \texorpdfstring{\textsf{ltx4yt} Package\\[3pt]}{ltx4yt Package: }Playing YouTube in a Browser using Forms and JavaScript},
+ pdfauthor=D. P. Story,
+ pdfsubject={Play YouTube videos in the default browser},
+ pdfkeywords={YouTube, AeB}
+}
+\title{The \texorpdfstring{\textsf{ltx4yt} Package\\[3pt]}{ltx4yt Package: }Playing YouTube videos in a browser using Forms and JavaScript}
+\author{D. P. Story}
+
+%\previewOn\pmpvOn
+
+\parindent=0pt\parskip6pt
+
+
+\begin{popupmenu}{YTMenu}
+ \puIdTitle{Select a YouTube Video}{} % A title has no ytId
+ \begin{submenu}{title=Music Videos}
+ \puIdTitle{Kung-Fu Fighting (Bruce Lee)}{GZ9e3Dy7obA}
+ \puIdTitle{Kung-Fu Fighting* (Carl Douglas)}{jhUkGIsKvn0}
+ \puIdTitle{Ink Spots - If I didn't care}{rvwfLe6sLis}
+ \puIdTitle{Ink Spots* - My Prayer}{h7KJCns5v3g}
+ \end{submenu}
+ \begin{submenu}{title=Adobe Related Videos}
+ \puIdTitle{Open at Adobe}{eNzrn8-JFSE}
+ \puIdTitle{Lori's Corner Episode \#1}{5y9-EVmreU4}
+ \puIdTitle{Intro to PDF Portfolios}{T9Yzo_hlwP0}
+ \end{submenu}
+ \begin{submenu}{title=Action Videos}
+ \puIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
+ \puIdTitle{AimBot}{NYGlWjIKoY4}
+ \puIdTitle{Flower Warfare}{031Dshcnso4}
+ \puIdTitle{Modern Warfare: Frozen Crossing Pt. 1}{rzQMGMuD1sU}
+ \puIdTitle{Modern Warfare: Frozen Crossing Pt. 2}{a08ViuvORRM}
+ \end{submenu}
+\end{popupmenu}
+
+\begin{popupmenu}{YTSea}
+ \puIdTitle{\Esc"Sea Hunt\Esc" US TV series {(1958-61)} lead-in}{Lz0aMoWh8Q4}
+ \puIdTitle{Theme Song to Sea Hunt*}{2QxXk6X9GDo}
+ \puIdTitle{J\"{u}rgen's favorite song*}{mLDF5MBMWHE}
+ \puIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+\end{popupmenu}
+
+
+% After defining all menus used with YouTube videos, declare them using \ytUseMenus
+\ytUseMenus{YTMenu,YTSea}
+
+\declarePlayList{\playList}{% note: put parentheses within braces
+ \ytIdTitle{Kung-Fu Fighting {(Bruce Lee)}}{GZ9e3Dy7obA}
+ \ytIdTitle{Kung-Fu Fighting* {(Carl Douglas)}}{jhUkGIsKvn0}
+ \ytIdTitle{RAF Sculthorpe {(Watch for my Mom at 6:22!)}}{K7H8QghVs9k}
+ \ytIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
+ \ytIdTitle{Abdul And Cleopatra* - Jonathan Richman and the Modern Lovers}{mLDF5MBMWHE}
+%
+ \ytIdTitle{J\"{u}rgen's favorite song*}{mLDF5MBMWHE}
+ \ytIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+ \ytIdTitle{"Sea Hunt" US TV series {(1958-61)} lead-in}{Lz0aMoWh8Q4}
+}
+
+\begin{document}
+
+\maketitle
+
+In this second sample file, the combo box and popup menu are
+demonstrated. Both of these use JavaScript methods that will
+function perfectly on \textsf{Adobe Acrobat}, \textsf{Adobe
+Acrobat Reader DC}, and \textsf{PDFX-Change Editor}. None of the fields
+work within the native PDF viewer of modern browsers.
+
+\textbf{Demo of combo box of favorites.} By convention of this
+package, items with an ``\texttt{*}" in their title is a signal to
+the document consumer that that video cannot be
+embedded and must be played on the YouTube site with
+advertisements and such. \vspace{-\parskip}
+\begin{quote}
+\ytPlayList{\tops{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}}{\playList}
+\ytComboList{YT1}{190bp}{11bp}\olBdry
+ \ytComboBtn[\TU{Click to play}]{YT1}{33bp}{11bp}
+\end{quote}
+
+\ytPopupBtn{YTMenu}{20bp}{5bp}
+\textbf{Demo of a popup menu of favorites.}
+On this page, with your mouse cursor, roll over the push button labeled \textcolor{blue}{\textsf{YT Menu}}, and a popup
+menu appears. Choose a YouTube video based on title.
+
+\ytPopupBtn[\CA{Sea Hunt}]{YTSea}{20bp}{5bp} Yes, you can have multiple popup menus in the document.
+
+\textbf{Demo of an interactive search}\\[3pt]
+\ytInputQuery{1.5in}{11bp}\olBdry
+\ytSearch{}{11bp}\olBdry
+\ytClearQuery{}{11bp}
+
+\end{document}
diff --git a/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.pdf b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.pdf
new file mode 100644
index 0000000000..7069e972e2
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.tex b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.tex
new file mode 100644
index 0000000000..8e55454731
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w1.tex
@@ -0,0 +1,82 @@
+\documentclass{article}
+\usepackage[designv,extended]{web}
+\usepackage{ltx4yt}
+\usepackage{multicol}
+
+\parindent0pt \parskip6pt
+
+
+\textBgColor{lightgray}
+
+\DeclareDocInfo
+{
+ title=The \texorpdfstring{\textsf{ltx4yt} Package\\[3pt]}{ltx4yt Package: }Playing YouTube in a Browser,
+ author=D. P. Story,
+ university=Acro\negthinspace\TeX.Net,
+ email=dpstory@acrotex.net,
+ subject={Play YouTube video in the default browser},
+ keywords={YouTube, AeB},
+ talksite=\url{http://www.acrotex.net},
+ talkdate={\today}
+}
+\talkdateLabel{Published:}
+
+\parindent=0pt\parskip6pt
+\rheader{}
+
+\addtoWebHeight{7\baselineskip}
+
+\begin{document}
+
+\maketitle
+
+\begin{center}\bfseries\Large\color{blue}LTX4YT -- Links\end{center}
+
+\textbf{Favorites to play:} Itemized links below use the \verb~\ytvId~ and \verb~\ytvId*~ commands,
+the only \texttt{*} command is ``Kung-Fu Fighting* (Original),'' this one is played with advertisements
+and related/unrelated content. The links in this document should work across all PDF viewers and across all devices.
+\begin{flushleft}\raggedcolumns
+\begin{multicols}{2}\bfseries
+\begin{itemize}
+
+\item \ytvId{GZ9e3Dy7obA}{Kung-Fu Fighting (Bruce Lee)}
+
+\item \ytvId*{jhUkGIsKvn0}{Kung-Fu Fighting* (Original)}
+
+\item \ytvId{_iUnOpPEg0w}{TegrityGuy}
+
+\item \ytvId{eNzrn8-JFSE}{Open at Adobe}
+
+\item \ytvId{q-iiFo-6Vi0}{Digital Signature in 9.0 Pro}
+
+\item \ytvId{5y9-EVmreU4}{Lori's Corner: Episode \#1}
+
+\item \ytvId{T9Yzo_hlwP0}{Intro to PDF Portfolios}
+\end{itemize}
+\end{multicols}
+\end{flushleft}
+What follows are customized links created by \verb~\ytLink~.
+
+\ytLink{\watchId{5y9-EVmreU4}\params{autoplay=1}}{Lori's Corner: Episode \#1} (\verb~\watchId~ and \verb~\params~)
+
+\ytLink{\embedId{5y9-EVmreU4}\params{autoplay=1&modestbranding=1}}{Lori's Corner: Episode \#1} (\verb~\embedId~ and \verb~\params~)
+
+\ytLink{\embed{listType=search&list=Adobe Acrobat DC}}{Search for Adobe Acrobat DC} (\verb~\embed~ custom search)
+
+\ytLink{embed?listType=search&list=table tennis}{Totally custom search link} (surprise topic)
+
+
+\ytLink{\channel{rocketjump}}{The RocketJump Channel} (\verb~\channel~)
+
+\ytLink{\user{freddiew}}{Freddie Diew's channel} (\verb~\user~)
+
+\ytLink{\embedId{5y9-EVmreU4}\params{autoplay=1&controls=1&fs=1&modestbranding=1&playlist=T9Yzo_hlwP0,eNzrn8-JFSE}}{A playlist of three videos}
+
+\textbf{PDF viewers:} \textsf{Acrobat}, \textsf{Acrobat Reader DC}, \textsf{PDFX-Change}, \textsf{SumatraPDF}, \textsf{evince}, \textsf{TeXworks}
+
+\textbf{Browsers:} \textsf{Microsoft Edge}, \textsf{Firefox}, \textsf{Google Chrome}
+
+\textbf{Devices:} \textsf{Android} smart phones, \textsf{iPhones}, \textsf{Android} tablets
+
+\end{document}
+
diff --git a/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.pdf b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.pdf
new file mode 100644
index 0000000000..958c36cbaf
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.pdf
Binary files differ
diff --git a/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.tex b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.tex
new file mode 100644
index 0000000000..31f3ca4917
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/examples/web-pkg/ltx4yt-w2.tex
@@ -0,0 +1,110 @@
+\documentclass{article}
+\usepackage[designv,extended]{web}
+\usepackage[usepopup]{ltx4yt}
+
+%\previewOn
+
+\parindent0pt \parskip6pt
+
+
+\textBgColor{lightgray}
+
+\DeclareDocInfo
+{
+ title=The \texorpdfstring{\textsf{ltx4yt} Package\\[3pt]}{ltx4yt Package: }Playing YouTube in a Browser,
+ author=D. P. Story,
+ university=Acro\negthinspace\TeX.Net,
+ email=dpstory@acrotex.net,
+ subject={Live streamed video from YouTube.com},
+ keywords={You Tube, AeB, rmannot},
+ talksite=\url{http://www.acrotex.net},
+ talkdate={\today}
+}
+\talkdateLabel{Published:}
+
+\parindent=0pt\parskip6pt
+\rheader{}
+
+\begin{popupmenu}{YTMenu}
+ \puIdTitle{Select a YouTube Video}{} % A title has no ytId
+ \begin{submenu}{title=Music Videos}
+ \puIdTitle{Kung-Fu Fighting (Bruce Lee)}{GZ9e3Dy7obA}
+ \puIdTitle{Kung-Fu Fighting* (Carl Douglas)}{jhUkGIsKvn0}
+ \puIdTitle{Ink Spots - If I didn't care}{rvwfLe6sLis}
+ \puIdTitle{Ink Spots* - My Prayer}{h7KJCns5v3g}
+ \end{submenu}
+ \begin{submenu}{title=Adobe Related Videos}
+ \puIdTitle{Open at Adobe}{eNzrn8-JFSE}
+ \puIdTitle{Lori's Corner Episode \#1}{5y9-EVmreU4}
+ \puIdTitle{Intro to PDF Portfolios}{T9Yzo_hlwP0}
+ \end{submenu}
+ \begin{submenu}{title=Action Videos}
+ \puIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
+ \puIdTitle{AimBot}{NYGlWjIKoY4}
+ \puIdTitle{Flower Warfare}{031Dshcnso4}
+ \puIdTitle{Modern Warfare: Frozen Crossing Pt. 1}{rzQMGMuD1sU}
+ \puIdTitle{Modern Warfare: Frozen Crossing Pt. 2}{a08ViuvORRM}
+ \end{submenu}
+\end{popupmenu}
+
+\begin{popupmenu}{YTSea}
+ \puIdTitle{\Esc"Sea Hunt\Esc" US TV series {(1958-61)} lead-in}{Lz0aMoWh8Q4}
+ \puIdTitle{Theme Song to Sea Hunt*}{2QxXk6X9GDo}
+ \puIdTitle{J\"{u}rgen's favorite song*}{mLDF5MBMWHE}
+ \puIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+\end{popupmenu}
+
+
+% After defining all menus used with YouTube videos, declare them using \ytUseMenus
+\ytUseMenus{YTMenu,YTSea}
+
+\declarePlayList{\playList}{% note: put parentheses within braces
+ \ytIdTitle{Kung-Fu Fighting {(Bruce Lee)}}{GZ9e3Dy7obA}
+ \ytIdTitle{Kung-Fu Fighting* {(Carl Douglas)}}{jhUkGIsKvn0}
+ \ytIdTitle{RAF Sculthorpe {(Watch for my Mom at 6:22!)}}{K7H8QghVs9k}
+ \ytIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
+ \ytIdTitle{Abdul And Cleopatra* - Jonathan Richman and the Modern Lovers}{mLDF5MBMWHE}
+%
+ \ytIdTitle{J\"{u}rgen's favorite song*}{mLDF5MBMWHE}
+ \ytIdTitle{Learn \cs{LaTeX} in one video}{VhmkLrOjLsw}
+ \ytIdTitle{"Sea Hunt" US TV series {(1958-61)} lead-in}{Lz0aMoWh8Q4}
+}
+
+\begin{document}
+
+
+
+%\maketitle
+
+\begin{center}\bfseries\Large\color{blue}LTX4YT -- Forms\end{center}
+
+In this second sample file, the combo box and popup menu are
+demonstrated. Both of these use JavaScript methods that will
+function perfectly on \textsf{Adobe Acrobat}, \textsf{Adobe
+Acrobat Reader DC}, and \textsf{PDFX-Change Editor}. None of the fields
+work within the native PDF viewer of modern browsers.
+
+\textbf{Demo of combo box of favorites.} By convention of this
+package, items with an ``\texttt{*}" in their title is a signal to
+the document consumer that that video cannot be
+embedded and must be played on the YouTube site with
+advertisements and such. \vspace{-\parskip}
+\begin{quote}
+\ytPlayList{\tops{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}}{\playList}
+\ytComboList{YT1}{190bp}{11bp}\olBdry
+ \ytComboBtn[\TU{Click to play}]{YT1}{33bp}{11bp}
+\end{quote}
+
+\ytPopupBtn{YTMenu}{20bp}{5bp}
+\textbf{Demo of a popup menu of favorites.}
+On this page, with your mouse cursor, roll over the push button labeled \textcolor{blue}{\textsf{YT Menu}}, and a popup
+menu appears. Choose a YouTube video based on title.
+
+\ytPopupBtn[\CA{Sea Hunt}]{YTSea}{20bp}{5bp} Yes, you can have multiple popup menus in the document.
+
+\textbf{Demo of an interactive search}\\[3pt]
+\ytInputQuery{1.5in}{11bp}\olBdry
+\ytSearch{}{11bp}\olBdry
+\ytClearQuery{}{11bp}
+
+\end{document}
diff --git a/macros/latex/contrib/ltx4yt/ltx4yt.dtx b/macros/latex/contrib/ltx4yt/ltx4yt.dtx
new file mode 100644
index 0000000000..ef6356d9ff
--- /dev/null
+++ b/macros/latex/contrib/ltx4yt/ltx4yt.dtx
@@ -0,0 +1,651 @@
+%\iffalse
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ltx4yt.sty package, %%
+%% Copyright (C) 2020 %%
+%% dpstory@uakron.edu %%
+%% %%
+%% 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+%<package>\ProvidesPackage{ltx4yt}
+%<package> [2020/07/30 v0.7 ltx4yt: Play YouTube videos in the default browser (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
+\hypersetup{pdfpagemode=useNone}
+\usepackage{fancyvrb}
+%\def\texorpdfstring#1#2{#1}
+%\pdfstringdefDisableCommands{\let\\\textbackslash}
+\OnlyDescription % comment out for implementation details
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{ltx4yt}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{ltx4yt}{aebdocfmt.def cannot be found}}
+\EnableCrossrefs \CodelineIndex \RecordChanges
+\makeatletter
+\renewcommand{\paragraph}
+ {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}
+ {\normalfont\normalsize\bfseries}}
+\renewenvironment{quote}[1][]
+ {\def\@rgi{#1}\ifx\@rgi\@empty
+ \let\rghtm\@empty\else\def\rghtm{\rightmargin\leftmargin}\fi
+ \list{}{\rghtm} %{\rightmargin\leftmargin}%
+ \item\relax}
+ {\endlist}
+\makeatother
+\bgroup\ttfamily
+\gdef\brpr#1{\char123\relax#1\char125\relax}\egroup
+\let\darg\brpr
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\tops\texorpdfstring
+\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
+\def\visispace{\symbol{32}}
+\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
+\def\meta#1{\textsl{\texttt{#1}}}
+\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
+\def\ltag{<}\def\rtag{>}
+\def\EXCL{!}
+\let\app\textsf\let\pkg\textsf
+\begin{document}
+ \GetFileInfo{ltx4yt.sty}
+ \title{The \textsf{ltx4yt} Package}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@acrotex.net}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{ltx4yt.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o ltx4yt.ind ltx4yt.idx} on the command line and recompile
+ \texttt{ltx4yt.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o ltx4yt.gls ltx4yt.glo} on the command line and recompile
+ \texttt{ltx4yt.dtx}.}
+\end{document}
+%</driver>
+% \fi
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{ltx4yt}{Inputting aebdonotindex.def}}
+% {\PackageInfo{ltx4yt}{cannot find aebdonotindex.def}}
+% \DoNotIndex{\g@addto@macro,\divide,\box,\setbox,\x,\y,\z}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \section{Introduction}
+%
+% It is July 2020 and Adobe's support for Flash will vanish in December. Google stopped
+% supporting Flash several years ago, so the package \pkg{yt4pdf} is no longer functional
+% and will be withdrawn from CTAN. If we cannot play videos within PDF anymore, the next best
+% course is to develop some basic commands for playing YouTube videos in the default browser, preferably
+% without any annoying advertisements. This can be done for some videos, but for others it cannot be done.
+%
+%\changes{v0.1}{2020/07/17}{Begin new package \string\pkg{ltx4yt}}
+%\changes{v0.2}{2020/07/17}{Commands to pass arguments to urls}
+%\changes{v0.6}{2020/07/25}{Final version before first publication}
+%\changes{v0.7}{2020/07/30}{Corrected upload}
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+% \end{macrocode}
+% \leavevmode\IndexOpt{usepopup} When this option is taken, additional code to support
+% the use of popup menus is input. We also support \IndexOpt[\protect\EXCL]{!usepopup}\opt{!popup},
+% which is a convenience option for not using \opt{usepopup}.
+% \begin{macrocode}
+\DeclareOption{usepopup}{\def\lo@dpu{\InputIfFileExists{ytpu.def}
+ {\PackageInfo{ltx4yt}{Loading ytpu.def}}
+ {\PackageInfo{ltx4yt}{Can't find ytpu.def}}}}
+\DeclareOption{!usepopup}{}
+\let\lo@dpu\relax
+\AtEndOfPackage{\lo@dpu}
+\ProcessOptions
+\RequirePackage{xcolor}
+\RequirePackage{eforms}
+% \end{macrocode}
+% If the \opt{usepopup} option is taken, we load the \pkg{popupmenu} package.
+% \begin{macrocode}
+\ifx\lo@dpu\relax\else
+\def\YT@rpPU{\RequirePackage{popupmenu}[2020/07/26]}\expandafter
+\YT@rpPU\fi
+% \end{macrocode}
+%
+% \section{Implementation}
+%
+% The JavaScript method \texttt{app.launchURL\darg{\ameta{URL}}} is used to open the default browser
+% on the page determined by \ameta{URL}. The links created use \cs{URI} (\texttt{/S/URI/URI}), this action type
+% allows links to be functional in all PDF viewers, even on hand held devices.
+%
+% We have three implementations of this plan: (1)~links (\cs{ytvId} and \cs{ytLink}) for all devices;
+% (2)~dropdown menus (combo boxes) (\cs{ytComboList} (uses JavaScript);
+% and (3)~pop-up menus using the \env{popupmenu} environment of the \pkg{popupmenu} package (uses JavaScript).
+% The methods that use JavaScript will not function in the near future on hand held devices.
+%
+% \subsection{Playing a YouTube video from its Video ID}
+%
+% In this section, we create several ways of calling for a YouTube video to play
+% in the default browser.
+%
+% \subsubsection{Using a Link}
+% \begin{macro}{\ytvIdPresets}\nmpsep{\darg{\ameta{KV-pairs}}}
+% The options for the \cs{ytvId} link. The default is given below in the definition.
+% Initially, the preset is to produce \texttt{webbrown} colored links.
+% \begin{macrocode}
+\newcommand{\ytvIdPresets}[1]{\def\yt@vIdPresets{#1}}
+\definecolor{webbrown}{rgb}{.6,0,0} % from the web package
+\ytvIdPresets{\linktxtcolor{webbrown}}
+% \end{macrocode}
+% \end{macro}
+% Here is a convenience command. This definition has since been made
+% in \pkg{insdljs}.
+% \begin{macrocode}
+\providecommand{\URI}[1]{/S/URI/URI(#1)}
+% \end{macrocode}
+% Define \DescribeMacro\ytURL\cs{ytURL} to expand to the YouTube web site.
+% \begin{macrocode}
+\def\ytNF{false}
+\def\ytURL{https://www.youtube.com}
+% \end{macrocode}
+% \begin{macro}{\ytvId}\nmpsep{*[\ameta{opts}]\darg{\ameta{ytvID}}\darg{\ameta{text}}}
+% The \cs{ytvId} is link which when pressed plays the video whose Video Id is \ameta{ytvID})
+% in the default browser.
+% \begin{quote}
+% \begin{itemize}
+% \item[\texttt*] If the \texttt*-option is taken, you have determined that this
+% video cannot be embedded (which is the ideal) and must be played normally on YouTube
+% with all advertisements and other extraneous information.
+% \item[{\ameta{opts}}:] link optional KV-pairs to modify the appearance of the link.
+% \item[{\ameta{ytvID}}:] The video Id for the YouTube video to play
+% \item[{\ameta{text}}:] The text that displays the link.
+%\end{itemize}
+%\end{quote}
+% \begin{macrocode}
+\newcommand{\ytvId}{\@ifstar{\def\yt@ask{*}\yt@@vId}
+ {\let\yt@ask\@empty\yt@@vId}}
+\newcommand{\yt@@vId}[3][]{%
+ \ifx\yt@ask\@empty
+ \def\yt@lnk@hash{embed/#2}\else
+ \def\yt@lnk@hash{watch?v=#2}\fi
+ \setLink[\presets{\yt@vIdPresets}#1
+ \A{\URI{\ytURL/\yt@lnk@hash}}]{#3}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytvIdML}\nmpsep{*[\ameta{opts}]\darg{\ameta{ytvID}}\darg{\ameta{text}}}
+% The \cs{ytvId} is link which when pressed plays the video whose Video Id is \ameta{ytvID})
+% in the default browser. This is a multi-line link, it requires the \pkg{aeb\_mlink} package
+% and the \app{dvips\,\texttt{->}\,distiller} workflow.
+% \begin{macrocode}
+\newcommand{\ytvIdML}{\@ifstar{\def\yt@ask{*}\yt@@vIdML}
+ {\let\yt@ask\@empty\yt@@vIdML}}
+\newcommand{\yt@@vIdML}[3][]{%
+ \ifx\yt@ask\@empty
+ \def\yt@lnk@hash{embed/#2}\else
+ \def\yt@lnk@hash{watch?v=#2}\fi
+ \mlsetLink[\presets{\yt@vIdPresets}#1
+ \A{\URI{\ytURL/\yt@lnk@hash}}]{#3}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytLink}\nmpsep{[\ameta{opts}]\darg{\ameta{spec}}\darg{\ameta{text}}}
+% We create a custom link for youtube videos. The \ameta{spec} (specification) argument has several
+% forms for maximum convenience and flexibility.
+% \begin{itemize}
+% \item |\ytLink{\embedId{|\ameta{ytvID}|}\params{|\ameta{parameters}|}}{|\ameta{text}|}|\\[3pt] This is the form
+% for playing a video with \ameta{ytvID} that \emph{can be embedded} (this best type of video). The \cs{params}
+% argument must follow the \cs{embedId}, its argument are any parameters you want to append to the URL.
+% The use of \cs{params} is optional; however, without the \cs{params} you may as well use
+% |\ytvId{|\ameta{ytvID}|}{|\ameta{text}|}|.
+%
+% \item |\ytLink{\watchId{|\ameta{ytvID}|}\params{|\ameta{parameters}|}}{|\ameta{text}|}|\\[3pt] This is the form
+% for playing a video with \ameta{ytvID} that \emph{cannot be embedded} (advertisements and other information
+% appears). The \cs{params} argument must follow the \cs{watchId}, its argument are any parameters you want to append to the URL.
+% The use of \cs{params} is optional; however, without the \cs{params} you may as well use
+% |\ytvId*{|\ameta{ytvID}|}{|\ameta{text}|}|.
+%
+% \item |\ytLink{\embed{|\ameta{spec}|}}{|\ameta{text}|}|\\[3pt]
+% A form that does not specify a video ID. It is useful for more general actions, such as
+% searches, for example,
+% \begin{flushleft}
+% |\ytLink{\embed{listType=search&list=Adobe Acrobat DC}}|\\
+% \qquad|{Search for Adobe Acrobat DC}|
+% \end{flushleft}
+% This form does not have a \cs{params} optional argument as all the parameters are built into the
+% argument of \cs{embed}.
+%
+% \item |\ytLink{|\ameta{spec}|}{|\ameta{text}|}|\\[3pt] The most general form. The action of this
+% link is |\URI{\ytURL/|\ameta{spec}|}|; for example,
+% \begin{flushleft}
+% |\ytLink{embed?listType=search&list=Adobe Acrobat DC}|\\
+% \qquad|{Search for Adobe Acrobat DC}|
+% \end{flushleft}
+% Here you are free to build whatever URL you can imagine.
+%
+% \item |\ytLink{\channel{|\ameta{name}|}}{|\ameta{text}|}|\\[3pt]
+% Such a link displays the channel \ameta{name}. For example,
+% \begin{flushleft}
+% |\ytLink{\channel{rocketjump}}{The RocketJump Channel}|
+% \end{flushleft}
+% This link opens the YouTube channel named \texttt{rocketjump}.
+% \end{itemize}
+% \paragraph*{Passing Player Parameters.}
+% As was illustrated above, the custom link \cs{ytLink} can pass various recognizable
+% parameters to YouTube. After reviewing,
+% \begin{flushleft}
+% \url{https://developers.google.com/youtube/player_parameters#Parameters}
+% \end{flushleft}
+% the following parameters are recommended, some of them are illustrated in the
+% sample document \texttt{ltx4yt-1.tex}:
+% \begin{itemize}
+% \item \texttt{autoplay=\ameta{\upshape{0\string|1}}} (default \texttt{0})
+% \item \texttt{controls=\ameta{\upshape{0\string|1}}} (default \texttt{1})
+% \item \texttt{fs=\ameta{\upshape{0\string|1}}} (default \texttt{1})
+% \item \texttt{modestbranding=\ameta{\upshape{0\string|0}}}
+% \item \texttt{playlist=\ameta{list}}
+% \item \texttt{listType=search\&list=\ameta{query}}
+% \end{itemize}
+% The specialized needs of the document author is most easily accommodated through the use
+% of the \cs{ytLink} command, for example,
+% \begin{flushleft}\obeylines
+% |\ytLink{\embedId{5y9-EVmreU4}\params{autoplay=1&modestbranding=1}}|
+% \qquad|{Lori's Corner: Episode \#1}|
+% \end{flushleft}
+% \begin{macrocode}
+\newif\ifytwatch \ytwatchfalse
+% \end{macrocode}
+% \paragraph*{The \cs{ytLink} command.} Before getting to \cs{ytLink} an d\cs{ytLinkML},
+% there is a long stream of commands to parse the \ameta{spec} argument of \cs{ytLink}.
+% It goes through looking for \cs{watchId}, \cs{embedId}, \cs{embed}, and \cs{params}.
+% As it progresses, it adds code to the macro \cs{ytspec}, which at the end of things
+% will hold the fully formed \ameta{spec} for insertion into the URL.
+% \begin{macrocode}
+\def\yt@@parse{\let\ytspec\@empty\yt@parse}
+\def\yt@parse{\@ifnextchar\@nil{\@gobble}{\yt@parsei}}
+\def\yt@parsei{\@ifnextchar\watchId{% check for \watchId
+ \ytwatchtrue\yt@parse@watch}{\yt@parseii}}
+\def\yt@parse@watch\watchId#1{\g@addto@macro
+ \ytspec{\watchId{#1}}\yt@parse}
+\def\yt@parseii{\@ifnextchar\embedId{% check for \embedId
+ \yt@parse@embedId}{\yt@parseiii}}
+\def\yt@parse@embedId\embedId#1{\g@addto@macro
+ \ytspec{\embedId{#1}}\yt@parse}
+\def\yt@parseiii{\@ifnextchar\embed{% check for \embed
+ \yt@parse@embed}{\yt@parseiv}}
+\def\yt@parse@embed\embed#1{\g@addto@macro
+ \ytspec{\embed{#1}}\yt@parse}
+\def\yt@parseiv{\@ifnextchar\params{% check for \params
+ \yt@parse@params}{\yt@parsev}}
+\def\yt@parse@params\params#1{\ifytwatch
+ \g@addto@macro\ytspec{&#1}\else
+ \g@addto@macro\ytspec{?#1}\fi
+ \yt@parse}
+% \end{macrocode}
+% If we get this far, \ameta{spec} is raw, has none
+% of the helper commands. So we just insert the
+% entire argument into \cs{ytspec}.
+% \begin{macrocode}
+\def\yt@parsev#1\@nil{\g@addto@macro\ytspec{#1}}
+% \end{macrocode}
+% All preliminaries done, we define \cs{ytLink}
+% \begin{macrocode}
+\newcommand{\ytLink}[3][]{\begingroup
+ \def\embedId##1{embed/##1}%
+ \def\params##1{##1}\def\embed##1{embed?##1}%
+ \def\watchId##1{watch?v=##1}\def\channel##1{c/##1}%
+ \def\user##1{user/##1}%
+ \yt@@parse#2\@nil % returns arg in \ytspec
+ \def\URLArg{\ytURL/\ytspec}%
+ \setLink[\presets{\yt@vIdPresets}#1\A{\URI{\URLArg}}
+ ]{#3}\endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytLinkML}\nmpsep{[\ameta{opts}]\darg{\ameta{spec}}\darg{\ameta{text}}}
+% is the multi-line version of \cs{ytLink}. It requires a \app{dvips\,\texttt{->}\,distiller} workflow
+% as well as the \pkg{aeb\_mlink} package.
+% \begin{macrocode}
+\newcommand{\ytLinkML}[3][]{\begingroup
+ \def\embedId##1{embed/##1}%
+ \def\params##1{##1}\def\embed##1{embed?##1}%
+ \def\watchId##1{watch?v=##1}\def\channel##1{c/##1}%
+ \def\user##1{user/##1}%
+ \yt@@parse#2\@nil % returns arg in \ytspec
+ \def\URLArg{\ytURL/\ytspec}%
+ \mlsetLink[\presets{\yt@vIdPresets}#1
+ \A{\URI{\URLArg}}
+ ]{#3}\endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Using a Combobox}
+% All commands associate with a combo box play list.
+% \begin{macro}{\ytComboList}\nmpsep{[\ameta{opts}]\darg{\ameta{name}}\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% The \cs{ytComboList} command produces a combo box (dropdown menu) of video Ids and titles. The user selects a
+% video based on its title, then presses the PLAY button. The two commands
+% \cs{ytComboListPresets} and \cs{ytComboBtnPresets} are used to set the appearances
+% of the combo box and the PLAY button.
+%\begin{quote}
+%\begin{itemize}
+% \item[\ameta{opts}:] eforms key-value pairs
+% \item[\ameta{name}:] A unique name (ASCII letters and numbers)
+% \item[\ameta{wd}:] The width of the combo box
+% \item[\ameta{ht}:] The height of the combo box
+%\end{itemize}
+%\end{quote}
+% Now we have the code for \cs{ytComboList}
+% \begin{macrocode}
+\newcommand{\ytComboList}[4][]{%
+ \comboBox[\Ff{\FfCommitOnSelChange}\DV{\yt@pl@def}\V{\yt@pl@def}
+ \presets{\yt@ComboListPresets}#1]{ytSelect#2}
+ {#3}{#4}{*\yt@pl@pl}% 2020/07/22 v0.4
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytComboBtn}\nmpsep{[\ameta{opts}]\darg{\ameta{name}}\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A button to play the selection made in the combo box. The caption of the push button
+% is determined by the command \DescribeMacro\ytStrPLAY\cs{ytStrPlay}.
+% The parameters for \cs{ytComboBtn} are,
+% \begin{quote}
+%\begin{itemize}
+% \item[\ameta{opts}:] The KV-pairs to pass to the underlying push button.
+% \item[\ameta{name}:] A unique name (ASCII letters and numbers)
+% \item[\ameta{wd}:] The width of the combo box
+% \item[\ameta{ht}:] The height of the combo box
+%\end{itemize}
+%\end{quote}
+% \begin{macrocode}
+\newcommand{\ytStrPLAY}{PLAY}
+\newcommand{\ytComboBtn}[4][]{%
+ \pushButton[\TU{Click to play}\CA{\ytStrPLAY}
+ \presets{\yt@ComboBtnPresets}#1
+ \A{\JS{var f=this.getField("ytSelect#2");\r
+ var ytID=f.value;\r
+ var i=f.currentValueIndices;\r
+ var ytFV=f.getItemAt(i,false);\r
+ var i=ytFV.indexOf("*");\r
+ if ( i == -1 )\r\t
+ app.launchURL("\ytURL/embed/"+ytID,\ytNF);\r
+ else\r\t
+ app.launchURL("\ytURL/watch?v="+ytID,\ytNF);
+ }}]{ytSelectBtn#2}{#3}{#4}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytPlayList}\nmpsep{\darg{\ameta{ytvID}}\darg{\ameta{\cs{cmd}}}}
+% This command is executed before \cs{ytComboList} to set the initial/default value (\ameta{ytvID}) of the
+% combo box and the play list (\ameta{\cs{cmd}}). Here \ameta{\cs{cmd}} is a command defined by the
+% \cs{declarePlayList} command. Use the \cs{ytPlayList} to pass the play list to the next combo box.
+% \begin{macrocode}
+\newcommand{\ytPlayList}{\begingroup\@makeother\_\@makeother\'
+ \ytPlayList@i}
+\def\ytPlayList@i#1#2{\gdef\yt@pl@def{#1}\xdef\yt@pl@pl{#2}\endgroup}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytComboListPresets}\nmpsep{\darg{\ameta{opts}}} The KV-pairs
+% for \cs{ytComboList}.
+% \begin{macrocode}
+\newcommand{\ytComboListPresets}[1]{\def\yt@ComboListPresets{#1}}
+\let\yt@ComboListPresets\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytComboBtnPresets}\nmpsep{\darg{\ameta{opts}}} The KV-pairs
+% for \cs{ytComboBtn}.
+% \begin{macrocode}
+\newcommand{\ytComboBtnPresets}[1]{\def\yt@ComboBtnPresets{#1}}
+\let\yt@ComboBtnPresets\@empty
+% \end{macrocode}
+% \end{macro}
+% \leavevmode\DescribeMacro{\ytIdTitle}\nmpsep{\darg{\ameta{text}}\darg{\ameta{VidID}}}
+% A convenience command to lay out the playlist.
+% \begin{macrocode}
+\newcommand{\ytIdTitle}[2]{[(#2)(#1)]}
+% \end{macrocode}
+% \begin{macro}{\declarePlayList}
+% A video ID may contain characters {\LaTeX} considers special, so we sanitize these
+% special characters before reading in the video ID. Near as I can determine, a video
+% id consists of 11 characters comprising combinations of letters (A-Z,a-z) numbers
+% (0-9) and special characters underscore and hyphen (\_ and -). We sanitize the last two.
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\declarePlayList{!ameta(\cmd)}{
+% \ytIdTitle{!ameta(text)}{!ameta(VidID)}
+% ...
+% \ytIdTitle{!ameta(text)}{!ameta(VidID)}
+% }
+%\end{Verbatim}
+%The entries may also be in raw form `|[(\ameta{VidID})(\ameta{text})]|'. Note that the two arguments are
+%enclosed in parentheses, there is a problem with parsing if \ameta{text} itself contains
+%parentheses. Within \ameta{text} enclose matching parentheses in braces, for example,
+%\begin{flushleft}|\ytIdTitle{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}|\end{flushleft}
+%\paragraph*{The role of \texttt* in the title.} If an \texttt{*} appears in the title, this means
+%that the video cannot be embedded. Viewing the video will come with advertisements and other information
+%that YouTube generates.
+%\begin{flushleft}|\ytIdTitle{Kung-Fu Fighting* {(Original version)}}{jhUkGIsKvn0}|\end{flushleft}
+%\changes{v0.4}{2020/07/22}{Changed parsing of \string\cs{declarePlayList} to accomodate
+%\string\cs{pdfstringdef}}
+% \begin{macrocode}
+\newcommand{\declarePlayList}[1]{\bgroup
+ \Hy@unicodefalse
+ \let\pl@yList\@empty
+ \ifpdfmarkup
+ \def\Esc{\eqbs}\else\def\Esc{}\fi
+ \def\cs##1{\eqbs\eqbs##1}\relax
+ \@makeother\_\@makeother\-
+ \yt@declarePlayList{#1}%
+}
+\def\yt@declarePlayList#1#2{%
+ \yt@declarePlayList@i#2\@nil\relax\relax
+ \toks@=\expandafter{\pl@yList}\relax
+ \xdef#1{\pl@yList}\egroup
+}
+\def\yt@declarePlayList@i{\@ifnextchar\@nil
+ {\expandafter\@gobbletwo\@gobble}
+ {\yt@declarePlayList@ii}%
+}
+\def\yt@declarePlayList@ii\ytIdTitle#1#2{%
+ \pdfstringdef\yt@PLTitle{#1}%
+ \edef\y{[(#2)(\yt@PLTitle)]}%
+ \expandafter\g@addto@macro\expandafter
+ \pl@yList\expandafter{\y}%
+ \yt@declarePlayList@i
+}
+% \end{macrocode}
+% \end{macro}
+%An example of use of \cs{declarePlayList}:
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\declarePlayList{\playListii}{%
+% \ytIdTitle{Elfego Baca}{gRwa0MdeqVs}
+% \ytIdTitle{Texas John Slaughter}{7yrk1BvtLE8}
+% \ytIdTitle{Swamp Fox}{-SBPnw5riLM&NR}
+% \ytIdTitle{Zorro Promo}{cKludhxEoJ0}
+%}
+%\end{Verbatim}
+% \begin{macrocode}
+%</package>
+%<*pujs>
+% \end{macrocode}
+% \subsubsection{Using a popup menu}
+% These code lines (including the document JavaScript) are only included
+% when the \opt{usepopup} option is taken.
+% \begin{macro}{\ytUseMenus}\nmpsep{\darg{\ameta{menu-names}}}
+% A command used to list popupmenu data. It defines a command
+% \cs{ytPopupData} that is used in the JS support for popup menus. The argument
+% \ameta{menu-names} is a comma-delimited list of menu names defined by a \env{popupmenu} environment. The command
+% needs to be in the preamble.
+% \begin{macrocode}
+\def\ytPopupAllMenuData{// ltx4yt: Begin popup menu data^^J}%
+\let\ytMenuNames\@gobble
+\newcommand{\ytUseMenus}[1]{\bgroup
+ \@for\yt@menu:=#1\do{%
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \ytMenuNames{,"\yt@menu"}}\x
+ \edef\x{\expandafter\noexpand\@nameuse{\yt@menu}}%
+ \toks@=\expandafter{\x^^J}%
+ \expandafter\g@addto@macro\expandafter
+ \ytPopupAllMenuData\expandafter{\the\toks@}%
+ }\g@addto@macro\ytPopupAllMenuData
+ {// ltx4yt: End of popup menu data}%
+ \egroup
+}
+\@onlypreamble\ytUseMenus
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\puIdTitle}
+% A convenience macro for entering popupmenu data for youtube videos.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,codes={\catcode`\%=9},commandchars={!()}]
+%\begin{popupmenu}{YTMenu}
+% \puIdTitle{Select a YouTube Video}{} % A title has no yt Id
+% \begin{submenu}{title=Music Videos}
+% \puIdTitle{Kung-Fu Fighting (Bruce Lee version)}{GZ9e3Dy7obA}
+% \puIdTitle{\string\"Sea Hunt\string\" TV serie}{MW-IZ67iADU}
+% ...
+% \end{submenu}
+%\end{popupmenu}
+%\end{Verbatim}
+% Note that we must protect the double quote.
+% \begin{macrocode}
+%\newcommand{\puIdTitle}[2]{\item{title={#1},%
+% return={[\itemindex,'#2']}}}
+\newcommand{\puIdTitle}[2]{\Hy@unicodefalse\pdfstringdef\x@YT{#1}%
+ \edef\y@YT{\noexpand\item{title={\x@YT},%
+ return={[\noexpand\itemindex,'#2']}}}\y@YT}
+% \end{macrocode}
+% \end{macro}
+% Some convenience commands for setting up a push button to display the popupmenu
+% on rollover.
+% \begin{macrocode}
+\def\ytpubtnCnt{0}
+\newcommand{\ytPopupBtn}[4][]{\bgroup
+ \@tempcnta\ytpubtnCnt\relax
+ \advance\@tempcnta\@ne
+ \xdef\ytpubtnCnt{\the\@tempcnta}%
+ \pushButton[\cmd{\pmpvCAOff}\CA{YT Menu}
+ \textColor{0 0 1}\W1\BC{}\textSize{0}
+ \H{N}\S{S}\presets{\yt@PopupPresets}#1
+ \AAmouseenter{ytPopupMenu("#2");} % dps
+ ]{ytPopup\ytpubtnCnt}{#3}{#4}\egroup
+}
+\newcommand{\ytPopupPresets}[1]{\def\yt@PopupPresets{#1}}
+\let\yt@PopupPresets\@empty
+% \end{macrocode}
+% \begin{macrocode}
+%</pujs>
+%<*package>
+% \end{macrocode}
+% \subsection{Search YouTube interactively}
+% \begin{macro}{\ytInputQuery}\nmpsep{[\ameta{opts}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% Provides a text field to enter a query string.
+% \begin{macrocode}
+\newcommand{\ytInputQuery}[3][]{%
+ \textField[\TU{Enter a query text string}#1]{ytSearchTxt}{#2}{#3}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytSearch}\nmpsep{[\ameta{opts}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button what will search YouTube based on the query string.
+% \begin{macrocode}
+\newcommand{\ytSearch}[3][]{%
+ \pushButton[\CA{Search}#1\AAmouseup{%
+ var f=this.getField("ytSearchTxt");\r
+ var v=f.value;\r
+ if ( v.replace(/\string\s/g,"") != "" )\r\t
+ app.launchURL("\ytURL/embed?listType=search&list="+v);}
+ ]{ytSearchBtn}{#2}{#3}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ytClearQuery}\nmpsep{[\ameta{opts}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A button to clear the query string.
+% \begin{macrocode}
+\newcommand{\ytClearQuery}[3][]{%
+ \pushButton[\CA{Clear}#1
+ \AAmouseup{this.resetForm("ytSearchTxt");}
+ ]{ytSearchClr}{#2}{#3}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*pujs>
+% \end{macrocode}
+%\subsection{Document JavaScript}
+% Some JavaScript to process the user's choice and to launch the browser
+% to view the selected video.
+% \changes{v0.5}{2020/07/24}{Manage multiple menus}
+% \begin{macrocode}
+\begin{insDLJS*}{yt}
+\begin{newsegment}{ltx4yt: %
+Popup Menu Data and JavaScript support functions}
+var YTdebug=false;
+var aYTLastChoice=new Array;
+var bYTLastChoice=false;
+\ytPopupAllMenuData
+var aChoice; // make local
+function ytProcessMenu(cMenu) { // aMenu->cMenu now a string
+ var aMenu=eval(cMenu);
+ var cChoice = app.popUpMenuEx.apply( app, aMenu );
+ ytProcessMenu.cChoice=cChoice;
+ if ( cChoice != null ) {
+ aChoice=eval(cChoice);
+ if (aChoice[1]=="") return null;
+ var thisChoice=aChoice[0];
+ eval(cMenu+thisChoice).bMarked=true;
+ if (!bYTLastChoice) {
+ eval(cMenu+aChoice[0]).bMarked=true;
+ } else {
+ var structLoc=eval(aYTLastChoice[1])[0]
+ eval(aYTLastChoice[0]+structLoc).bMarked=false;
+ eval(cMenu+aChoice[0]).bMarked=true;
+ }
+ return aChoice;
+ } else return null;
+}
+function ytPopupMenu(cMenu) { // cMenu now a string
+ var aChoice=ytProcessMenu(cMenu);
+ var cChoice=ytProcessMenu.cChoice;
+ var aMenu=eval(cMenu);
+ if (aChoice!=null) {
+ var title=eval(cMenu+aChoice[0]).cName;
+ var i=title.indexOf("*");
+ var _hash=(i == -1)?"embed/"+aChoice[1]:"watch?v="+aChoice[1];
+ if (!bYTLastChoice) {
+ if(YTdebug) %
+console.println("launching url https://www.youtube.com/"+_hash);
+ else app.launchURL("https://www.youtube.com/"+_hash,false);
+ aYTLastChoice=[cMenu,cChoice];
+ bYTLastChoice=true;
+ } else {
+ var cLastMenu=eval(aYTLastChoice[1])[0]
+ aYTLastChoice=[cMenu,cChoice];
+ if (cLastMenu!=aChoice[0]) {
+ if (YTdebug) %
+console.println("will launch url: https://www.youtube.com/"+_hash);
+ else app.launchURL("https://www.youtube.com/"+_hash,false);
+ } else {
+ if (YTdebug) console.println("will NOT launch url");
+ // choice is the same, uncheck this item
+ eval(cMenu+aChoice[0]).bMarked=false;
+ bYTLastChoice=false;
+ }
+ }
+ }
+}
+\end{newsegment}
+\end{insDLJS*}
+% \end{macrocode}
+% \begin{macrocode}
+%<*pujs>
+%<*package>
+%</package>
+% \end{macrocode}
+% \Finale
+\endinput
+
+https://developers.google.com/youtube/iframe_api_reference?csw=1
diff --git a/macros/latex/contrib/yt4pdf/yt4pdf.ins b/macros/latex/contrib/ltx4yt/ltx4yt.ins
index 6732fb251c..f9535bae17 100644
--- a/macros/latex/contrib/yt4pdf/yt4pdf.ins
+++ b/macros/latex/contrib/ltx4yt/ltx4yt.ins
@@ -17,8 +17,8 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2010/09/10}
-\def\batchfile{yt4pdf.ins}
+\def\filedate{2020/07/17}
+\def\batchfile{ltx4yt.ins}
\input docstrip
\ifx\generate\undefined
@@ -45,7 +45,8 @@
\generate
{%
- \file{yt4pdf.sty}{\from{yt4pdf.dtx}{copyright,package}}
+ \file{ltx4yt.sty}{\from{ltx4yt.dtx}{copyright,package}}
+ \file{ytpu.def}{\from{ltx4yt.dtx}{copyright,pujs}}
}
\Msg{***************************************************************}
diff --git a/macros/latex/contrib/yt4pdf/README.md b/macros/latex/contrib/yt4pdf/README.md
deleted file mode 100644
index 5d1400140e..0000000000
--- a/macros/latex/contrib/yt4pdf/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The yt4pdf package
-Dated: 2016/10/04
-
-The yt4pdf package uses the rmannot package to embed a special SWF file to
-play the YouTube videos. There is a complete set of buttons that come with
-the package to control the video: play, pause, stop loading, rewind, load
-a video by its YouTube video ID, and a button to view a video on the
-YouTube web site. Adobe Acrobat 9 or later is required to author a
-document; only Adobe Reader 9 is need to view the created yt4pdf document.
-
-The SWF file for playing the YouTube videos was developed by UVSAR
-(http://www.uvsar.com/pdftube/) and is based on the YouTube chromeless
-player and the YouTube ActionScript 3.0 Player API Reference
-(http://code.google.com/apis/youtube/flash_api_reference.html)
-
-Now, I simply must get back to my retirement.
-
-Dr. D. P. Story
-www.acrotex.net
-dpstory@uakron.edu
-dpstory@acrotex.net
diff --git a/macros/latex/contrib/yt4pdf/doc/yt4pdf_man.pdf b/macros/latex/contrib/yt4pdf/doc/yt4pdf_man.pdf
deleted file mode 100644
index 5b0bbca68d..0000000000
--- a/macros/latex/contrib/yt4pdf/doc/yt4pdf_man.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/doc/yt4pdf_man.tex b/macros/latex/contrib/yt4pdf/doc/yt4pdf_man.tex
deleted file mode 100644
index 97febc04f1..0000000000
--- a/macros/latex/contrib/yt4pdf/doc/yt4pdf_man.tex
+++ /dev/null
@@ -1,737 +0,0 @@
-% makeindex < aebpro_man.idx > aebpro_man.ind
-\documentclass{article}
-\usepackage[fleqn]{amsmath}
-\usepackage[
- web={centertitlepage,designv,tight*,usetemplates,
- forcolorpaper,latextoc,pro},%usesf,
- eforms,aebxmp
-]{aeb_pro}
-%\usepackage{multicol}
-\usepackage{aeb_mlink}
-\usepackage{array}
-\usepackage[altbullet]{lucidbry}
-
-\usepackage{makeidx}
-\makeindex
-\usepackage{acroman}
-
-\usepackage[active]{srcltx}
-
-\def\expath{../examples}
-
-\urlstyle{rm}
-\def\pkg{\textsf}
-\let\app\textsf
-\let\opt\texttt
-\let\uif\textsf
-\let\env\texttt
-\def\meta#1{\textit{\texttt{#1}}}
-\def\ameta#1{$\langle\textit{\texttt{#1}}\rangle$}
-\newdimen\aebdimen \aebdimen6pt %\partopsep \advance\aebdimen\partopsep
-\newcommand\bVerb[1][]{\begingroup#1\vskip\aebdimen\parindent0pt}%
-\def\eVerb{\vskip\aebdimen\endgroup\noindent}
-\def\SUB#1{\ensuremath{{}_{\text{#1}}}}
-\def\darg#1{\texttt{\{#1\}}}
-\def\takeMeasure{\bgroup\obeyspaces\takeMeasurei}
-\def\takeMeasurei#1{\global\setbox\webtempboxi\hbox{\ttfamily#1}\egroup}
-\def\bxSize{\wd\webtempboxi+2\fboxsep+2\fboxrule}
-\let\amtIndent\leftmargini
-\makeatletter
-\def\setDisplayNumber#1#2{\kern0pt
- \setlength\abovedisplayshortskip{0pt}%
- \setlength\belowdisplayshortskip{0pt}%
- \setlength\abovedisplayskip{0pt}%
- \setlength\belowdisplayskip{0pt}%
- \begin{equation}\label{#2}\end{equation}\kern0pt
-}
-\renewenvironment{quote}[1][]
- {\def\@rgi{#1}\ifx\@rgi\@empty
- \let\rghtm\@empty\else\def\rghtm{\rightmargin\leftmargin}\fi
- \list{}{\rghtm} %{\rightmargin\leftmargin}%
- \item\relax}
- {\endlist}
-\renewcommand*\descriptionlabel[1]{\hspace\labelsep
- \normalfont #1}
-\setcounter{secnumdepth}{4}
-\setcounter{tocdepth}{5}
-\renewcommand*{\theparagraph}{\texorpdfstring{\protect\P\protect\ }{\textparagraph}}
-\renewcommand{\paragraph}
- {\renewcommand{\@seccntformat}[1]{\theparagraph}%
- \@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\color{\aeb@subsubsectioncolor}\bfseries}}
-\renewcommand*\l@paragraph{\@dottedtocline{4}{5.0em}{1em}} %{7.0em}{4.1em}}
-\def\chgCurrLblName#1{\def\@currentlabelname{#1}}
-\def\echgCurrLblName#1{\edef\@currentlabelname{#1}}
-\makeatother
-
-
-\newcommand{\YouTube}{\textsf{YouTube}}
-
-
-%\def\tutpath{doc/tutorial}
-%\def\tutpathi{tutorial}
-
-\DeclareDocInfo
-{
- university={\AcroTeX.Net},
- title={The \texorpdfstring{\textsf{yt4PDF} Package\\[1em]}{: }
- Playing \texorpdfstring{\YouTube}{YouTube} Videos in PDF},
- author={D. P. Story},
- email={dpstory@acrotex.net},
- subject={Playing YouTube Videos in PDF},
- talksite={\url{www.acrotex.net}},
- version={1.1, 2016/10/04},
- keywords={AcroTeX, PDF, YouTube, rmannot},
- copyrightStatus=True,
- copyrightNotice={Copyright (C) \the\year, D. P. Story},
- copyrightInfoURL={http://www.acrotex.net}
-}
-
-\def\dps{$\hbox{$\mathfrak D$\kern-.3em\hbox{$\mathfrak P$}%
- \kern-.6em \hbox{$\mathcal S$}}$}
-
-\universityLayout{fontsize=Large}
-\titleLayout{fontsize=LARGE}
-\authorLayout{fontsize=Large}
-\tocLayout{fontsize=Large,color=aeb}
-\sectionLayout{indent=-40pt,fontsize=large,color=aeb} %,afterskip=1sp}
-\subsectionLayout{indent=-20pt,color=aeb} %,afterskip=1sp}
-\subsubsectionLayout{indent=0pt,color=aeb} %,afterskip=1sp}
-\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
-
-\newenvironment{eqComments}[1][\strut]{\smallskip\leftskip-\labelwidth
-\item[]\textbf{\textcolor{blue}{#1}}}{\par\smallskip}
-
-%\pagestyle{empty}
-%\parindent0pt\parskip\medskipamount
-
-\chngDocObjectTo{\newDO}{doc}
-\begin{docassembly}
-var titleOfManual="The yt4pdf MANUAL";
-var manualfilename="Manual_BG_Print_yt4pdf.pdf";
-var manualtemplate="Manual_BG_Brown.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,
- bOnPrint:false,
- cDIPath:_path
-});
-\executeSave();
-\end{docassembly}
-
-\begin{document}
-
-\maketitle
-
-\selectColors{linkColor=black}
-\tableofcontents
-\selectColors{linkColor=webgreen}
-
-\section{Introduction}\label{s:intro}
-
- I believe that I was vaguely aware of the \href{http://code.google.com/apis/youtube/flash_api_reference.html}
-{{\YouTube} ActionScript 3.0 Player},\footnote{The YouTube AcrionScript 2.0 Player API
- has been deprecated as of January 27, 2015; however, it is still supported, for now.} but never pursued it because of my
-general lack of interest in {\YouTube} (\url{www.youtube.com}). Recently, I
-came across a very nice demo PDF that used the API, see
-%\mlhref{http://www.uvsar.com/pdftube/}{PDF Tube - {\YouTube} API wrapper for PDF documents}.
-``PDF Tube - {\YouTube} API wrapper for PDF documents'' (the page has
-since been removed).
-The SWF file and JavaScript are made freely available, so I
-downloaded it, and was sufficiently impressed to port the example to
-{\LaTeX} using various members of the {Acro\negthinspace\TeX} Fine Family of Software
-\verb!:-{)!. The SWF file and JavaScript are due to the good folks at
-\textbf{UVSAR} (\url{www.uvsar.com}). The \textbf{UVSAR}'s sample demo also appeared in the forums of
-the \href{http://acrobatusers.com/forum/javascript/embed-youtube-video-pdf}{Acrobat User
-Community}.
-
-The \textsf{yt4pdf} package uses the \textsf{rmannot} to embed the \textsf{SWF}
-file that plays the {\YouTube} videos. There is a complete set of buttons
-that come with the package to control the video: play, pause, stop
-loading, rewind, load a video by its {\YouTube} video ID, and a button to
-view a video on the {\YouTube} web site.\footnote{Some videos do not allow
-embedded playback, and must be viewed on the {\YouTube} web site.}
-
-% http://acrobatusers.com/news/youtube-widget-acrobat
-
-\subsection{Sample files}
-
-The following are the sample files shipped with \textsf{yt4pdf}:
-\begin{itemize}
- \item \texttt{yt4pdf-1.tex} demonstrates the basic functionality of
- the {\YouTube} RMA: the use of the poster, including \cs{ytComboList},
- \cs{ytComboBtn}, and \cs{ytvId}.
- \item \texttt{yt4pdf-2.tex} experiments with different ways the
- {\YouTube} annotation can be displayed
- \begin{itemize}
- \item As a small icon, videos are played in a floating window,
- buttons displayed in the running footer.
- \item[] This one uses a rollover, popup menu system (as opposed to
- a combo box). The \textsf{popupmenu} package is used.
- \item Using a built-in poster, with the combo box under the
- annotation, control buttons in running footer.
- \item Same as above, but control buttons moved to a two column
- format.
- \item Using the custom {\YouTube} for PDF poster with combo box and
- control buttons under the RMA.
- \end{itemize}
- \item \texttt{yt4pdf-3.tex} illustrates the usage of the \texttt{play} and \texttt{load}
- keys that are passed in the optional parameter of \cs{ytRmAnnot}.
-\end{itemize}
-% Advanced examples \href{http://www.math.uakron.edu/~dpstory/aebblog.html}{AeB Blog site}.
-
-\section{Requirements}
-
-This package is part of \textsf{AeB Pro}, which means Acrobat Distiller is
-used to create the PDF; the package requires \textsf{rmannot}, which
-creates rich media annotations. Therefore, we require
-\begin{equation*}
- \boxed{\text{\large\bfseries Adobe Acrobat, version 9.0 or later}}
-\end{equation*}
-To use this package, the document author must have AeB and AeB Pro
-installed, as well as \textsf{rmannot}. The manual for \textsf{rmannot}
-needs to be read closely to properly install it and to function correctly.
-I have made \textsf{rmannot} a required package, and recently
-have made the \textsf{popupmenu} package required as well.
-
-\section{Configuring your installation}
-
-In addition to configuring the \textsf{rmannot} package correctly, the
-\textsf{yt4pdf} package needs configuring as well. The \textsf{yt4pdf} package
-comes with a configuration file \texttt{yt4pdf.cfg}. Open this file in
-your favorite editor to see
-\begin{Verbatim}[fontsize=\small]
-% yt4pdf config file. Delete the \endinput below and replace the path
-% provided with the path to the swf folder of your yt4pdf installation.
-% This path is used to locate the pdf_tube_basic.swf file, used to play
-% YouTube videos.
-\endinput
-\renewcommand{\ytFolder}{C:/Users/Public/Documents/My TeX Files/%
-tex/latex/aeb/aebpro/yt4pdf/swf}
-\end{Verbatim}
-Edit this file so that \cs{ytFolder} points to the \texttt{swf} folder on
-your computer.
-
-\section{The Rich Mediation Annotation for {\YouTube}}
-
-The Rich Media Annotation (RMA) used is \cs{ytRmAnnot}, its definition
-uses the command \cs{rmAnnot}, which is defined in the \textsf{rmannot} package.
-\bVerb\takeMeasure{\string\ytRmAnnot[\ameta{KV-pairs}]\darg{\ameta{name}}\darg{\ameta{width}}\darg{\ameta{height}}}%
-\begin{minipage}{\linewidth}
-\begin{minipage}{\bxSize}
-\xdef\panelWidth{\the\linewidth}%
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytRmAnnot[!ameta(KV-pairs)]{!ameta(name)}{!ameta(width)}{!ameta(height)}
-\end{Verbatim}
-\end{minipage}\hfill
-\begin{minipage}{\linewidth-\panelWidth}
-\setDisplayNumber\label{display:ytRmAnnot}
-\end{minipage}\end{minipage}\endgroup
-\PD
-\begin{enumerate}
- \item The first (optional) parameter is used to pass the key-value pairs of the
- \cs{rmAnnot} command. Additionally, there are two other \ameta{KV-pairs}
- recognized, specialized to the \cs{ytRmAnnot} command.
- \begin{itemize}
- \item \texttt{play=\ameta{vID}} Loads and plays the {\YouTube} video with
- video ID of \ameta{vID}.
- \item \texttt{load=\ameta{vID}} Loads the specified video's thumbnail
- (as specified by \ameta{vID}) and prepares the player to play
- the video. The player does not request the \textsf{FLV} until the play
- button is pressed.
- \end{itemize}
- When you want to play a {\YouTube} video when the page containing
- the annotation is opened, use the \texttt{play} key; for example
- \texttt{play=GZ9e3Dy7obA} causes the video whose video ID is
- \texttt{GZ9e3Dy7obA} to play when the page is opened.
-
- See the manual for the \pkg{rmannot} package for more details on the
- key-value pairs that can be passed through the optional first
- parameter.
-
- \item The \ameta{name} parameter is a name used to refer to the
- annotation through underlying JavaScript code. The \ameta{name}
- should consist of only letters and numbers. The value of this
- parameter is placed in the macro \cs{ytCurrRMAName}. This macro is
- used internally by the various control buttons.
-
- \item The width of the annotation.
-
- \item The height of the annotation.
-\end{enumerate}
-
-\paragraph*{Annot Dimensions.}
-The width and height of the {\YouTube} annotation should be \texttt{571bp}
-and \texttt{330bp}, respectively, or any re-scaling of these dimensions.
-
-Examples,
-\begin{Verbatim}
- \ytRmAnnot[posternote=AcroTeX PDF Tube,play=eNzrn8-JFSE,
- deactivated=pageclose]{YouTube1}{571bp}{330bp}
-\end{Verbatim}
-is a ``full-size'' annotation, while
-\begin{Verbatim}
- \ytRmAnnot[posternote=AcroTeX PDF Tube,load=eNzrn8-JFSE,
- deactivated=pageclose]{YouTube1}{571bp/2}{330bp/2}
-\end{Verbatim}
-is half that size. The first example above plays a video when
-the page is opened, the second example loads the thumbnail, and waits play
-the video.
-
-You can also re-scale using either \cs{resizebox} or
-\cs{scalebox} from the \textsf{graphicx} package.
-\begin{Verbatim}
- \resizebox{2in}{!}{\ytRmAnnot[posternote=AcroTeX PDF Tube,
- deactivated=pageclose]{YouTube1}{571bp}{330bp}}
-\end{Verbatim}
-or, using \cs{scalebox},
-\begin{Verbatim}
- \scalebox{.5}{\ytRmAnnot[posternote=AcroTeX PDF Tube,
- deactivated=pageclose]{YouTube1}{571bp}{330bp}}
-\end{Verbatim}
-
-\textbf{Running multiple videos at once.} At the time of this writing, the
-\pkg{yt4pdf} package is not designed to run more than one video at a
-time, that's not saying it cannot be done, however. It is not recommended,
-indeed, why would you want to look at two {\YouTube} videos at the same
-time?
-
-For documents with multiple {\YouTube} annotations over
-several pages it is recommended, therefore, that the \texttt{deactivated=pageclose}
-should be used in the optional parameter list of the \cs{ytRmAnnot}
-command.
-
-\subsection{The \texorpdfstring{\protect\textsf{yt4pdf}}{yt4pdf} Poster}
-
-The \textsf{rmannot} package provides a standard poster (a gray rectangle
-with text in the lower left corner). However, there is an especially
-designed poster, designed by the folks at \textbf{UVSAR}. (See
-Figure~\ref*{pdfytPoster}, page~\pageref*{pdfytPoster}.)
-
-\begin{figure}[htb]
-\begin{center}
- \includegraphics[scale=.5]{./graphics/pdfyt_poster}\\
- \caption{YouTube for PDF poster}\label{pdfytPoster}
-\end{center}
-\end{figure}
-
-\goodbreak
-\textbf{To use this really cool poster:}
-\begin{enumerate}
- \item Insert the following line into the preamble,
-\begin{Verbatim}[fontsize=\small]
- \makePoster[bb=0 0 570.794 329.887]{pdfyt_poster}{pdfyt_poster}
-\end{Verbatim}
-The optional parameter should remain as it is, it adjusts the bounding
-box so that the poster is properly placed.
-
-\item Use the \texttt{poster} key in the first optional parameter of
-\cs{ytRmAnnot}, like so,
-\begin{Verbatim}
- \ytRmAnnot[poster=pdfyt_poster,
- deactivated=pageclose]{YouTube}{571bp}{330bp}}
-\end{Verbatim}
-\end{enumerate}
-
-\subsection{Control Buttons}
-
-The {\YouTube} rich media annotation (as created by \cs{ytRmAnnot}), comes
-with six (optional) control buttons.
-\bVerb\takeMeasure{\string\ytSelect[\ameta{KV-pairs}]\darg{\ameta{vID}}\darg{\ameta{width}}\darg{\ameta{height}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytPlayToggle[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\ytStopLoading[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\ytMuteToggle[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\ytRewind[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\ytSelect[!ameta(KV-pairs)]{!ameta(vID)}{!ameta(width)}{!ameta(height)}
-\ytOpenWeb[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\end{Verbatim}
-\end{minipage}\endgroup
-\PD The labels are self-explanatory, the \texttt{<kv-pairs>} parameter is
-the standard \textsf{eforms} optional parameter for changing the
-appearance of the form. The \ameta{vID} parameter for \cs{ytSelect} is
-a {\YouTube} video ID.
-
-\goodbreak
-\CmdDescription We give brief descriptions of each of the six control
-buttons.
-\begin{itemize}
- \item \cs{ytPlayToggle}:
- This button has several functions, \textsf{PAUSE}, \textsf{PLAY}, \textsf{BUFFERING}, and \textsf{REPLAY}.
- Initially the button label is on \textsf{PAUSE} (pressing it pauses a playing video);
- the button label reads \textsf{PLAY} when the video is loaded and paused (pressing it plays or resumes
- the video); while the video is loading, the button label is
- \textsf{BUFFERING\dots}. After the video finishes playing, the button
- label is changed to \textsf{Replay}.
- \item \cs{ytStopLoading}: Pressing this button stops the streaming of the currently playing
- video. If the video is started again, there will be some buffering before the play begins.
- \item \cs{ytMuteToggle}: This button toggles and sound off and on. Button labels are
- \textsf{MUTE} and \textsf{UNMUTE}.
- \item \cs{ytRewind}: If the video is playing, this button
- stops the video, rewinds it to the beginning, and starts play again. If the video
- is paused, this button rewinds the video to the beginning, the video remains paused.
- \item \cs{ytSelect}: When this button is pressed, a response dialog opens.
- The user enters a {\YouTube} video ID into the field. On pressing OK, this video is played.
-
- \item[] The second parameter \ameta{vID} is the default video
- that is displayed in the input box of the response box that opens.
- \item[] \textbf{Note:} Some {\YouTube} videos are security
- restricted and cannot be played through an embedded player, such as the one used here.
- If video ID of a video that does not allow embedded playback, a dialog appears giving
- the user the opportunity to view the video on the web.
- \item \cs{ytOpenWeb}: The user has the option of pressing this button to view the
- current video on the web at \texttt{www.youtube.com}.
-\end{itemize}
-
-The first (optional) parameter can be used to modify the appearance of the
-individual buttons. To modify the appearances of the buttons as a group,
-use,
-\bVerb\takeMeasure{\string\ytBtnPresets\darg{\ameta{KV-pairs}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytBtnPresets{!ameta(KV-pairs)}
-\end{Verbatim}
-\end{minipage}\eVerb
-The key-value pairs are ones defined for form fields created by the \textsf{eforms}
-package. The default definition is,
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\ytBtnPresets{\BC{.5 0 0}\S{S}\textFont{HeBo}}
-\end{Verbatim}
-
-The second parameter of \cs{ytRmAnnot} is the name to be associated with
-that annot; the name of the annot is not known until after the annot is
-defined. The command \cs{DeclareYTName},
-\bVerb\takeMeasure{\string\DeclareYTName\darg{\ameta{name}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\DeclareYTName{!ameta(name)}
-\end{Verbatim}
-\end{minipage}\eVerb
-allows you to define the name prior to the creation of the annot. This is
-useful if you want to place the control buttons above the annot itself. By
-specifying the name, the control buttons will know the name of the annot
-they are to control.
-
-\subsection{Controls for playing a {\YouTube} video}
-
-To actually play a video, you must pass a video ID to the underlying SWF
-file. We present two methods here, through links and through a combo box.
-One of the example files, \texttt{yt4pdf-2.pdf}, illustrates another method
-using a popup menu.
-
-\subsubsection{Playing a video through a link}
-
-The command \cs{ytvId} creates a list such that when you click on it, the
-video specified by the second parameter of the command is played in the
-associated Rich Media annotation created by \cs{ytRmAnnot}. The associated
-RMA is the one most recently defined prior to the link. If the link occurs
-before the target RMA, you can use \cs{DeclareYTName} to set the name of
-the target RMA for the link.
-\bVerb\takeMeasure{\string\ytvId[\ameta{KV-pairs}]\darg{\ameta{vID}}\darg{\ameta{text}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytvId[!ameta(KV-pairs)]{!ameta(vID)}{!ameta(text)}
-\end{Verbatim}
-\end{minipage}\endgroup
-\PD The first parameter takes the usual key-value pairs for links created
-by the \textsf{eforms} package. The second parameter is the video ID to be
-played. The third parameter is the text to be displayed by the link,
-usually the title of the {\YouTube} video.
-
-\cs{ytvId} loads and plays the specified video; there is an
-\texttt{*}-form of this command,
-\bVerb\takeMeasure{\string\ytvId*[\ameta{KV-pairs}]\darg{\ameta{vID}}\darg{\ameta{text}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytvId*[!ameta(KV-pairs)]{!ameta(vID)}{!ameta(text)}
-\end{Verbatim}
-\end{minipage}\eVerb
-When this form is used, the {\YouTube} thumbnail image for the video is
-displayed. The player does not
-request the video until the play button is pressed.
-
-You can set the appearances for a all links created by \cs{ytvId} by using
-\cs{ytvIdPresets}
-\bVerb\takeMeasure{\string\ytvIdPresets\darg{\ameta{KV-pairs}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytvIdPresets{!ameta(KV-pairs)}
-\end{Verbatim}
-\end{minipage}\eVerb
-The key-value pairs are ones defined for form fields created by the \textsf{eforms}
-package. The default definition is
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\ytvIdPresets{\linktxtcolor{webbrown}}
-\end{Verbatim}
-
-\subsubsection{Playing a video using a combo box}
-
-You can created a combo box with a play list. There are three commands
-that create the combo list, \cs{ytPlayList}, \cs{ytComboList}, and
-\cs{ytComboBtn}.
-\bVerb\takeMeasure{\string\ytPlayList\darg{\ameta{default\_vId}}\darg{\ameta{playlist}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytPlayList{!ameta(default_vId)}{!ameta(playlist)}
-\end{Verbatim}
-\end{minipage}\eVerb
-This command sets the play list to be displayed in the combo box, it needs
-to be executed before the actual creation of the combo box (using
-\cs{ytComboList}). The first parameter is the default video ID, this title
-will be initially displayed by the combo box. The \ameta{playlist} is
-an array of video IDs and title pairs. The \ameta{playlist} is conveniently defined
-within the \cs{declarePlayList} command:
-\bVerb\takeMeasure{\string\declarePlayList\darg{\ameta{\cs{plCmd}}}\{\%}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\declarePlayList{!ameta(\plCmd)}{%
- !ameta(array-of-vIDs-titles)
-}
-\end{Verbatim}
-\end{minipage}\eVerb The array of video IDs and title pairs are saved under the command name \ameta{plCmd}.
-For example
-\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
-\declarePlayList{\playList}{%
- [(GZ9e3Dy7obA)(Kung-Fu Fighting {(Bruce Lee version)})]
- [(eNzrn8-JFSE)(Open at Adobe)]
- [(5y9-EVmreU4)(Lori's Corner: Episode \#1)]
-}
-\end{Verbatim}
-The format for each pair is \texttt{[(\ameta{vId})(\ameta{title})]}. Notice that in the case
-of the Bruce Lee video, the title itself contains parentheses; to avoid parsing errors when
-the \pkg{eforms} package builds the combo box, \emph{enclose these parentheses in a pair of matching braces}.
-
-In the example above, the array, in its correct format, is loaded
-conveniently into a macro \cs{playList} declared through \cs{declarePlayList}. The macro may then be passed as the
-second parameter of \cs{ytPlayList}. Thus, an example of the use of
-\cs{ytPlayList} is
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\ytPlayList{eNzrn8-JFSE}{\playList}
-\end{Verbatim}
-
-There is a convenience command, \cs{ytIdTitle}, that is used to build
-a \cs{ytPlayList}.
-\bVerb\takeMeasure{\string\ytIdTitle\darg{\ameta{vId}}\darg{\ameta{title}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytIdTitle{!ameta(vId)}{!ameta(title)}
-\end{Verbatim}
-\end{minipage}\eVerb
-The above example can the be re-written as,
-\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
-\declarePlayList{\playList}{%
- \ytIdTitle{GZ9e3Dy7obA}{Kung-Fu Fighting {(Bruce Lee version)}}
- \ytIdTitle{eNzrn8-JFSE}{Open at Adobe}
- \ytIdTitle{5y9-EVmreU4}{Lori's Corner: Episode \#1}
-}
-\end{Verbatim}
-
-\paragraph*{The combo box.} The syntax for the combo box itself is
-\bVerb\takeMeasure{\string\ytComboList[\ameta{KV-pairs}]\darg{\ameta{width}}\darg{\ameta{height}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytComboList[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\end{Verbatim}
-\end{minipage}\eVerb
-The \cs{ytComboList} is a combo box of video Ids and titles. The user
-selects a video based on its title, then presses the \textsf{PLAY} button
-(see \cs{ytComboBtn} below). This command is executed \emph{before}
-\cs{ytComboBtn} to set the play list, and the default value.
-\PD\begin{itemize}
- \item \ameta{KV-pairs}: (optional) The key-value pairs associated with an
- \textsf{eforms} form field, used to change the appearance of the field.
- \item \ameta{width}: The width of the combo box
- \item \ameta{height}: The height of the combo box
-\end{itemize}
-The appearance can be changed locally by the optional first parameter. The
-command \cs{ytComboListPresets} is used to change all combo lists create
-by \cs{ytComboList}. The command takes has one parameter, the key-value
-pairs for changing the appearance. The default definition is
-\verb!\ytComboListPresets{}!.
-
-Originally, I visualized only one combo box per page, recently that
-mind-set has changed. Should you want several combo boxes, as created by
-\cs{ytComboList}, each box must have a unique name. To that end
-\bVerb\takeMeasure{\string\ytNewBaseName[\ameta{name}]}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytNewBaseName[!ameta(name)]
-\ytResetBaseName
-\end{Verbatim}
-\end{minipage}\eVerb
-The first command, \cs{ytNewBaseName}, has one optional parameter, if no
-parameter is supplied, then a base name will be generated; otherwise,
-the title of the combo box will be based on the \ameta{name} passed to
-it. For the command \cs{ytResetBaseName}, the first command effects the JS
-and the field name of \cs{ytComboBtn} described below.
-\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()]
-\begin{itemize}
-\item \ytNewBaseName\relax\ytPlayList{!ameta(default_Id)}{\playListii}%
- \ytComboList{2.5in}{11bp}\kern1bp\ytComboBtn{33bp}{11bp}
-\item \ytNewBaseName[Listiii]\ytPlayList{!ameta(default_Id)}{\playListiii}%
- \ytComboList{2.5in}{11bp}\kern1bp\ytComboBtn{33bp}{11bp}
-\end{itemize}
-\end{Verbatim}
-\textbf{\textcolor{red}{Note:}} Because \cs{ytNewBaseName} has an optional
-argument, you should place a \cs{relax} after \cs{ytNewBaseName} to prevent
-premature expansion of the \cs{ytplayList} command that follows.
-
-\newtopic Once the selection has been made from the combo box, the user
-can play the selection by pressing the button created by \cs{ytComboBtn}.
-\bVerb\takeMeasure{\string\ytComboBtn[\ameta{KV-pairs}]\darg{\ameta{width}}\darg{\ameta{height}}}%
-\begin{minipage}{\bxSize}
-\begin{Verbatim}[frame=single,commandchars=!(),rulecolor=\color{red}]
-\ytComboBtn[!ameta(KV-pairs)]{!ameta(width)}{!ameta(height)}
-\end{Verbatim}
-\end{minipage}\eVerb
-\textbf{\textcolor{red}{Note:}} If you hold down the shift key and click on
-the button, the thumbnail poster is loaded, and the player is ready to
-play the video.
-\PD\begin{itemize}
- \item \ameta{KV-pairs}: (optional) The key-value pairs associated with an
- \textsf{eforms} form field, used to change the appearance of the field.
- \item \ameta{width}: The width of the combo box
- \item \ameta{height}: The height of the combo box
-\end{itemize}
-The appearance can be changed locally by the optional first parameter. The
-command \cs{ytComboBtnPresets} is used to change all combo lists create
-by \cs{ytComboBtn}. The command takes has one parameter, the key-value
-pairs for changing the appearance. The default definition is
-\verb!\ytComboBtnPresets{}!.
-
-\subsection{Using the \textsf{popupmenu} package}
-
-The \pkg{popupmenu} a required package, \pkg{yt4pdf} adds some commands and
-JS to facilitate its usage. The demo file for this feature is
-\texttt{yt4pdf-2.tex}, where you will find some comments in the source file.
-
-In the preamble, we define our menu structure,
-
-\begin{Verbatim}[numbers=left,xleftmargin=\leftmargini,fontsize=\fontsize{9}{11}\selectfont]
-\begin{popupmenu}{YTMenu}
- \puIdTitle{Select a You Tube Video}{} % A title has no yt Id
- \begin{submenu}{title=Music Videos}
- \puIdTitle{Ink Spots - If I didn't care}{rvwfLe6sLis}
- \puIdTitle{Ink Spots - My Prayer}{h7KJCns5v3g}
- \end{submenu}
- \begin{submenu}{title=Adobe Related Videos}
- \puIdTitle{Open at Adobe}{eNzrn8-JFSE}
- \puIdTitle{Lori's Corner Episode \#1}{5y9-EVmreU4}
- \puIdTitle{Intro to PDF Portfolios}{T9Yzo_hlwP0}
- \end{submenu}
-\end{popupmenu}
-\ytPopupMenuData{\YTMenu}
-\end{Verbatim}
-The \cs{puIdTitle} is a convenience macro to enter the menu data; the
-first argument is the title of the {\YouTube} video, the second argument
-is the {\YouTube} ID. There may be several \texttt{popupmenu} environments, each
-with a different name. After the last such environment, execute the
-\cs{ytPopuMenuData} command, seen in line~(12). Its argument is a token
-list of all popupmenus; here, we have only one. If there are several, they
-are listed as follows:
-\begin{Verbatim}[xleftmargin=\leftmargini]
-\ytPopupMenuData{\YTMenu\myEduVids\myMusicVids}
-\end{Verbatim}
-
-The menu is displayed as an mouse-over action of button, here is the
-verbatim listing from \texttt{yt4pdf-2.tex}
-
-\begin{Verbatim}[numbers=left,xleftmargin=\leftmargini,fontsize=\fontsize{9}{11}\selectfont]
-\DeclareYTName{ytInWindow}
-...
-\newcommand{\myPBPresets}{%
- \CA{YT Menu}\textColor{0 0 1}\W1\BC{}\textSize{0}\S{S}
- \AA{\AAMouseEnter{\JS{ytPopupMenu("\ytCurrRMAName",YTMenu)}}}}
-\setWindowDimPos{%
- position={halign=center,valign=center,hoffset=0,voffset=0},
- width={default=571},height={default=330}}%
-\setlength{\pichskip}{3pt}
-\parpic(.25in,.25in){%
-\parbox{.25in}{\offinterlineskip\resizebox{.25in}{!}{%
- \ytRmAnnot[windowed,poster=yt_poster,deactivated=pageclose]%
- {ytInWindow}{72bp}{72bp}%
-}}}
-\pushButton[\presets{\myPBPresets}]{myYTMenu}{20bp}{5bp}
-On this page, the You Tube annotation is icon size and the
-video is played in a floating window.
-\end{Verbatim}
-\textbf{Comments:}
-\begin{itemize}
- \item In line~(1) we declare the name of the {\YouTube} annot to be
- used. We do this because we need to use the name before the annot is
- defined. The annot itself is not defined until line~(12).
- \item Lines~(3)--(5): Define a command to be used for passing the
- button attributes for the \texttt{myYTMenu} button (seen in
- line~(15)). In line~(5) we define the action for the button; it is a
- mouse enter action that executes the \texttt{ytPopupMenu} JS function
- defined in the \texttt{yt2pdf} package. This function takes two
- arguments, the first is the name of the target Rich Media Annotation
- hat will display the videos, this name is \verb!"\ytCurrRMAName"!,
- where \cs{ytCurrRMAName} holds the name of the most recent {\YouTube}
- annotation. The second argument is the name of the menu data (defined
- by the \texttt{popupmenu} environment.
- \item Lines~(9)--(14): We create an annot so that it appears as an
- icon, the text of the paragraph wraps around the icon. This is what we
- do with the \cs{parpic} command. In lines~(12)--(13), we create the
- {\YouTube} annot using \cs{ytRmAnnot}.
- \item In line~(15) we have a button with a mouse rollover action. Note
- we pass the earlier defined presets to this button.
-\end{itemize}
-See the complete source file in \texttt{yt4pdf-2.tex}.
-
-
-\section{Language localizations}
-
-The default language for \textsf{yt4pdf} is English; the English strings
-that \textsf{yt4pdf} uses are listed below. These can be redefined as
-desired.
-\begin{Verbatim}
-\newcommand{\ytStrPLAY}{PLAY}
-\newcommand{\ytStrREPLAY}{REPLAY}
-\newcommand{\ytStrPAUSE}{PAUSE}
-\newcommand{\ytStrBuffering}{Buffering...}
-\newcommand{\ytStrStopLoading}{Stop Loading}
-\newcommand{\ytStrMUTE}{MUTE}
-\newcommand{\ytStrUNMUTE}{UNMUTE}
-\newcommand{\ytStrREWIND}{REWIND}
-\newcommand{\ytStrLoadVideo}{Load Video}
-\newcommand{\ytStrWatchOnWeb}{Watch on YouTube}
-% response dialog box associated with ytSelect()
-\newcommand{\ytRespQues}{Enter the YouTube Video ID}
-\newcommand{\ytRespTitle}{Load a Video}
-\newcommand{\ytRespLabel}{ID:}
-% alert error messages
-\newcommand{\ytStrErrorVideoNotFound}{Error: Video not found}
-\newcommand{\ytStrErrorNoEmbed}{Error: This video does not allow
- embedded playback \r\r Would you like to view this video
- on the web?}
-\newcommand{\ytStrConnecTimedOut}{Connection timed out, try again.}
-\end{Verbatim}
-
-\bigskip
-
-That's all for now, I simply must get back to my retirement. {\dps}
-
-\end{document}
diff --git a/macros/latex/contrib/yt4pdf/examples/config_intacc.def b/macros/latex/contrib/yt4pdf/examples/config_intacc.def
deleted file mode 100644
index ac2e0f8e25..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/config_intacc.def
+++ /dev/null
@@ -1,29 +0,0 @@
-\newpage
-
-\begin{minipage}[t]{3in}\parindent20pt\small
-\noindent\makebox[\linewidth][c]{\bfseries\normalsize\color{blue}Configuring
-Preferences}\\[3pt]
-To avoid the security alerts when loading FLV files from You Tube,
-configure your preferences as described below.
-
-Start Adobe Reader 9 or later (or Acrobat~9 or later), and open the \textbf{Preferences}
-dialog box (located in the menu system by selecting \textbf{Edit
-\texttt{>} Preferences} or using the shortcut Ctrl+K); select
-\textbf{Trust Manager} from the left-hand \textbf{Categories} panel. On
-the right side of the dialog box, press the button labeled \textbf{Change
-Settings}, shown below.\par\vspace*{3pt}\centering
-\includegraphics[width=\linewidth]{graphics/trustmanager}
-\end{minipage}\hfill
-\begin{minipage}[t]{\linewidth-3in-10pt}\small
-In the \textbf{Manage Internet Access}, make selections as
-indicated by the red boxes.\par\medskip
-\noindent\makebox[\linewidth][c]{\bfseries\normalsize\color{blue}For Version 9}\\[3pt]
-\noindent\makebox[\linewidth][c]{\includegraphics[width=2in]{graphics/MIA9}}\\[3pt]
-That is, select \textbf{Allow all web sites}\par\medskip
-\noindent\makebox[\linewidth][c]{\bfseries\normalsize\color{blue}For Version 10}\\[3pt]
-\noindent\makebox[\linewidth][c]{\includegraphics[width=2in]{graphics/MIAX}}\\[3pt]
-\textbf{Allow PDF files to access all web sites}\par\medskip
-Exit the dialogs, and try \textbf{YT4PDF}!
-\end{minipage}
-
-\newpage
diff --git a/macros/latex/contrib/yt4pdf/examples/graphics/MIA9.eps b/macros/latex/contrib/yt4pdf/examples/graphics/MIA9.eps
deleted file mode 100644
index e68a0a0b87..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/graphics/MIA9.eps
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/examples/graphics/MIAX.eps b/macros/latex/contrib/yt4pdf/examples/graphics/MIAX.eps
deleted file mode 100644
index 71bdbbc0c4..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/graphics/MIAX.eps
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/examples/graphics/trustmanager.eps b/macros/latex/contrib/yt4pdf/examples/graphics/trustmanager.eps
deleted file mode 100644
index ee141a72ec..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/graphics/trustmanager.eps
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/examples/graphics/yt_icon_sm.eps b/macros/latex/contrib/yt4pdf/examples/graphics/yt_icon_sm.eps
deleted file mode 100644
index 2e6e0ff10e..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/graphics/yt_icon_sm.eps
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/examples/yt4pdf-1.tex b/macros/latex/contrib/yt4pdf/examples/yt4pdf-1.tex
deleted file mode 100644
index fac944ab7a..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/yt4pdf-1.tex
+++ /dev/null
@@ -1,93 +0,0 @@
-\documentclass{article}
-\usepackage{amsmath}
-%
-% the driver line is not necessary if you
-% have aebpro.cfg configured to your driver.
-%
-\usepackage[%
- web={designv,pro,tight,usesf,usetemplates},
- eforms,graphicxsp={showembeds},aebxmp
-]{aeb_pro}
-\usepackage{rmannot}
-\usepackage{yt4pdf}
-\usepackage{multicol}
-
-\textBgColor{lightgray}
-
-\DeclareDocInfo
-{
- title=The \texorpdfstring{\textsf{yt4pdf} Package\\[3pt]}{yt4pdf Package: }Demo 1 of You Tube API,
- author=D. P. Story,
- university=Acro\negthinspace\TeX.Net,
- email=dpstory@acrotex.net,
- subject={Live streamed video from YouTube.com},
- keywords={You Tube, AeB, rmannot},
- talksite=\url{http://www.acrotex.net},
- talkdate={\today}
-}
-\talkdateLabel{Published:}
-
-\def\AcroTeX{Acro\!\TeX}
-
-\makePoster{pdfyt_poster}{pdfyt_poster}
-
-\parindent=0pt\parskip6pt
-\rheader{}
-
-\DeclarePageLayout{footskip=29pt}
-
-\declarePlayList{\playList}{% dps note I've put these parentheses within braces, that was the problem.
- \ytIdTitle{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}
- \ytIdTitle{Kung-Fu Fighting {(Original, must view on YouTube)}}{jhUkGIsKvn0}
- \ytIdTitle{RAF Sculthorpe {(Watch for my Mom!)}}{K7H8QghVs9k}
- \ytIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
- \ytIdTitle{Abdul And Cleopatra - Jonathan Richman and the Modern Lovers}{mLDF5MBMWHE}
-}
-
-\begin{document}
-
-\maketitle
-
-\input{config_intacc.def}
-
-\begin{center}\bfseries\Large\color{blue}YT4PDF\end{center}
-
-
-%\previewtrue
-
-\begin{minipage}{571bp/2}
-\ytRmAnnot[poster=pdfyt_poster,deactivated=pageclose]{YouTube}{571bp/2}{330bp/2}
-\end{minipage}\hfill
-\begin{minipage}{\linewidth-290bp-10bp}\centering
-\ytPlayToggle{1in}{11bp}\\[3bp]
-\ytStopLoading[\textSize{0}]{1in}{11bp}\\[3bp]
-\ytMuteToggle{1in}{11bp}\\[3bp]
-\ytRewind{1in}{11bp}\\[3bp]
-\ytSelect[\textSize{0}]{eNzrn8-JFSE}{1in}{11bp}\\[6bp]
-\ytOpenWeb[\textSize{0}]{1in}{11bp}
-\end{minipage}
-
-\medskip
-
-\begin{flushleft}
-\raggedcolumns\bfseries
-Favorites to play:\vspace{-.5\baselineskip}
-\begin{multicols}{2}\ytPlayList{GZ9e3Dy7obA}{\playList}%
-\begin{itemize}
-\item \ytComboList{\linewidth-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}
-\item \ytvId{_iUnOpPEg0w}{TegrityGuy}
-
-\item \ytvId*{eNzrn8-JFSE}{Open at Adobe} (load thumbnail)
-
-\columnbreak
-
-\item \ytvId{q-iiFo-6Vi0}{Digital Signature in 9.0 Pro}
-\item \ytvId{5y9-EVmreU4}{Lori's Corner: Episode \#1}
-\item \ytvId{T9Yzo_hlwP0}{Intro to PDF Portfolios}
-\end{itemize}
-\end{multicols}
-\end{flushleft}
-
-
-
-\end{document}
diff --git a/macros/latex/contrib/yt4pdf/examples/yt4pdf-2.tex b/macros/latex/contrib/yt4pdf/examples/yt4pdf-2.tex
deleted file mode 100644
index 558b39288e..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/yt4pdf-2.tex
+++ /dev/null
@@ -1,152 +0,0 @@
-\documentclass{article}
-\usepackage{amsmath}
-%
-% the driver line is not necessary if you
-% have aebpro.cfg configured to your driver.
-%
-\usepackage[%
- web={designv,pro,tight,usesf,usetemplates},
- eforms,graphicxsp={showembeds},aebxmp
-]{aeb_pro}
-\usepackage{yt4pdf}
-\usepackage{picins}
-
-% \textBgColor{lightgray}
-
-\DeclareDocInfo
-{
- title=The \texorpdfstring{\textsf{yt4pdf} Package\\[3pt]}{yt4pdf Package: }Demo 2 of You Tube API,
- author=D. P. Story,
- university=Acro\negthinspace\TeX.Net,
- email=dpstory@acrotex.net,
- subject={Live streamed video from YouTube.com},
- keywords={You Tube, AeB, rmannot},
- talksite=\url{http://www.acrotex.net},
- talkdate={\today}
-}
-\talkdateLabel{Published:}
-
-\def\AcroTeX{Acro\!\TeX}
-
-\makePoster{pdfyt_poster}{pdfyt_poster}
-\makePoster{yt_poster}{graphics/yt_icon_sm}
-
-\parindent=0pt\parskip6pt
-\rheader{}
-
-\DeclarePageLayout{footskip=15.5pt}
-
-%\previewtrue
-
-\declarePlayList{\playList}{%
- \ytIdTitle{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}
- \ytIdTitle{Kung-Fu Fighting {(Original, must view on YouTube)}}{jhUkGIsKvn0}
- \ytIdTitle{RAF Sculthorpe {(Watch for my Mom!)}}{K7H8QghVs9k}
- \ytIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
-}
-
-%
-% Note: popupmenu package version 1.0 (2010/09/18) or later required here.
-%
-\begin{popupmenu}{YTMenu}
- \puIdTitle{Select a You Tube Video}{} % A title has no yt Id
- \begin{submenu}{title=Music Videos}
- \puIdTitle{Kung-Fu Fighting (Bruce Lee version)}{GZ9e3Dy7obA}
- \puIdTitle{Kung-Fu Fighting (Original, view on You Tube)}{jhUkGIsKvn0}
- \puIdTitle{Ink Spots - If I didn't care}{rvwfLe6sLis}
- \puIdTitle{Ink Spots - My Prayer}{h7KJCns5v3g}
- \end{submenu}
- \begin{submenu}{title=Adobe Related Videos}
- \puIdTitle{Open at Adobe}{eNzrn8-JFSE}
- \puIdTitle{Lori's Corner Episode \#1}{5y9-EVmreU4}
- \puIdTitle{Intro to PDF Portfolios}{T9Yzo_hlwP0}
- \end{submenu}
- \begin{submenu}{title=Action Videos}
- \puIdTitle{Rocket Jump}{7XzdZ4KcI8Y}
- \puIdTitle{AimBot}{NYGlWjIKoY4}
- \puIdTitle{Flower Warfare}{031Dshcnso4}
- \puIdTitle{Modern Warfare: Frozen Crossing Pt. 1}{rzQMGMuD1sU}
- \puIdTitle{Modern Warfare: Frozen Crossing Pt. 2}{a08ViuvORRM}
- \end{submenu}
-\end{popupmenu}
-
-% After defining all menus used with YouTube videos, we declare them using \ytPopupMenuData
-% The argument is a token list: \ytPopupMenuData{\myEducationMenu\myFunMenu...}
-\ytPopupMenuData{\YTMenu}
-
-\begin{document}
-
-\maketitle
-
-\input{config_intacc.def}
-
-
-\begin{center}\bfseries\Large\color{blue}YT4PDF\end{center}
-
-\DeclareYTName{ytInWindow}
-\ytBtnPresets{\BC{.5 0 0}\W{1}\S{S}\textFont{HeBo}}%
-{\setlength{\dimen0}{(\linewidth)/6-1bp}\xdef\ytWidth{\the\dimen0}} %-.5bp
-\cfooter{\makebox[\linewidth][c]{\kern1bp\ytPlayToggle{\ytWidth}{11bp}\kern1bp\ytStopLoading[\textSize{0}]{\ytWidth}{11bp}\kern1bp
-\ytMuteToggle{\ytWidth}{11bp}\kern1bp\ytRewind{\ytWidth}{11bp}\kern1bp
-\ytSelect[\textSize{0}]{eNzrn8-JFSE}{\ytWidth}{11bp}\kern1bp\ytOpenWeb[\textSize{0}]{\ytWidth}{11bp}}}
-
-\newcommand{\myPBPresets}{\CA{YT Menu}\textColor{0 0 1}\W1\BC{}\textSize{0}
- \S{S}\AA{\AAMouseEnter{\JS{ytPopupMenu("\ytCurrRMAName",YTMenu)}}}}
-
-\setWindowDimPos{position={halign=center,valign=center,hoffset=0,voffset=0},
- width={default=571},height={default=330}}%
-
-\setlength{\pichskip}{3pt}
-\parpic(.25in,.25in){%
-\parbox{.25in}{\offinterlineskip\resizebox{.25in}{!}
-{\ytRmAnnot[windowed,poster=yt_poster,deactivated=pageclose]{ytInWindow}{72bp}{72bp}}}}
-\pushButton[\presets{\myPBPresets}]{myYTMenu}{20bp}{5bp}
-On this page, the You Tube annotation is icon size and the video is played
-in a floating window.
-
-Move the window by dragging its title bar. Resize it by dragging the
-lower-right corner. Close the window by clicking on the upper-right
-corner.
-
-The \textsf{YT Menu} uses the \textsf{popupmenu} package. Alternatively,
-we could just use the combo box that has been used already, but, I thought
-we might try something different.
-
-\newpage
-
-\ytRmAnnot[posternote=AcroTeX PDF Tube,deactivated=pageclose]{YouTube1}{571bp/2}{330bp/2}\\
-\ytPlayList{GZ9e3Dy7obA}{\playList}\ytComboListPresets{\textSize{9}}%
-\ytComboList{(571bp/2)-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}
-
-\newpage
-\cfooter{}
-\begin{minipage}{571bp/2}
-\ytRmAnnot[posternote=AcroTeX PDF Tube,deactivated=pageclose]{YouTube2}{571bp/2}{330bp/2}\\
-\ytPlayList{GZ9e3Dy7obA}{\playList}\ytComboListPresets{\textSize{9}}%
-\ytComboList{(571bp/2)-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}
-\end{minipage}\hfill
-\begin{minipage}{\linewidth-290bp-10bp}\centering
-\ytPlayToggle{1in}{11bp}\\[3bp]
-\ytStopLoading[\textSize{0}]{1in}{11bp}\\[3bp]
-\ytMuteToggle{1in}{11bp}\\[3bp]
-\ytRewind{1in}{11bp}\\[3bp]
-\ytSelect[\textSize{0}]{eNzrn8-JFSE}{1in}{11bp}\\[6bp]
-\ytOpenWeb[\textSize{0}]{1in}{11bp}
-\end{minipage}
-
-\newpage
-
-\begin{center}
-\begin{minipage}{571bp/2}
-\ytRmAnnot[poster=pdfyt_poster,deactivated=pageclose]{YouTube3}{571bp/2}{330bp/2}\\
-\ytPlayList{GZ9e3Dy7obA}{\playList}\ytComboListPresets{\textSize{9}}%
-\ytComboList{(571bp/2)-1bp-33bp}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}\\[1bp]
-{\setlength{\dimen0}{(\linewidth+1bp)/6-1bp}\xdef\ytWidth{\the\dimen0}}%
-\ytPlayToggle{\ytWidth}{11bp}\kern1bp\ytStopLoading[\textSize{0}]{\ytWidth}{11bp}\kern1bp
-\ytMuteToggle{\ytWidth}{11bp}\kern1bp\ytRewind{\ytWidth}{11bp}\kern1bp
-\ytSelect[\textSize{0}]{eNzrn8-JFSE}{\ytWidth}{11bp}\kern1bp
-\ytOpenWeb[\textSize{0}\CA{View on Web}]{\ytWidth}{11bp}
-\end{minipage}
-\end{center}
-
-\end{document}
diff --git a/macros/latex/contrib/yt4pdf/examples/yt4pdf-3.tex b/macros/latex/contrib/yt4pdf/examples/yt4pdf-3.tex
deleted file mode 100644
index 03625c9fe1..0000000000
--- a/macros/latex/contrib/yt4pdf/examples/yt4pdf-3.tex
+++ /dev/null
@@ -1,88 +0,0 @@
-%\ytIdTitle{No Ordinary Love - Sade}{_WcWHZc8s2I}
-\documentclass{article}
-\usepackage{amsmath}
-%
-% the driver line is not necessary if you
-% have aebpro.cfg configured to your driver.
-%
-\usepackage[%
- web={designv,pro,tight,usesf,usetemplates},
- eforms,graphicxsp={showembeds},aebxmp
-]{aeb_pro}
-\usepackage{yt4pdf}
-
-%\margins{10bp}{10bp}{.5in}{.5in} % left,right,top, bottom
-%\screensize{7.5in}{10in} % height,width dimensions
-
-\textBgColor{lightgray}
-
-\DeclareDocInfo
-{
- title=The \texorpdfstring{\textsf{yt4pdf} Package\\[3pt]}{yt4pdf Package: }Demo 3 of You Tube API,
- author=D. P. Story,
- university=Acro\negthinspace\TeX.Net,
- email=dpstory@acrotex.net,
- subject={Live streamed video from YouTube.com},
- keywords={You Tube, AeB, rmannot},
- talksite=\url{http://www.acrotex.net},
- talkdate={\today}
-}\talkdateLabel{Published:}
-
-\def\AcroTeX{Acro\!\TeX}
-
-\makePoster{pdfyt_poster}{pdfyt_poster}
-\makePoster{yt_poster}{graphics/yt_icon_sm}
-
-\parindent=0pt\parskip6pt
-\rheader{}
-
-% dps need to change the catcode of subscript (_) before hyperref gets
-% chance to look at it.
-\declarePlayList{\playList}{%
- \ytIdTitle{Kung-Fu Fighting {(Bruce Lee version)}} {GZ9e3Dy7obA}
- \ytIdTitle{Kung-Fu Fighting {(Original, must view on YouTube)}}{jhUkGIsKvn0}
- \ytIdTitle{RAF Sculthorpe {(Watch for my Mom!)}} {K7H8QghVs9k}
- \ytIdTitle{Rocket Jump} {7XzdZ4KcI8Y}
- \ytIdTitle{No Ordinary Love - Sade} {_WcWHZc8s2I}
-}
-
-\begin{document}
-
-\maketitle
-
-\input{config_intacc.def}
-
-\begin{center}\bfseries\Large\color{blue}YT4PDF\end{center}
-
-\ytBtnPresets{\BC{.5 0 0}\W{1}\S{S}\textFont{HeBo}}%
-
-\resizebox{\linewidth}{!}{\ytRmAnnot[play=eNzrn8-JFSE,poster=pdfyt_poster,
- deactivated=pageclose]{ytPlayOnOpen}{571bp}{330bp}}\\
-{\setlength{\dimen0}{(\linewidth-2bp)/6}\xdef\ytWidth{\the\dimen0}}%
-\ytPlayToggle{\ytWidth}{11bp}\ytStopLoading{\ytWidth}{11bp}%
-\ytMuteToggle{\ytWidth}{11bp}\ytRewind{\ytWidth}{11bp}%
-\ytSelect{eNzrn8-JFSE}{\ytWidth}{11bp}\ytOpenWeb[\textSize{0}]{\ytWidth}{11bp}%
-
-\ytPlayList{GZ9e3Dy7obA}{\playList}
-
-% We have to disable the RMA so the combo box can be seen above it.
-Playlist: \ytComboList[\A{\JS{\thisNamedRMA(ytPlayOnOpen).activated=false;}}]{2.5in}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}
-
-\newpage
-\begin{center}\bfseries\Large\color{blue}YT4PDF\end{center}
-
-\resizebox{\linewidth}{!}{\ytRmAnnot[load=GZ9e3Dy7obA,poster=pdfyt_poster,
- deactivated=pageclose]{ytLoadOnOpen}{571bp}{330bp}}\\
-\ytBtnPresets{\BC{.5 0 0}\W{1}\S{S}\textFont{HeBo}}%
-{\setlength{\dimen0}{(\linewidth-2bp)/6}\xdef\ytWidth{\the\dimen0}}%
-\ytPlayToggle{\ytWidth}{11bp}\ytStopLoading{\ytWidth}{11bp}%
-\ytMuteToggle{\ytWidth}{11bp}\ytRewind{\ytWidth}{11bp}%
-\ytSelect{eNzrn8-JFSE}{\ytWidth}{11bp}\ytOpenWeb[\textSize{0}]{\ytWidth}{11bp}%
-
-\ytPlayList{GZ9e3Dy7obA}{\playList}
-
-% We have to disable the RMA so the combo box can be seen above it.
-Playlist: \ytComboList[\A{\JS{\thisNamedRMA(ytLoadOnOpen).activated=false;}}]{2.5in}{11bp}\kern1bp\ytComboBtn[\TU{Click to play, shift-click to load thumbnail only}]{33bp}{11bp}
-
-
-\end{document}
diff --git a/macros/latex/contrib/yt4pdf/graphics/pdfyt_poster.eps b/macros/latex/contrib/yt4pdf/graphics/pdfyt_poster.eps
deleted file mode 100644
index 97c7ecd154..0000000000
--- a/macros/latex/contrib/yt4pdf/graphics/pdfyt_poster.eps
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/swf/pdf_tube_basic.swf b/macros/latex/contrib/yt4pdf/swf/pdf_tube_basic.swf
deleted file mode 100644
index 5dde7b7cb5..0000000000
--- a/macros/latex/contrib/yt4pdf/swf/pdf_tube_basic.swf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/yt4pdf/yt4pdf.cfg b/macros/latex/contrib/yt4pdf/yt4pdf.cfg
deleted file mode 100644
index 7a8e5de800..0000000000
--- a/macros/latex/contrib/yt4pdf/yt4pdf.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-%
-% yt4pdf config file. Delete the \endinput below and replace the path
-% provided with the path to the swf folder of your yt4pdf installation. This
-% path is used to locate the pdf_tube_basic.swf file, used to play YouTube
-% videos.
-%
-\endinput
-\renewcommand{\ytFolder}{C:/Users/Public/Documents/My TeX Files/%
-tex/latex/aeb/aebpro/yt4pdf/swf}
-\endinput
diff --git a/macros/latex/contrib/yt4pdf/yt4pdf.dtx b/macros/latex/contrib/yt4pdf/yt4pdf.dtx
deleted file mode 100644
index 4ca3bcc0b6..0000000000
--- a/macros/latex/contrib/yt4pdf/yt4pdf.dtx
+++ /dev/null
@@ -1,629 +0,0 @@
-%\iffalse
-%<*copyright>
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% yt4pdf.sty package, %%
-%% Copyright (C) 2010--2016 D. P. Story %%
-%% dpstory@uakron.edu %%
-%% %%
-%% 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%</copyright>
-%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
-%<package>\ProvidesPackage{yt4pdf}
-%<package> [2016/10/04 v1.1 yt4pdf: Play You Tube videos in PDF, Acrobat Distiller only (dps)]
-%<*driver>
-\documentclass{ltxdoc}
-\usepackage[colorlinks,hyperindex]{hyperref}
-%\pdfstringdefDisableCommands{\let\\\textbackslash}
-%\EnableCrossrefs \CodelineIndex
-\begin{document}
-\def\CMD#1{\textbackslash#1}
- \GetFileInfo{yt4pdf.sty}
- \title{\textsf{yt4pdf}: Package for playing You Tube Videos}
- \author{D. P. Story\\
- Email: \texttt{dpstory@uakron.edu}}
- \date{processed \today}
- \maketitle
- \tableofcontents
- \let\Email\texttt
- \DocInput{yt4pdf.dtx}
- \PrintIndex
-\end{document}
-%</driver>
-% \fi
-% \MakeShortVerb{|}
-% \StopEventually{}
-%
-% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
-% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
-% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
-% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
-% \DoNotIndex{\space,\@empty,\special}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-% \begin{macrocode}
-\RequirePackage{xkeyval}
-% \end{macrocode}
-% \begin{macrocode}
-\ProcessOptions
-\RequirePackage{rmannot}
-\RequirePackage{popupmenu}[2010/09/18]
-% \end{macrocode}
-%
-% \section{Introduction}
-%
-% I believe that I was vaguely aware of the \href{http://code.google.com/apis/youtube/flash_api_reference.html}
-%{YouTube ActionScript 3.0 Player}, but never pursued it because of my
-%general lack of interest in You Tube (\url{www.youtube.com}). Recently, I
-%became aware of a very nice demo PDF that used the API, see
-%\href{http://www.uvsar.com/pdftube/}{PDF Tube - YouTube API wrapper for PDF
-%documents}. The SWF file and JavaScript are made freely available, so I
-%downloaded it, and was sufficiently impressed to port the example to
-%{\LaTeX} using various members of the {Acro\negthinspace\TeX} Fine Family of Software
-%\verb!:-{)!. The SWF file and JavaScript are due to the good folks at
-%UVSAR (\url{www.uvsar.com}). The UVSAR's sample demo also appeared in the forums of
-%the \href{http://acrobatusers.com/forums/aucbb/viewtopic.php?pid=62134}{Acrobat User
-%Community}.
-%
-% \section{Implementation}
-%
-% \DescribeMacro{\ytFolder} The path to the folder containing
-% the \texttt{pdf\_Tube\_basic.swf} file. This path is set through
-% the \texttt{yt4pdf.cfg} file.
-% \begin{macrocode}
-\newcommand{\ytFolder}{C:/Users/Public/Documents/My TeX Files/%
-tex/latex/aeb/aebpro/yt4pdf/swf}
-% \end{macrocode}
-% \DescribeMacro{ytSWF} The path to \texttt{pdf\_Tube\_basic.swf}, used
-% as an argument for the \cs{rmAnnot} macro.
-% \begin{macrocode}
-\saveNamedPath{ytSWF}{\ytFolder/pdf_tube_basic.swf}
-% \end{macrocode}
-% We input the file \texttt{yt4pdf.cfg} which should contain a re-definition
-% of \cs{ytFolder}, the path to the user's installation containing the
-% \texttt{pdf\_tube\_basic.swf}.
-% \begin{macrocode}
-\InputIfFileExists{yt4pdf.cfg}{}{}
-% \end{macrocode}
-% \subsection{The YouTube RMA}
-% In this section, we define \cs{ytRmAnnot}, a rich media annotation, that is used
-% to play YouTube videos.
-% \begin{macrocode}
-% \end{macrocode}
-% An internal command for getting the rma object based on the current page and the
-% name of the annot.
-% \begin{macrocode}
-\def\yt@namegdef#1{\expandafter\gdef\csname #1\endcsname}
-\def\yt@namexdef#1{\expandafter\xdef\csname #1\endcsname}
-\def\thisNamedRMA(#1){this.getAnnotRichMedia(this.pageNum,"#1")}
-% \end{macrocode}
-% \DescribeMacro{play} This is a key-value pair for the \cs{ytRmAnnot} command.
-% The value of \texttt{play} is a YouTube video ID. When the page the annot is
-% on, the video will be played.
-% \begin{macrocode}
-\define@key{ytRmAnnot}{play}[]{\def\ytrmannot@play{#1}}
-\define@key{ytRmAnnot}{load}[]{\def\ytrmannot@load{#1}}
-\setkeys{ytRmAnnot}{play,load}
-\let\ytCurrRMAName\@empty
-% \end{macrocode}
-% \begin{macro}{\ytRmAnnot}
-% The \cs{ytRmAnnot} creates a rich media annotation using the \textsf{rmannot} package.
-% It uses the SWF file \texttt{pdf\_Tube\_basic.swf} referenced here by the name of
-% \texttt{ytSWF}. The command takes four parametrs:
-% \begin{itemize}
-% \item[\texttt{[\#1]}]: The optional first parameter takes the key-value pairs of the
-% \cs{rmAnnot} command, plus the \texttt{play} key, defined above. The play key is used
-% to set the annot up so it plays automatically when the page is opened.
-% \item[\texttt{\#2}]: The name of this annot, unique to the document. This should be
-% a ``JavaScript variable.'' The name populates the command \cs{ytCurrRMAName}, which is
-% needed for the other commands in this package.
-% \item[\texttt{\#3}]: The width of the annot
-% \item[\texttt{\#4}]: The height of the annot
-% \end{itemize}
-% \begin{macrocode}
-\newcommand{\ytRmAnnot}[4][]{\begingroup
- \@ifundefined{#2@ytrmname}{\yt@namegdef{#2@ytrmname}{#1}}%
- {\PackageError{yt2pdf}{The name `#2' is already defined
- for\MessageBreak this \string\ytRmAnnot}{Choose a unique
- name for this \string\ytRmAnnot, one different from `#2'.}}%
- \setkeys*{ytRmAnnot}{#1}\gdef\ytCurrRMAName{#2}%
- \ifx\ytrmannot@play\@empty\else
- \makebox[0pt][l]{\pushButton[\BC{}\BG{}\S{S}
- \AA{\AAPageOpen{aebStartPlayer(\thisNamedRMA(#2),%
- "\ytrmannot@play",true);}\AAPageClose{aebCancelWait(false);}}
- ]{btnRmAnnot#2}{1bp}{1bp}}\let\ytrmannot@load\@empty\fi
- \ifx\ytrmannot@load\@empty
- \else\makebox[0pt][l]{\pushButton[\BC{}\BG{}\S{S}
- \AA{\AAPageOpen{aebStartPlayer(\thisNamedRMA(#2),%
- "\ytrmannot@load",false);}\AAPageClose{aebCancelWait(false);}}
- ]{btnRmAnnot#2}{1bp}{1bp}}\fi
- \rmAnnot[\XKV@rm,name=#2,enabled=onclick]{#3}{#4}{ytSWF}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \DescribeMacro{\DeclareYTName} Defines the internal macro
-% \cs{ytCurrRMAName}. This command is needed in the case were links, or
-% control buttons come before the RMA annot. The first parameter is the
-% page on which the target annot resides, the default is the current page.
-% The second argument is the name of the target annot.
-% code passed is
-% \begin{macrocode}
-\newcommand{\DeclareYTName}[2][]{\def\argi{#1}%
- \ifx\argi\@empty\gdef\ytCurrRMAName{#2}\else
- \gdef\ytCurrRMAName{[#1]#2}\fi
-}
-% \end{macrocode}
-% \subsection{Button Controls}
-% We present six control buttons for the rm annot
-% \begin{macro}{\ytBtnPresets}
-% The default appearances of the control buttons.
-% \begin{macrocode}
-\newcommand{\ytBtnPresets}[1]{\def\yt@Presets{#1}}
-\ytBtnPresets{\BC{.5 0 0}\S{S}\textFont{HeBo}\autoCenter{n}}
-% \end{macrocode}
-% \end{macro}
-% The following six commands all take three parameters, the first one optional
-%\begin{enumerate}
-% \item[\texttt{\#1}:] Standard key-value pairs for modifying the
-% appearance of an eforms form field.
-% \item[\texttt{\#2}:]
-% \texttt{this.getAnnotRichMedia(this.pageNum+1, "YouTube")}.
-% \item[\texttt{\#3}:] the width of the button
-% \item[\texttt{\#4}:] the height of the button
-%\end{enumerate}
-% \begin{macro}{\ytPlayToggle}
-% This button has several functions: Pause/Play/Buffering.
-% Initially the button label is on Pause (pressing it pauses a playing video);
-% the button label reads Play when the video is loaded and paused (pressing it plays or resumes
-% the video); while the video is loading, the button label is Buffering...
-% \begin{macro}{\ytStopLoading} Pressing this button stops the streaming of the currently playing
-% video. If the video is started again, there will be some buffering before the play begins.
-% \begin{macro}{\ytMuteToggle} This button toggles and sound off and on. Button labels are
-% MUTE and UNMUTE.
-% \begin{macro}{\ytRewind} If the video is playing, this button
-% stops the video, rewinds it to the beginning, and starts play again. If the video
-% is paused, this button rewinds the video to the beginning, the video remains paused.
-% \begin{macro}{\ytSelect} When this button is pressed, a response dialog opens.
-% The user enters a YouTube video ID into the field. On pressing OK, this video is played.
-% \item[] \textbf{Note:} Some YouTube videos are security
-% restricted and cannot be played through an embedded player, such as the one used here.
-% If video ID of a video that does not allow embedded playback, a dialog appears giving
-% the use to view the video on the web.
-% \begin{macro}{\ytOpenWeb} The user has the option of pressing this button to view the
-% currently video on the web at \texttt{www.youtube.com}.
-% \begin{macrocode}
-% \end{macrocode}
-% The \cs{oyt@RMA} command takes the second parameter of each of the six button commands,
-% and expands it into the appropriate JS code.
-% \begin{macrocode}
-\newcommand{\oyt@RMA}[1][this.pageNum]{\oyt@@RMA[#1]}
-\def\oyt@@RMA[#1]#2\@nil{\gdef\yt@CurrRMAName{#2}%
- \def\yt@rm{this.getAnnotRichMedia(#1,"#2")}}
-% \end{macrocode}
-% We finally define the six control buttons.
-% \begin{macrocode}
-\newcommand{\ytPlayToggle}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrPAUSE}\presets{\yt@Presets}#1
- \A{\JS{ytPlayToggle(\yt@rm);}}]{playToggle}{#2}{#3}%
-}
-\newcommand{\ytStopLoading}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrStopLoading}\presets{\yt@Presets}#1
- \A{\JS{\yt@rm.callAS("stopVideo");}}]{vidStop}{#2}{#3}%
-}
-\newcommand{\ytMuteToggle}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrMUTE}\presets{\yt@Presets}#1
- \A{\JS{ytMuteToggle(\yt@rm);}}]{muteToggle}{#2}{#3}%
-}
-\newcommand{\ytRewind}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrREWIND}\presets{\yt@Presets}#1
- \A{\JS{ytRewind(\yt@rm);}}]{ytRewind}{#2}{#3}%
-}
-\newcommand{\ytSelect}[4][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrLoadVideo}\presets{\yt@Presets}#1
- \A{\JS{ytSelect(\yt@rm,"#2");}}]{selectVid}{#3}{#4}%
-}
-\newcommand{\ytOpenWeb}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrWatchOnWeb}\presets{\yt@Presets}#1
- \A{\JS{ytOpenWeb(\yt@rm);}}]{playOnWeb}{#2}{#3}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \subsection{Defining a Video Id}
-% \subsubsection{Using a Link}
-% \begin{macro}{\ytvIdPresets}
-% The options for the \cs{ytvId} link. The default is given below in the definition.
-% \begin{macro}{\ytvId}
-% The \cs{ytvId} is link which when pressed plays the video whose Video Id is passed as
-% its second argument.
-% \begin{itemize}
-% \item[\texttt{[\#1]}:] The name of the annot this video is to play in. When
-% this parameter is not specified, the default
-% is \cs{ytCurrRMAName}, which is defined by the \cs{ytRmAnnot} macro.
-% \item[\texttt{\#2}:] The video Id for the YouTube video to play
-% \item[\texttt{\#3}:] The text that displays the link.
-%\end{itemize}
-% \begin{macrocode}
-\newcommand{\ytvIdPresets}[1]{\def\yt@vIdPresets{#1}}
-\ytvIdPresets{\linktxtcolor{webbrown}}
-\newcommand{\ytvId}{\@ifstar{\def\yt@lnk@play{false}\yt@@vId}
- {\def\yt@lnk@play{true}\yt@@vId}}
-\newcommand{\yt@@vId}[3][\ytCurrRMAName]{%
- \oyt@RMA#1\@nil\setLink[\presets{\yt@vIdPresets}
- \A{\JS{aebStartPlayer(\yt@rm,"#2",\yt@lnk@play);}}]{#3}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \subsubsection{Using a Combobox}
-% \begin{macro}{\ytComboList}
-% The \cs{ytComboList} is a combox box of video Ids and titles. The user selects a
-% video based on its title, then presses the PLAY button. The two commands
-% \cs{ytComboListPresets} and \cs{ytComboBtnPresets} are used to set the appearances
-% of the combo box and the PLAY button.
-%\begin{itemize}
-% \item[\texttt{[\#1]}:] eforms key-value pairs
-% \item[\texttt{\#2}:] The width of the combo box
-% \item[\texttt{\#3}:] The height of the combo box
-%\end{itemize}
-% \begin{macro}{\ytComboBtn}
-% A button to play the selection made in the combo box.
-% \begin{macro}{\ytPlayList}
-% This command is executed before \cs{ytComboBtn} to set the play list,
-% and the default value.
-% \begin{macrocode}
-\newcommand{\ytComboListPresets}[1]{\def\yt@ComboListPresets{#1}}
-\newcommand{\ytComboBtnPresets}[1]{\def\yt@ComboBtnPresets{#1}}
-\let\yt@ComboListPresets\@empty
-\let\yt@ComboBtnPresets\@empty
-% \end{macrocode}
-% Use the \cs{ytPlayList} to pass the play list to the next combo box
-% \begin{macrocode}
-\newcommand{\ytPlayList}{\begingroup\@makeother\_\@makeother\'
- \ytPlayList@i}
-\def\ytPlayList@i#1#2{\gdef\yt@pl@def{#1}\xdef\yt@pl@pl{#2}\endgroup}
-% \end{macrocode}
-% \begin{macro}{\declarePlayList}
-% A video ID may contain characters {\LaTeX} considers special, so we sanitize these
-% special characters before reading in the video ID. Near as I can determine, a video
-% id consists of 11 characters comprising combinations of letters (A-Z,a-z) numbers
-% (0-9) and special characters underscore and hyphen (\_ and -). We sanitize the last two.
-%\begin{verbatim}
-%\declarePlayList{<\cmd>}{
-% \ytIdTitle{<text>}{<VidID>}
-% ...
-% \ytIdTitle{<text>}{<VidID>}
-% }
-%\end{verbatim}
-%The entries may also be in raw form `|[(<VidID>)(<text>)]|'. Note that the two arguments are
-%enclosed in parentheses, there is a problem with parsing if \texttt{<text>} itself contains
-%parentheses. Within \texttt{<text>} enclose matching parentheses in braces, for example,
-%\begin{flushleft}|\ytIdTitle{Kung-Fu Fighting {(Bruce Lee version)}}{GZ9e3Dy7obA}|\end{flushleft}
-% \changes{v1.1}{2016/10/04}{Added \string\cs{declarePlayList}}
-% \begin{macrocode}
-\newcommand{\declarePlayList}{\bgroup
- \@makeother\_\@makeother\-
- \yt@declarePlayList}
-\def\yt@declarePlayList#1#2{%
- \gdef#1{#2}\egroup}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ytIdTitle}
-% A convenience command to lay out the playlist, for example,
-%\begin{verbatim}
-%\declarePlayList{\playListii}{%
-% \ytIdTitle{Elfego Baca}{gRwa0MdeqVs}
-% \ytIdTitle{Texas John Slaughter}{7yrk1BvtLE8}
-% \ytIdTitle{Swamp Fox}{-SBPnw5riLM&NR}
-% \ytIdTitle{Zorro Promo}{cKludhxEoJ0}
-%}
-%\end{verbatim}
-% \begin{macrocode}
-\newcommand{\ytIdTitle}[2]{[(#2)(#1)]}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ytNewBaseName}
-% \cs{ytNewBaseName} is a not so perfect attempt to fix the problem of having
-% multiple combo boxes on one page. The field names need to be distinct. We
-% can pass the new field name using this command.
-% \begin{macro}{\ytResetBaseName}
-% This command resets the field name back to its default value.
-% Both of these commands apply to \cs{ytComboList} and to \cs{ytComboBtn}.
-% \changes{v1.0}{2011/08/23}{Added \cs{ytBaseName} to pass a field title to
-% combo box and controlling play button}
-% \begin{macrocode}
-\newcount\ytListCnt \ytListCnt=0
-\newcommand{\ytNewBaseName}[1][]{%
- \def\yt@argi{#1}\ifx\yt@argi\@empty\global\advance\ytListCnt1\relax
- \gdef\yt@BaseName{\yt@CurrRMAName\the\ytListCnt}\else
- \gdef\yt@BaseName{\yt@CurrRMAName#1}\fi
-}
-\newcommand{\ytResetBaseName}{\gdef\yt@BaseName{\yt@CurrRMAName}}
-\ytResetBaseName
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% Now we have the code for \cs{ytComboList}
-% \begin{macrocode}
-\newcommand{\ytComboList}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \comboBox[\DV{\yt@pl@def}\V{\yt@pl@def}
- \presets{\yt@ComboListPresets}#1]{ytSelect\yt@BaseName}
- {#2}{#3}{\yt@pl@pl}%
-}
-% \end{macrocode}
-% The parameters for \cs{ytComboBtn} are
-%\begin{itemize}
-% \item[\texttt{[\#1]}:] The the name of the \cs{ytRmAnnot} this selection is to play in
-% the default is \cs{ytCurrRMAName}.
-% \item[\texttt{\#2}:] The width of the combo box
-% \item[\texttt{\#3}:] The height of the combo box
-% the array of values and titles.
-%\end{itemize}
-% \begin{macrocode}
-\newcommand{\ytComboBtn}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrPLAY}\presets{\yt@ComboBtnPresets}#1
- \A{\JS{var f=this.getField("ytSelect\yt@BaseName");\r
- aebStartPlayer(\yt@rm,f.value,!event.shift);
- }}]{ytSelectBtn\yt@BaseName}{#2}{#3}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \subsection{Support for the \textsf{popupmenu} package}
-% \begin{macro}{\ytPopupMenuData}
-% A command use to list the popupmenu data. It defines a command
-% \cs{ytPopupData} that is used in the JS support for popup menus.
-% \begin{macrocode}
-\newcommand{\ytPopupMenuData}[1]{{\toks0={// yt4pdf: Begin popup menu data^^J}%
- \@tfor\yt@menu:=#1\do{%
- \toks2=\expandafter{\yt@menu}%
- \edef\@tmp@exp{\the\toks0\the\toks2^^J}%
- \toks0=\expandafter{\@tmp@exp}%
- }\xdef\ytPopupData{\the\toks0// End of popup menu data}%
-}}
-\def\ytPopupData{// No popup menu data defined}%
-% \begin{macro}{\puIdTitle}
-% A convenience macro for entering popupmenu data for youtube videos.
-%\begin{verbatim}
-%\puIdTitle{\string\"Sea Hunt\string\" TV serie}{MW-IZ67iADU}
-%\end{verbatim}
-% Note that we must protect the double quote.
-% \begin{macrocode}
-\newcommand{\puIdTitle}[2]{\item{title={#1},return={[\itemindex,'#2']}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Strings that can be localized}
-% The following strings are used on the buttons, and in the document level JS
-% \begin{macrocode}
-\newcommand{\ytStrPLAY}{PLAY}
-\newcommand{\ytStrREPLAY}{REPLAY}
-\newcommand{\ytStrPAUSE}{PAUSE}
-\newcommand{\ytStrBuffering}{Buffering...}
-\newcommand{\ytStrStopLoading}{Stop Loading}
-\newcommand{\ytStrMUTE}{MUTE}
-\newcommand{\ytStrUNMUTE}{UNMUTE}
-\newcommand{\ytStrREWIND}{REWIND}
-\newcommand{\ytStrLoadVideo}{Load Video}
-\newcommand{\ytStrWatchOnWeb}{Watch on YouTube}
-% response dialog box associated with ytSelect()
-\newcommand{\ytRespQues}{Enter the YouTube Video ID}
-\newcommand{\ytRespTitle}{Load a Video}
-\newcommand{\ytRespLabel}{ID:}
-% alert error messages
-\newcommand{\ytStrErrorVideoNotFound}{Error: Video not found}
-\newcommand{\ytStrErrorNoEmbed}{Error: This video does not allow
- embedded playback \r\r Would you like to view this video
- on the web?}
-\newcommand{\ytStrConnecTimedOut}{Connection timed out, try again.}
-% \end{macrocode}
-%
-% \subsection{Document level JavaScript}
-% \begin{macrocode}
-\begin{insDLJS*}[ytPlayToggle]{yt}
-\begin{newsegment}{yt4PDF: YouTube for PDF JavaScript}
-/*
- Document-level script for YouTube player
- Document-level script for the PDFtube embedded YouTube player
- ***************************************************************
- Functions to be called by buttons or links on the PDF
- in each case, "rm" is the RichMedia annot containing the player
- All these are optional and can be renamed or edited as required
- ***********************************************************
-*/
-// toggle play/pause (button labels updated by event functions)
-function ytPlayToggle(rm) {
- var ps = rm.callAS("getPlayerState");
- rm.callAS((ps == 1)? "pauseVideo" : "playVideo");
-}
-// toggle mute (have to update button labels ourselves)
-function ytMuteToggle(rm) {
- var im = rm.callAS("isMuted");
- if (im) {
- event.target.buttonSetCaption("\ytStrMUTE");
- rm.callAS("unMute");
- } else {
- event.target.buttonSetCaption("\ytStrUNMUTE");
- rm.callAS("mute");
- }
-}
-// Ask the user for the ID number of a new video, and play it
-function ytSelect(rm,vID) {
- var rsp = app.response({
- cQuestion: "\ytRespQues",
- cTitle: "\ytRespTitle",
- cDefault: vID,
- cLabel: "\ytRespLabel"});
- if (rsp !=null && rsp != "")
- aebStartPlayer(rm,rsp,true); // dps
-}
-// open the video's YouTube page in the web browser
-function ytOpenWeb(rm) {
- var link = rm.callAS("getVideoUrl");
- if (link != null) {
- app.launchURL(link,true);
- rm.activated = false;
- }
-}
-// rewind (seek to zero)
-function ytRewind(rm) { rm.callAS("seekTo",0); }
-/*
- ************************************************************
- Functions called by the player itself, in response to events
- as the events are "external", the annot is not the target.
- These functions must exist and match the names in the SWF.
- ***********************************************************
-*/
-function ytPlayerReady() {
-
- // this is the place to load your default video - for example...
- console.println("<YT> Player loaded and ready");
- // this.getAnnotsRichMedia(this.pageNum)[0].callAS("loadVideoById",
- // "eNzrn8-JFSE",0);
- aebStartPlayer.isPlayerReady=true; // dps
-}
-function ytStateChange(st) {
- // Possible values are unstarted (-1), ended (0), playing (1),
- // paused (2), buffering (3), video cued (5)
- var lbl = "";
- console.println("<YT> State changed to " + st);
- if (st == 0) lbl = "\ytStrREPLAY";
- else if (st == 1) lbl = "\ytStrPAUSE";
- else if (st == 3) lbl = "\ytStrBuffering";
- else if (st == 2 || st == 5) lbl = "\ytStrPLAY";
- if (lbl) this.getField("playToggle").buttonSetCaption(lbl);
-}
-function ytPlaybackQualityChange(str) {
- // Possible values are "small", "medium", "large" and "hd720"
- console.println("<YT> Quality changed to " + str);
-}
-function ytProgress(q) {
- // q has four properties that you can use to update form fields,
- // such as...
- //this.getField("currentTime").value = q.CurrentTime;
- //this.getField("Duration").value = q.Duration;
- //this.getField("BytesLoaded").value = q.BytesLoaded;
- //this.getField("BytesTotal").value = q.BytesTotal;
-}
-function ytError(err) {
- // Video cannot be played
- console.println("<YT> ERROR code " + err + " received");
- if (err == 100)
- app.alert("\ytStrErrorVideoNotFound", 0, 0, "YouTube");
- else {
- var resp=app.alert("\ytStrErrorNoEmbed", 1, 3, "YouTube");
- if (resp==4) {
- aebCancelWait(false);
- ytOpenWeb(aebStartPlayer.annot);
- }
- }
-}
-/*
- We start the player if the annot is activated, if not,
- we set annot.activated=true, and wait for the widget to say it
- is ready. When ready, ytPlayerReady() sets
- aebStartPlayer.isPlayerReady=true
-*/
-function aebStartPlayer(rm,Id,bPlay) {
- aebStartPlayer.annot=rm;
- if (aebStartPlayer.annot.activated)
- aebStartPlayer.annot.callAS(%
-(bPlay)?"loadVideoById":"cueVideoById",Id,0);
- else {
- aebCancelWait(false);
- aebStartPlayer.annot.activated=true;
- aebStartPlayer.isPlayerReady=false;
- aebStartPlayer.twait=app.setInterval(%
-'aebWait4Ready(\"'+Id+'\",'+bPlay+');',250);
- aebStartPlayer.to=app.setTimeOut("aebCancelWait(true)", 10000);
- }
-}
-aebStartPlayer.isPlayerReady=false;
-aebStartPlayer.twait=null;
-aebStartPlayer.to=null;
-/*
- If the player is ready, we start the video, and clear
- the setInterval, otherwise, we wait.
-*/
-function aebWait4Ready(Id,bPlay) {
- if (aebStartPlayer.isPlayerReady) {
- aebCancelWait(false);
- aebStartPlayer.annot.callAS(%
-(bPlay)?"loadVideoById":"cueVideoById",Id,0);
- }
-}
-function aebCancelWait(bNotify) {
- var twait=aebStartPlayer.twait;
- if (aebStartPlayer.to!=null)
- try { app.clearTimeOut(aebStartPlayer.to); } catch(e) {};
- aebStartPlayer.to=null;
- if (aebStartPlayer.twait!=null)
- try { app.clearInterval(aebStartPlayer.twait); } catch(e) {}
- aebStartPlayer.twait=null;
- if ( bNotify && twait!=null ) app.alert("\ytStrConnecTimedOut");
-}
-\end{newsegment}
-\begin{newsegment}{Popup Menu Data and JS}
-\ytPopupData
-var aChoice;
-function ytProcessMenu(aMenu) {
- var cChoice = \popUpMenu(aMenu);
- if ( cChoice != null ) {
- aChoice=eval(cChoice);
- if (aChoice[1]=="") return null;
- var thisChoice=aChoice[0];
- if (ytProcessMenu.nChoice==undefined) {
- ytProcessMenu.nChoice=thisChoice;
- eval("aMenu"+ytProcessMenu.nChoice).bMarked=true;
- } else {
- eval("aMenu"+ytProcessMenu.nChoice).bMarked=false;
- var oldnChoice=ytProcessMenu.nChoice;
- ytProcessMenu.nChoice=thisChoice;
- eval("aMenu"+ytProcessMenu.nChoice).bMarked=(oldnChoice==ytProcessMenu.nChoice)?false:true;
- }
- return aChoice;
- } else return null;
-}
-function ytPopupMenu(rmaName,ytmenu) {
- var aChoice=ytProcessMenu(ytmenu);
- var rm=this.getAnnotRichMedia(this.pageNum,rmaName);
- if (aChoice!=null) {
- if (ytProcessMenu.lastDescrip==undefined) {
- aebStartPlayer(rm,aChoice[1],!event.shift);
- } else {
- if (ytProcessMenu.lastDescrip!=aChoice[1]) {
- aebStartPlayer(rm,aChoice[1],!event.shift);
- }
- }
- ytProcessMenu.lastDescrip=aChoice[1];
- }
-}
-\end{newsegment}
-\end{insDLJS*}
-% \end{macrocode}
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-\endinput
-
-rm=this.getAnnotRichMedia(this.pageNum,"YouTube1");
-rm.callAS("cueVideoById", "GZ9e3Dy7obA");
diff --git a/macros/latex/contrib/yt4pdf/yt4pdf.sty b/macros/latex/contrib/yt4pdf/yt4pdf.sty
deleted file mode 100644
index 7bed0d2499..0000000000
--- a/macros/latex/contrib/yt4pdf/yt4pdf.sty
+++ /dev/null
@@ -1,346 +0,0 @@
-%%
-%% This is file `yt4pdf.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% yt4pdf.dtx (with options: `copyright,package')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% yt4pdf.sty package, 2010-09-10 %%
-%% Copyright (C) 2010 D. P. Story %%
-%% dpstory@uakron.edu %%
-%% %%
-%% 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}[1997/12/01]
-\ProvidesPackage{yt4pdf}
- [2016/10/04 v1.1 yt4pdf: Play You Tube videos in PDF, Acrobat Distiller only (dps)]
-\RequirePackage{xkeyval}
-\ProcessOptions
-\RequirePackage{rmannot}
-\RequirePackage{popupmenu}[2010/09/18]
-\newcommand{\ytFolder}{C:/Users/Public/Documents/My TeX Files/%
-tex/latex/aeb/aebpro/yt4pdf/swf}
-\saveNamedPath{ytSWF}{\ytFolder/pdf_tube_basic.swf}
-\InputIfFileExists{yt4pdf.cfg}{}{}
-\def\yt@namegdef#1{\expandafter\gdef\csname #1\endcsname}
-\def\yt@namexdef#1{\expandafter\xdef\csname #1\endcsname}
-\def\thisNamedRMA(#1){this.getAnnotRichMedia(this.pageNum,"#1")}
-\define@key{ytRmAnnot}{play}[]{\def\ytrmannot@play{#1}}
-\define@key{ytRmAnnot}{load}[]{\def\ytrmannot@load{#1}}
-\setkeys{ytRmAnnot}{play,load}
-\let\ytCurrRMAName\@empty
-\newcommand{\ytRmAnnot}[4][]{\begingroup
- \@ifundefined{#2@ytrmname}{\yt@namegdef{#2@ytrmname}{#1}}%
- {\PackageError{yt2pdf}{The name `#2' is already defined
- for\MessageBreak this \string\ytRmAnnot}{Choose a unique
- name for this \string\ytRmAnnot, one different from `#2'.}}%
- \setkeys*{ytRmAnnot}{#1}\gdef\ytCurrRMAName{#2}%
- \ifx\ytrmannot@play\@empty\else
- \makebox[0pt][l]{\pushButton[\BC{}\BG{}\S{S}
- \AA{\AAPageOpen{aebStartPlayer(\thisNamedRMA(#2),%
- "\ytrmannot@play",true);}\AAPageClose{aebCancelWait(false);}}
- ]{btnRmAnnot#2}{1bp}{1bp}}\let\ytrmannot@load\@empty\fi
- \ifx\ytrmannot@load\@empty
- \else\makebox[0pt][l]{\pushButton[\BC{}\BG{}\S{S}
- \AA{\AAPageOpen{aebStartPlayer(\thisNamedRMA(#2),%
- "\ytrmannot@load",false);}\AAPageClose{aebCancelWait(false);}}
- ]{btnRmAnnot#2}{1bp}{1bp}}\fi
- \rmAnnot[\XKV@rm,name=#2,enabled=onclick]{#3}{#4}{ytSWF}%
- \endgroup
-}
-\newcommand{\DeclareYTName}[2][]{\def\argi{#1}%
- \ifx\argi\@empty\gdef\ytCurrRMAName{#2}\else
- \gdef\ytCurrRMAName{[#1]#2}\fi
-}
-\newcommand{\ytBtnPresets}[1]{\def\yt@Presets{#1}}
-\ytBtnPresets{\BC{.5 0 0}\S{S}\textFont{HeBo}\autoCenter{n}}
-\newcommand{\oyt@RMA}[1][this.pageNum]{\oyt@@RMA[#1]}
-\def\oyt@@RMA[#1]#2\@nil{\gdef\yt@CurrRMAName{#2}%
- \def\yt@rm{this.getAnnotRichMedia(#1,"#2")}}
-\newcommand{\ytPlayToggle}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrPAUSE}\presets{\yt@Presets}#1
- \A{\JS{ytPlayToggle(\yt@rm);}}]{playToggle}{#2}{#3}%
-}
-\newcommand{\ytStopLoading}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrStopLoading}\presets{\yt@Presets}#1
- \A{\JS{\yt@rm.callAS("stopVideo");}}]{vidStop}{#2}{#3}%
-}
-\newcommand{\ytMuteToggle}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrMUTE}\presets{\yt@Presets}#1
- \A{\JS{ytMuteToggle(\yt@rm);}}]{muteToggle}{#2}{#3}%
-}
-\newcommand{\ytRewind}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrREWIND}\presets{\yt@Presets}#1
- \A{\JS{ytRewind(\yt@rm);}}]{ytRewind}{#2}{#3}%
-}
-\newcommand{\ytSelect}[4][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrLoadVideo}\presets{\yt@Presets}#1
- \A{\JS{ytSelect(\yt@rm,"#2");}}]{selectVid}{#3}{#4}%
-}
-\newcommand{\ytOpenWeb}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrWatchOnWeb}\presets{\yt@Presets}#1
- \A{\JS{ytOpenWeb(\yt@rm);}}]{playOnWeb}{#2}{#3}%
-}
-\newcommand{\ytvIdPresets}[1]{\def\yt@vIdPresets{#1}}
-\ytvIdPresets{\linktxtcolor{webbrown}}
-\newcommand{\ytvId}{\@ifstar{\def\yt@lnk@play{false}\yt@@vId}
- {\def\yt@lnk@play{true}\yt@@vId}}
-\newcommand{\yt@@vId}[3][\ytCurrRMAName]{%
- \oyt@RMA#1\@nil\setLink[\presets{\yt@vIdPresets}
- \A{\JS{aebStartPlayer(\yt@rm,"#2",\yt@lnk@play);}}]{#3}}
-\newcommand{\ytComboListPresets}[1]{\def\yt@ComboListPresets{#1}}
-\newcommand{\ytComboBtnPresets}[1]{\def\yt@ComboBtnPresets{#1}}
-\let\yt@ComboListPresets\@empty
-\let\yt@ComboBtnPresets\@empty
-\newcommand{\ytPlayList}{\begingroup\@makeother\_\@makeother\'
- \ytPlayList@i}
-\def\ytPlayList@i#1#2{\gdef\yt@pl@def{#1}\xdef\yt@pl@pl{#2}\endgroup}
-\newcommand{\declarePlayList}{\bgroup
- \@makeother\_\@makeother\-
- \yt@declarePlayList}
-\def\yt@declarePlayList#1#2{%
- \gdef#1{#2}\egroup}
-\newcommand{\ytIdTitle}[2]{[(#2)(#1)]}
-\newcount\ytListCnt \ytListCnt=0
-\newcommand{\ytNewBaseName}[1][]{%
- \def\yt@argi{#1}\ifx\yt@argi\@empty\global\advance\ytListCnt1\relax
- \gdef\yt@BaseName{\yt@CurrRMAName\the\ytListCnt}\else
- \gdef\yt@BaseName{\yt@CurrRMAName#1}\fi
-}
-\newcommand{\ytResetBaseName}{\gdef\yt@BaseName{\yt@CurrRMAName}}
-\ytResetBaseName
-\newcommand{\ytComboList}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \comboBox[\DV{\yt@pl@def}\V{\yt@pl@def}
- \presets{\yt@ComboListPresets}#1]{ytSelect\yt@BaseName}
- {#2}{#3}{\yt@pl@pl}%
-}
-\newcommand{\ytComboBtn}[3][]{%
- \expandafter\oyt@RMA\ytCurrRMAName\@nil%
- \pushButton[\CA{\ytStrPLAY}\presets{\yt@ComboBtnPresets}#1
- \A{\JS{var f=this.getField("ytSelect\yt@BaseName");\r
- aebStartPlayer(\yt@rm,f.value,!event.shift);
- }}]{ytSelectBtn\yt@BaseName}{#2}{#3}%
-}
-\newcommand{\ytPopupMenuData}[1]{{\toks0={// yt4pdf: Begin popup menu data^^J}%
- \@tfor\yt@menu:=#1\do{%
- \toks2=\expandafter{\yt@menu}%
- \edef\@tmp@exp{\the\toks0\the\toks2^^J}%
- \toks0=\expandafter{\@tmp@exp}%
- }\xdef\ytPopupData{\the\toks0// End of popup menu data}%
-}}
-\def\ytPopupData{// No popup menu data defined}%
-\newcommand{\puIdTitle}[2]{\item{title={#1},return={[\itemindex,'#2']}}}
-\newcommand{\ytStrPLAY}{PLAY}
-\newcommand{\ytStrREPLAY}{REPLAY}
-\newcommand{\ytStrPAUSE}{PAUSE}
-\newcommand{\ytStrBuffering}{Buffering...}
-\newcommand{\ytStrStopLoading}{Stop Loading}
-\newcommand{\ytStrMUTE}{MUTE}
-\newcommand{\ytStrUNMUTE}{UNMUTE}
-\newcommand{\ytStrREWIND}{REWIND}
-\newcommand{\ytStrLoadVideo}{Load Video}
-\newcommand{\ytStrWatchOnWeb}{Watch on YouTube}
-\newcommand{\ytRespQues}{Enter the YouTube Video ID}
-\newcommand{\ytRespTitle}{Load a Video}
-\newcommand{\ytRespLabel}{ID:}
-\newcommand{\ytStrErrorVideoNotFound}{Error: Video not found}
-\newcommand{\ytStrErrorNoEmbed}{Error: This video does not allow
- embedded playback \r\r Would you like to view this video
- on the web?}
-\newcommand{\ytStrConnecTimedOut}{Connection timed out, try again.}
-\begin{insDLJS*}[ytPlayToggle]{yt}
-\begin{newsegment}{yt4PDF: YouTube for PDF JavaScript}
-/*
- Document-level script for YouTube player
- Document-level script for the PDFtube embedded YouTube player
- ***************************************************************
- Functions to be called by buttons or links on the PDF
- in each case, "rm" is the RichMedia annot containing the player
- All these are optional and can be renamed or edited as required
- ***********************************************************
-*/
-// toggle play/pause (button labels updated by event functions)
-function ytPlayToggle(rm) {
- var ps = rm.callAS("getPlayerState");
- rm.callAS((ps == 1)? "pauseVideo" : "playVideo");
-}
-// toggle mute (have to update button labels ourselves)
-function ytMuteToggle(rm) {
- var im = rm.callAS("isMuted");
- if (im) {
- event.target.buttonSetCaption("\ytStrMUTE");
- rm.callAS("unMute");
- } else {
- event.target.buttonSetCaption("\ytStrUNMUTE");
- rm.callAS("mute");
- }
-}
-// Ask the user for the ID number of a new video, and play it
-function ytSelect(rm,vID) {
- var rsp = app.response({
- cQuestion: "\ytRespQues",
- cTitle: "\ytRespTitle",
- cDefault: vID,
- cLabel: "\ytRespLabel"});
- if (rsp !=null && rsp != "")
- aebStartPlayer(rm,rsp,true); // dps
-}
-// open the video's YouTube page in the web browser
-function ytOpenWeb(rm) {
- var link = rm.callAS("getVideoUrl");
- if (link != null) {
- app.launchURL(link,true);
- rm.activated = false;
- }
-}
-// rewind (seek to zero)
-function ytRewind(rm) { rm.callAS("seekTo",0); }
-/*
- ************************************************************
- Functions called by the player itself, in response to events
- as the events are "external", the annot is not the target.
- These functions must exist and match the names in the SWF.
- ***********************************************************
-*/
-function ytPlayerReady() {
-
- // this is the place to load your default video - for example...
- console.println("<YT> Player loaded and ready");
- // this.getAnnotsRichMedia(this.pageNum)[0].callAS("loadVideoById",
- // "eNzrn8-JFSE",0);
- aebStartPlayer.isPlayerReady=true; // dps
-}
-function ytStateChange(st) {
- // Possible values are unstarted (-1), ended (0), playing (1),
- // paused (2), buffering (3), video cued (5)
- var lbl = "";
- console.println("<YT> State changed to " + st);
- if (st == 0) lbl = "\ytStrREPLAY";
- else if (st == 1) lbl = "\ytStrPAUSE";
- else if (st == 3) lbl = "\ytStrBuffering";
- else if (st == 2 || st == 5) lbl = "\ytStrPLAY";
- if (lbl) this.getField("playToggle").buttonSetCaption(lbl);
-}
-function ytPlaybackQualityChange(str) {
- // Possible values are "small", "medium", "large" and "hd720"
- console.println("<YT> Quality changed to " + str);
-}
-function ytProgress(q) {
- // q has four properties that you can use to update form fields,
- // such as...
- //this.getField("currentTime").value = q.CurrentTime;
- //this.getField("Duration").value = q.Duration;
- //this.getField("BytesLoaded").value = q.BytesLoaded;
- //this.getField("BytesTotal").value = q.BytesTotal;
-}
-function ytError(err) {
- // Video cannot be played
- console.println("<YT> ERROR code " + err + " received");
- if (err == 100)
- app.alert("\ytStrErrorVideoNotFound", 0, 0, "YouTube");
- else {
- var resp=app.alert("\ytStrErrorNoEmbed", 1, 3, "YouTube");
- if (resp==4) {
- aebCancelWait(false);
- ytOpenWeb(aebStartPlayer.annot);
- }
- }
-}
-/*
- We start the player if the annot is activated, if not,
- we set annot.activated=true, and wait for the widget to say it
- is ready. When ready, ytPlayerReady() sets
- aebStartPlayer.isPlayerReady=true
-*/
-function aebStartPlayer(rm,Id,bPlay) {
- aebStartPlayer.annot=rm;
- if (aebStartPlayer.annot.activated)
- aebStartPlayer.annot.callAS(%
-(bPlay)?"loadVideoById":"cueVideoById",Id,0);
- else {
- aebCancelWait(false);
- aebStartPlayer.annot.activated=true;
- aebStartPlayer.isPlayerReady=false;
- aebStartPlayer.twait=app.setInterval(%
-'aebWait4Ready(\"'+Id+'\",'+bPlay+');',250);
- aebStartPlayer.to=app.setTimeOut("aebCancelWait(true)", 10000);
- }
-}
-aebStartPlayer.isPlayerReady=false;
-aebStartPlayer.twait=null;
-aebStartPlayer.to=null;
-/*
- If the player is ready, we start the video, and clear
- the setInterval, otherwise, we wait.
-*/
-function aebWait4Ready(Id,bPlay) {
- if (aebStartPlayer.isPlayerReady) {
- aebCancelWait(false);
- aebStartPlayer.annot.callAS(%
-(bPlay)?"loadVideoById":"cueVideoById",Id,0);
- }
-}
-function aebCancelWait(bNotify) {
- var twait=aebStartPlayer.twait;
- if (aebStartPlayer.to!=null)
- try { app.clearTimeOut(aebStartPlayer.to); } catch(e) {};
- aebStartPlayer.to=null;
- if (aebStartPlayer.twait!=null)
- try { app.clearInterval(aebStartPlayer.twait); } catch(e) {}
- aebStartPlayer.twait=null;
- if ( bNotify && twait!=null ) app.alert("\ytStrConnecTimedOut");
-}
-\end{newsegment}
-\begin{newsegment}{Popup Menu Data and JS}
-\ytPopupData
-var aChoice;
-function ytProcessMenu(aMenu) {
- var cChoice = \popUpMenu(aMenu);
- if ( cChoice != null ) {
- aChoice=eval(cChoice);
- if (aChoice[1]=="") return null;
- var thisChoice=aChoice[0];
- if (ytProcessMenu.nChoice==undefined) {
- ytProcessMenu.nChoice=thisChoice;
- eval("aMenu"+ytProcessMenu.nChoice).bMarked=true;
- } else {
- eval("aMenu"+ytProcessMenu.nChoice).bMarked=false;
- var oldnChoice=ytProcessMenu.nChoice;
- ytProcessMenu.nChoice=thisChoice;
- eval("aMenu"+ytProcessMenu.nChoice).bMarked=(oldnChoice==ytProcessMenu.nChoice)?false:true;
- }
- return aChoice;
- } else return null;
-}
-function ytPopupMenu(rmaName,ytmenu) {
- var aChoice=ytProcessMenu(ytmenu);
- var rm=this.getAnnotRichMedia(this.pageNum,rmaName);
- if (aChoice!=null) {
- if (ytProcessMenu.lastDescrip==undefined) {
- aebStartPlayer(rm,aChoice[1],!event.shift);
- } else {
- if (ytProcessMenu.lastDescrip!=aChoice[1]) {
- aebStartPlayer(rm,aChoice[1],!event.shift);
- }
- }
- ytProcessMenu.lastDescrip=aChoice[1];
- }
-}
-\end{newsegment}
-\end{insDLJS*}
-\endinput
-%%
-%% End of file `yt4pdf.sty'.