summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/media9/media9.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-05 00:42:08 +0000
committerKarl Berry <karl@freefriends.org>2012-05-05 00:42:08 +0000
commit440129bde78c9900f848a8225a5577223a4837b6 (patch)
tree35092add7c86eb44925011de49efaf1f17dd43d2 /Master/texmf-dist/tex/latex/media9/media9.sty
parentfedd1465e14e7640fb141f97161d85acbfc6c111 (diff)
media9 (2may12)
git-svn-id: svn://tug.org/texlive/trunk@26204 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/media9/media9.sty')
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty86
1 files changed, 78 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index 5e152394316..0bfae338326 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -39,8 +39,8 @@
\RequirePackage{l3keys2e}
\RequirePackage{ifpdf}
-\def\g@mix@date@tl{2012/04/16}
-\def\g@mix@version@tl{0.5}
+\def\g@mix@date@tl{2012/05/02}
+\def\g@mix@version@tl{0.7}
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
{acrobat-9 compatible media}
@@ -107,6 +107,7 @@
\tl_gset:Nn\g_mix_pkgplayspd_tl{1}
\tl_gset:Nn\g_mix_pkgplaytpe_tl{None}
\tl_gset:Nn\g_mix_pkgtools_tl{false}
+\tl_gset:Nn\g_mix_pkgnrdflt_tl{/NR~true}
\tl_gset:Nn\g_mix_pkgnav_tl{false}
\tl_gset:Nn\g_mix_pkgopt_bg_tl{}
\tl_gset:Nn\g_mix_pkgopt_ls_tl{}
@@ -130,11 +131,13 @@
activate / pagevisible .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/PV}},
activate / pageopen .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/PO}},
activate / onclick .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/XA}},
+ activate .value_required:,
deactivate .choice:,
deactivate / pageinvisible .code:n = {\tl_gset:Nn\g_mix_pkgdeact_tl{/PI}},
deactivate / pageclose .code:n = {\tl_gset:Nn\g_mix_pkgdeact_tl{/PC}},
deactivate / onclick .code:n = {\tl_gset:Nn\g_mix_pkgdeact_tl{/XD}},
+ deactivate .value_required:,
transparent .choice_code:n = {
\tl_gset:Nx\g_mix_pkgtransp_tl{\l_keys_choice_tl}},
@@ -152,6 +155,7 @@
3Dplaytype / linear .code:n = {\tl_gset:Nn\g_mix_pkgplaytpe_tl{Linear}},
3Dplaytype / oscillating .code:n = {
\tl_gset:Nn\g_mix_pkgplaytpe_tl{Oscillating}},
+ 3Dplaytype .value_required:,
3Dplaycount .code:n = {\tl_gset:Nn\g_mix_pkgplaycnt_tl{
\exp_after:wN\int_value:w \dim_eval:w#1sp\dim_eval_end:}},
@@ -168,6 +172,17 @@
3Dnavpane .generate_choices:n = {true,false},
3Dnavpane .default:n = {true},
+ 3Dpartsattrs .choice_code:n = {
+ \tl_set:Nn\l_mix_keep_tl{keep}
+ \tl_if_eq:NNTF\l_keys_choice_tl\l_mix_keep_tl{
+ \tl_gset:Nn\g_mix_pkgnrdflt_tl{/NR~false}
+ }{
+ \tl_gset:Nn\g_mix_pkgnrdflt_tl{/NR~true}
+ }
+ },
+ 3Dpartsattrs .generate_choices:n = {keep,restore},
+ 3Dpartsattrs .value_required:,
+
3Dmenu .bool_gset:N = \g_mix_pkgiiidcalc_bool,
3Dbg .code:n = {
@@ -243,7 +258,8 @@
%reset various variables for every new media inclusion
\cs_new:Nn\mix_reset:{
- \tl_gset:Nx\g_mix_label_tl{rm.\int_use:N\g_mix_rmcnt_int}
+ \tl_gset:Nx\g_mix_label_tl{rm@\int_use:N\g_mix_rmcnt_int}
+ \tl_gset:Nx\g_mix_usrlabel_tl{}
\tl_gset:Nn\g_mix_flashvars_tl{}
\tl_gset:Nn\g_mix_assets_tl{}
\tl_gset:Nn\g_mix_configurations_tl{}
@@ -271,6 +287,7 @@
\tl_gset_eq:NN\g_mix_playspd_tl\g_mix_pkgplayspd_tl
\tl_gset_eq:NN\g_mix_playtpe_tl\g_mix_pkgplaytpe_tl
\tl_gset_eq:NN\g_mix_tools_tl\g_mix_pkgtools_tl
+ \tl_gset_eq:NN\g_mix_nrdflt_tl\g_mix_pkgnrdflt_tl
\tl_gset_eq:NN\g_mix_nav_tl\g_mix_pkgnav_tl
\tl_gset_eq:NN\g_mix_opt_bg_tl\g_mix_pkgopt_bg_tl
@@ -312,6 +329,7 @@
\tl_set:Nn\l_mix_naarray_tl{} %array of node dicts
\tl_set:Nn\l_mix_saarray_tl{} %array of crosssect dicts
+ \tl_set_eq:NN\l_mix_nr_tl\g_mix_nrdflt_tl %keep or restore part attributes
}
%wrong image resource for 3D
@@ -999,6 +1017,7 @@
\tl_set:Nn\l_mix_naarray_tl{}
\tl_set:Nn\l_mix_saarray_tl{}
+ \tl_set_eq:NN\l_mix_nr_tl\g_mix_nrdflt_tl
\mix_view:n{Default}
\tl_set:Nx\l_mix_dfltview_tl{\g_mix_pdflastobj_tl}
@@ -1065,6 +1084,10 @@
/Deactivation~<</Condition\g_mix_deact_tl>>
}
\tl_set:Nx\l_mix_settings_tl{\g_mix_pdflastobj_tl}
+ \tl_if_empty:NF\g_mix_usrlabel_tl{
+ \tl_gset_eq:NN\g_mix_label_tl\g_mix_usrlabel_tl
+ }
+ % #1:width, #2:height, #3:depth, #4:content (key-value)
\mix_pdfannot:nnnn{\l_mix_wd_tl}{\l_mix_ht_tl}{\l_mix_dp_tl}{
/Subtype/RichMedia
/F~4
@@ -1075,7 +1098,22 @@
/RichMediaSettings~\l_mix_settings_tl
/RichMediaContent~\l_mix_content_tl
}
- \tl_set:Nx\l_mix_settings_tl{\g_mix_pdflastobj_tl}
+ \tl_if_empty:NF\g_mix_usrlabel_tl{
+ \mix_pdfobj:nnn{}{dict}{
+ /S/JavaScript/JS~(
+ if(typeof(annotRM)=='undefined'){annotRM=new~Array();}
+ annotRM['\g_mix_label_tl']=
+ this.getAnnotRichMedia(this.pageNum,~'\g_mix_label_tl');
+ )
+ }
+ \mix_pdfannot:nnnn{0pt}{0pt}{0pt}{
+ /Subtype/Widget
+ /FT/Btn/Ff~65537
+ /BS~<</W~0>>
+ /T~(fd@\g_mix_label_tl)
+ /AA~<</PO~\g_mix_pdflastobj_tl~/PV~\g_mix_pdflastobj_tl>>
+ }
+ }
\hbox_to_wd:nn{\l_mix_wd_tl}{
\vrule~width~\c_zero_dim~height~\l_mix_ht_tl~depth~\l_mix_dp_tl\hss
}
@@ -1356,7 +1394,8 @@
>>
/C2W~[\l_mix_ciiw_tl]
/CO~\l_mix_roo_tl
- /NR~true/NA~[\l_mix_naarray_tl]
+ \l_mix_nr_tl
+ /NA~[\l_mix_naarray_tl]
/SA~[\l_mix_saarray_tl]
\l_mix_bg_tl\l_mix_ls_tl\l_mix_rm_tl
/XN~(#1)
@@ -1391,18 +1430,20 @@
\seq_new:N\g_mix_res_seq
\seq_new:N\g_mix_script_seq
+\tl_new:N\g_mix_rmnames_tl
+
\keys_define:nn{media9/user}{
%user override automatic label
label .code:n = {
- \tl_gset:Nx\g_mix_label_tl{rm.#1}
- \cs_if_exist:cTF{rm.#1}{
+ \tl_gset:Nx\g_mix_usrlabel_tl{#1}
+ \cs_if_exist:cTF{rm@#1}{
\msg_warning:nnx{media9}{same~label}{#1}
\cs_if_exist:NF\g_mix_samelabel_tl{
\tl_new:N\g_mix_samelabel_tl
\AtEndDocument{\msg_warning:nn{media9}{multiple~labels}}
}
}{
- \tl_new:c{rm.#1}
+ \tl_new:c{rm@#1}
}
},
label .value_required:,
@@ -1443,11 +1484,13 @@
activate / pagevisible .code:n = {\tl_gset:Nn\g_mix_act_tl{/PV}},
activate / pageopen .code:n = {\tl_gset:Nn\g_mix_act_tl{/PO}},
activate / onclick .code:n = {\tl_gset:Nn\g_mix_act_tl{/XA}},
+ activate .value_required:,
deactivate .choice:,
deactivate / pageinvisible .code:n = {\tl_gset:Nn\g_mix_deact_tl{/PI}},
deactivate / pageclose .code:n = {\tl_gset:Nn\g_mix_deact_tl{/PC}},
deactivate / onclick .code:n = {\tl_gset:Nn\g_mix_deact_tl{/XD}},
+ deactivate .value_required:,
draft .choice:,
draft / true .code:n = {\bool_gset_true:N\g_mix_usrdraft_bool},
@@ -1474,6 +1517,7 @@
3Dplaytype / linear .code:n = {\tl_gset:Nn\g_mix_playtpe_tl{Linear}},
3Dplaytype / oscillating .code:n = {
\tl_gset:Nn\g_mix_playtpe_tl{Oscillating}},
+ 3Dplaytype .value_required:,
3Dplaycount .code:n = {\tl_gset:Nn\g_mix_playcnt_tl{
\exp_after:wN\int_value:w \dim_eval:w#1sp\dim_eval_end:}},
@@ -1490,6 +1534,17 @@
3Dnavpane .generate_choices:n = {true,false},
3Dnavpane .default:n = {true},
+ 3Dpartsattrs .choice_code:n = {
+ \tl_set:Nn\l_mix_keep_tl{keep}
+ \tl_if_eq:NNTF\l_keys_choice_tl\l_mix_keep_tl{
+ \tl_gset:Nn\g_mix_nrdflt_tl{/NR~false}
+ }{
+ \tl_gset:Nn\g_mix_nrdflt_tl{/NR~true}
+ }
+ },
+ 3Dpartsattrs .generate_choices:n = {keep,restore},
+ 3Dpartsattrs .value_required:,
+
3Dcoo .code:n = {\tl_gset:Nn\g_mix_opt_coo_tl{#1}
\bool_gset_true:N\g_mix_opt_iiidview_bool},
3Dcoo .value_required:,
@@ -1834,6 +1889,21 @@
},
RENDERMODE .value_required:,
+ PARTSATTRS .choice_code:n = {
+ \int_compare:nF{\l_mix_level_tl=\c_zero}{
+ \msg_error:nnxxxx{media9}{key~not~allowed}
+ {\g_mix_vfile_tl}{\int_use:N\l_mix_lineno_int}{PARTSATTRS}{VIEW}
+ }
+ \tl_set:Nn\l_mix_keep_tl{keep}
+ \tl_if_eq:NNTF\l_keys_choice_tl\l_mix_keep_tl{
+ \tl_set:Nn\l_mix_nr_tl{/NR~false}
+ }{
+ \tl_set:Nn\l_mix_nr_tl{/NR~true}
+ }
+ },
+ PARTSATTRS .generate_choices:n = {keep,restore},
+ PARTSATTRS .value_required:,
+
PART .code:n = {
\int_compare:nF{\l_mix_level_tl=\c_zero}{
\msg_error:nnxxxx{media9}{section~not~allowed}