summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/movie15
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-19 17:50:33 +0000
committerKarl Berry <karl@freefriends.org>2006-12-19 17:50:33 +0000
commit23b2789419e9e22d552147033a4f7f8ff569f649 (patch)
tree46de84a6d7a5269ec8cd658a128e236c65827cd3 /Master/texmf-dist/tex/latex/movie15
parent19e726eec508d247a2f1acb5b9c3a6618bd5c487 (diff)
movie15 update (16dec06)
git-svn-id: svn://tug.org/texlive/trunk@2816 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/movie15')
-rw-r--r--Master/texmf-dist/tex/latex/movie15/movie15.sty627
1 files changed, 431 insertions, 196 deletions
diff --git a/Master/texmf-dist/tex/latex/movie15/movie15.sty b/Master/texmf-dist/tex/latex/movie15/movie15.sty
index bd4134da353..99edfa128d6 100644
--- a/Master/texmf-dist/tex/latex/movie15/movie15.sty
+++ b/Master/texmf-dist/tex/latex/movie15/movie15.sty
@@ -9,7 +9,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{movie15}[2006/11/21]
+\ProvidesPackage{movie15}[2006/12/15]
\RequirePackage{keyval}
\RequirePackage{ifthen}
\RequirePackage{ifpdf}
@@ -59,7 +59,7 @@
\gdef\@MXV@if#1{\csname if#1\endcsname}%
\newboolean{@MXV@beamer} %set to true if beamer class has been loaded
-\newboolean{@MXV@powerdot} %the same for
+%\newboolean{@MXV@powerdot} %the same for
\newboolean{@MXV@presentation} %used with presentation making package?
\newboolean{@MXV@hide} %contents hidden on the current slide?
\@ifclassloaded{beamer}{%
@@ -69,19 +69,13 @@
\setboolean{@MXV@beamer}{false}%
\setboolean{@MXV@presentation}{false}%
}
-\@ifclassloaded{powerdot}{%
- \setboolean{@MXV@powerdot}{true}%
- \setboolean{@MXV@presentation}{true}%
-}{%
- \setboolean{@MXV@powerdot}{false}%
- \setboolean{@MXV@presentation}{false}%
-}
-
-\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
- \newcount\@MXV@iiidoncurpage%index of 3D annot on current page
- \global\@MXV@iiidoncurpage=0%
- \gdef\@MXV@oldpage{0}% needed together with previous counter
-}{}
+%\@ifclassloaded{powerdot}{%
+% \setboolean{@MXV@powerdot}{true}%
+% \setboolean{@MXV@presentation}{true}%
+%}{%
+% \setboolean{@MXV@powerdot}{false}%
+% \setboolean{@MXV@presentation}{false}%
+%}
\RequirePackage{everyshi}%
\newcount\@MXV@page% counter for absolute page number
@@ -256,18 +250,25 @@
\setboolean{@MXV@viewsprovided}{false}%
\setboolean{@MXV@defaultviewprovided}{false}%
\gdef\@MXV@iiidview{}%
- %show controls for 3D content by default, otherwise the 3D model
- %would be noninteractive, i. e. would not respond to mouse events
- \setboolean{@MXV@iiidctrls}{true}%
+ \gdef\@MXV@iiidtoolb{/TB false}% don't show toolbar by default
+ \gdef\@MXV@iiidia{}% 3D interactive by default
\gdef\@MXV@calc{}% camera aperture for coo and roo calculation
\setboolean{@MXV@iiidgetview}{false}%
+ \gdef\@MXV@iiidopt{}% option string to be passed to internal macro
+ \setboolean{@MXV@resource}{false}%
+ \gdef\@MXV@resourcetree{}% name tree of embedded 3D resources
+ \xdef\@MXV@animstyle{}%
+ \gdef\@MXV@iiidpalindrome{/Subtype/Linear}% forward
+ \gdef\@MXV@iiidrate{}% animation speed
+ \global\@MXV@iiidrepeat=-1% repeat count
+ \gdef\@MXV@lights{}% default lighting scheme
}{}%
}%
%missing package error message
\def\@MXV@missing#1{%
- \PackageError{movie15}{%
- Package `#1' has not been loaded yet
+ \PackageError{movie15}{%
+ Package `#1' has not been loaded yet
}{%
Put the line `\protect\usepackage{#1}' somewhere after
`\protect\usepackage{movie15}' to the preamble of your
@@ -377,9 +378,14 @@
\RequirePackage{fp}% needed for fixed point calculus
\newcount\@MXV@viewscount%counter for number of 3D views per inclusion
\newboolean{@MXV@viewsprovided}%3d views file provided?
- \newboolean{@MXV@iiidctrls}% show controls?
\newboolean{@MXV@iiidgetview}% print current 3D settings?
\newboolean{@MXV@defaultviewprovided}%default 3D view provided?
+ \newboolean{@MXV@resource}%3d resource file provided?
+ \ifpdf\else\newcount\@MXV@rescount\fi% number of embedded resource files
+ \newcount\@MXV@iiidrepeat% play count
+ \newcount\@MXV@iiidoncurpage%index of 3D annot on current page
+ \global\@MXV@iiidoncurpage=0%
+ \gdef\@MXV@oldpage{0}% needed together with previous counter
%macro for building the transformation matrix
\def\@MXV@ciiwmatrix#1 #2 #3 #4 #5 #6 #7 #8 {%
@@ -569,16 +575,72 @@
/C2W [\@MXV@matrix]%
/XN(\@MXV@xname)% name of the view appearing in the drop down list
\@MXV@background%
+ \@MXV@lights%
>>}\pdfrefobj\pdflastobj%
\xdef\@MXV@@viewobj{\the\pdflastobj\space 0 R}%
}%
+ %macro for creating resource objects from 3D and image files, to be used
+ %in 3D JavaScript
+ \def\@MXV@addresource#1{%
+ %determine file type
+ \filename@parse{#1}%
+ \ifthenelse{%
+ \equal{\filename@ext}{u3d}\OR%
+ \equal{\filename@ext}{U3D}%
+ }{%
+ \def\@MXV@restype{U3D}%
+ }{%
+ \def\@MXV@restype{image}%
+ }%
+ \ifthenelse{\equal{\@MXV@restype}{image}}{%
+ %embed the same image file only once
+ \ifthenelse{\equal{\@MXV@getlabelvalue{#1}}{undefined}}{%
+ \immediate\pdfximage {#1}%
+ \xdef\@MXV@resourcetree{% build name tree for embedded resources
+ \@MXV@resourcetree\space (#1) \the\pdflastximage\space 0 R%
+ }%
+ \@MXV@newlabel{#1}{\the\pdflastximage}%
+ }{%
+ \xdef\@MXV@resourcetree{%
+ \@MXV@resourcetree\space (#1) \@MXV@getlabelvalue{#1}\space 0 R%
+ }%
+ }%
+ }{%
+ %embed the same 3D file only once
+ \ifthenelse{\equal{\@MXV@getlabelvalue{#1}}{undefined}}{%
+ \pdfobj stream %
+ attr {%
+ /Subtype/\@MXV@restype%
+ }%
+ file {#1}%
+ \pdfrefobj\pdflastobj%
+ \xdef\@MXV@resourcetree{%
+ \@MXV@resourcetree\space (#1) \the\pdflastobj\space 0 R%
+ }%
+ \@MXV@newlabel{#1}{\the\pdflastobj}%
+ }{%
+ \xdef\@MXV@resourcetree{%
+ \@MXV@resourcetree\space (#1) \@MXV@getlabelvalue{#1}\space 0 R%
+ }%
+ }%
+ }%
+ }
+
%3D inclusion macro
- \def\@MXV@includeiiid#1#2#3#4{%
+ \newcommand{\@MXV@includeiiid}[5][]{%
%insert box or poster
- \@MXV@box{#1}{#2}{#3}%
+ \@MXV@box{#2}{#3}{#4}%
%
\if@MXV@externalviewer\else%
+ \setkeys{MXV@iiid}{#1}%process deferred options
+ \ifnum\@MXV@iiidrepeat=0\else%
+ \edef\@MXV@animstyle{% animation style dict
+ /AN <<%
+ \@MXV@iiidpalindrome\@MXV@iiidrate/PC \the\@MXV@iiidrepeat%
+ >>%
+ }%
+ \fi%
%java script file, stream object
\IfFileExists{\@MXV@jscriptiiidfile}{%
\pdfobj stream file {\@MXV@jscriptiiidfile}%
@@ -602,10 +664,16 @@
\if@MXV@externalviewer\else%
/VA [\@MXV@varray]%
/DV/F% use first entry in VA as default view
+ \@MXV@animstyle%
\@MXV@jscriptiiid%
+ \if@MXV@resource%
+ /Resources <<%
+ /Names [\@MXV@resourcetree]%
+ >>%
+ \fi%
\fi%
}%
- file {#4}%
+ file {#5}%
\pdfrefobj\pdflastobj%
\edef\@MXV@iiidstream{\the\pdflastobj}%
\if@MXV@presentation%
@@ -616,14 +684,14 @@
}%
\fi%
%
- \makebox[0pt][r]{\makebox[#1][l]{%
+ \makebox[0pt][r]{\makebox[#2][l]{%
%insert FileAttachment annotation
\ifthenelse{\boolean{@MXV@inline}\AND\boolean{@MXV@externalviewer}%
% since Reader 7.0.7, we cannot place a file attachment annot behind
% the 3D annot :-(
% \OR\boolean{@MXV@attachment}
}{%
- \pdfannot width #1 height #2 depth #3 {%
+ \pdfannot width #2 height #3 depth #4 {%
/Subtype /FileAttachment%
/F 0%
/T (\@MXV@filename)%
@@ -631,11 +699,11 @@
\if@MXV@externalviewer%
/Name/Paperclip%
/C [1 1 1]%
- \else
+ \else%
/AP <</N<<>>/R<<>>/D<<>>>>%
- \fi
+ \fi%
/FS <<%
- /F(#4)%
+ /F(#5)%
/Type/Filespec%
/EF << /F \@MXV@iiidstream\space 0 R >>%
>>%
@@ -643,7 +711,7 @@
}{%
\if@MXV@url%
%insert Link annotation, if 3D file is a URL
- \pdfannot width #1 height #2 depth #3 {%
+ \pdfannot width #2 height #3 depth #4 {%
/Subtype /Link%
/F 0%
\if@MXV@externalviewer%
@@ -652,13 +720,13 @@
/H /N%
/Border [0 0 0]%
\fi%
- /A <</URI (#4) /S/URI>>%
+ /A <</URI (#5) /S/URI>>%
/Contents (3D Object (\@MXV@mime))%
}%
\else%
%else insert Launch action for local external 3D file
\if@MXV@inline\else%
- \pdfannot width #1 height #2 depth #3 {%
+ \pdfannot width #2 height #3 depth #4 {%
/Subtype /Link%
/F 0%
\if@MXV@externalviewer%
@@ -668,7 +736,7 @@
/Border [0 0 0]%
\fi%
/A <<%
- /F (#4)%
+ /F (#5)%
/S /Launch%
>>%
/Contents (3D Object (\@MXV@mime))%
@@ -701,7 +769,7 @@
\edef\@MXV@iiidstreamorref{\@MXV@iiidstream}%
\fi%
%annotation object of subtype `3D'
- \pdfannot width #1 height #2 depth #3 {%
+ \pdfannot width #2 height #3 depth #4 {%
/Subtype/3D%
/F 4% we cannot put F 5 here; bug in Reader; 3D annot would be
/T (\@MXV@filename)% disabled even if plugin were available
@@ -712,9 +780,9 @@
/P \@MXV@pdfpageref{@MXV@annot\the\@MXV@includes.page} 0 R%
\@MXV@apdict% /AP <</N<<>>/R<<>>/D<<>>>> doesn't work here
\@MXV@defaultview%
- /3DI \if@MXV@iiidctrls true\else false\fi%
+ \@MXV@iiidia%
/3DD \@MXV@iiidstreamorref\space 0 R% 3D stream or reference object
- /3DA << \@MXV@activation\@MXV@deactivation >>%
+ /3DA << \@MXV@activation\@MXV@deactivation\@MXV@iiidtoolb >>%
}%
%label for later annot obj number determination, to be used in
%movieref's
@@ -762,16 +830,81 @@
/C2W[\@MXV@matrix]%
/XN(\@MXV@xname)%
\@MXV@background%
+ \@MXV@lights%
>>%
}%
}%
\xdef\@MXV@@viewobj{{viewobj\the\@MXV@includes_\the\@MXV@viewscount}}%
}%
%
+ %macro for creating resource objects from 3D and image files
+ \def\@MXV@addresource#1{%
+ %determine file type
+ \filename@parse{#1}%
+ \ifthenelse{%
+ \equal{\filename@ext}{u3d}\OR%
+ \equal{\filename@ext}{U3D}%
+ }{%
+ \def\@MXV@restype{U3D}%
+ }{%
+ \def\@MXV@restype{image}%
+ }%
+ \ifthenelse{\equal{\@MXV@restype}{image}}{%
+ %embed the same image file only once
+ \ifthenelse{\equal{\@MXV@getlabelvalue{#1}}{undefined}}{%
+ %increment counter of embedded resource files
+ \global\advance\@MXV@rescount by 1%
+ %create Image XObject from next raster image
+ \pdfmark{pdfmark=/NI,Raw={ /_objdef {resource\the\@MXV@rescount}}}%
+ \special{ps:% read image resource from file
+ save gsave newpath clip /showpage {} def /setpagedevice /pop load def
+ (#1) run 0 0 1 [1 0 0 1 0 0] {} image %empty dummy, in case #1 is not
+ grestore restore %a valid image file
+ }%
+ \xdef\@MXV@resourcetree{% build name tree for embedded resources
+ \@MXV@resourcetree\space (#1) {resource\the\@MXV@rescount}%
+ }%
+ \@MXV@newlabel{#1}{resource\the\@MXV@rescount}%
+ }{%
+ \xdef\@MXV@resourcetree{%
+ \@MXV@resourcetree\space (#1) {\@MXV@getlabelvalue{#1}}%
+ }%
+ }%
+ }{%
+ %embed the same 3D file only once
+ \ifthenelse{\equal{\@MXV@getlabelvalue{#1}}{undefined}}{%
+ \global\advance\@MXV@rescount by 1%
+ \special{ps:
+ [ /_objdef {resource\the\@MXV@rescount} /type/stream /OBJ pdfmark
+ [ {resource\the\@MXV@rescount} <<%
+ /Subtype/\@MXV@restype%
+ >> /PUT pdfmark%
+ [ {resource\the\@MXV@rescount} (#1) (r) file /PUT pdfmark
+ }%
+ \xdef\@MXV@resourcetree{%
+ \@MXV@resourcetree\space (#1) {resource\the\@MXV@rescount}%
+ }%
+ \@MXV@newlabel{#1}{resource\the\@MXV@rescount}%
+ }{%
+ \xdef\@MXV@resourcetree{%
+ \@MXV@resourcetree\space (#1) {\@MXV@getlabelvalue{#1}}%
+ }%
+ }%
+ }%
+ }
+ %
%3D inclusion macro
- \def\@MXV@includeiiid#1#2#3#4{%
+ \newcommand{\@MXV@includeiiid}[5][]{%
%
\if@MXV@externalviewer\else%
+ \setkeys{MXV@iiid}{#1}%process deferred options
+ \ifnum\@MXV@iiidrepeat=0\else%
+ \edef\@MXV@animstyle{% animation style dict
+ /AN <<%
+ \@MXV@iiidpalindrome\@MXV@iiidrate/PC \the\@MXV@iiidrepeat%
+ >>%
+ }%
+ \fi%
%java script file, stream object
\IfFileExists{\@MXV@jscriptiiidfile}{%
\pdfmark{%
@@ -818,6 +951,12 @@
\if@MXV@externalviewer\else%
/VA [\@MXV@varray]%
/DV/F% use first entry in VA as default view
+ \@MXV@animstyle%
+ \if@MXV@resource%
+ /Resources <<%
+ /Names [\@MXV@resourcetree]%
+ >>%
+ \fi%
\@MXV@jscriptiiid%
\fi%
>>%
@@ -827,7 +966,7 @@
pdfmark=/PUT,%
Raw={%
{iiiDfile\the\@MXV@includes}%
- (#4) (r) file%
+ (#5) (r) file%
}%
}%
\edef\@MXV@iiidstream{iiiDfile\the\@MXV@includes}%
@@ -844,7 +983,7 @@
% \OR\boolean{@MXV@attachment}
}{%
\makebox[0pt][l]{%
- \pdfmark[\phantom{\@MXV@box{#1}{#2}{#3}}]{%
+ \pdfmark[\phantom{\@MXV@box{#2}{#3}{#4}}]{%
pdfmark=/ANN,%
Subtype=/FileAttachment,%
Raw={%
@@ -854,11 +993,11 @@
\if@MXV@externalviewer%
/Name/Paperclip%
/C [1 1 1]%
- \else
+ \else%
/AP <</N<<>>/R<<>>/D<<>>>>%
- \fi
+ \fi%
/FS <<%
- /F(#4)%
+ /F(#5)%
/Type/Filespec%
/EF <</F {\@MXV@iiidstream}>>%
>>%
@@ -869,7 +1008,7 @@
\if@MXV@url%
%insert Link annotation, if 3D file is a URL
\makebox[0pt][l]{%
- \pdfmark[\phantom{\@MXV@box{#1}{#2}{#3}}]{%
+ \pdfmark[\phantom{\@MXV@box{#2}{#3}{#4}}]{%
pdfmark=/ANN,%
Subtype=/Link,%
Raw={%
@@ -881,7 +1020,7 @@
/H /N%
/Border [0 0 0]%
\fi%
- /A <</URI (#4) /S/URI>>%
+ /A <</URI (#5) /S/URI>>%
/Contents (3D Object (\@MXV@mime))%
}%
}%
@@ -890,7 +1029,7 @@
%else insert Launch action for local external 3D file
\if@MXV@inline\else%
\makebox[0pt][l]{%
- \pdfmark[\phantom{\@MXV@box{#1}{#2}{#3}}]{%
+ \pdfmark[\phantom{\@MXV@box{#2}{#3}{#4}}]{%
pdfmark=/ANN,%
Subtype=/Link,%
Raw={%
@@ -903,7 +1042,7 @@
/Border [0 0 0]%
\fi%
/A <<%
- /F (#4)%
+ /F (#5)%
/S /Launch%
>>%
/Contents (3D Object (\@MXV@mime))%
@@ -914,7 +1053,7 @@
\fi%
}%
\if@MXV@externalviewer%
- \phantom{\@MXV@box{#1}{#2}{#3}}%
+ \phantom{\@MXV@box{#2}{#3}{#4}}%
\else%
%appearance dict dummy, to be shared by all 3D annots
\ifthenelse{\isundefined{\@MXV@apdict}}{%
@@ -964,7 +1103,7 @@
\edef\@MXV@iiidstreamorref{\@MXV@iiidstream}%
\fi%
%annotation object of subtype `3D'
- \pdfmark[\phantom{\@MXV@box{#1}{#2}{#3}}]{%
+ \pdfmark[\phantom{\@MXV@box{#2}{#3}{#4}}]{%
pdfmark=/ANN,%
Subtype=/3D,%
Raw={%
@@ -978,9 +1117,9 @@
/P {ThisPage}%
\@MXV@apdict% /AP <</N<<>>/R<<>>/D<<>>>> doesn't work here
\@MXV@defaultview%
- /3DI \if@MXV@iiidctrls true\else false\fi%
+ \@MXV@iiidia%
/3DD {\@MXV@iiidstreamorref}% 3D stream or reference object
- /3DA << \@MXV@activation\@MXV@deactivation >>%
+ /3DA <<\@MXV@activation\@MXV@deactivation\@MXV@iiidtoolb>>%
}%
}%
\ifx\@MXV@@label\@empty\else%
@@ -1123,8 +1262,8 @@
/Subtype (\@MXV@mime)%
}%
file {#4}%
- \pdfrefobj\pdflastobj%
- \edef\@MXV@efentry{%
+ \pdfrefobj\pdflastobj%
+ \edef\@MXV@efentry{%
/EF << /F \the\pdflastobj\space 0 R >>%
}%
\@MXV@newlabel{#4}{\the\pdflastobj}%
@@ -1579,9 +1718,14 @@
%definition of user command `\includemovie'
\newcommand{\includemovie}[4][]{%
+ %test for hyperref package
+ \ifpdf\else%
+ \ifthenelse{\isundefined{\pdfmark}}{\@MXV@missing{hyperref}}{}%
+ \fi%
+ %
\leavevmode%
\@MXV@reset% all macros and options
- \setkeys{movie15}{#1}% parse options
+ \setkeys{MXV@user}{#1}% parse options
%
%total height of text
\@MXV@totalheight=\@MXV@height%
@@ -1627,13 +1771,13 @@
%
%find out whether the contents should be hidden or not (for presentations)
\setboolean{@MXV@hide}{false}%
- \ifthenelse{\boolean{@MXV@powerdot}}{%
- \ifthenelse{\boolean{pd@overlay}}{}{%
- \ifthenelse{\pd@method=2}{}{%
- \setboolean{@MXV@hide}{true}%
- }%
- }%
- }{}%
+% \ifthenelse{\boolean{@MXV@powerdot}}{%
+% \ifthenelse{\boolean{pd@overlay}}{}{%
+% \ifthenelse{\pd@method=2}{}{%
+% \setboolean{@MXV@hide}{true}%
+% }%
+% }%
+% }{}%
\ifthenelse{\boolean{@MXV@beamer}}{%
\ifthenelse{\boolean{beamer@anotherslide}}{%
\setboolean{@MXV@hide}{true}%
@@ -1667,8 +1811,8 @@
%
%if 3D object is not embedded inline we must use some external player :(
\ifthenelse{%
- \boolean{@MXV@iiid}
- \AND\NOT\boolean{@MXV@inline}
+ \boolean{@MXV@iiid}%
+ \AND\NOT\boolean{@MXV@inline}%
}{%
\setboolean{@MXV@externalviewer}{true}%
}{}%
@@ -1762,37 +1906,35 @@
\@MXV@newlabel{@MXV@\@MXV@label.externalviewer}{false}%
\fi%
%
- %test for hyperref package
- \ifthenelse{\NOT\boolean{pdf}\AND\isundefined{\pdfmark}}{%
- \@MXV@missing{hyperref}%
- }{}%
- %
%depending on options do content specific stuff
\ifthenelse{\boolean{@MXV@iiid}}{%
% #### 3D ####
- \ifthenelse{\boolean{@MXV@autoplay}\OR\boolean{@MXV@autoresume}}{%
- \def\@MXV@activation{/A/PV/AIS/L}% open 3D object, run animation
- }{%
- \if@MXV@runposter%
- \def\@MXV@activation{/A/PV/AIS/I}%open 3D obj but don't run animation
- \else%
- \def\@MXV@activation{/A/XA}% explicit activation by user
- \fi%
- }%
- \if@MXV@autostop%
- \def\@MXV@deactivation{/D/PI/DIS/I}%
- \else%
- \if@MXV@autopause%
+ \if@MXV@externalviewer\else%
+ \ifthenelse{\equal{\@MXV@iiidpalindrome}{/Subtype/Oscillating}}{%
+ \global\multiply\@MXV@iiidrepeat by 2%
+ }{}%
+ \ifthenelse{\boolean{@MXV@autoplay}\OR\boolean{@MXV@autoresume}}{%
+ \def\@MXV@activation{/A/PV/AIS/L}% open 3D object, run animation
+ }{%
+ \if@MXV@runposter%
+ \def\@MXV@activation{/A/PV/AIS/I}%open 3D obj but don't run animation
+ \else%
+ \def\@MXV@activation{/A/XA}% explicit activation by user
+ \fi%
+ }%
+ \if@MXV@autostop%
\def\@MXV@deactivation{/D/PI/DIS/I}%
\else%
- \if@MXV@autoclose%
- \def\@MXV@deactivation{/D/PI/DIS/U}%
- \else%@MXV@continue
- \def\@MXV@deactivation{/D/PI/DIS/L}%
+ \if@MXV@autopause%
+ \def\@MXV@deactivation{/D/PI/DIS/I}%
+ \else%
+ \if@MXV@autoclose%
+ \def\@MXV@deactivation{/D/PI/DIS/U}%
+ \else%@MXV@continue
+ \def\@MXV@deactivation{/D/PI/DIS/L}%
+ \fi%
\fi%
\fi%
- \fi%
- \if@MXV@externalviewer\else%
%counter for 3D inclusion on current page
\ifthenelse{%
\equal{%
@@ -1809,6 +1951,8 @@
\ifx\@MXV@label\@empty\else%
\@MXV@labeltoaux{@MXV@\@MXV@label.3D}{true}%
\@MXV@newlabel{@MXV@\@MXV@label.3D}{true}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.3Dlights}{\@MXV@lights}%
+ \@MXV@newlabel{@MXV@\@MXV@label.3Dlights}{\@MXV@lights}%
\fi%
\ifx\@MXV@@label\@empty\else%
\@MXV@labeltoaux{@MXV@\@MXV@@label.3Doncurpage}{\the\@MXV@iiidoncurpage}%
@@ -2076,7 +2220,8 @@
%
%insert annotation
\ifthenelse{\boolean{@MXV@iiid}}{%
- \@MXV@includeiiid{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
+ \edef\@MXV@iiidopt{[\@MXV@iiidopt]}%
+ \expandafter\@MXV@includeiiid\@MXV@iiidopt{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
}{%
\@MXV@includemovie{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
}%
@@ -2091,18 +2236,21 @@
%for remote control of media
\newcommand\movieref[3][]{%
+ \ifpdf\else%
+ \ifthenelse{\isundefined{\pdfmark}}{\@MXV@missing{hyperref}}{}%
+ \fi%
\leavevmode%
\savebox{\@MXV@textbox}{#3}% save text argument
%
%find out whether the contents should be hidden or not (for presentations)
\setboolean{@MXV@hide}{false}%
- \ifthenelse{\boolean{@MXV@powerdot}}{%
- \ifthenelse{\boolean{pd@overlay}}{}{%
- \ifthenelse{\pd@method=2}{}{%
- \setboolean{@MXV@hide}{true}%
- }%
- }%
- }{}%
+% \ifthenelse{\boolean{@MXV@powerdot}}{%
+% \ifthenelse{\boolean{pd@overlay}}{}{%
+% \ifthenelse{\pd@method=2}{}{%
+% \setboolean{@MXV@hide}{true}%
+% }%
+% }%
+% }{}%
\ifthenelse{\boolean{@MXV@beamer}}{%
\ifthenelse{\boolean{beamer@anotherslide}}{%
\setboolean{@MXV@hide}{true}%
@@ -2163,10 +2311,17 @@
%
%actions completely different in 3D & 2D context
\ifthenelse{\boolean{@MXV@iiid}}{% #### 3D ####
- \setkeys{movie15}{#1}%
+ %retrieve default lighting scheme
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.3Dlights}}{undefined}}{%
+ \edef\@MXV@lights{}%
+ }{%
+ \edef\@MXV@lights{\@MXV@getlabelvalue{@MXV@\@MXV@label.3Dlights}}%
+ }%
+ \setkeys{MXV@user}{#1}%
\if@MXV@defaultviewprovided% define a new view,
%using any of the coo, c2c, roo, caa options
- \edef\@MXV@args{\@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space}%
+ \xdef\@MXV@xname{}%
+ \edef\@MXV@args{\@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space\@MXV@roll\space}%
\expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
\@MXV@viewobj% create pdf object of 3D view
\edef\@MXV@iiidview{\@MXV@@viewobj}%
@@ -2269,7 +2424,7 @@
if(up0xup.length>0){%
up0xup.normalize();%
var up0dotup=up.dot(up0);%
- up0dotup=(Math.abs(up0dotup) > 1 ? Math.round(up0dotup) : up0dotup);%
+ up0dotup=(Math.abs(up0dotup) > 1 ? Math.round(up0dotup) : up0dotup);%
%compute the angle between camera up and up0 vectors
roll=Math.acos(up0dotup)*180/Math.PI*out.dot(up0xup);%
}%
@@ -2721,7 +2876,7 @@
\edef\@MXV@startat{\@MXV@getlabelvalue{@MXV@\@MXV@label.startAt}}%
\edef\@MXV@endat{\@MXV@getlabelvalue{@MXV@\@MXV@label.endAt}}%
\edef\@MXV@volume{\@MXV@getlabelvalue{@MXV@\@MXV@label.volume}}%
- \setkeys{movie15}{#1}%override with new settings
+ \setkeys{MXV@user}{#1}%override with new settings
%
\edef\@MXV@operation{}%
%
@@ -2790,7 +2945,22 @@
player\@MXV@currplayer.settings.privateData.paused=true;
}%
}%
- catch(e){}%
+ catch(e){% open new player if not yet open
+ if(focusonplayer==undefined){%
+ var focusonplayer=0; %shared by all annots
+ }%
+ \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
+ {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
+ \@MXV@events{\@MXV@currplayer}%
+ {\if@MXV@mouse true\else false\fi}{true}%
+ try{%
+ var player\@MXV@currplayer=app.media.openPlayer({%
+ settings: settings,%
+ events: events%
+ });
+ }%
+ catch (e){}%
+ }%
)%
}%
\fi%
@@ -2850,7 +3020,22 @@
player\@MXV@currplayer.settings.privateData.paused=true;
}%
}%
- catch(e){}%
+ catch(e){% open new player if not yet open
+ if(focusonplayer==undefined){%
+ var focusonplayer=0; %shared by all annots
+ }%
+ \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
+ {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
+ \@MXV@events{\@MXV@currplayer}%
+ {\if@MXV@mouse true\else false\fi}{true}%
+ try{%
+ var player\@MXV@currplayer=app.media.openPlayer({%
+ settings: settings,%
+ events: events%
+ });
+ }%
+ catch (e){}%
+ }%
)%
}%
\fi%
@@ -2899,7 +3084,7 @@
try{%
if(player\@MXV@currplayer.isOpen){%
player\@MXV@currplayer.close(%
- app.media.closeReason.general);
+ app.media.closeReason.general);
player\@MXV@currplayer=null;
}%
}%
@@ -3014,32 +3199,40 @@
}%
}
+%standard keys to be processed first
%key definitions for options to \includemovie
-\define@key{movie15}{draft}[true]{%
+\define@key{MXV@user}{draft}[true]{%
\setboolean{@MXV@@draft}{#1}%
}
-\define@key{movie15}{final}[true]{%
+\define@key{MXV@user}{final}[true]{%
\ifthenelse{\equal{#1}{true}}{%
\setboolean{@MXV@@draft}{false}%
}{%
\setboolean{@MXV@@draft}{true}%
}%
}
-\define@key{movie15}{label}{%for use with movieref
+\define@key{MXV@user}{label}{%for use with movieref
\gdef\@MXV@label{#1}%
}
-\define@key{movie15}{controls}[true]{%
+\define@key{MXV@user}{controls}[true]{%
\xdef\@MXV@ctrls{, showUI: #1}%
\xdef\@MXV@@ctrls{/C #1}%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
- \setboolean{@MXV@iiidctrls}{#1}%
+ \gdef\@MXV@iiidtoolb{/TB #1}%
}{}%
}
-\define@key{movie15}{volume}{%
+\define@key{MXV@user}{toolbar}[true]{%
+ \xdef\@MXV@ctrls{, showUI: #1}%
+ \xdef\@MXV@@ctrls{/C #1}%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \gdef\@MXV@iiidtoolb{/TB #1}%
+ }{}%
+}
+\define@key{MXV@user}{volume}{%
\def\@MXV@@volume{/V #1}%
\def\@MXV@volume{#1}%
}
-\define@key{movie15}{mimetype}{%
+\define@key{MXV@user}{mimetype}{%
\ifthenelse{\equal{#1}{model/u3d}}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\setboolean{@MXV@iiid}{true}%
@@ -3048,63 +3241,72 @@
}{}%
\def\@MXV@mime{#1}%
}
-\define@key{movie15}{playerid}{%
+\define@key{MXV@user}{playerid}{%
\def\@MXV@player{%
/PL<</MU [<</PID<</U (vnd.adobe.swname:#1)>>>>]>>%
}%
}
-\define@key{movie15}{autoplay}[true]{%
+\define@key{MXV@user}{autoplay}[true]{%
\setboolean{@MXV@autoplay}{#1}%
\if@MXV@autoplay%
\setboolean{@MXV@autoresume}{false}%
\fi%
}
-\define@key{movie15}{autostop}[true]{%
+\define@key{MXV@user}{autostop}[true]{%
\setboolean{@MXV@autostop}{#1}%
\if@MXV@autostop%
\setboolean{@MXV@autopause}{false}%
\fi%
}
-\define@key{movie15}{autoresume}[true]{%
+\define@key{MXV@user}{autoresume}[true]{%
\setboolean{@MXV@autoresume}{#1}%
\if@MXV@autoresume%
\setboolean{@MXV@autoplay}{false}%
\setboolean{@MXV@autoclose}{false}%
\fi%
}
-\define@key{movie15}{autopause}[true]{%
+\define@key{MXV@user}{autopause}[true]{%
\setboolean{@MXV@autopause}{#1}%
\if@MXV@autopause%
\setboolean{@MXV@autostop}{false}%
\setboolean{@MXV@autoclose}{false}%
\fi%
}
-\define@key{movie15}{autoclose}[true]{%
+\define@key{MXV@user}{autoclose}[true]{%
\setboolean{@MXV@autoclose}{#1}%
\if@MXV@autoclose%
\setboolean{@MXV@autostop}{false}%
\setboolean{@MXV@autopause}{false}%
\fi%
}
-\define@key{movie15}{continue}[true]{%
+\define@key{MXV@user}{continue}[true]{%
\setboolean{@MXV@autostop}{false}%
\setboolean{@MXV@autopause}{false}%
\setboolean{@MXV@autoclose}{false}%
}
-\define@key{movie15}{open}[true]{%
+\define@key{MXV@user}{open}[true]{%
%no longer supported; once open, media remains loaded
%to avoid reloading when media is to be played again
}
-\define@key{movie15}{mouse}[true]{%
+\define@key{MXV@user}{mouse}[true]{%
\setboolean{@MXV@mouse}{#1}%
+ \ifthenelse{\equal{false}{#1}\AND\boolean{@MXV@iiiDfeat}}{%
+ \def\@MXV@iiidia{/3DI #1}%
+ }{}%
}
-\define@key{movie15}{palindrome}[true]{%
+\define@key{MXV@user}{palindrome}[true]{%
\xdef\@MXV@palindrome{, palindrome: #1}%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \gdef\@MXV@iiidpalindrome{/Subtype/Oscillating}%
+ }{}%
}
-\define@key{movie15}{rate}{%
+\define@key{MXV@user}{rate}{%
\xdef\@MXV@rate{, rate: #1}%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \gdef\@MXV@iiidrate{/TM #1}%
+ }{}%
}
-\define@key{movie15}{repeat}[Infinity]{%
+\define@key{MXV@user}{repeat}[Infinity]{%
\ifthenelse{%
\equal{#1}{Infinity}\OR%
\equal{#1}{0}%
@@ -3115,14 +3317,21 @@
\xdef\@MXV@repeat{, repeat: #1}%
\xdef\@MXV@@repeat{/RC #1}%
}%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \ifthenelse{\equal{#1}{Infinity}}{%
+ \global\@MXV@iiidrepeat=-1%
+ }{%
+ \global\@MXV@iiidrepeat=#1%
+ }%
+ }{}%
}
-\define@key{movie15}{startat}{%
+\define@key{MXV@user}{startat}{%
\xdef\@MXV@startat{, startAt: {#1}}%
}
-\define@key{movie15}{endat}{%
+\define@key{MXV@user}{endat}{%
\xdef\@MXV@endat{, endAt: {#1}}%
}
-\define@key{movie15}{poster}[true]{%
+\define@key{MXV@user}{poster}[true]{%
\ifthenelse{\equal{#1}{true}}{% option without arg
\setboolean{@MXV@runposter}{true}%
}{%
@@ -3131,24 +3340,21 @@
\mbox{\pdfximage width ##1 height ##2 depth ##3 {#1}}%
\pdfrefximage\pdflastximage%
\else%
- \ifthenelse{\isundefined{\includegraphics}}{%
- \@MXV@missing{graphicx}%
- }{%
- \@MXV@totalheight=##2%
- \advance\@MXV@totalheight by ##3%
- \raisebox{-##3}[##2][##3]{%
- \includegraphics[%
- width=##1,height=##2,totalheight=\@MXV@totalheight,clip]{#1}%
- }%
+ \ifthenelse{\isundefined{\includegraphics}}{\@MXV@missing{graphics}}{}%
+ \@MXV@totalheight=##2%
+ \advance\@MXV@totalheight by ##3%
+ \raisebox{-##3}[##2][##3]{%
+ \includegraphics[%
+ width=##1,height=##2,totalheight=\@MXV@totalheight,clip]{#1}%
}%
\fi%
}%
}%
}
-\define@key{movie15}{externalviewer}[true]{%
+\define@key{MXV@user}{externalviewer}[true]{%
\setboolean{@MXV@externalviewer}{#1}%
}
-\define@key{movie15}{inline}[true]{%
+\define@key{MXV@user}{inline}[true]{%
\if@MXV@url%
\setboolean{@MXV@inline}{false}%
\else%
@@ -3158,7 +3364,7 @@
\setboolean{@MXV@attachment}{false}%
\fi%
}
-\define@key{movie15}{url}[true]{%
+\define@key{MXV@user}{url}[true]{%
\setboolean{@MXV@url}{#1}%
\if@MXV@url%
\setboolean{@MXV@inline}{false}%
@@ -3166,32 +3372,32 @@
\def\@MXV@fsentry{/FS /URL}%
\fi%
}
-\define@key{movie15}{attach}[true]{%
+\define@key{MXV@user}{attach}[true]{%
\setboolean{@MXV@attachment}{#1}%
\if@MXV@attachment%
\setboolean{@MXV@inline}{true}%
\fi%
}
-\define@key{movie15}{text}{%
+\define@key{MXV@user}{text}{%
\setboolean{@MXV@boxopt}{true}%
\savebox{\@MXV@textbox}{#1}%
\@MXV@width=\wd\@MXV@textbox%
\@MXV@height=\ht\@MXV@textbox%
\@MXV@depth=\dp\@MXV@textbox%
}
-\define@key{movie15}{textoverposter}[true]{%
+\define@key{MXV@user}{textoverposter}[true]{%
\setboolean{@MXV@textoverposter}{#1}%
}
-\define@key{movie15}{depth}{%set depth of display area
+\define@key{MXV@user}{depth}{%set depth of display area
\gdef\@MXV@boxdepth{#1}%
}
%3D specific options
-\define@key{movie15}{3Dbg}{%
+\define@key{MXV@user}{3Dbg}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\def\@MXV@background{/BG<</CS/DeviceRGB/C[#1]>>}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Djscript}{%
+\define@key{MXV@user}{3Djscript}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\IfFileExists{#1}{%
\def\@MXV@jscriptiiidfile{#1}%
@@ -3203,37 +3409,37 @@
}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Dcoo}{%
+\define@key{MXV@user}{3Dcoo}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\def\@MXV@coo{#1}%
\setboolean{@MXV@defaultviewprovided}{true}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Dc2c}{%
+\define@key{MXV@user}{3Dc2c}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\def\@MXV@ctoc{#1}%
\setboolean{@MXV@defaultviewprovided}{true}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Droo}{%
+\define@key{MXV@user}{3Droo}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\def\@MXV@roo{#1}%
\setboolean{@MXV@defaultviewprovided}{true}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Daac}{%
+\define@key{MXV@user}{3Daac}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\def\@MXV@aac{#1}%
\setboolean{@MXV@defaultviewprovided}{true}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Droll}{%
+\define@key{MXV@user}{3Droll}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\def\@MXV@roll{#1}%
\setboolean{@MXV@defaultviewprovided}{true}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Dviews}{%
+\define@key{MXV@user}{3Dviews}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\IfFileExists{#1}{%
\def\@MXV@viewsfile{#1}%
@@ -3245,8 +3451,13 @@
}%
}{\@MXV@neediiiD}%
}
+\define@key{MXV@user}{3Dlights}{%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \gdef\@MXV@lights{/LS <</Subtype/#1>>}%
+ }{\@MXV@neediiiD}%
+}
%options for \movieref command
-\define@key{movie15}{play}[true]{%
+\define@key{MXV@user}{play}[true]{%
\setboolean{@MXV@linkplay}{#1}%
\if@MXV@linkplay%
\setboolean{@MXV@linkpause}{false}%
@@ -3256,7 +3467,7 @@
\setboolean{@MXV@linkreset}{false}%
\fi%
}
-\define@key{movie15}{pause}[true]{%
+\define@key{MXV@user}{pause}[true]{%
\setboolean{@MXV@linkpause}{#1}%
\if@MXV@linkpause%
\setboolean{@MXV@linkresume}{false}%
@@ -3266,7 +3477,7 @@
\setboolean{@MXV@linkplay}{false}%
\fi%
}
-\define@key{movie15}{resume}[true]{%
+\define@key{MXV@user}{resume}[true]{%
\setboolean{@MXV@linkresume}{#1}%
\if@MXV@linkresume%
\setboolean{@MXV@linkpause}{false}%
@@ -3276,7 +3487,7 @@
\setboolean{@MXV@linkplay}{false}%
\fi%
}
-\define@key{movie15}{stop}[true]{%
+\define@key{MXV@user}{stop}[true]{%
\setboolean{@MXV@linkstop}{#1}%
\if@MXV@linkstop%
\setboolean{@MXV@linkpause}{false}%
@@ -3286,7 +3497,7 @@
\setboolean{@MXV@linkplay}{false}%
\fi%
}
-\define@key{movie15}{close}[true]{%
+\define@key{MXV@user}{close}[true]{%
\setboolean{@MXV@linkclose}{#1}%
\if@MXV@linkclose%
\setboolean{@MXV@linkpause}{false}%
@@ -3296,7 +3507,7 @@
\setboolean{@MXV@linkplay}{false}%
\fi%
}
-\define@key{movie15}{reset}[true]{%
+\define@key{MXV@user}{reset}[true]{%
\setboolean{@MXV@linkreset}{#1}%
\if@MXV@linkreset%
\setboolean{@MXV@linkpause}{false}%
@@ -3306,7 +3517,7 @@
\setboolean{@MXV@linkplay}{false}%
\fi%
}
-\define@key{movie15}{3Dviewindex}{%
+\define@key{MXV@user}{3Dviewindex}{%
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\ifthenelse{%
\equal{#1}{F}%
@@ -3322,26 +3533,82 @@
\setboolean{@MXV@defaultviewprovided}{false}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Dcalculate}[30]{%
- %calculates optimal 3D settings for roo and coo for a given aac
+\define@key{MXV@user}{3Dcalculate}[30]{%
+ %calculate optimal 3D settings for roo and coo for a given aac
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\gdef\@MXV@calc{#1}%
}{\@MXV@neediiiD}%
}
-\define@key{movie15}{3Dgetview}[true]{%
+\define@key{MXV@user}{3Dgetview}[true]{%
%print current 3D camera settings
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\setboolean{@MXV@iiidgetview}{#1}%
}{\@MXV@neediiiD}%
}
+\define@key{MXV@user}{3Dresource}{%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \IfFileExists{#1}{%
+ \setboolean{@MXV@resource}{true}%
+ \xdef\@MXV@iiidopt{3Dresource=#1, \@MXV@iiidopt}%
+ }{%
+ \PackageError{movie15}{3D resource file `#1' cannot be opened%
+ }{%
+ Make sure file `#1' exists and is readable!%
+ }%
+ }%
+ }{\@MXV@neediiiD}%
+}
+
+%compatibility options for \movie and \hyperlinkmovie commands
+\define@key{MXV@user}{borderwidth}{%
+ %ignored; acroread doesn't draw borders around screen annots anyway
+}
+\define@key{MXV@user}{height}{%set height of display area
+ \gdef\@MXV@boxheight{#1}%
+}
+\define@key{MXV@user}{width}{%set width of display area
+ \gdef\@MXV@boxwidth{#1}%
+}
+\define@key{MXV@user}{autostart}[true]{%
+ \xdef\@MXV@autostart{, autoplay=#1}%
+}
+\define@key{MXV@user}{loop}[Infinity]{%
+ \xdef\@MXV@loop{, repeat=#1}%
+}
+\define@key{MXV@user}{once}[]{%
+ \xdef\@MXV@loop{, repeat=1}%
+}
+\define@key{MXV@user}{showcontrols}[true]{%
+ \xdef\@MXV@showcontrols{, controls=#1}%
+}
+\define@key{MXV@user}{start}{%
+ \gdef\@MXV@starttime##1s{%
+ \global\@MXV@start=##1pt%
+ }%
+ \@MXV@starttime #1%
+}
+\define@key{MXV@user}{duration}{%
+ \gdef\@MXV@durationtime##1s{%
+ \global\@MXV@end=##1pt%
+ }%
+ \@MXV@durationtime #1%
+}
+
+%options to be passed to internal macro \@MXV@includeiiid
+\define@key{MXV@iiid}{3Dresource}{%
+ \@MXV@addresource{#1}%
+}
%compatibility macros
\providecommand\movie[3][]{%
+ \ifpdf\else%
+ \ifthenelse{\isundefined{\pdfmark}}{\@MXV@missing{hyperref}}{}%
+ \fi%
\leavevmode%
\@MXV@reset%
\def\@MXV@autostart{}\def\@MXV@loop{}\def\@MXV@showcontrols{}%
\def\@MXV@starttime{}\def\@MXV@durationtime{}%
- \setkeys{movie15}{#1}%
+ \setkeys{MXV@user}{#1}%
%
%sanity checks
\if@MXV@boxopt%
@@ -3378,16 +3645,19 @@
\savebox{\@MXV@textbox}{#2}%
\edef\@MXV@movieoptions{[\@MXV@movieoptions, text={\noexpand\usebox{%
\noexpand\@MXV@textbox}}]}%
- \expandafter\includemovie\@MXV@movieoptions{\@MXV@boxwidth}{\@MXV@boxheight}%
- {#3}%
+ \expandafter%
+ \includemovie\@MXV@movieoptions{\@MXV@boxwidth}{\@MXV@boxheight}{#3}%
}
\newcommand\hyperlinkmovie[3][]{%
+ \ifpdf\else%
+ \ifthenelse{\isundefined{\pdfmark}}{\@MXV@missing{hyperref}}{}%
+ \fi%
\leavevmode%
\@MXV@reset%
\def\@MXV@autostart{}\def\@MXV@loop{}\def\@MXV@showcontrols{}%
\def\@MXV@starttime{}\def\@MXV@durationtime{}%
- \setkeys{movie15}{#1}%
+ \setkeys{MXV@user}{#1}%
%
%sanity check
\ifx\@MXV@durationtime\@empty\else\ifx\@MXV@startat\@empty\else%
@@ -3416,38 +3686,3 @@
\edef\@MXV@movieoptions{[\@MXV@movieoptions]}%
\expandafter\movieref\@MXV@movieoptions{#2}{#3}%
}
-
-%compatibility options for \movie and \hyperlinkmovie commands
-\define@key{movie15}{borderwidth}{%
- %ignored; acroread doesn't draw borders around screen annots anyway
-}
-\define@key{movie15}{height}{%set height of display area
- \gdef\@MXV@boxheight{#1}%
-}
-\define@key{movie15}{width}{%set width of display area
- \gdef\@MXV@boxwidth{#1}%
-}
-\define@key{movie15}{autostart}[true]{%
- \xdef\@MXV@autostart{, autoplay=#1}%
-}
-\define@key{movie15}{loop}[Infinity]{%
- \xdef\@MXV@loop{, repeat=#1}%
-}
-\define@key{movie15}{once}[]{%
- \xdef\@MXV@loop{, repeat=1}%
-}
-\define@key{movie15}{showcontrols}[true]{%
- \xdef\@MXV@showcontrols{, controls=#1}%
-}
-\define@key{movie15}{start}{%
- \gdef\@MXV@starttime##1s{%
- \global\@MXV@start=##1pt%
- }%
- \@MXV@starttime #1%
-}
-\define@key{movie15}{duration}{%
- \gdef\@MXV@durationtime##1s{%
- \global\@MXV@end=##1pt%
- }%
- \@MXV@durationtime #1%
-}