summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-17 21:36:06 +0000
committerKarl Berry <karl@freefriends.org>2017-03-17 21:36:06 +0000
commit3e61a137bdc5f0026fd9ea0c19646343410a3faf (patch)
treede9afbf25cd015574f7a97a997273019194eedec
parent9931cd650cfa196a601649b18c7651f109ca33bd (diff)
media9 (17may17)
git-svn-id: svn://tug.org/texlive/trunk@43529 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog5
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin3606767 -> 3829624 bytes
-rw-r--r--Master/texmf-dist/source/latex/media9/files/config.xml42
-rw-r--r--Master/texmf-dist/source/latex/media9/media9.tex16
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty18
-rw-r--r--Master/texmf-dist/tex/latex/media9/pdfbase.sty181
6 files changed, 169 insertions, 93 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index f142e3909b6..5bebd99c59f 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-16
+ * v0.77 : media9.sty
+ * v0.12 : pdfbase.sty
+ * fix: PDF annotation and Form XObject producing macros improved
+
2017-02-08
* v0.76 : media9.sty
* fix: error in the caption of Fig. 8, documentation `media9.pdf' rebuilt
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 3af59a59145..3e716a60bff 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/source/latex/media9/files/config.xml b/Master/texmf-dist/source/latex/media9/files/config.xml
index f79d28b9bb4..4a42d52fb40 100644
--- a/Master/texmf-dist/source/latex/media9/files/config.xml
+++ b/Master/texmf-dist/source/latex/media9/files/config.xml
@@ -3,45 +3,41 @@
<!--
Configuration file template for SlideShow.swf
- SlideShow.swf can display life and static PNG/JPEG/GIF image
- files from remote servers or residing on the same server as the
- app itself.
+ SlideShow.swf can display life and static PNG/JPEG/GIF image files from
+ remote servers or residing on the same server as the app itself.
- Pass this file to SlideShow.swf using the `xml=<configuration
- file>' FlashVar.
+ Pass this file to SlideShow.swf using the `xml=<configuration file>'
+ FlashVar.
- **NOTE**: For security reasons of Flash Player, the configuration
- file and SlideShow.swf must reside on the same web server or
- be both embedded into the PDF. Different web servers or the
- combination of web server location and embedding into the PDF
- throws a security error.
+ **NOTE**: For security reasons of Flash Player, the configuration file and
+ SlideShow.swf must reside on the same web server or be both embedded into
+ the PDF. Different web servers or the combination of web server location
+ and embedding into the PDF throws a security error.
- An image definition starts with <Img [attributes]> and ends
- with </Img>. All attributes in the opening <Img [attributes]>
- tag are optional:
+ An image definition starts with <Img [attributes]> and ends with </Img>.
+ All attributes in the opening <Img [attributes]> tag are optional:
live="<refresh interval in [s]>" for live remote image
rot90="<integer number>" initial rotation by number*90°
Inside an image definition, at least one <URL [attributes]>...</URL>
- element is required. The attributes are optional. More than one URL may
- be given to provide image files at various resolutions. The best one
- fitting within the current display size will be chosen dynamically.
- In the case of multiple URLs, the actual resolution of each image should
- be told using the
+ element is required. The attributes are optional. More than one URL may be
+ given to provide image files at various resolutions. The best one fitting
+ within the current display size will be chosen dynamically. In the case of
+ multiple URLs, the actual resolution of each image should be told using the
size="<width>x<height>"
attribute, which specifies the image file dimensions in pixels.
- Some servers generate bitmap graphics at arbitrary resolution upon
- request. In such cases, one or both of the attributes
+ Some servers generate bitmap graphics at arbitrary resolution upon request.
+ In such cases, one or both of the attributes
width="<width pattern>" height="<height pattern>"
- may be given in the opening URL tag. <width pattern> and <height
- pattern>, if present in the URL string, will be substituted with
- the current display dimensions.
+ may be given in the opening URL tag. <width pattern> and <height pattern>,
+ if present in the URL string, will be substituted with the current display
+ dimensions.
An image URL, given between <URL> and </URL>, can be absolute, that is,
starting with 'http://...', or relative to the location of SlideShow.swf.
diff --git a/Master/texmf-dist/source/latex/media9/media9.tex b/Master/texmf-dist/source/latex/media9/media9.tex
index 447e9ab9dae..8780849f110 100644
--- a/Master/texmf-dist/source/latex/media9/media9.tex
+++ b/Master/texmf-dist/source/latex/media9/media9.tex
@@ -4,8 +4,8 @@
% http://mirror.ctan.org/help/Catalogue/licenses.lppl.html
% for the details of that license.
%
-%\pdfcompresslevel=0
-%\pdfobjcompresslevel=0
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
\listfiles
\documentclass[a4paper]{article}
\frenchspacing
@@ -20,9 +20,13 @@
\usepackage[UKenglish]{babel}
\usepackage{graphicx}
\usepackage{color}
-\usepackage{lmodern}
-\usepackage{microtype}
\usepackage[T1]{fontenc}
+%\usepackage{lmodern}
+%\usepackage[scaled=0.85]{luximono}
+ \usepackage[tt=false]{libertine} %override beramono (doesn't look like tt font)
+ \usepackage[libertine]{newtxmath}
+% \usepackage[scaled=0.83]{luximono} %override beramono (doesn't look like tt font)
+\usepackage{microtype}
%\usepackage{float}
\usepackage{parskip}
\usepackage{tabls}
@@ -43,7 +47,6 @@
pagebordercolor={0 0 1},
urlbordercolor={0 0 1}
}
-\usepackage[scaled=0.85]{luximono}
%\usepackage{listings}
\usepackage{minted}
@@ -188,7 +191,8 @@ Except for `\verb+dvipdfmx+', `\verb+xetex+' and `\verb+bigfiles+', the options
\begin{animateinline}[autoplay,loop,nomouse]{1}\strut\emph{Important:}\newframe[3]\end{animateinline} If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
-Option `\verb+bigfiles+' is only relevant for the \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+ workflow. It may be needed if large media files cause \verb+latex+ to abort with error `\verb+TeX capacity exceeded+'. See Sect.\ \ref{bugs}.
+ Option `\verb+bigfiles+' is only relevant for the \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+ workflow. It may be needed if large media files cause \verb+latex+ to abort with error `\verb+TeX capacity exceeded+'. See Sect.\ \ref{bugs}.\enlargethispage{2\baselineskip}
+
\section{The user interface}
Package `media9' provides commands for media inclusion (\verb+\includemedia+) and insertion of media control buttons (\verb+\mediabutton+). The latter is introduced in Sect. \ref{mbtn}.
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index 5869a84b165..505c76ac4f1 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{2017/02/08}
-\def\g@mix@version@tl{0.76}
+\def\g@mix@date@tl{2017/03/16}
+\def\g@mix@version@tl{0.77}
\def\g@mix@liiikerneldate{2015/09/27}
\def\g@mix@liiipkgdate{2015/09/27}
@@ -328,7 +328,7 @@
\cs_set_eq:NN\mix_pdfannot:nnnn\pbs_pdfannot:nnnn
\cs_set_eq:NN\mix_appendtofields:n\pbs_appendtofields:n
\cs_set_eq:NN\mix_pdflink:nn \pbs_pdflink:nn
-\cs_new:Nn\mix_pdfxform:n{\pbs_pdfxform:nnn{1}{1}{#1}}
+\cs_new:Nn\mix_pdfxform:n{\pbs_pdfxform:nnnnn{1}{1}{}{}{#1}}
\cs_set_eq:NN\mix_pdfximage:n \pbs_pdfximage:n
\cs_set_eq:NN\mix_pdfcatalog:n \pbs_pdfcatalog:n
@@ -1149,7 +1149,7 @@
% #1:width, #2:height, #3:depth, #4:content (key-value)
\mix_pdfannot:nnnn{\g_mix_wd_tl}{\g_mix_ht_tl}{\g_mix_dp_tl}{
/Subtype/RichMedia
- /F~4\cs_if_exist_use:N\ocgxii@insert@OC
+ /F~4
/BS~<</W~0/S/S>>
/Contents~(media~embedded~by~media9~[\g_mix_version_tl~(\g_mix_date_tl)])
/NM~(\g_mix_label_tl)
@@ -2398,20 +2398,12 @@
\box_use:N\l_mix_poster_box}}{\box_use:N\l_mix_poster_box}}
\mix_pdfxform:n{\l_mix_poster_box}
\tl_set:Nx\g_mix_normalbtn_tl{\mix_pdflastxform:}
- \bool_if:nT{ %dummy Widget for ocgx2, AR seems to need it
-% \cs_if_exist_p:N\ocgxii@insert@OC && !\tl_if_blank_p:V\ocgxii@insert@OC
- !\cs_if_exist:NTF\ocgxii@insert@OC{
- \tl_if_blank_p:V\ocgxii@insert@OC
- }{
- \c_true_bool
- }
- }{\mix_pdfannot:nnnn{\width}{\height}{\depth}{/Subtype/Widget/F~2}}
%insert widget annotation
\mix_pdfannot:nnnn{\width}{\height}{\depth}{
/Subtype/Widget
/T~(mbtn@\int_use:N\g_mix_mbtncnt_int)
\tl_if_empty:NF\g_mix_tooltip_tl{/TU~(\g_mix_tooltip_tl)}
- /FT/Btn/Ff~65536\cs_if_exist_use:N\ocgxii@insert@OC
+ /FT/Btn/Ff~65536
\tl_if_empty:NTF\g_mix_downbtn_tl{/H/I}{/H/P}
/AP~<<
/N~\g_mix_normalbtn_tl
diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
index 9584b8a88ed..73122d79d77 100644
--- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty
+++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
@@ -67,10 +67,12 @@
%
% --------
%
-% \pbs_pdfxform:nnn
-% #1: add pgf/tikz transparency, shading etc. resources? (1|0)
-% #2: used as PDF annotation appearance? (1|0)
-% #3: savebox number
+% \pbs_pdfxform:nnnnn
+% #1: add pgf/tikz resources (transparency, shading)? (1|0) %dvipdfmx/xetex
+% #2: used as PDF annotation appearance? (1|0) %dvips/pdftex
+% #3: additional resources %all BUT dvips
+% #4: additional dictionary entries
+% #5: savebox number
% creates PDF Form XObject from savebox content
%
% \pbs_pdflastxform:
@@ -123,8 +125,8 @@
\RequirePackage{l3keys2e}
\RequirePackage{atenddvi}
-\def\g@pbs@date@tl{2017/01/24}
-\def\g@pbs@version@tl{0.13}
+\def\g@pbs@date@tl{2017/03/16}
+\def\g@pbs@version@tl{0.14}
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
{driver independent access to low-level PDF features}
@@ -244,19 +246,31 @@
}
\tl_gset:Nx\g_pbs_pdflastobj_tl{\the\pdflastobj\space 0~R}
}
-
\cs_new_nopar:Nn\pbs_pdfannot:nnnn{
- \immediate\pdfannot~width~#1~height~#2~depth~#3 {#4}
+ %(hidden) dummy Widget, workaround for (pre?) AR-DC bug;
+ %see https://forums.adobe.com/message/5787612#5787612
+ \str_if_eq_x:nnF{\cs_if_exist_use:N\ocgbase_insert_oc:}{}{
+ \immediate\pdfannot~width~#1~height~#2~depth~#3 {/Subtype/Widget/F~2}}
+ \immediate\pdfannot~width~#1~height~#2~depth~#3 {
+ \cs_if_exist_use:N\ocgbase_insert_oc:~#4}
\tl_gset:Nx\g_pbs_pdflastann_tl{\the\pdflastannot\space 0~R}
}
\cs_new:Nn\pbs_pdflink:nn{
- \immediate\pdfstartlink~user~{#1}#2\pdfendlink
+ \immediate\pdfstartlink~user~{
+ \cs_if_exist_use:N\ocgbase_insert_oc:~#1}#2\pdfendlink
}
- \cs_new_nopar:Nn\pbs_pdfxform:nnn{ % #1 not used
+ \cs_new_nopar:Nn\pbs_pdfxform:nnnnn{ % #1 not used
+ %additional resources
+ \tl_set:Nx\l_tmpa_tl{\the\pdfpageresources~#3}\tl_trim_spaces:N\l_tmpa_tl
+ %additional dict entries
+ \tl_set:Nx\l_tmpb_tl{#4}
+ \tl_trim_spaces:N\l_tmpb_tl
\int_compare:nT{#2>\c_zero}{\immediate}
- \pdfxform~resources~{\the\pdfpageresources}~#3
+ \pdfxform~
+ \str_if_eq_x:nnF{\l_tmpb_tl}{}{attr~{\l_tmpb_tl}~}
+ \str_if_eq_x:nnF{\l_tmpa_tl}{}{resources~{\l_tmpa_tl}~}#5
\tl_gset:Nx\g_pbs_pdflastxform_tl{\the\pdflastxform\space 0~R}
}
@@ -303,9 +317,23 @@
\cs_new_nopar:Nn\pbs_pdfbdc:nn{
\pdfliteral~page~{#1/rm@oc\int_use:N\g_pbs_oc_int\space BDC}
- \iow_shipout_x:Nx\@mainaux{\token_to_str:N\pbs@seq@push@cx{
- pbs@props@\noexpand\the\g@pbs@page@int
- }{/rm@oc\int_use:N\g_pbs_oc_int\space#2}}
+ %decide whether the current property is to be written to the page
+ %resources or to the xobject resources, depending on whether marked content
+ %is written to a page stream or to an xobject stream (for compatibility with
+ %`xsavebox' package)
+ \bool_if:nTF{
+ \cs_if_exist:NTF\xsb_count_props:{
+ \int_compare_p:n{\xsb_count_props:>\c_zero}
+ }{
+ \c_false_bool
+ }
+ }{
+ \xsb_addto_props:n{/rm@oc\int_use:N\g_pbs_oc_int\space#2}
+ }{
+ \iow_shipout_x:Nx\@mainaux{\token_to_str:N\pbs@seq@push@cx{
+ pbs@props@\noexpand\the\g@pbs@page@int
+ }{/rm@oc\int_use:N\g_pbs_oc_int\space#2}}
+ }
\int_gincr:N\g_pbs_oc_int
}
@@ -315,15 +343,20 @@
\tl_gset:Nx\g_pbs_output_tl{\the\output}
\global\output{
\pbs_zap_properties: %purge those from previous page
- \group_begin:
- \tl_set:Nx\l_pbs_temp_tl{\group_end:
- \global\pdfpageresources{
- \the\pdfpageresources
- /Properties<<\seq_if_exist:cT{pbs@props@\the\g@pbs@page@int}{
- \seq_use:cn{pbs@props@\the\g@pbs@page@int}{~}
- }>>
- }
- }\l_pbs_temp_tl
+ \tl_set:Nx\l_tmpa_tl{\seq_if_exist:cT{pbs@props@\the\g@pbs@page@int}{
+ \seq_use:cn{pbs@props@\the\g@pbs@page@int}{~}}}
+ \tl_trim_spaces:N\l_tmpa_tl
+ \str_if_eq_x:nnF{\l_tmpa_tl}{}{
+ \group_begin:
+ \tl_set:Nx\l_pbs_temp_tl{\group_end:
+ \global\pdfpageresources{
+ \the\pdfpageresources
+ /Properties<<\seq_if_exist:cT{pbs@props@\the\g@pbs@page@int}{
+ \seq_use:cn{pbs@props@\the\g@pbs@page@int}{~}
+ }>>
+ }
+ }\l_pbs_temp_tl
+ }
\g_pbs_output_tl
\int_gincr:N\g@pbs@page@int
%purge from current page's properties, because they aren't needed any longer
@@ -366,17 +399,36 @@
\bool_if:NTF\g_pbs_lscape_bool{
%fix missing annotation rotation of (x)dvipdfmx on landscape pages
\box_move_up:nn{\dim_eval:n{#2}}{\vbox:n{
+ %(hidden) dummy Widget, workaround for (pre?) AR-DC bug;
+ %see https://forums.adobe.com/message/5787612#5787612
+ \str_if_eq_x:nnF{\cs_if_exist_use:N\ocgbase_insert_oc:}{}{
+ \special{pdf:ann~
+ width~\dim_eval:n{#2+#3}\space
+ height~\dim_eval:n{#1}\space
+ depth~\dim_eval:n{\c_zero_dim}~<</Subtype/Widget/F~2>>
+ }
+ }
\special{pdf:ann~@pbs@obj\int_use:N\g_pbs_obj_int\space
width~\dim_eval:n{#2+#3}\space
height~\dim_eval:n{#1}\space
- depth~\dim_eval:n{\c_zero_dim}~<<#4>>
+ depth~\dim_eval:n{\c_zero_dim}~<<
+ \cs_if_exist_use:N\ocgbase_insert_oc:~#4>>
}
}}
}{
+ %(hidden) dummy Widget, workaround for (pre?) AR-DC bug;
+ %see https://forums.adobe.com/message/5787612#5787612
+ \str_if_eq_x:nnF{\cs_if_exist_use:N\ocgbase_insert_oc:}{}{
+ \special{pdf:ann~
+ width~\dim_eval:n{#1}\space
+ height~\dim_eval:n{#2}\space
+ depth~\dim_eval:n{#3}~<</Subtype/Widget/F~2>>
+ }
+ }
\special{pdf:ann~@pbs@obj\int_use:N\g_pbs_obj_int\space
width~\dim_eval:n{#1}\space
height~\dim_eval:n{#2}\space
- depth~\dim_eval:n{#3}~<<#4>>
+ depth~\dim_eval:n{#3}~<<\cs_if_exist_use:N\ocgbase_insert_oc:~#4>>
}
}
\tl_gset:Nx\g_pbs_pdflastann_tl{@pbs@obj\int_use:N\g_pbs_obj_int}
@@ -384,35 +436,43 @@
}
\cs_new:Nn\pbs_pdflink:nn{
- \special{pdf:bann~<<#1>>}#2\special{pdf:eann}
+ \special{pdf:bann~<<\cs_if_exist_use:N\ocgbase_insert_oc:~#1>>}#2
+ \special{pdf:eann}
}
- \cs_new_nopar:Nn\pbs_pdfxform:nnn{ % #2 not used
+ \cs_new_nopar:Nn\pbs_pdfxform:nnnnn{ % #2 not used
\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#3\space
- height\space\dim_use:N\box_ht:N#3\space
- depth\space \dim_use:N\box_dp:N#3
+ width\space \dim_use:N\box_wd:N#5\space
+ height\space\dim_use:N\box_ht:N#5\space
+ depth\space \dim_use:N\box_dp:N#5
}
- \box_use:N#3
+ \box_use:N#5
+ \tl_clear:N\l_tmpa_tl{}
%transparency et al. for PGF
\bool_if:nT{\int_compare_p:n{#1>\c_zero} && \g_pbs_pgfloaded_bool}{
- \tl_set:Nn\l_pbs_temp_tl{}
\ifpgf@sys@pdf@extgs@exists
- \tl_set:Nn\l_pbs_temp_tl{/ExtGState~@pgfextgs}
+ \tl_set:Nn\l_tmpa_tl{/ExtGState~@pgfextgs}
\fi
\ifpgf@sys@pdf@patterns@exists
- \tl_put_right:Nn\l_pbs_temp_tl{/Pattern~@pgfpatterns}
+ \tl_put_right:Nn\l_tmpa_tl{/Pattern~@pgfpatterns}
\fi
\ifpgf@sys@pdf@colorspaces@exists
- \tl_put_right:Nn\l_pbs_temp_tl{/ColorSpace~@pgfcolorspaces}
+ \tl_put_right:Nn\l_tmpa_tl{/ColorSpace~@pgfcolorspaces}
\fi
- \tl_if_blank:VF\l_pbs_temp_tl{
- \special{pdf:put~@resources~<<\l_pbs_temp_tl>>}
- }
}
- \special{pdf:exobj}
+ %additional resources
+ \tl_put_right:Nx\l_tmpa_tl{~#3}\tl_trim_spaces:N\l_tmpa_tl
+ \str_if_eq_x:nnF{\l_tmpa_tl}{}{
+ \special{pdf:put~@resources~<<\l_tmpa_tl>>}
+ }
+ %additional dict entries
+ \tl_set:Nx\l_tmpa_tl{#4}
+ \tl_trim_spaces:N\l_tmpa_tl
+ \special{pdf:exobj %close form xobject
+ \str_if_eq_x:nnF{\l_tmpa_tl}{}{<<\l_tmpa_tl>>}
+ }
}
\end{picture}
\tl_gset:Nx\g_pbs_pdflastxform_tl{@pbs@obj\int_use:N\g_pbs_obj_int}
@@ -593,11 +653,21 @@
}
\end{picture}
\group_end:
+ \str_if_eq_x:nnF{\cs_if_exist_use:N\ocgbase_insert_oc:}{}{
+ \special{ps:~
+ mark~
+ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}
+ /Rect~[pbs@llx~pbs@lly~pbs@urx~pbs@ury]
+ /Subtype/Widget/F~2
+ /ANN~pdfmark
+ }
+ \int_gincr:N\g_pbs_obj_int
+ }
\special{ps:~
mark~
/_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}
/Rect~[pbs@llx~pbs@lly~pbs@urx~pbs@ury]
- #4
+ \cs_if_exist_use:N\ocgbase_insert_oc:~#4
/ANN~pdfmark
}
\tl_gset:Nx\g_pbs_pdflastann_tl{{pbs@obj\int_use:N\g_pbs_obj_int}}
@@ -606,7 +676,8 @@
\cs_new:Nn\pbs_pdflink:nn{
\cs_if_exist:NTF\pdfmark{
- \pdfmark[#2]{pdfmark=/ANN,Raw={#1}}
+ \pdfmark[#2]{pdfmark=/ANN,Raw={
+ \cs_if_exist_use:N\ocgbase_insert_oc:~#1}}
}{
\hbox_set:Nn\l_tmpb_box{#2}
\pbs_pdfannot:nnnn{
@@ -625,29 +696,30 @@
output.
}
- \cs_new_nopar:Nn\pbs_pdfxform:nnn{ % #1 not used
+ \cs_new_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources are
+ %managed by pdfmarks)
%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#3},
- \dim_ratio:nn{\paperheight}{\box_ht:N#3+\box_dp:N#3}
+ \dim_ratio:nn{\paperwidth}{\box_wd:N#5},
+ \dim_ratio:nn{\paperheight}{\box_ht:N#5+\box_dp:N#5}
)}}
- \box_scale:Nnn#3{
+ \box_scale:Nnn#5{
\tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}
}{
\tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}}
}
\group_begin:
- %mark bbox of box#3
+ %mark bbox of box#5
\dim_set:Nn\unitlength{1pt}
\begin{picture}(0,0)
- \put(0,-\dim_to_decimal:n{\box_dp:N#3}){
+ \put(0,-\dim_to_decimal:n{\box_dp:N#5}){
\special{ps:
currentpoint~/pbs@lly~exch~def~/pbs@llx~exch~def
}
}
\put(
- \dim_to_decimal:n{\box_wd:N#3},
- \dim_to_decimal:n{\box_ht:N#3}
+ \dim_to_decimal:n{\box_wd:N#5},
+ \dim_to_decimal:n{\box_ht:N#5}
){
\special{ps:
currentpoint~/pbs@ury~exch~def~/pbs@urx~exch~def
@@ -698,14 +770,21 @@
}?pdfmark
}
}
- \begin{picture}(0,0)\put(0,0){\box_use:N#3}\end{picture}
+ \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
+ \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}
+ }
\tl_gset:Nx\g_pbs_pdflastxform_tl{{pbs@obj\int_use:N\g_pbs_obj_int}}
\int_gincr:N\g_pbs_obj_int
\int_compare:nT{#2>\c_zero}{
%Form XObjects for use as annotation appearances require that
%dvips generated PostScript to be further processed with ps2pdf
- %may not have the exaggerated dpi resolution resulting from dvips
+ %must not have the exaggerated dpi resolution resulting from dvips
%option `-Ppdf'.
\tl_if_exist:NF\g_pbs_dpiwarned_tl{
\tl_new:N\g_pbs_dpiwarned_tl