summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-23 23:59:04 +0000
committerKarl Berry <karl@freefriends.org>2013-01-23 23:59:04 +0000
commit3f2b183ad30e6333672219c6e36339c4ee7c990b (patch)
treeca09b188b7d29fd5ab663999289c73bc1869b8a2
parentc1dacde85799a672c29740afe6041f3b3b671d32 (diff)
media9 0.21 (23jan13)
git-svn-id: svn://tug.org/texlive/trunk@28919 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog7
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin1956069 -> 1955423 bytes
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty150
3 files changed, 121 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index 94917fdbc46..de69f360ce6 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,4 +1,9 @@
-2013-01-07
+2013-01-23
+ * v0.21
+ * fix: swf media inserted after a 3D object didn't work, reported by C.
+ Sturm
+
+2013-01-21
* v0.20
* new: `hideBar' option (FlashVar) for APlayer.swf
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index d4939ac07ab..397badd4a6f 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.pdf
+++ b/Master/texmf-dist/doc/latex/media9/media9.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index e76a04b9477..3acd29c393a 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{2013/01/21}
-\def\g@mix@version@tl{0.20}
+\def\g@mix@date@tl{2013/01/23}
+\def\g@mix@version@tl{0.21}
\def\g@mix@liiikerneldate{2012/07/16}
\def\g@mix@liiipkgdate{2012/07/16}
@@ -116,9 +116,9 @@
\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{}
-\tl_gset:Nn\g_mix_pkgopt_rm_tl{}
+\tl_gclear:N\g_mix_pkgopt_bg_tl
+\tl_gclear:N\g_mix_pkgopt_ls_tl
+\tl_gclear:N\g_mix_pkgopt_rm_tl
\bool_new:N\g_mix_pkgiiidcalc_bool
\keys_define:nn{media9}{
dvipdfmx .bool_gset:N = \g_mix_dvipdfmx_bool,
@@ -225,7 +225,7 @@
unknown .code:n = {
\msg_error:nnx{media9}{unknown~package~option}{\l_keys_key_tl}
- },
+ }
}
\ProcessKeysOptions{media9}
\xetex_if_engine:T{\bool_gset_true:N\g_mix_dvipdfmx_bool}
@@ -281,9 +281,9 @@
%creating global definitions
\cs_new:Npn\mix@newkey#1#2{\tl_gset:cx{#1}{#2}}
-%macro for writing global defs to \jobname.aux
+%macros for writing global defs to \jobname.aux
\msg_set:nnn{media9}{rerun}{Rerun~to~get~media~labels~right!}
-\cs_gset:Nn\mix_keytoaux:nn{
+\cs_gset:Nn\mix_keytoaux_now:nn{
\iow_now:Nx\@auxout{\token_to_str:N\mix@newkey{#1}{#2}}
\bool_if:nF{
\cs_if_exist_p:c{#1} && \str_if_eq_x_p:nn{\tl_use:c{#1}}{#2}
@@ -294,19 +294,28 @@
}
}
}
+\cs_gset:Nn\mix_keytoaux_shipout:nn{
+ \iow_shipout_x:Nx\@auxout{\token_to_str:N\mix@newkey{#1}{#2}}
+ \cs_if_exist:cF{#1}{
+ \cs_if_exist:NF\g_mix_rerunwarned_tl{
+ \tl_new:N\g_mix_rerunwarned_tl
+ \AtEndDocument{\msg_warning:nn{media9}{rerun}}
+ }
+ }
+}
%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_usrlabel_tl{}
- \tl_gset:Nn\g_mix_flashvars_tl{}
- \tl_gset:Nn\g_mix_assets_tl{}
- \tl_gset:Nn\g_mix_configurations_tl{}
+ \tl_gclear:N\g_mix_usrlabel_tl
+ \tl_gclear:N\g_mix_flashvars_tl
+ \tl_gclear:N\g_mix_assets_tl
+ \tl_gclear:N\g_mix_configurations_tl
\tl_gset_eq:NN\g_mix_act_tl\g_mix_pkgact_tl
\tl_gset_eq:NN\g_mix_deact_tl\g_mix_pkgdeact_tl
\bool_gset_false:N\g_mix_url_bool
\box_clear:N\l_mix_poster_box
- \tl_set:Nn\l_mix_scripts_tl{}
+ \tl_clear:N\l_mix_scripts_tl
\bool_gset_eq:NN\g_mix_usrdraft_bool\g_mix_pkgdraft_bool
\seq_gclear:N\g_mix_res_seq
\seq_gclear:N\g_mix_script_seq
@@ -321,6 +330,7 @@
\tl_gset_eq:NN\g_mix_windowed_tl\g_mix_pkgwindowed_tl
%3D specific settings
+ \bool_gset_false:N\g_mix_iiid_bool
\bool_gset_false:N\g_mix_opt_iiidview_bool
\bool_gset_eq:NN\g_mix_iiidcalc_bool\g_mix_pkgiiidcalc_bool
@@ -337,7 +347,7 @@
\tl_gset:Nn\g_mix_opt_psob_tl{Min}
\tl_gset:Nn\g_mix_opt_coo_tl{0~0~0}
\tl_gset:Nn\g_mix_opt_ctoc_tl{0~-1~0}
- \tl_gset:Nn\g_mix_opt_ciiw_tl{}
+ \tl_gclear:N\g_mix_opt_ciiw_tl
\fp_gset:Nn\g_mix_opt_roo_fp{1e-9}
\fp_gset:Nn\g_mix_opt_aac_fp{30}
\fp_gset:Nn\g_mix_opt_oscale_fp{1}
@@ -347,19 +357,19 @@
\bool_gset_false:N\g_mix_opt_ciiw_bool
\bool_gset_false:N\g_mix_opt_iiidortho_bool
- \tl_set:Nn\l_mix_iiidviewarray_tl{}
- \tl_gset:Nn\g_mix_vfile_tl{}
+ \tl_clear:N\l_mix_iiidviewarray_tl
+ \tl_gclear:N\g_mix_vfile_tl
}
%3D settings to be reset before creating an additional view
\cs_new:Nn\mix_iiidreset:{
- \tl_set:Nn\l_mix_bg_tl{}
- \tl_set:Nn\l_mix_ls_tl{}
- \tl_set:Nn\l_mix_rm_tl{}
+ \tl_clear:N\l_mix_bg_tl
+ \tl_clear:N\l_mix_ls_tl
+ \tl_clear:N\l_mix_rm_tl
\tl_set:Nn\l_mix_psob_tl{Min}
\tl_set:Nn\l_mix_coo_tl{0~0~0}
\tl_set:Nn\l_mix_ctoc_tl{0~-1~0}
- \tl_set:Nn\l_mix_ciiw_tl{}
+ \tl_clear:N\l_mix_ciiw_tl
\fp_set:Nn\l_mix_roo_fp{1e-9}
\fp_set:Nn\l_mix_aac_fp{30}
@@ -370,8 +380,8 @@
\bool_set_false:N\l_mix_ciiw_bool
\bool_set_false:N\l_mix_iiidortho_bool
- \tl_set:Nn\l_mix_naarray_tl{} %array of node dicts
- \tl_set:Nn\l_mix_saarray_tl{} %array of crosssect dicts
+ \tl_clear:N\l_mix_naarray_tl %array of node dicts
+ \tl_clear:N\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
}
@@ -390,7 +400,7 @@
% #1:objref; if empty, a new object number will be reserved
% #2:type of object (dict|array|stream|fstream)
% #3:content (key-value, file, string); may be empty
- \tl_set:Nn\l_mix_usenum_tl{}
+ \tl_clear:N\l_mix_usenum_tl
\tl_if_blank:oTF{#1}{
\pdfobj~reserveobjnum
\tl_set:Nx\l_mix_usenum_tl{useobjnum~\the\pdflastobj}
@@ -451,7 +461,7 @@
% #1:objref; if empty, a new object number will be reserved
% #2:type of object (dict|array|stream|fstream)
% #3:content (key-value, file, string); may be empty
- \tl_set:Nn\l_mix_usenum_tl{}
+ \tl_clear:N\l_mix_usenum_tl
\tl_if_blank:oTF{#1}{
\str_case:nnn{#2}{
{dict}{\special{pdf:obj~@mix@obj\int_use:N\g_mix_obj_int\space<<>>}}
@@ -564,7 +574,7 @@
% #1:objref; if empty, a new object number will be reserved
% #2:type of object (dict|array|stream|fstream)
% #3:content (key-value, file, string); may be empty
- \tl_set:Nn\l_mix_usenum_tl{}
+ \tl_clear:N\l_mix_usenum_tl
\tl_if_blank:oTF{#1}{
\bool_if:nTF{
\g_mix_pkgbigfiles_bool &&
@@ -1127,15 +1137,15 @@
\bool_set_eq:NN\l_mix_ciiw_bool\g_mix_opt_ciiw_bool
\bool_set_eq:NN\l_mix_iiidortho_bool\g_mix_opt_iiidortho_bool
- \tl_set:Nn\l_mix_naarray_tl{}
+ \tl_clear:N\l_mix_naarray_tl
\bool_if:NF\l_mix_ciiw_bool{
\tl_set:Nx\l_mix_args_tl{\l_mix_coo_tl\space\l_mix_ctoc_tl\space}
\exp_after:wN\mix_calc_ciiw:w\l_mix_args_tl\q_stop
}
- \tl_set:Nn\l_mix_naarray_tl{}
- \tl_set:Nn\l_mix_saarray_tl{}
+ \tl_clear:N\l_mix_naarray_tl
+ \tl_clear:N\l_mix_saarray_tl
\tl_set_eq:NN\l_mix_nr_tl\g_mix_nrdflt_tl
\mix_view:n{Default}
@@ -1155,7 +1165,7 @@
}
}
\tl_if_empty:NF\g_mix_usrlabel_tl{
- \mix_keytoaux:nn{main@\g_mix_usrlabel_tl}{\g_mix_pdflastobj_tl}
+ \mix_keytoaux_now:nn{main@\g_mix_usrlabel_tl}{\g_mix_pdflastobj_tl}
}
\mix_pdfobj:nnn{}{dict}{
/Subtype/\g_mix_mainassetsub_tl
@@ -1238,7 +1248,7 @@
/RichMediaContent~\l_mix_content_tl
}
\tl_if_empty:NF\g_mix_usrlabel_tl{
- \mix_keytoaux:nn{ann@\g_mix_usrlabel_tl}{\g_mix_pdflastann_tl}
+ \mix_keytoaux_now:nn{ann@\g_mix_usrlabel_tl}{\g_mix_pdflastann_tl}
\mix_pdfobj:nnn{}{dict}{
/S/JavaScript/JS~(
if(typeof(annotRM)=='undefined'){annotRM=new~Array();}
@@ -1664,7 +1674,7 @@
unknown .code:n = {
\msg_error:nnx{media9}{unknown~option}{\l_keys_key_tl}
- },
+ }
}
%3D views file parsing
@@ -1944,10 +1954,10 @@
\tl_set:Nn\l_mix_ndname_tl{(#1)} %part (=node) name
\tl_set_eq:NN\l_mix_partlineno_int\l_mix_lineno_int
%default part settings
- \tl_set:Nn\l_mix_ndop_tl{} %opacity
- \tl_set:Nn\l_mix_ndvi_tl{} %visibility
- \tl_set:Nn\l_mix_ndrm_tl{} %render mode
- \tl_set:Nn\l_mix_ndtrans_tl{}%transformation matrix
+ \tl_clear:N\l_mix_ndop_tl %opacity
+ \tl_clear:N\l_mix_ndvi_tl %visibility
+ \tl_clear:N\l_mix_ndrm_tl %render mode
+ \tl_clear:N\l_mix_ndtrans_tl%transformation matrix
},
PART .default:n = {},
@@ -2105,3 +2115,73 @@
},
END .value_forbidden:,
}
+
+%options for \mediabutton command
+\keys_define:nn{media9/mbtn}{
+ overface .code:n = {
+ \hbox_set:Nn\l_tmpa_box{#1}
+ \mix_pdfxform:n{\l_tmpa_box}
+ \tl_gset:Nx\g_mix_overbtn_tl{\g_mix_pdflastxform_tl}
+ },
+ overface .value_required:,
+
+ downface .code:n = {
+ \hbox_set:Nn\l_tmpa_box{#1}
+ \mix_pdfxform:n{\l_tmpa_box}
+ \tl_gset:Nx\g_mix_downbtn_tl{\g_mix_pdflastxform_tl}
+ },
+ downface .value_required:,
+
+ 3Dviewindex .code:n ={
+ },
+ 3Dviewindex .value_required:,
+
+ unknown .code:n = {
+ \msg_error:nnx{media9}{unknown~option}{\l_keys_key_tl}
+ }
+}
+
+%create media buttons
+\int_new:N\g_mix_mbtncnt_int
+\NewDocumentCommand\mediabutton{O{}m}{%#1 options, #2 normal button text
+ \group_begin:
+ \leavevmode
+ %reset various variables
+ \tl_gclear:N\g_mix_overbtn_tl
+ \tl_gclear:N\g_mix_downbtn_tl
+ \tl_gclear:N\g_mix_btnactions_tl
+ %process options
+ \mix_uribegin: %treat URI characters correctly
+ \keys_set:nn{media9/mbtn}{#1}
+ \mix_uriend:
+ %normal button appearance
+ \hbox_set:Nn\l_tmpa_box{#2}
+ \tl_set:Nx\width {\dim_use:N\box_wd:N\l_tmpa_box}
+ \tl_set:Nx\height{\dim_use:N\box_ht:N\l_tmpa_box}
+ \tl_set:Nx\depth {\dim_use:N\box_dp:N\l_tmpa_box}
+ \mix_pdfxform:n{\l_tmpa_box}
+ \tl_set:Nx\g_mix_normalbtn_tl{\g_mix_pdflastxform_tl}
+ %insert widget annotation
+ \mix_pdfannot:nnnn{\width}{\height}{\depth}{
+ /Subtype/Widget
+ /T~(mbtn@\int_use:N\g_mix_mbtncnt_int)
+ /FT/Btn/Ff~65536
+ /H/P
+ \tl_if_empty:NTF\g_mix_downbtn_tl{/H/I}{/H/P}
+ /AP~<<
+ /N~\g_mix_normalbtn_tl
+ \tl_if_empty:NF\g_mix_overbtn_tl{/R~\g_mix_overbtn_tl}
+ \tl_if_empty:NF\g_mix_downbtn_tl{/D~\g_mix_downbtn_tl}
+ >>
+ /A~<<
+ /S/JavaScript/JS~(app.focusRect=false;)
+ %sequence of actions to perform
+ \tl_if_empty:NF\g_mix_btnactions_tl{/Next~[\g_mix_btnactions_tl]}
+ >>
+ }
+ \hbox_to_wd:nn{\width}{
+ \vrule~width~\c_zero_dim~height~\height~depth~\depth\hss
+ }
+ \int_gincr:N\g_mix_mbtncnt_int
+ \group_end:
+}