summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/media9/media9.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-24 22:37:41 +0000
committerKarl Berry <karl@freefriends.org>2014-06-24 22:37:41 +0000
commit5f82586b4490bd606e4410739e1c089c54ed323b (patch)
tree926b6300218720cef07d7ca9025a32070ecf6f2d /Master/texmf-dist/tex/latex/media9/media9.sty
parent084a4d47bb53b4091f81ab09e8cff78d684c3107 (diff)
media9 (4jun14)
git-svn-id: svn://tug.org/texlive/trunk@34386 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.sty87
1 files changed, 62 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index 959370fb20d..5a8a8f33dca 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -43,8 +43,8 @@
\RequirePackage{atenddvi}
\RequirePackage{tikz}
-\def\g@mix@date@tl{2014/03/25}
-\def\g@mix@version@tl{0.43}
+\def\g@mix@date@tl{2014/06/04}
+\def\g@mix@version@tl{0.44}
\def\g@mix@liiikerneldate{2013/07/28}
\def\g@mix@liiipkgdate{2013/07/28}
@@ -103,6 +103,7 @@
}
\bool_new:N\g_mix_pkgbigfiles_bool
+\bool_new:N\g_mix_pkgattach_bool
\bool_new:N\g_mix_dvipdfmx_bool
\bool_new:N\g_mix_pkgdraft_bool
\bool_new:N\g_mix_opt_pkgwindowed_bool
@@ -168,6 +169,11 @@
final / false .code:n = {\bool_gset_true:N\g_mix_pkgdraft_bool},
final .default:n = {true},
+ attachfiles .choice:,
+ attachfiles / true .code:n = {\bool_gset_true:N\g_mix_pkgattach_bool},
+ attachfiles / false .code:n = {\bool_gset_false:N\g_mix_pkgattach_bool},
+ attachfiles .default:n = {true},
+
noplaybutton .choice:,
noplaybutton / true .code:n = {\tl_gset:Nn\g_mix_pkgpbtn_tl{none}},
noplaybutton .default:n = {true},
@@ -371,6 +377,7 @@
\box_clear:N\l_mix_poster_box
\tl_clear:N\l_mix_scripts_tl
\bool_gset_eq:NN\g_mix_usrdraft_bool\g_mix_pkgdraft_bool
+ \bool_gset_eq:NN\g_mix_usrattach_bool\g_mix_pkgattach_bool
\tl_gset_eq:NN\g_mix_usrpbtn_tl\g_mix_pkgpbtn_tl
\seq_gclear:N\g_mix_res_seq
\seq_gclear:N\g_mix_script_seq
@@ -502,6 +509,11 @@
/OCProperties~<<
/OCGs~\g_mix_ocgarray_tl
/D~<<
+ /AS~[
+ <</Event/View /Category[/View] /OCGs~\g_mix_ocgarray_tl>>
+ <</Event/Print /Category[/Print] /OCGs~\g_mix_ocgarray_tl>>
+ <</Event/Export/Category[/Export]/OCGs~\g_mix_ocgarray_tl>>
+ ]
/BaseState/ON~/OFF~\g_mix_offocgarray_tl
>>
>>
@@ -514,12 +526,14 @@
\cs_new:Nn\mix_insert_btnocg:{%OCG for play button overlay
\mix_pdfobj:nnn{}{dict}{
/Type/OCG/Name~(MediaPlayButton\int_use:N\g_mix_rmcnt_int)
- /Usage<</Print<</PrintState/OFF>>/Export<</ExportState/OFF>>>>
+ /Usage<<
+ /Print<</PrintState/OFF>>
+ /Export<</ExportState/OFF>>
+ >>
}
\tl_gput_right:Nx\@anim@ocgs{\space\g_mix_pdflastobj_tl}
\tl_gput_right:Nx\@anim@offocgs{\space\g_mix_pdflastobj_tl}
\tl_gset:Nx\g_mix_btnocg_tl{\g_mix_pdflastobj_tl}
- \mix_pdfresources:
}
%commands for creating PDF objects, annots etc.
@@ -587,21 +601,28 @@
\cs_new:Nn\mix_pdfcatalog:n{\pdfcatalog{#1}}
- \tl_new:N\g_mix_ocgnames_tl
- \cs_new:Nn\mix_pdfresources:{
- \tl_gput_right:Nx\g_mix_ocgnames_tl{
- ~/OC@rm@play@\int_use:N\g_mix_rmcnt_int\space\g_mix_btnocg_tl}
+ %marked content BDC/EMC operators
+ \int_new:N\g_mix_oc_int % object ID
+ \cs_new:Nn\mix_pdfbdc:nn{ % #1: tag, #2: prop. dict obj ID
+ \pdfliteral~direct~{#1/rm@oc\int_use:N\g_mix_oc_int\space BDC}
+ \tl_if_empty:NTF\@anim@ocmap{
+ \tl_gset:cx{@anim@ocmap}{/rm@oc\int_use:N\g_mix_oc_int\space#2}
+ }{
+ \tl_gput_right:cx{@anim@ocmap}{~/rm@oc\int_use:N\g_mix_oc_int\space#2}
+ }
\group_begin:
\tl_set:Nx\l_mix_temp_tl{\group_end:
\global\pdfpageresources{\the\pdfpageresources
- /Properties<<\g_mix_ocgnames_tl>>
+ /Properties<<\@anim@ocmap>>
}
}\l_mix_temp_tl
+ \int_gincr:N\g_mix_oc_int
}
- \cs_new:Nn\mix_pdfbdc:{
- \pdfliteral{/OC/OC@rm@play@\int_use:N\g_mix_rmcnt_int\space BDC}
+ \tl_if_exist:cF{@anim@ocmap}{
+ \tl_gset:cn{@anim@ocmap}{}
+ \AtBeginShipout{\tl_gset:cn{@anim@ocmap}{}}
}
- \cs_new:Nn\mix_pdfemc:{\pdfliteral{EMC}}
+ \cs_new:Nn\mix_pdfemc:{\pdfliteral~direct~{EMC}}
}{
\int_new:N\g_mix_obj_int % object ID
\bool_if:NTF\g_mix_dvipdfmx_bool{ %dvipdfmx/XeTeX
@@ -684,14 +705,16 @@
}
\cs_new:Nn\mix_pdfcatalog:n{\special{pdf:put~@catalog~<<#1>>}}
- \cs_new:Nn\mix_pdfresources:{\special{pdf:put~@resources~<<
- /Properties<</OC@rm@play@\int_use:N\g_mix_rmcnt_int\space
- \g_mix_btnocg_tl>>
- >>}}
- \cs_new:Nn\mix_pdfbdc:{
- \special{pdf:~content~/OC/OC@rm@play@\int_use:N\g_mix_rmcnt_int\space BDC}
- }
- \cs_new:Nn\mix_pdfemc:{\special{pdf:~content~EMC}}
+
+ %marked content BDC/EMC operators
+ \int_new:N\g_mix_oc_int % object ID
+ \cs_new:Nn\mix_pdfbdc:nn{
+ \special{pdf:code~#1/rm@oc\int_use:N\g_mix_oc_int\space BDC}
+ \special{pdf:put~@resources~<<
+ /Properties~<</rm@oc\int_use:N\g_mix_oc_int\space#2>>>>}
+ \int_gincr:N\g_mix_oc_int
+ }
+ \cs_new:Nn\mix_pdfemc:{\special{pdf:~code~EMC}}
}{
% dvips
\bool_new:N\g_mix_powerdot_bool %to cope with some powerdot oddity
@@ -966,8 +989,8 @@
\special{ps:~mark~{Catalog}~<<#1>>~/PUT~pdfmark}
}
- \cs_new:Nn\mix_pdfresources:{} %no-op, Distiller does it automatically
- \cs_new:Nn\mix_pdfbdc:{\special{ps:~mark~/OC~\g_mix_btnocg_tl~/BDC~pdfmark}}
+ %marked content BDC/EMC operators for playbutton ocg
+ \cs_new:Nn\mix_pdfbdc:nn{\special{ps:~mark~#1~#2~/BDC~pdfmark}}
\cs_new:Nn\mix_pdfemc:{\special{ps:~mark~/EMC~pdfmark}}
}
}
@@ -1068,10 +1091,18 @@
%create FileSpec for current file name if not yet existent
\cs_if_exist:cF{fileSpec_#1}{
\mix_pdfobj:nnn{}{dict}{
- /Type/Filespec/F~(#1)/UF~(#1)
+ /Type/Filespec/F~(#1)%/UF~(#1)
/EF~<</F~\tl_use:c{fileEmb_\mix_filemdfivesum:n{\l_mix_file_tl}}>>
}
\tl_gset:cx{fileSpec_#1}{\g_mix_pdflastobj_tl}
+ \bool_if:NT\g_mix_usrattach_bool{
+ \mix_pdfannot:nnnn{0pt}{0pt}{0pt}{
+ /Contents~(media~resource)
+ /F~2
+ /Subtype/FileAttachment
+ /FS~\g_mix_pdflastobj_tl
+ }
+ }
}
%add FileSpec to assets tree of current annot
\cs_if_exist:cF{fileAsset_\int_use:c{g_mix_rmcnt_int}_#1}{
@@ -1301,7 +1332,7 @@
}
}
\mix_pdfobj:nnn{}{dict}{
- /Type/Filespec/F~(btnoff)/UF~(btnoff)/EF~<</F~\g_mix_pdflastobj_tl>>
+ /Type/Filespec/EF~<</F~\g_mix_pdflastobj_tl>>/F~(btnoff)%/UF~(btnoff)
}
\tl_gset:Nx\g_mix_assets_tl{(btnoff)~\g_mix_pdflastobj_tl}
\tl_set:Nx\l_mix_scripts_tl{~\g_mix_pdflastobj_tl~}
@@ -1555,7 +1586,7 @@
\hbox_to_wd:nn{\l_mix_wd_tl}{
\vbox_to_ht:nn{\l_mix_tt_tl}{
\vss
- \mix_pdfbdc:
+ \mix_pdfbdc:nn{/OC}{\g_mix_btnocg_tl}
\box_use:N\l_mix_pbtn_box
\mix_pdfemc:
}
@@ -1737,6 +1768,7 @@
}
\bool_new:N\g_mix_usrdraft_bool
+\bool_new:N\g_mix_usrattach_bool
\bool_new:N\g_mix_usrpbtn_bool
\bool_new:N\g_mix_opt_iiidview_bool
\bool_new:N\l_mix_roo_bool
@@ -1825,6 +1857,11 @@
final / false .code:n = {\bool_gset_true:N\g_mix_usrdraft_bool},
final .default:n = {true},
+ attachfiles .choice:,
+ attachfiles / true .code:n = {\bool_gset_true:N\g_mix_usrattach_bool},
+ attachfiles / false .code:n = {\bool_gset_false:N\g_mix_usrattach_bool},
+ attachfiles .default:n = {true},
+
noplaybutton .choice:,
noplaybutton / true .code:n = {\tl_gset:Nn\g_mix_usrpbtn_tl{none}},
noplaybutton .default:n = {true},