From c481150d3ae193500b45a1ff37f38fc2a7ab998f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Sep 2017 20:38:39 +0000 Subject: media9 (29sep17) git-svn-id: svn://tug.org/texlive/trunk@45432 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/media9/ChangeLog | 6 ++ Master/texmf-dist/doc/latex/media9/README.md | 2 +- Master/texmf-dist/doc/latex/media9/media9.pdf | Bin 4544997 -> 3857800 bytes Master/texmf-dist/source/latex/media9/media9.tex | 2 +- .../tex/latex/media9/javascript/3Dmenu.js | 2 +- .../tex/latex/media9/javascript/3Dspintool.js | 2 +- .../tex/latex/media9/javascript/animation.js | 2 +- .../tex/latex/media9/javascript/asylabels.js | 2 +- Master/texmf-dist/tex/latex/media9/media9.sty | 10 +-- Master/texmf-dist/tex/latex/media9/pdfbase.sty | 78 ++++++++++++++++++--- 10 files changed, 86 insertions(+), 20 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog index aab571bdabe..d5ea6c27577 100644 --- a/Master/texmf-dist/doc/latex/media9/ChangeLog +++ b/Master/texmf-dist/doc/latex/media9/ChangeLog @@ -1,3 +1,9 @@ +2017-09-29 + * v0.86 : media9.sty + * v0.18 : pdfbase.sty + * fix : pdfbase.sty: improving \pbs_pdfxform:nnnnn for dvips + * new: pdfbase.sty: \pbs_literal:nn (raw PDF/Postscript insertion) + 2017-08-25 * v0.85 : media9.sty * v0.17 : pdfbase.sty diff --git a/Master/texmf-dist/doc/latex/media9/README.md b/Master/texmf-dist/doc/latex/media9/README.md index 5afc54c2a98..30125741bdc 100644 --- a/Master/texmf-dist/doc/latex/media9/README.md +++ b/Master/texmf-dist/doc/latex/media9/README.md @@ -44,4 +44,4 @@ For updating the package, repeat the steps given above. ## License -This material is subject to the [LaTeX Project Public License](http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt). +This material is subject to the [LaTeX Project Public License](http://mirrors.ctan.org/macros/latex/base/lppl.txt). diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf index 9a466bf25b0..8205b00bd08 100644 Binary files a/Master/texmf-dist/doc/latex/media9/media9.pdf and b/Master/texmf-dist/doc/latex/media9/media9.pdf differ diff --git a/Master/texmf-dist/source/latex/media9/media9.tex b/Master/texmf-dist/source/latex/media9/media9.tex index d2e30555825..319b7e34b9b 100644 --- a/Master/texmf-dist/source/latex/media9/media9.tex +++ b/Master/texmf-dist/source/latex/media9/media9.tex @@ -1,7 +1,7 @@ % Copyright 2012--\today Alexander Grahn % % This material is subject to the LaTeX Project Public License. See -% http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +% http://mirrors.ctan.org/macros/latex/base/lppl.txt % for the details of that license. % \pdfcompresslevel=0 diff --git a/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js b/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js index 5cd1893cba9..9037d040dd3 100644 --- a/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js +++ b/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js @@ -44,7 +44,7 @@ // conditions of the LaTeX Project Public License. // // The latest version of this license is in -// http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +// http://mirrors.ctan.org/macros/latex/base/lppl.txt // // This work has the LPPL maintenance status `maintained'. // diff --git a/Master/texmf-dist/tex/latex/media9/javascript/3Dspintool.js b/Master/texmf-dist/tex/latex/media9/javascript/3Dspintool.js index 46001890e19..529288ad0ce 100644 --- a/Master/texmf-dist/tex/latex/media9/javascript/3Dspintool.js +++ b/Master/texmf-dist/tex/latex/media9/javascript/3Dspintool.js @@ -18,7 +18,7 @@ // conditions of the LaTeX Project Public License. // // The latest version of this license is in -// http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +// http://mirrors.ctan.org/macros/latex/base/lppl.txt // // This work has the LPPL maintenance status `maintained'. // diff --git a/Master/texmf-dist/tex/latex/media9/javascript/animation.js b/Master/texmf-dist/tex/latex/media9/javascript/animation.js index a5b423bf1bf..4f202c4e7d3 100644 --- a/Master/texmf-dist/tex/latex/media9/javascript/animation.js +++ b/Master/texmf-dist/tex/latex/media9/javascript/animation.js @@ -23,7 +23,7 @@ var palindrome = true; // true --> play forth and back // conditions of the LaTeX Project Public License. // // The latest version of this license is in -// http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +// http://mirrors.ctan.org/macros/latex/base/lppl.txt // // This work has the LPPL maintenance status `maintained'. // diff --git a/Master/texmf-dist/tex/latex/media9/javascript/asylabels.js b/Master/texmf-dist/tex/latex/media9/javascript/asylabels.js index 0c231938952..95f1c3c3d1c 100644 --- a/Master/texmf-dist/tex/latex/media9/javascript/asylabels.js +++ b/Master/texmf-dist/tex/latex/media9/javascript/asylabels.js @@ -19,7 +19,7 @@ // conditions of the LaTeX Project Public License. // // The latest version of this license is in -// http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +// http://mirrors.ctan.org/macros/latex/base/lppl.txt // // This work has the LPPL maintenance status `maintained'. // diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty index b4794540b8b..2f1c9e3f621 100644 --- a/Master/texmf-dist/tex/latex/media9/media9.sty +++ b/Master/texmf-dist/tex/latex/media9/media9.sty @@ -26,7 +26,7 @@ % conditions of the LaTeX Project Public License. % % The latest version of this license is in -% http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +% http://mirrors.ctan.org/macros/latex/base/lppl.txt % % This work has the LPPL maintenance status `maintained'. % @@ -37,8 +37,8 @@ \RequirePackage{xparse} \RequirePackage{atbegshi} -\def\g@mix@date@tl{2017/08/25} -\def\g@mix@version@tl{0.85} +\def\g@mix@date@tl{2017/09/29} +\def\g@mix@version@tl{0.86} \def\g@mix@liiikerneldate{2017/05/29} \def\g@mix@liiipkgdate{2017/05/29} @@ -812,7 +812,7 @@ \mix@btn@dim=\dimexpr\baselineskip*3\relax% \ifdim#1<\mix@btn@dim\mix@btn@dim=#1\fi% \ifdim#2<\mix@btn@dim\mix@btn@dim=#2\fi% - \tikz[x=\mix@btn@dim,y=\mix@btn@dim,transparency group]{% + \tikz[x=\mix@btn@dim,y=\mix@btn@dim]{% \shade [opacity=\ifdim#2>\dimexpr\baselineskip*6\relax0.6\else0\fi, shading angle=-180,even odd rule] (-\dimexpr#1/2\relax,-0.5) rectangle (\dimexpr#1/2\relax,0.5) @@ -841,7 +841,7 @@ \mix@btn@dim=\dimexpr\baselineskip*3\relax% \ifdim#1<\mix@btn@dim\mix@btn@dim=#1\fi% \ifdim#2<\mix@btn@dim\mix@btn@dim=#2\fi% - \tikz[x=\mix@btn@dim,y=\mix@btn@dim,transparency group]{% + \tikz[x=\mix@btn@dim,y=\mix@btn@dim]{% \fill [opacity=\ifdim#2>\dimexpr\baselineskip*6\relax0.5\else0\fi, color=gray,even odd rule] (-\dimexpr#1/2\relax,-0.5) rectangle (\dimexpr#1/2\relax,0.5); diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty index e3292be7f35..9643557cd05 100644 --- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty +++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty @@ -97,6 +97,15 @@ % % -------- % +% \pbs_literal:nn +% #1: keyword (empty) | direct | page +% #2: raw PDF/Postscript code +% implements \pdfliteral{...}, \pdfliteral page {...}, +% \pdfliteral page {...} from pdfTeX, and +% \special{" ...} and \special{ps: ...} from dvips +% +% -------- +% % \pbs_pdfcatalog:n % #1: dictionary (key-value) % @@ -119,7 +128,7 @@ % conditions of the LaTeX Project Public License. % % The latest version of this license is in -% http://mirrors.ctan.org/tex-archive/macros/latex/base/lppl.txt +% http://mirrors.ctan.org/macros/latex/base/lppl.txt % % This work has the LPPL maintenance status `maintained'. % @@ -128,8 +137,8 @@ \RequirePackage{expl3} \RequirePackage{l3keys2e} -\def\g@pbs@date@tl{2017/08/25} -\def\g@pbs@version@tl{0.17} +\def\g@pbs@date@tl{2017/09/29} +\def\g@pbs@version@tl{0.18} \ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl} {driver independent access to low-level PDF features} @@ -277,6 +286,21 @@ \cs_generate_variant:Nn\_pbs_reftonum:n{f} \cs_new_nopar:Npn\_pbs_reftonum:w #1~0~R{#1} + %literal PDF code into content stream, no saving of graphics state + \cs_new_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or `page' + \str_case:nnF{#1}{ % #2: raw PDF + % `direct' inserts raw pdf code without translating origin (0,0) to + % current position: origin is lower left page corner + {direct}{\pdfliteral~direct~{#2}} + % same as above, but closing text object if necessary + {page}{\pdfliteral~page~{#2}} + }{ + % closing text object if necessary and setting current + % location's coordinates to (0,0) + \pdfliteral{#2} + } + } + \cs_new_nopar:Nn\pbs_pdfobj:nnn{ \tl_clear:N\l_pbs_usenum_tl \tl_if_blank:oF{#1}{ @@ -431,6 +455,20 @@ %suppress any annotation growth through (x)dvipdfmx option/config var `g' \AtBeginDocument{\special{dvipdfmx:config~g~0}} + %literal PDF code into content stream; open text objects are always closed + \cs_new_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 + % 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} + } + } + \cs_new_nopar:Nn\pbs_pdfobj:nnn{ \tl_if_blank:oTF{#1}{ \tl_set:Nx\l_pbs_usenum_tl{@pbs@obj\int_use:N\g_pbs_obj_int} @@ -573,7 +611,7 @@ /Properties~<>>>} \int_gincr:N\g_pbs_oc_int } - \cs_new_nopar:Nn\pbs_pdfemc:{\special{pdf:~code~EMC}} + \cs_new_nopar:Nn\pbs_pdfemc:{\special{pdf:code~EMC}} }{ %dvips \bool_new:N\g_pbs_powerdot_bool %to cope with some powerdot oddity @@ -620,6 +658,20 @@ } } + %insert literal Postscript code + \cs_new_nopar:Nn\pbs_literal:nn{ % #1: empty (`'), `direct' or `page' + \str_if_eq:nnTF{#1}{}{ % #2: raw Postscript + % 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 + \special{"~#2} + }{ + % `direct' does the same as `page': no origin translation, + % no gs saving + \special{ps::~#2} + } + } + \cs_new_nopar:Nn\pbs_pdfobj:nnn{ \tl_clear:N\l_pbs_usenum_tl \tl_if_blank:oTF{#1}{ @@ -798,6 +850,8 @@ } \end{picture} \group_end: + %additional dict entries + \tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl \special{ps:~ gsave~ currentpoint~/pbs@cury~exch~def~/pbs@curx~exch~def~ @@ -816,6 +870,10 @@ pbs@llx~pbs@curx~sub~pbs@lly~pbs@cury~sub~ pbs@urx~pbs@curx~sub~pbs@ury~pbs@cury~sub ] + %insert additional dict entries (the Distiller way) + \str_if_eq_x:nnF{\l_tmpa_tl}{}{ + product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse + } /BP~pdfmark~grestore~ \int_compare:nT{#2>\c_zero}{ %operations needed if used as annotation appearance @@ -843,12 +901,14 @@ } \begin{picture}(0,0)\put(0,0){\box_use:N#5}\end{picture} \special{ps:~mark~/EP~pdfmark~grestore} - %additional dict entries - \tl_set:Nx\l_tmpa_tl{#4} - \tl_trim_spaces:N\l_tmpa_tl + %insert additional dict entries (the Ghostscript way) \str_if_eq_x:nnF{\l_tmpa_tl}{}{ - \special{ps:~mark~{pbs@obj\int_use:N\g_pbs_obj_int}~<<\l_tmpa_tl>>~ - /PUT~pdfmark} + \special{ps:~ + product~(Ghostscript)~search~{ + pop~pop~pop~ + mark~{pbs@obj\int_use:N\g_pbs_obj_int}~<<\l_tmpa_tl>>~/PUT~pdfmark + }{pop}ifelse + } } \tl_gset:Nx\g_pbs_pdflastxform_tl{{pbs@obj\int_use:N\g_pbs_obj_int}} \int_gincr:N\g_pbs_obj_int -- cgit v1.2.3