From cffdb1fe27f760b0db26ceb41316473593e4851e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 21 Mar 2020 21:20:07 +0000 Subject: media9 (21mar20) git-svn-id: svn://tug.org/texlive/trunk@54453 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/media9/media9.sty | 4 +-- Master/texmf-dist/tex/latex/media9/pdfbase.sty | 37 +++++++++++++++----------- 2 files changed, 23 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist/tex/latex/media9') diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty index 0126bcbc21b..d179c794f94 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/03/04} -\def\g@mix@version@tl{1.06} +\def\g@mix@date@tl{2020/03/20} +\def\g@mix@version@tl{1.07} \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 f03a11ac24d..6281a190c4b 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/03/04} -\def\g@pbs@version@tl{0.37} +\def\g@pbs@date@tl{2020/03/20} +\def\g@pbs@version@tl{0.38} \ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl} {driver independent access to low-level PDF features} @@ -334,8 +334,8 @@ \cs_new_nopar:Npn\_pbs_reftonum:w #1~0~R{#1} %literal PDF code into content stream, no saving of graphics state - \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or `page' - \str_case:nnF{#1}{ % #2: raw PDF + \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or + \str_case:nnF{#1}{ % #2: raw PDF `page' % `direct' inserts raw pdf code without translating origin (0,0) to % current position: origin is lower left page corner {direct}{\pdfliteral~direct~{#2}} @@ -539,16 +539,20 @@ } %literal PDF code into content stream; open text objects are always closed - \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or `page' - \str_if_eq:nnTF{#1}{}{ % #2: raw PDF - % set current location's coordinates to (0,0), while saving graphics + \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or + \str_case:nnF{#1}{ % #2: raw PDF `page' + % `pdf:code' inserts raw pdf code without translating origin (0,0) to + % the current position. Unlike pdftex, origin is (+72bp,-72bp) from the + % upper left page corner. In analogy to pdftex, newer dvipdfmx versions + % also provide `pdf:direct:' and `pdf:page:', but actually, both are + % just aliases for `pdf:code'. + {direct}{\special{pdf:code~#2}} + {page}{\special{pdf:code~#2}} + }{ + % sets current location's coordinates to (0,0), while saving graphics % state before and re-instating after insertion (this is different from % \pdfliteral{...} \special{pdf:content~#2} - }{ - % `direct' works the same as `page': no origin translation, - % no gs saving, but closing open text objects - \special{pdf:code~#2} } } @@ -708,8 +712,8 @@ \bool_if:NTF\g_pbs_dvisvgm_bool{ \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 `page' - \str_if_eq:nnTF{#1}{}{ % #2: raw Postscript + \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or + \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 @@ -747,7 +751,7 @@ \raisebox{\c_zero_dim}[\c_zero_dim][\c_zero_dim]{ \special{dvisvgm:raw~{?nl}{?nl} < - g~transform='translate(-{?x},-{?y})'~#4~ + g~transform='scale(-1)translate({?x},{?y})scale(-1)'~#4~ id='pbs@obj\int_use:N\g_pbs_obj_int'~class='xform' > } @@ -796,6 +800,7 @@ \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 @@ -835,8 +840,8 @@ } %insert literal Postscript code - \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or `page' - \str_if_eq:nnTF{#1}{}{ % #2: raw Postscript + \cs_new_protected_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or + \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 -- cgit v1.2.3