summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-10 21:20:40 +0000
committerKarl Berry <karl@freefriends.org>2020-09-10 21:20:40 +0000
commita1a059cb41146cfca1bb356bff185d946800c274 (patch)
tree3621e1043eb9130aa4853c1a1e97f45af4d59956 /Master
parent2b8b526890bb09e1516dca649f855a945ee2875b (diff)
media9 (10sep20)
git-svn-id: svn://tug.org/texlive/trunk@56312 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog7
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin3735778 -> 3737571 bytes
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty4
-rw-r--r--Master/texmf-dist/tex/latex/media9/pdfbase.sty137
4 files changed, 78 insertions, 70 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index 953a714fc07..be1f65e01d9 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,4 +1,9 @@
-2020-05-06
+2020-09-10
+ * v1.13 : media9.sty
+ * v0.44 : pdfbase.sty
+ * fix : pdfbase.sty: improvements for producing xforms
+
+2020-07-08
* v1.12 : media9.sty
* v0.43 : pdfbase.sty
* fix : pdfbase.sty: \pbs_pdfxform:nnnnn (dvips version) missing `newpath'
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 5b378b67810..93b95df1933 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 610ff93c53a..4deae7f5197 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -37,8 +37,8 @@
\RequirePackage{xparse}
\RequirePackage{atbegshi}
-\def\g@mix@date@tl{2020/07/08}
-\def\g@mix@version@tl{1.12}
+\def\g@mix@date@tl{2020/09/10}
+\def\g@mix@version@tl{1.13}
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
{acrobat-9/X compatible media}
diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
index 9da881bd6d3..6e86b60bf8f 100644
--- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty
+++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
@@ -159,8 +159,8 @@
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2020/07/08}
-\def\g@pbs@version@tl{0.43}
+\def\g@pbs@date@tl{2020/09/10}
+\def\g@pbs@version@tl{0.44}
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
{driver independent access to low-level PDF features}
@@ -429,7 +429,10 @@
}
\cs_new_protected_nopar:Nn\pbs_pdfrefxform:n{% #1: xform obj ID
- \hbox_overlap_right:n{\smash{\pdfrefxform\pbs_reftonum:n{#1}}}
+ \hbox_set:Nn\l_tmpa_box{\pdfrefxform\pbs_reftonum:n{#1}}
+ \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_drop:N\l_tmpa_box
}
\cs_new_protected_nopar:Nn\pbs_pdfximage:n{
@@ -638,8 +641,8 @@
}
\cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #2 not used
- \begin{picture}(0,0)
- \put(0,0){
+ \group_begin:
+ \hbox_set:Nn\l_tmpa_box{
\special{pdf:bxobj~@pbs@obj\int_use:N\g_pbs_obj_int\space
width~\dim_eval:n{\box_wd:N#5}~
height~\space\dim_eval:n{\box_ht:N#5}~
@@ -671,7 +674,10 @@
\str_if_eq:eeF{\l_tmpa_tl}{}{<<\l_tmpa_tl>>}
}
}
- \end{picture}
+ \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_drop:N\l_tmpa_box
+ \group_end:
\tl_gset:Nx\g_pbs_pdflastxform_tl{@pbs@obj\int_use:N\g_pbs_obj_int}
\int_gincr:N\g_pbs_obj_int
}
@@ -712,7 +718,7 @@
\tl_gset:Nx\g_pbs_hash_tl{\token_to_str:N#}
%insert literal Postscript code
\cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or
- \str_if_eq:nnTF{#1}{}{ % #2: raw Postscript `page'
+ \str_if_eq:nnTF{#1}{}{ % #2: raw Postscript | `page'
% set current location's coordinates to (0,0) and set unit vectors to
% 1bp right and 1bp upwards; graphics state is saved before and
% re-instated after insertion
@@ -726,28 +732,34 @@
\cs_new_protected_nopar:Nn\pbs_pdfannot:nnnn{
\special{dvisvgm:raw~{?nl}<path~d=}
- \group_begin:\dim_set:Nn\unitlength{1pt}
- \begin{picture}(0,0)% mark annotation rectangle
- \put(0,-\dim_to_decimal:n{#3}){% ll
- \special{dvisvgm:raw~'M{?x}~{?y}}
- }
- \put(\dim_to_decimal:n{#1},-\dim_to_decimal:n{#3}){% lr
- \special{dvisvgm:raw~{?nl}L{?x}~{?y}}
- }
- \put(\dim_to_decimal:n{#1},\dim_to_decimal:n{#2}){% ur
- \special{dvisvgm:raw~{?nl}L{?x}~{?y}}
- }
- \put(0,\dim_to_decimal:n{#2}){% ul
- \special{dvisvgm:raw~{?nl}L{?x}~{?y}~Z'}
+ \group_begin:
+ \hbox_set:Nn\l_tmpa_box{
+ \box_move_down:nn{#3}{\hbox_to_zero:n{% ll
+ \special{dvisvgm:raw~'M{?x}~{?y}}
+ }}
+ \hbox_to_zero:n{
+ \skip_horizontal:n{#1}
+ \box_move_down:nn{#3}{\hbox_to_zero:n{% lr
+ \special{dvisvgm:raw~L{?x}~{?y}}
+ }}
+ \box_move_up:nn{#2}{\hbox_to_zero:n{% ur
+ \special{dvisvgm:raw~L{?x}~{?y}}
+ }}\hss
+ }
+ \box_move_up:nn{#2}{\hbox_to_zero:n{% ul
+ \special{dvisvgm:raw~L{?x}~{?y}Z'}
+ }}
}
- \end{picture}
+ \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_drop:N\l_tmpa_box
\group_end:
\special{dvisvgm:raw~{?nl}opacity='0'~#4~class='annot'/>}
}
\cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{
- \makebox[\c_zero_dim][l]{
- \raisebox{\c_zero_dim}[\c_zero_dim][\c_zero_dim]{
+ \group_begin:
+ \hbox_set:Nn\l_tmpa_box{
\special{dvisvgm:raw~{?nl}<defs>{?nl}
<g~
transform='translate({?(-(x))},{?(-(y))})'~#4~
@@ -759,7 +771,10 @@
\special{dvisvgm:bbox~unlock}
\special{dvisvgm:raw~{?nl}</g>{?nl}</defs>}
}
- }
+ \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_drop:N\l_tmpa_box
+ \group_end:
\tl_gset:Nx\g_pbs_pdflastxform_tl{
\g_pbs_hash_tl pbs@obj\int_use:N\g_pbs_obj_int}
\int_gincr:N\g_pbs_obj_int
@@ -795,9 +810,6 @@
}
}
\special{!~
- %keeping track of xform nesting level
- true~setglobal~globaldict~/pbs@xform@level~0~put~false~setglobal
- %
%back-transforms user coords to page coords (bigpoints with reference
%point [0,0] in the bottom-left page corner)
% user_x user_y pbs@user2page --> page_x page_y
@@ -944,15 +956,21 @@
\cs_new_protected_nopar:Nn\pbs_pdfannot:nnnn{
\group_begin:
- \dim_set:Nn\unitlength{1pt}
- \begin{picture}(0,0)% mark annotation rectangle
- \put(0,-\dim_to_decimal:n{#3}){
- \pbs_special:n{currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def}
- }
- \put(\dim_to_decimal:n{#1},\dim_to_decimal:n{#2}){
- \pbs_special:n{currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def}
+ % mark annotation rectangle
+ \hbox_set:Nn\l_tmpa_box{
+ % lower left
+ \box_move_down:nn{#3}{\hbox_to_zero:n{\pbs_special:n{
+ currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def
+ }}}
+ \skip_horizontal:n{#1}
+ % upper right
+ \box_move_up:nn{#2}{\hbox_to_zero:n{\pbs_special:n{
+ currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def
+ }}}
}
- \end{picture}
+ \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_drop:N\l_tmpa_box
\group_end:
\str_if_eq:eeF{#4}{}{
\pbs_special:n{
@@ -1086,15 +1104,7 @@
}
\cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources
- %this allows nesting \pbs_pdfxform:nnnnn{...} % are managed
- \pbs_special:n{ % automaticlly)
- gsave~
- pbs@xform@level~0~eq~{/pbs@ctm@0~matrix~currentmatrix~def}~if~
- pbs@ctm@0~setmatrix~
- true~setglobal~
- globaldict~/pbs@xform@level~pbs@xform@level~1~add~put~
- false~setglobal
- }
+ % are managed automatically)
%rescale box to fit within the papersize while distilling
\tl_gset:cx{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0,
\dim_ratio:nn{\paperwidth}{\box_wd:N#5},
@@ -1107,22 +1117,20 @@
}
\group_begin:
%mark bbox of box#5
- \dim_set:Nn\unitlength{1pt}
- \begin{picture}(0,0)
- \put(0,-\dim_to_decimal:n{\box_dp:N#5}){
- \pbs_special:n{
+ \hbox_set:Nn\l_tmpa_box{
+ % lower left
+ \box_move_down:nn{\box_dp:N#5}{\hbox_to_zero:n{\pbs_special:n{
currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def
- }
- }
- \put(
- \dim_to_decimal:n{\box_wd:N#5},
- \dim_to_decimal:n{\box_ht:N#5}
- ){
- \pbs_special:n{
+ }}}
+ \skip_horizontal:n{\box_wd:N#5}
+ % upper right
+ \box_move_up:nn{\box_ht:N#5}{\hbox_to_zero:n{\pbs_special:n{
currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def
- }
+ }}}
}
- \end{picture}
+ \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_drop:N\l_tmpa_box
\group_end:
%additional dict entries
\tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl
@@ -1176,7 +1184,9 @@
}?pdfmark
}
}
- \begin{picture}(0,0)\put(0,0){\box_use:N#5}\end{picture}
+ \box_set_wd:Nn#5{\c_zero_dim}
+ \box_set_ht:Nn#5{\c_zero_dim}
+ \box_set_dp:Nn#5{\c_zero_dim}\box_use_drop:N#5
\pbs_special:n{~mark~/EP~pdfmark~grestore}
%insert additional dict entries (the Ghostscript way)
\str_if_eq:eeF{\l_tmpa_tl}{}{
@@ -1201,12 +1211,6 @@
}
}
}
- \pbs_special:n{
- true~setglobal~
- globaldict~/pbs@xform@level~pbs@xform@level~1~sub~put~
- false~setglobal~
- grestore
- }
}
\cs_new_protected_nopar:Nn\pbs_pdfrefxform:n{% #1: xform obj ID
@@ -1343,13 +1347,12 @@
% This can be fixed by placing a dumb (non-interactive) Widget dummy
% somewhere on the page.
\bool_if:NT\g_pbs_ocgbase_loaded_bool{
- \skip_horizontal:n{1bp}
- \box_move_down:nn{1bp}{\vbox:n{
+ \put(1,-1){
\pbs_pdfannot:nnnn{3bp}{\c_zero_dim}{3bp}{
/Ff~65537/FT/Btn/Subtype/Widget
/T~(pbs@ARFix@\int_use:N\g_pbs_page_int)
}
- }}
+ }
}
}
}