summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-25 22:39:48 +0000
committerKarl Berry <karl@freefriends.org>2016-02-25 22:39:48 +0000
commite609261d18e7ce4dd1708dcc6d4679b22ba2d814 (patch)
treee81a4ce54b60f0505823893f32b8087a68daa89e /Master
parentee86c2f293c6e4baf8eade205f1df6d9e975f0f1 (diff)
media9 (25feb16)
git-svn-id: svn://tug.org/texlive/trunk@39865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog8
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin3606426 -> 3606881 bytes
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty24
-rw-r--r--Master/texmf-dist/tex/latex/media9/pdfbase.sty224
4 files changed, 165 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index 8f85a47c118..1477476996c 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,7 +1,13 @@
+2016-02-25
+ * v0.65 : media9.sty
+ * v0.5 : pdfbase.sty
+ * fix: fixing possible colour leaking of play button overlay
+ and of m-button faces; minor adjustments of pdfbase.sty
+
2016-02-13
* v0.64 : media9.sty
* v0.4 : pdfbase.sty, with minor fixes
- * fix: fixing \pdfliteral for BDC/EMC insertion
+ * fix: fixing \pdfliteral for BDC/EMC insertion
2016-01-29
* v0.63 : media9.sty
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 5f7ffbeae3f..741d163b309 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 61a187b2348..ce20f2c5ded 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -41,8 +41,8 @@
\RequirePackage{atbegshi}
\RequirePackage{atenddvi}
-\def\g@mix@date@tl{2016/02/13}
-\def\g@mix@version@tl{0.64}
+\def\g@mix@date@tl{2016/02/25}
+\def\g@mix@version@tl{0.65}
\def\g@mix@liiikerneldate{2015/09/27}
\def\g@mix@liiipkgdate{2015/09/27}
@@ -323,7 +323,7 @@
\cs_set_eq:NN\mix_pdfobj:nnn \pbs_pdfobj:nnn
\cs_set_eq:NN\mix_pdfannot:nnnn\pbs_pdfannot:nnnn
\cs_set_eq:NN\mix_pdflink:nn \pbs_pdflink:nn
-\cs_set_eq:NN\mix_pdfxform:n \pbs_pdfxform:n
+\cs_new:Nn\mix_pdfxform:n{\pbs_pdfxform:nn{1}{#1}}
\cs_set_eq:NN\mix_pdfximage:n \pbs_pdfximage:n
\cs_set_eq:NN\mix_pdfcatalog:n \pbs_pdfcatalog:n
@@ -945,8 +945,9 @@
\cs_if_exist:NT\Ginput@path{\cs_set_eq:NN\input@path\Ginput@path}
- \hbox_set:Nn\l_mix_poster_box{\group_begin:#2\group_end:}
+ %\hbox_set:Nn\l_mix_poster_box{\group_begin:#2\group_end:}
%\hbox_set:Nn\l_mix_poster_box{#2}
+ \sbox\l_mix_poster_box{#2}
\mix_scale:n{\l_mix_poster_box}
\bool_if:nT{
\dim_compare_p:n{\g_mix_tt_tl=\c_zero_dim}||
@@ -1229,15 +1230,19 @@
}{%insert play button overlay
\mix_insert_btnocg: %create OCG
\cs_gset_eq:Nc\mix_pbtn:NN{g@mix@pbtn@\g_mix_usrpbtn_tl @tl}
- \hbox_set:Nn\l_mix_pbtn_box{\mix_pbtn:NN\g_mix_wd_tl\g_mix_tt_tl}
+ %\hbox_set:Nn\l_mix_pbtn_box{\mix_pbtn:NN\g_mix_wd_tl\g_mix_tt_tl}
+ \sbox\l_mix_pbtn_box{\mix_pbtn:NN\g_mix_wd_tl\g_mix_tt_tl}
+% \pbs_pdfxform:nn{0}{\l_mix_pbtn_box}
\box_move_down:nn{\g_mix_dp_tl}{
\hbox_to_wd:nn{\g_mix_wd_tl}{
\vbox_to_ht:nn{\g_mix_tt_tl}{
\vss
\ocgbase_oc_bdc:n{\g_mix_btnocg_tl}
\box_use:N\l_mix_pbtn_box
+% \pbs_pdfrefxform:n{\pbs_pdflastxform:}
\ocgbase_oc_emc:
}
+% \hss
}
}
}
@@ -2214,14 +2219,16 @@
tooltip .value_required:n = {true},
overface .code:n = {
- \hbox_set:Nn\l_mix_poster_box{#1}
+ %\hbox_set:Nn\l_mix_poster_box{#1}
+ \sbox\l_mix_poster_box{#1}
\mix_pdfxform:n{\l_mix_poster_box}
\tl_gset:Nx\g_mix_overbtn_tl{\mix_pdflastxform:}
},
overface .value_required:n = {true},
downface .code:n = {
- \hbox_set:Nn\l_mix_poster_box{#1}
+ %\hbox_set:Nn\l_mix_poster_box{#1}
+ \sbox\l_mix_poster_box{#1}
\mix_pdfxform:n{\l_mix_poster_box}
\tl_gset:Nx\g_mix_downbtn_tl{\mix_pdflastxform:}
},
@@ -2401,7 +2408,8 @@
\bool_if:NF\g_mix_btndraft_bool{\keys_set:nn{media9/mbtn}{#1}}
\mix_uriend:
%normal button appearance
- \hbox_set:Nn\l_mix_poster_box{#2}
+ %\hbox_set:Nn\l_mix_poster_box{#2}
+ \sbox\l_mix_poster_box{#2}
\tl_set:Nx\width {\dim_use:N\box_wd:N\l_mix_poster_box}
\tl_set:Nx\height{\dim_use:N\box_ht:N\l_mix_poster_box}
\tl_set:Nx\depth {\dim_use:N\box_dp:N\l_mix_poster_box}
diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
index 91bb9872029..8cdca8f00dd 100644
--- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty
+++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
@@ -57,12 +57,20 @@
%
% --------
%
-% \pbs_pdfxform:n
-% #1: savebox number
+% \pbs_pdfxform:nn
+% #1: used as PDF annotation appearance ? (1|0)
+% #2: savebox number
+%
+% creates PDF Form XObject from savebox content
%
% \pbs_pdflastxform:
-% inserts ID of PDF object created during most recent call of
-% \pbs_pdfxform:n
+% inserts ID of PDF Form XObject created during most recent call of
+% \pbs_pdfxform:nn
+%
+% \pbs_pdfrefxform:n
+% #1: xform object ID
+% inserts the PDF Form XObject into the current content stream, that is,
+% typsets the PDF Form XObject
%
% --------
%
@@ -70,7 +78,7 @@
% #1: bitmap file name
%
% \pbs_pdflastximage:
-% inserts ID of PDF object created during most recent call of
+% inserts ID of PDF Image XObject created during most recent call of
% \pbs_pdfximage:n
%
% --------
@@ -104,8 +112,8 @@
\RequirePackage{atbegshi}
\RequirePackage{atenddvi}
-\def\g@pbs@date@tl{2016/02/13}
-\def\g@pbs@version@tl{0.4}
+\def\g@pbs@date@tl{2016/02/25}
+\def\g@pbs@version@tl{0.5}
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
{driver independent access to low-level PDF features}
@@ -154,11 +162,16 @@
%commands for creating PDF objects, annots etc.
\sys_if_output_pdf:TF{
%helper func to remove `0 R' part from pdf obj reference
- \cs_new_nopar:Npn\pbs_reftonum:w #1~0~R {#1}
+ \cs_new_nopar:Nn\pbs_reftonum:n{\_pbs_reftonum:f{#1}}
+ %
+ \cs_new_nopar:Nn\_pbs_reftonum:n{\exp_after:wN\_pbs_reftonum:w#1}
+ \cs_generate_variant:Nn\_pbs_reftonum:n{f}
+ \cs_new_nopar:Npn\_pbs_reftonum:w #1~0~R{#1}
+ %
\cs_new_nopar:Nn\pbs_pdfobj:nnn{
\tl_clear:N\l_pbs_usenum_tl
\tl_if_blank:oF{#1}{
- \tl_set:Nx\l_pbs_usenum_tl{useobjnum~\exp_after:wN \pbs_reftonum:w #1}
+ \tl_set:Nx\l_pbs_usenum_tl{useobjnum~\pbs_reftonum:n{#1}}
}
\bool_if:nTF{\tl_if_blank_p:o{#1}&&\tl_if_blank_p:o{#3}}{
\pdfobj~reserveobjnum
@@ -182,11 +195,16 @@
\immediate\pdfstartlink~user~{#1}#2\pdfendlink
}
- \cs_new_nopar:Nn\pbs_pdfxform:n{
- \immediate\pdfxform~resources~{\the\pdfpageresources}~#1
+ \cs_new_nopar:Nn\pbs_pdfxform:nn{
+ \int_compare:nT{#1>\c_zero}{\immediate}
+ \pdfxform~resources~{\the\pdfpageresources}~#2
\tl_gset:Nx\g_pbs_pdflastxform_tl{\int_use:c{pdflastxform}~0~R}
}
+ \cs_new:Nn\pbs_pdfrefxform:n{% #1: xform obj ID
+ \begin{picture}(0,0)\put(0,0){\pdfrefxform\pbs_reftonum:n{#1}}\end{picture}
+ }
+
\cs_new_nopar:Nn\pbs_pdfximage:n{
\filename@parse{#1}
\tl_set:Nx\l_pbs_ext_tl{\tl_lower_case:n{\filename@ext}}
@@ -206,6 +224,12 @@
}
}
+ \cs_new_nopar:Nn\pbs_pdfrefximage:n{% #1: xform obj ID
+ \hbox_overlap_right:n{
+ \vbox_to_zero:n{\vss\pdfrefximage\pbs_reftonum:n{#1}}
+ }
+ }
+
\cs_new_nopar:Nn\pbs_pdfcatalog:n{\pdfcatalog{#1}}
\int_new:N\g_pbs_oc_int % object ID for marked content Properties
@@ -291,33 +315,39 @@
\special{pdf:bann~<<#1>>}#2\special{pdf:eann}
}
- \cs_new_nopar:Nn\pbs_pdfxform:n{
- \special{pdf:bxobj~@pbs@obj\int_use:N\g_pbs_obj_int\space
- width\space \dim_use:N\box_wd:N#1\space
- height\space\dim_use:N\box_ht:N#1\space
- depth\space \dim_use:N\box_dp:N#1
- }
- \begin{picture}(0,0)\put(0,0){\box_use:N #1}\end{picture}
- \bool_if:NT\g_pbs_pgfloaded_bool{ % transparency et al. for PGF
- \tl_set:Nn\l_pbs_temp_tl{}
- \ifpgf@sys@pdf@extgs@exists
- \tl_set:Nn\l_pbs_temp_tl{/ExtGState~@pgfextgs}
- \fi
- \ifpgf@sys@pdf@patterns@exists
- \tl_put_right:Nn\l_pbs_temp_tl{/Pattern~@pgfpatterns}
- \fi
- \ifpgf@sys@pdf@colorspaces@exists
- \tl_put_right:Nn\l_pbs_temp_tl{/ColorSpace~@pgfcolorspaces}
- \fi
- \tl_if_blank:VF\l_pbs_temp_tl{
- \special{pdf:put~@resources~<<\l_pbs_temp_tl>>}
+ \cs_new_nopar:Nn\pbs_pdfxform:nn{
+ \begin{picture}(0,0)
+ \put(0,0){
+ \special{pdf:bxobj~@pbs@obj\int_use:N\g_pbs_obj_int\space
+ width\space \dim_use:N\box_wd:N#2\space
+ height\space\dim_use:N\box_ht:N#2\space
+ depth\space \dim_use:N\box_dp:N#2
+ }
+ \box_use:N#2
+ \bool_if:NT\g_pbs_pgfloaded_bool{ % transparency et al. for PGF
+ \tl_set:Nn\l_pbs_temp_tl{}
+ \ifpgf@sys@pdf@extgs@exists
+ \tl_set:Nn\l_pbs_temp_tl{/ExtGState~@pgfextgs}
+ \fi
+ \ifpgf@sys@pdf@patterns@exists
+ \tl_put_right:Nn\l_pbs_temp_tl{/Pattern~@pgfpatterns}
+ \fi
+ \ifpgf@sys@pdf@colorspaces@exists
+ \tl_put_right:Nn\l_pbs_temp_tl{/ColorSpace~@pgfcolorspaces}
+ \fi
+ \tl_if_blank:VF\l_pbs_temp_tl{
+ \special{pdf:put~@resources~<<\l_pbs_temp_tl>>}
+ }
+ }
+ \special{pdf:exobj}
}
- }
- \special{pdf:exobj}
+ \end{picture}
\tl_gset:Nx\g_pbs_pdflastxform_tl{@pbs@obj\int_use:N\g_pbs_obj_int}
\int_gincr:N\g_pbs_obj_int
}
+ \cs_new_nopar:Nn\pbs_pdfrefxform:n{\special{pdf:uxobj~#1}}% #1: xform obj ID
+
\cs_new_nopar:Nn\pbs_pdfximage:n{
\filename@parse{#1}
\tl_set:Nx\l_pbs_ext_tl{\tl_lower_case:n{\filename@ext}}
@@ -338,6 +368,8 @@
}
}
+ \cs_gset_eq:NN\pbs_pdfrefximage:n\pbs_pdfrefxform:n
+
\cs_new_nopar:Nn\pbs_pdfcatalog:n{\special{pdf:put~@catalog~<<#1>>}}
\int_new:N\g_pbs_oc_int % object ID
@@ -511,43 +543,49 @@
}
}
- \cs_new_nopar:Nn\pbs_pdfxform:n{
- %mark bbox of box#1
- \hbox_set:Nn\l_tmpa_box{
- \box_move_down:nn{\box_dp:N #1}{
- \hbox_to_zero:n{
- \special{ps:~currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def}
+ \cs_new_nopar:Nn\pbs_pdfxform:nn{
+ %mark bbox of box#2
+ \group_begin:
+ \dim_set:Nn\unitlength{1pt}
+ \begin{picture}(0,0)
+ %mark BBox of the graphics
+ \put(0,-\dim_to_decimal:n{\box_dp:N#2}){
+ \special{ps:
+ currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def~
}
}
- \skip_horizontal:n{\box_wd:N #1}
- \box_move_up:nn{\box_ht:N #1}{
- \hbox_to_zero:n{
- \special{ps:~currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def}
+ \put(
+ \dim_to_decimal:n{\box_wd:N#2},
+ \dim_to_decimal:n{\box_ht:N#2}
+ ){
+ \special{ps:
+ currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def~
}
}
- }
- \box_set_wd:Nn\l_tmpa_box{\c_zero_dim}
- \box_set_ht:Nn\l_tmpa_box{\c_zero_dim}
- \box_set_dp:Nn\l_tmpa_box{\c_zero_dim}
- \box_use_clear:N\l_tmpa_box
- %define some length values in current PS coordinate units
- \hbox_set:Nn\l_tmpa_box{
- \special{ps:~currentpoint~/origin@y~exch~def~/origin@x~exch~def}
- \skip_horizontal:n{72.27pt}
- \box_move_up:nn{72.27pt}{
- \hbox_to_zero:n{
- \special{ps:~
- currentpoint~origin@y~exch~sub~/one@inch@y~exch~def~
- origin@x~sub~/one@inch@x~exch~def
- }
+ %define some length values in current PS coordinate units
+ \put(0,0){
+ \special{ps:
+ currentpoint~/origin@y~exch~def~/origin@x~exch~def~
+ }
+ }
+ \dim_set:Nn\unitlength{1in}
+ \put(1,1){
+ \special{ps:
+ currentpoint~origin@y~exch~sub~/one@inch@y~exch~def~
+ origin@x~sub~/one@inch@x~exch~def~
}
}
+ \end{picture}
+ \group_end:
+ \tl_gset:cx{origin:{pbs@obj\int_use:N\g_pbs_obj_int}}{
+ origin@pbs@\int_use:N\g_pbs_obj_int
}
- \box_set_wd:Nn\l_tmpa_box{\c_zero_dim}
- \box_set_ht:Nn\l_tmpa_box{\c_zero_dim}
- \box_use_clear:N\l_tmpa_box
\special{ps:~
gsave~
+ %keep a record of lower left corner coordinates
+ true~setglobal~globaldict~
+ /origin@pbs@\int_use:N\g_pbs_obj_int~[currentpoint]~cvx~put~
+ false~setglobal~
%translate graphics to upper left page corner
\bool_if:NF\g_pbs_powerdot_bool{
{
@@ -560,33 +598,46 @@
/_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}
/BBox~[pbs@llx~pbs@lly~pbs@urx~pbs@ury]
/BP~pdfmark~
- {
- isls{%landscape mode (powerdot, geometry /w landscape option)
- /pbs@dxdy~{
- pbs@urx~pbs@llx~sub~abs~
- pbs@ury~pbs@lly~sub~abs~div
- }~bind~def
- /pbs@dydx~{1~pbs@dxdy~div}~bind~def
- /pbs@cx~{pbs@urx~pbs@llx~add~2~div}~bind~def
- /pbs@cy~{pbs@ury~pbs@lly~add~2~div}~bind~def
- % graphics needs to be rescaled for some reason ...
- [pbs@dxdy~0~0~pbs@dydx~1~pbs@dxdy~sub~pbs@cx~mul~
- 1~pbs@dydx~sub~pbs@cy~mul]~concat
- %... rotated by 270 degrees ...
- [0~-1~1~0~pbs@cx~pbs@cy~sub~pbs@cx~pbs@cy~add]~concat
- %... and flipped around vertical axis
- [-1~0~0~1~pbs@llx~pbs@urx~add~0]~concat
- }{% flip around horizontal axis in portrait mode
- [1~0~0~-1~0~pbs@lly~pbs@ury~add]~concat
- }ifelse
- }?pdfmark~
+ % operations needed if used as annotation appearance
+ \int_compare:nT{#1>\c_zero}{
+ {
+ isls{%landscape mode (powerdot, geometry /w landscape option)
+ /pbs@dxdy~{
+ pbs@urx~pbs@llx~sub~abs~
+ pbs@ury~pbs@lly~sub~abs~div
+ }~bind~def
+ /pbs@dydx~{1~pbs@dxdy~div}~bind~def
+ /pbs@cx~{pbs@urx~pbs@llx~add~2~div}~bind~def
+ /pbs@cy~{pbs@ury~pbs@lly~add~2~div}~bind~def
+ % graphics needs to be rescaled for some reason ...
+ [pbs@dxdy~0~0~pbs@dydx~1~pbs@dxdy~sub~pbs@cx~mul~
+ 1~pbs@dydx~sub~pbs@cy~mul]~concat
+ %... rotated by 270 degrees ...
+ [0~-1~1~0~pbs@cx~pbs@cy~sub~pbs@cx~pbs@cy~add]~concat
+ %... and flipped around vertical axis
+ [-1~0~0~1~pbs@llx~pbs@urx~add~0]~concat
+ }{% flip around horizontal axis in portrait mode
+ [1~0~0~-1~0~pbs@lly~pbs@ury~add]~concat
+ }ifelse
+ }?pdfmark~
+ }
}
- \begin{picture}(0,0)\put(0,0){\box_use:N #1}\end{picture}
+ \begin{picture}(0,0)\put(0,0){\box_use:N#2}\end{picture}
\special{ps:~mark~/EP~pdfmark~grestore}
\tl_gset:Nx\g_pbs_pdflastxform_tl{{pbs@obj\int_use:N\g_pbs_obj_int}}
\int_gincr:N\g_pbs_obj_int
}
+ \cs_new_nopar:Nn\pbs_pdfrefxform:n{% #1: xform obj ID
+ \special{ps:~
+ gsave~
+ currentpoint~pop~\tl_use:c{origin:#1}~pop~sub~
+ currentpoint~exch~pop~\tl_use:c{origin:#1}~exch~pop~sub~translate~
+ mark~#1~/SP~pdfmark~
+ grestore~
+ }
+ }
+
\cs_new_nopar:Nn\pbs_pdfximage:n{
\filename@parse{#1}
\tl_set:Nx\l_pbs_ext_tl{\tl_lower_case:n{\filename@ext}}
@@ -612,6 +663,15 @@
}
}
+ \cs_new_nopar:Nn\pbs_pdfrefximage:n{% #1: ximage obj ID
+ %not implemented; how to insert an image XObject with pdfmarks?
+ %\special{ps:~
+ % gsave~
+ % mark~#1~/SP~pdfmark~
+ % grestore~
+ %}
+ }
+
\cs_new_nopar:Nn\pbs_pdfcatalog:n{
\special{ps:~mark~{Catalog}~<<#1>>~/PUT~pdfmark}
}