summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-22 00:08:06 +0000
committerKarl Berry <karl@freefriends.org>2009-11-22 00:08:06 +0000
commit85c2888835a33844b01fcf9a536dd6d481c99c49 (patch)
tree0eca919dcbbfb176d139c427781c67e4254066eb
parent37c4a5be1d1d1c895526e9c5ae9e5918fb133d80 (diff)
new latex package popupmenu (21oct09)
git-svn-id: svn://tug.org/texlive/trunk@16116 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/popupmenu/README19
-rw-r--r--Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex.tex109
-rw-r--r--Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex_pdftex.tex111
-rw-r--r--Master/texmf-dist/source/latex/popupmenu/popupmenu.dtx254
-rw-r--r--Master/texmf-dist/source/latex/popupmenu/popupmenu.ins59
-rw-r--r--Master/texmf-dist/tex/latex/popupmenu/popupmenu.sty79
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/popupmenu.tlpsrc0
9 files changed, 633 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/popupmenu/README b/Master/texmf-dist/doc/latex/popupmenu/README
new file mode 100644
index 00000000000..11e7e4f8e29
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/popupmenu/README
@@ -0,0 +1,19 @@
+The popupmenu Package
+
+popupmenu is a LaTeX package used to create a menu structure. This
+menu structure (an array of menu items) is passed to the Acrobat
+JavaScript method app.popUpMenuEx() method to create a popup menu.
+Using the environments defined in this package, and the command
+\popUpMenu, you can create and display hierarchical menus. The menu
+items can have JavaScript actions associated with them, they can be
+marked and dis-enabled.
+
+The package requires only hyperref. Thus, users of pdftex, dvipdfm,
+and dvips can use this package. Two examples are included in the
+distribution, additional examples can be found at the AeB Blog
+
+ http://www.math.uakron.edu/~dpstory/aebblog.html
+
+
+D. P. Story
+10/21/09
diff --git a/Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex.tex b/Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex.tex
new file mode 100644
index 00000000000..026ce8323f0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex.tex
@@ -0,0 +1,109 @@
+\documentclass{article}
+\usepackage[designv]{web}
+\usepackage{eforms}
+\usepackage{popupmenu}
+
+\title{The \texorpdfstring{\textsf{popupmenu}}{popupmenu} Package Test File}
+\author{D. P. Story}
+\subject{Test file for the popupmenu Package}
+\keywords{LaTeX, popupmenu, Acrobat JavaScript, AcroTeX}
+
+\university{NORTHWEST FLORIDA STATE COLLEGE\\
+ Department of Mathematics}
+\email{dpstory@acrotex.net}
+\version{1.0}
+
+%\nocopyright
+\norevisionLabel
+
+%
+% This package can be used by users of pdftex, dvipdfm, dvips (with distiller)
+%
+
+\urlPath{\aebhome}{http://www.math.uakron.edu/~dpstory}
+
+\begin{popupmenu}{AeBMenu}
+ \item{title=AeB, return=\aebhome/webeq.html}
+ \item{title=-}
+ \begin{submenu}{title=AeB Pro Family}
+ \item{title=Home page,return=\aebhome/aeb_pro.html}
+ \item{title=Graphicxsp,return=\aebhome/graphicxsp.html}
+ \end{submenu}
+ \item{title=eqExam,return=\aebhome/eqexam.html}
+\end{popupmenu}
+
+\begin{popupmenu}{AeBMenuLocal}
+ \item{title=AeB, return=\aebhome/webeq.html}
+ \item{title=-}
+ \begin{submenu}{title=AeB Pro Family,enabled=false}
+ \item{title=Home page,return=\aebhome/aeb_pro.html}
+ \item{title=Graphicxsp,return=\aebhome/graphicxsp.html}
+ \end{submenu}
+ \item{title=eqExam,return=\aebhome/eqexam.html}
+\end{popupmenu}
+
+%
+% This menu was taken from the Acrobat JavaScript API Reference
+% as a test of the new popupmenu and submenu environments.
+%
+\begin{popupmenu}{myMenu}
+ \item{title=Item 1, marked, enabled=false}
+ \item{title=-}
+ \begin{submenu}{title=Item 2}
+ \item{title={Item 2, Submenu 1}}
+ \begin{submenu}{title={Item 2, Submenu 2}}
+ \item{title={Item 2, Submenu 2, Subsubmenu 1}}
+ \end{submenu}
+ \end{submenu}
+ \item{title=Item 3}
+ \item{title=Item 4}
+\end{popupmenu}
+
+\begin{insDLJS}[AeBMenu]{md}{Menu Data}
+\AeBMenu
+\myMenu
+\end{insDLJS}
+
+\parindent0pt\parskip6pt
+
+\begin{document}
+
+\maketitle
+
+This file uses the \textsf{eforms} package to create push buttons,
+the push button of \textsf{hyperref} can also be used.
+
+Here is an example taken from the Acrobat JavaScript API Reference:
+\pushButton[\CA{My Menu}\AA{\AAMouseEnter{\JS{%
+var cChoice = \popUpMenu(myMenu);\r
+if ( cChoice != null ) app.alert("You chose the \\""+cChoice+"\\" menu item");
+}}}]{mymenu}{}{11bp}
+
+We can add a push button with a rollover effect
+\pushButton[\CA{Packages}\AA{\AAMouseEnter{\JS{%
+var cChoice = \popUpMenu(AeBMenu);\r
+if ( cChoice != null ) app.launchURL(cChoice);
+}}}]{menu}{}{11bp}
+
+You can also open the menu with a link:
+\setLinkText[\A{\JS{%
+var cChoice = \popUpMenu(AeBMenu);\r
+if ( cChoice != null ) app.launchURL(cChoice);
+}}]{Package}. Links do not have a rollover effect, however, you can use buttons
+like so: {\setbox0=\hbox{\textcolor{red}{Packages}}%
+\makebox[0pt][l]{\pushButton[\W0\BG{}\BC{}\S{S}\AA{\AAMouseEnter{\JS{%
+var cChoice = \popUpMenu(AeBMenu);\r if ( cChoice != null )
+app.launchURL(cChoice); }}}]{menu}{\wd0}{\ht0+\dp0}}\unhbox0}.
+
+This is a version that has a local version of the menu array:
+{\setbox0=\hbox{\textcolor{red}{Packages}}%
+\makebox[0pt][l]{\pushButton[\W0\BG{}\BC{}\S{S}\AA{\AAMouseEnter{\JS{%
+\AeBMenuLocal\r
+var cChoice = \popUpMenu(AeBMenuLocal);\r if ( cChoice != null )
+app.launchURL(cChoice);}}}]{menu}{\wd0}{\ht0+\dp0}}\unhbox0}
+\end{document}
+
+This is a version that has a local version of the menu array:
+\PushButton[name=hyperbutton,onmouseover={\AeBMenuLocal
+var cChoice = \popUpMenu(AeBMenuLocal); if ( cChoice != null )
+app.launchURL(cChoice); }]{Packages}
diff --git a/Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex_pdftex.tex b/Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex_pdftex.tex
new file mode 100644
index 00000000000..3254570dc57
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/popupmenu/examples/pumen_ex_pdftex.tex
@@ -0,0 +1,111 @@
+\documentclass{article}
+\usepackage[designv,pdftex]{web}
+\usepackage{eforms}
+\usepackage{popupmenu}
+
+\title{The \texorpdfstring{\textsf{popupmenu}}{popupmenu} Package Test File}
+\author{D. P. Story}
+\subject{Test file for the popupmenu Package}
+\keywords{LaTeX, popupmenu, Acrobat JavaScript, AcroTeX}
+
+\university{NORTHWEST FLORIDA STATE COLLEGE\\
+ Department of Mathematics}
+\email{dpstory@acrotex.net}
+\version{1.0}
+
+%\nocopyright
+\norevisionLabel
+
+%
+% This package can be used by users of pdftex, dvipdfm, dvips (with distiller)
+%
+
+\urlPath{\aebhome}{http://www.math.uakron.edu/~dpstory}
+
+\begin{popupmenu}{AeBMenu}
+ \item{title=AeB, return=\aebhome/webeq.html}
+ \item{title=-}
+ \begin{submenu}{title=AeB Pro Family}
+ \item{title=Home page,return=\aebhome/aeb_pro.html}
+ \item{title=Graphicxsp,return=\aebhome/graphicxsp.html}
+ \end{submenu}
+ \item{title=eqExam,return=\aebhome/eqexam.html}
+\end{popupmenu}
+
+\begin{popupmenu}{AeBMenuLocal}
+ \item{title=AeB, return=\aebhome/webeq.html}
+ \item{title=-}
+ \begin{submenu}{title=AeB Pro Family,enabled=false}
+ \item{title=Home page,return=\aebhome/aeb_pro.html}
+ \item{title=Graphicxsp,return=\aebhome/graphicxsp.html}
+ \end{submenu}
+ \item{title=eqExam,return=\aebhome/eqexam.html}
+\end{popupmenu}
+
+%
+% This menu was taken from the Acrobat JavaScript API Reference
+% as a test of the new popupmenu and submenu environments.
+%
+\begin{popupmenu}{myMenu}
+ \item{title=Item 1, marked, enabled=false}
+ \item{title=-}
+ \begin{submenu}{title=Item 2}
+ \item{title={Item 2, Submenu 1}}
+ \begin{submenu}{title={Item 2, Submenu 2}}
+ \item{title={Item 2, Submenu 2, Subsubmenu 1}}
+ \end{submenu}
+ \end{submenu}
+ \item{title=Item 3}
+ \item{title=Item 4}
+\end{popupmenu}
+
+\begin{insDLJS}[AeBMenu]{md}{Menu Data}
+\AeBMenu
+\myMenu
+\end{insDLJS}
+
+\newcommand{\cs}[1]{\texttt{\char`\\#1}}
+
+
+\parindent0pt\parskip6pt
+
+\begin{document}
+
+\maketitle
+
+This file uses the \textsf{hyperref} package to create push buttons,
+the push button of \textsf{eforms} can also be used.
+
+
+Here is an example taken from the Acrobat JavaScript API Reference, it uses
+the \cs{PushButton} command of \textsf{hyperref}. The script is implemented as
+a mouse up event, rather than a rollover event as it appears \cs{PushButton} does not
+support rollover. There is a \texttt{onmouseover} key that is supposed to work, but it doesn't.
+\PushButton[name=mymenu,
+onclick={var cChoice = \popUpMenu(myMenu);
+if ( cChoice != null ) app.alert("You chose the \eqbs\eqbs""+cChoice+"\eqbs\eqbs" menu item");
+}]{My Menu}
+
+
+Here is the same example, but using \cs{pushButton}, the button command from the eforms package.
+It is implemented as a rollover event.
+\pushButton[\CA{My Menu}\AA{\AAMouseEnter{\JS{%
+var cChoice = \popUpMenu(myMenu);\r
+if ( cChoice != null ) app.alert("You chose the \\""+cChoice+"\\" menu item");
+}}}]{mymenu}{}{11bp}
+
+We can add a push button with a rollover effect
+\pushButton[\CA{Packages}\AA{\AAMouseEnter{\JS{%
+var cChoice = \popUpMenu(AeBMenu);\r
+if ( cChoice != null ) app.launchURL(cChoice);
+}}}]{menu}{}{11bp}
+
+This is a version that has a local version of the \texttt{AeBMenuLocal} array.
+If we place the array as field-level JavaScript, we don't need the \textsf{eforms} package.
+Again, this is an \texttt{onclick} event.
+\PushButton[name=mymenu,onclick={\AeBMenuLocal;
+var cChoice = \popUpMenu(AeBMenuLocal);
+if ( cChoice != null ) app.launchURL(cChoice);}]{AeB Local Menu}
+
+Fancier examples can be found at the \textcolor{blue}{AeB Blog} (\url{www.math.uakron.edu/~dpstory/aebblog.html}).
+\end{document}
diff --git a/Master/texmf-dist/source/latex/popupmenu/popupmenu.dtx b/Master/texmf-dist/source/latex/popupmenu/popupmenu.dtx
new file mode 100644
index 00000000000..da0f1bf5d7f
--- /dev/null
+++ b/Master/texmf-dist/source/latex/popupmenu/popupmenu.dtx
@@ -0,0 +1,254 @@
+% \iffalse
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% popupmenu.sty package, 2009-10-15 %%
+%% Copyright (C) 2009 D. P. Story %%
+%% dpstory@acrotex.net %%
+%% storyd@nwfsc.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}
+%<package>\ProvidesPackage{popupmenu}
+%<package> [2009/10/20 v.7 Provides support for popup menus (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex]{hyperref}
+\pdfstringdefDisableCommands{\let\\\textbackslash}%
+\EnableCrossrefs \CodelineIndex
+\OnlyDescription % comment out for implementation details
+\begin{document}
+ \GetFileInfo{popupmenu.sty}
+ \title{The \textsf{popupmenu} Package}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@acrotex.net}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{popupmenu.dtx}
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% This is a short package that provides environments and commands for building
+% a popup menu using JavaScript. The command \cs{popUpMenu} uses the Acrobat JavaScript
+% method \texttt{app.popUpMenuEx}. This latter method requires you to pass to it a
+% structured menu listing of the menu items to be displayed in the popup menu, and the actions
+% to be taken when a menu item is selected. The environments \texttt{popupmenu} and
+% \texttt{submenu} are defined for the purpose of creating this hierarchical structure.
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+% \end{macrocode}
+% According to the JavaScript manual, the \texttt{app.popUpMenuEx} method takes
+% one or more \texttt{MenuItem} objects. The {\LaTeX} access to the properties of this object are documented
+% as follows (taken verbatim from the JavaScript reference):
+% \begin{macro}{title}
+% The menu item name, which is the string to appear on the menu item. The value of
+% \texttt{"-"} is reserved to draw a separator line in the menu.
+% \begin{macro}{marked}
+% (optional) A Boolean value specifying whether the item is to be marked with a
+% check. The default is \texttt{false} (not marked).
+% \begin{macro}{enabled}
+% (optional) A Boolean value specifying whether the item is to appear enabled or
+% grayed out. The default is \texttt{true} (enabled).
+% \begin{macro}{return}
+% (optional) A string to be returned when the menu item is selected. The default is the
+% value of cName.
+% \begin{macrocode}
+\define@key{menustruct}{title}[]{\def\menustruct@title{#1}}
+\define@boolkey{menustruct}{marked}[true]{}
+\define@boolkey{menustruct}{enabled}[true]{}
+\define@key{menustruct}{return}[]{\def\menustruct@return{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% We use the command \cs{pum@holdtoks} to hold the menu items as they are processed
+% in the environment, and use \cs{@AddToMenuToks} to add to the items.
+% \begin{macrocode}
+\let\pum@holdtoks\@empty
+\newcommand{\@AddToMenuToks}{\g@addto@macro\pum@holdtoks}
+% \end{macrocode}
+% \begin{environment}{popupmenu}
+% We begin by defining our menu structure using the
+% \texttt{popupmenu} environment. Within this environment,
+% we list the items in the menu using \cs{item} and
+% the \texttt{submenu} menu if there are sub menus.
+%
+% The \texttt{popupmenu} command requires one parameter, this command is
+% used to create both a command and a JavaScript variable. The name is
+% passed to the \cs{popUpMenu} command, while the command version of the
+% name expands to the menu structure. The menu structure can be placed
+% at the document level, or as part of a push button action.
+% Here is an example of usage:\par
+% \begin{verbatim}
+%\urlPath{\aebhome}{http://www.math.uakron.edu/~dpstory}
+%\begin{popupmenu}{myMenu}
+% \item{title=AeB,return=\aebhome/webeq.html}
+% \item{title=-}
+% \begin{submenu}{title=AeB Pro Family}
+% \item{title=Home page, return=\aebhome/aeb_pro.html}
+% \item{title=Graphicxsp, return=\aebhome/graphicxsp.html}
+% \end{submenu}
+% \item{title=eqExam, return=\aebhome/eqexam.html}
+%\end{popupmenu}
+%\end{verbatim}
+%The above definition can be conveniently placed in the preamble, though it can
+% appear anywhere before it is used, obviously. Now to use the menu structure,
+% all we need is a push button or link to create a JavaScript action:
+%\begin{verbatim}
+% \pushButton[\CA{Packages}\AA{\AAMouseEnter{\JS{%
+% \myMenu\r
+% var cChoice = \popUpMenu(myMenu);\r
+% if ( cChoice != null ) app.launchURL(cChoice);
+% }}}]{menu}{}{11bp}
+%\end{verbatim}
+% The above example uses the \textsf{eforms} package, but a push button from \textsf{hyperref} will do too.
+% The \texttt{app.popUpMenuEx} method returns the return value, which we, in turn, process. In this
+% case, the return is a URL, which we launch.
+%
+% If we have placed \cs{myMenu} at the document level, the line \verb!\myMenu\r! would not be needed.
+% If you are using the same menu several times in the document, put it at the document level to reduce
+% file size.
+%
+% Also, in the above example, you see how the name, \texttt{myMenu}, passed as an argument
+% of the popupmenu environment is used as a name and as a command: The name is passed to
+% \cs{popUpMenu}, while the command expands to the menu structure that is referenced by the name.
+% \begin{macrocode}
+% \end{macrocode}
+% \begin{macro}{\itemindex}
+% We generate the index of each menu item. \cs{itemindex} is
+% the index of the menu structure array; for example,
+% \cs{itemindex} might expand to \texttt{[0]}, \texttt{[1].oSubMenu[3]}, or \texttt{[2].oSubMenu[3].oSubMenu[0]}.
+% If \cs{itemindex} is included in the return value (possibly as an array entry), we can
+% know the item the use selected
+%\begin{verbatim}
+%var aChoice=processMenu(AeBMenu);
+%if (aChoice!=null) {
+% var thisChoice=aChoice[0]; // this is a string
+% var thistitle=eval("AeBMenu"+thisChoice+".cName");
+% app.alert(thistitle);
+%}
+%\end{verbatim}
+% The above code gets the return array, then uses it to get the title of the item
+% selected,
+% \begin{macrocode}
+\def\pum@updateindex{\advance\count\z@\@ne
+ \edef\pum@rc{\pum@topindex[\the\count\z@]}\edef\itemindex{'\pum@rc'}}
+\def\pum@initIndexMenu#1{\count\z@=-1\relax\edef\pum@rc{#1}%
+ \edef\pum@topindex{\pum@rc}}
+% \end{macrocode}
+% \end{macro}
+% We are now ready to define the \texttt{popupmenu} environment. The environment
+% takes one required parameter, a name that is used as a JavaScript variable.
+% This name is also used to create a command.
+% \begin{macrocode}
+\newenvironment{popupmenu}[1]{\pum@initIndexMenu{}%
+ \let\pum@holdtoks\@empty
+ \toks@={\pum@mytab}\@makeother\~
+% \end{macrocode}
+% We initialize with a \cs{@gobble}, which eats up the leading comma (,)
+% that is placed there by the code below.
+% \begin{macrocode}
+ \gdef\msarg{#1}\@AddToMenuToks{\@gobble}%
+ \let\item\pum@item
+}{%
+ \expandafter\xdef\csname\msarg\endcsname{%
+ var \msarg\space = [ \pum@holdtoks^^J];}%
+}
+% \end{macrocode}
+% \end{environment}
+% \begin{macro}{\pum@item}
+% At the startup of the \texttt{popupmenu} environment, we \verb|\let\item\pum@item|.
+% The definition of \cs{pum@item} takes one argument, the properties described above.
+% \begin{macrocode}
+\newcommand{\pum@item}[1]{\pum@updateindex
+ \setkeys{menustruct}{title,marked=false,enabled,return,#1}%
+ \edef\tmp@exp{,^^J\the\toks@
+ {cName: "\menustruct@title"%
+ \ifKV@menustruct@marked, bMarked: true\fi%
+ \ifKV@menustruct@enabled\else, bEnabled: false\fi%
+ \ifx\menustruct@return\@empty\else,
+ cReturn: "\menustruct@return"\fi}}%
+ \expandafter\@AddToMenuToks\expandafter{\tmp@exp}%
+}
+% \end{macrocode}
+% \end{macro}
+% Some technical matters, we need unmatched braces, so we define
+% \cs{pum@lbrace} and \cs{pum@rbrace}.
+% \begin{macrocode}
+\begingroup
+\catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+\gdef\pum@lbrace<{>\gdef\pum@rbrace<}>
+\endgroup
+\def\pum@mytab{\space\space\space\space}
+% \end{macrocode}
+% \begin{environment}{submenu}
+% Used to create a submenu of a menu item. The top level menu item has no return value,
+% it can be marked but cannot be dis-enabled (\texttt{enabled=false}).
+%
+% The argument of \texttt{submenu} are any of the menu item properties, however, only
+% \texttt{title} and \texttt{marked} will be recognized.
+%
+% The JavaScript property, \texttt{oSubMenu}, of the menu structure passed to
+% the method \texttt{app.popUpMenuEx} has no {\LaTeX} counterpart. This property
+% key-value pair is automatically inserted by the \texttt{submenu}
+% environment.
+% \begin{macrocode}
+\newenvironment{submenu}[1]{\pum@updateindex
+ \pum@initIndexMenu{\pum@rc.oSubMenu}\edef\temp@toks{\the\toks@}%
+ \toks@=\expandafter{\temp@toks\pum@mytab}%
+ \setkeys{menustruct}{title,marked=false,enabled,return,#1}%
+ \edef\tmp@exp{,^^J\the\toks@
+ \noexpand\pum@lbrace cName: "\menustruct@title"%
+ \ifKV@menustruct@marked, bMarked: true\fi%
+ \ifKV@menustruct@enabled\else, bEnabled: false\fi,
+ oSubMenu:^^J\the\toks@[}%
+% \end{macrocode}
+% Again, we \cs{@gobble} up the leading comma (,).
+% \begin{macrocode}
+ \expandafter\@AddToMenuToks\expandafter{\tmp@exp\@gobble}%
+}{%
+ \edef\tmp@exp{^^J\the\toks@ ]\pum@rbrace}%
+ \expandafter\@AddToMenuToks\expandafter{\tmp@exp}%
+}
+% \end{macrocode}
+% \end{environment}
+% \begin{macro}{\popUpMenu}
+% The \cs{popUpMenu} command takes one argument, the name pass to a
+% popupmenu environment. The command expands to the \texttt{app.popUpMenuEx}
+% method. The document author must then process the return value in some way.
+% The argument is enclosed in parentheses, this is so we can use \cs{popUpMenu}
+% at the document level, we can pass it an argument there.
+% \begin{macrocode}
+\def\popUpMenu(#1){app.popUpMenuEx.apply( app, #1 )}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\urlPath}
+% A convenience command to save a url path. The string is normalized using
+% the \textsf{hyperref} command \cs{hyper@normalise}. Though we don't require
+% any other packages, you can't do much unless you use \textsf{hyperref} as well.
+% \begin{macrocode}
+\providecommand{\urlPath}[1]{\def\pum@urlName{#1}%
+ \hyper@normalise\pum@urlPath}
+\def\pum@urlPath#1{\expandafter\xdef\pum@urlName{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \Finale
+\endinput
+History:
+ (2009/10/20 v.7) Added \itemindex, which calculates the index of the menu item
+ selected. Can be passed to the handling code as part of the return value.
diff --git a/Master/texmf-dist/source/latex/popupmenu/popupmenu.ins b/Master/texmf-dist/source/latex/popupmenu/popupmenu.ins
new file mode 100644
index 00000000000..1223d03e854
--- /dev/null
+++ b/Master/texmf-dist/source/latex/popupmenu/popupmenu.ins
@@ -0,0 +1,59 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2006 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2009/10/15}
+\def\batchfile{popupmenu.ins}
+%
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+\generate
+{%
+ \file{popupmenu.sty}{\from{popupmenu.dtx}{copyright,package}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/popupmenu/popupmenu.sty b/Master/texmf-dist/tex/latex/popupmenu/popupmenu.sty
new file mode 100644
index 00000000000..6a89759eb57
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/popupmenu/popupmenu.sty
@@ -0,0 +1,79 @@
+%%
+%% This is file `popupmenu.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% popupmenu.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% popupmenu.sty package, 2009-10-15 %%
+%% Copyright (C) 2009 D. P. Story %%
+%% dpstory@acrotex.net %%
+%% storyd@nwfsc.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}
+\ProvidesPackage{popupmenu}
+ [2009/10/20 v.7 Provides support for popup menus (dps)]
+\RequirePackage{xkeyval}
+\define@key{menustruct}{title}[]{\def\menustruct@title{#1}}
+\define@boolkey{menustruct}{marked}[true]{}
+\define@boolkey{menustruct}{enabled}[true]{}
+\define@key{menustruct}{return}[]{\def\menustruct@return{#1}}
+\let\pum@holdtoks\@empty
+\newcommand{\@AddToMenuToks}{\g@addto@macro\pum@holdtoks}
+\def\pum@updateindex{\advance\count\z@\@ne
+ \edef\pum@rc{\pum@topindex[\the\count\z@]}\edef\itemindex{'\pum@rc'}}
+\def\pum@initIndexMenu#1{\count\z@=-1\relax\edef\pum@rc{#1}%
+ \edef\pum@topindex{\pum@rc}}
+\newenvironment{popupmenu}[1]{\pum@initIndexMenu{}%
+ \let\pum@holdtoks\@empty
+ \toks@={\pum@mytab}\@makeother\~
+ \gdef\msarg{#1}\@AddToMenuToks{\@gobble}%
+ \let\item\pum@item
+}{%
+ \expandafter\xdef\csname\msarg\endcsname{%
+ var \msarg\space = [ \pum@holdtoks^^J];}%
+}
+\newcommand{\pum@item}[1]{\pum@updateindex
+ \setkeys{menustruct}{title,marked=false,enabled,return,#1}%
+ \edef\tmp@exp{,^^J\the\toks@
+ {cName: "\menustruct@title"%
+ \ifKV@menustruct@marked, bMarked: true\fi%
+ \ifKV@menustruct@enabled\else, bEnabled: false\fi%
+ \ifx\menustruct@return\@empty\else,
+ cReturn: "\menustruct@return"\fi}}%
+ \expandafter\@AddToMenuToks\expandafter{\tmp@exp}%
+}
+\begingroup
+\catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+\gdef\pum@lbrace<{>\gdef\pum@rbrace<}>
+\endgroup
+\def\pum@mytab{\space\space\space\space}
+\newenvironment{submenu}[1]{\pum@updateindex
+ \pum@initIndexMenu{\pum@rc.oSubMenu}\edef\temp@toks{\the\toks@}%
+ \toks@=\expandafter{\temp@toks\pum@mytab}%
+ \setkeys{menustruct}{title,marked=false,enabled,return,#1}%
+ \edef\tmp@exp{,^^J\the\toks@
+ \noexpand\pum@lbrace cName: "\menustruct@title"%
+ \ifKV@menustruct@marked, bMarked: true\fi%
+ \ifKV@menustruct@enabled\else, bEnabled: false\fi,
+ oSubMenu:^^J\the\toks@[}%
+ \expandafter\@AddToMenuToks\expandafter{\tmp@exp\@gobble}%
+}{%
+ \edef\tmp@exp{^^J\the\toks@ ]\pum@rbrace}%
+ \expandafter\@AddToMenuToks\expandafter{\tmp@exp}%
+}
+\def\popUpMenu(#1){app.popUpMenuEx.apply( app, #1 )}
+\providecommand{\urlPath}[1]{\def\pum@urlName{#1}%
+ \hyper@normalise\pum@urlPath}
+\def\pum@urlPath#1{\expandafter\xdef\pum@urlName{#1}}
+\endinput
+%%
+%% End of file `popupmenu.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 2fbd93b19a2..c0980fef4e9 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -196,7 +196,7 @@ my @WorkingTLP = qw(
pinlabel pittetd pkfix pkfix-helper placeins placeins-plain
plari plates play
plnfss plweb pmgraph poemscol polski polyglossia polynom polynomial
- polytable
+ polytable popupmenu
powerdot powerdot-FUBerlin ppr-prv pracjourn preprint
prettyref preview printlen proba probsoln procIAGssymp program
properties protex protocol
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index ebca2c7407e..948d75daf4e 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -419,6 +419,7 @@ depend polyglot
depend polynom
depend polynomial
depend polytable
+depend popupmenu
depend postcards
depend ppower4
depend ppr-prv
diff --git a/Master/tlpkg/tlpsrc/popupmenu.tlpsrc b/Master/tlpkg/tlpsrc/popupmenu.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/popupmenu.tlpsrc