summaryrefslogtreecommitdiff
path: root/texmf-dist/tex/latex/popupmenu
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2017-07-13 09:26:18 +0900
committerNorbert Preining <norbert@preining.info>2017-07-13 09:26:18 +0900
commit30e9cda301125dbde368d7bba3331bfd0f8389a1 (patch)
tree44f0aa317efd985e6490f921d5495cd2d0aa9885 /texmf-dist/tex/latex/popupmenu
parentd9c316b8eb45d1ca15978bee0e9965b7ab828617 (diff)
add lmacs popupmenu rangen renditions richtext yt4pdf
Diffstat (limited to 'texmf-dist/tex/latex/popupmenu')
-rw-r--r--texmf-dist/tex/latex/popupmenu/popupmenu.sty83
1 files changed, 83 insertions, 0 deletions
diff --git a/texmf-dist/tex/latex/popupmenu/popupmenu.sty b/texmf-dist/tex/latex/popupmenu/popupmenu.sty
new file mode 100644
index 00000000..49dbb8d5
--- /dev/null
+++ b/texmf-dist/tex/latex/popupmenu/popupmenu.sty
@@ -0,0 +1,83 @@
+%%
+%% 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}
+ [2010/09/18 v1.0 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}
+\newcount\pum@cnt
+\def\pum@updateindex{\global\advance\pum@cnt\@ne
+ \edef\pum@rc{\pum@topindex[\the\pum@cnt]}\edef\itemindex{'\pum@rc'}}
+\def\pum@initIndexMenu#1{\global\pum@cnt=-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
+ \edef\tmp@exp{\noexpand
+ \setkeys{menustruct}{title,marked=false,enabled,return,#1}}\tmp@exp
+ \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
+ \xdef\saved@pum@cnt{\the\pum@cnt}%
+ \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}%
+ \global\pum@cnt\saved@pum@cnt
+}
+\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'.