summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/media9/pdfbase.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/media9/pdfbase.sty')
-rw-r--r--macros/latex/contrib/media9/pdfbase.sty178
1 files changed, 82 insertions, 96 deletions
diff --git a/macros/latex/contrib/media9/pdfbase.sty b/macros/latex/contrib/media9/pdfbase.sty
index b61b8b56aa..56d9a0b603 100644
--- a/macros/latex/contrib/media9/pdfbase.sty
+++ b/macros/latex/contrib/media9/pdfbase.sty
@@ -158,8 +158,8 @@
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2021/07/29}
-\def\g@pbs@version@tl{0.50}
+\def\g@pbs@date@tl{2021/08/13}
+\def\g@pbs@version@tl{0.51}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
@@ -1071,7 +1071,7 @@
output.
}
- \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used
+ \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used as
\mode_leave_vertical: % resources 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,
@@ -1099,66 +1099,59 @@
%additional dict entries
\tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl
\pbs_special:n{
- gsave~
- currentpoint~/pbs@cury~exch~def~/pbs@curx~exch~def~
%translate graphics to upper left page corner, so we have the whole
%clipbox (i. e. page area) available for distilling; outlying parts
%get clipped
{
+ gsave~currentpoint~ % put graphic's ref point coords on the stack
initclip~ % restore default clipping path (page device/whole page)
- clippath~pathbbox~newpath~pop~pop~ % top-left coordinates
+ clippath~pathbbox~newpath~pop~pop~ %page device top-left coordinates
isls {
landplus90 {
% pkg geometry with landscape option
- exch~pbs@curx~sub~\l_pbs_height_tl~add~
- exch~pbs@cury~sub
+ exch~\l_pbs_height_tl~add~exch
}{
% landscape as class option
- exch~pbs@curx~sub~\l_pbs_depth_tl~add~
- exch~pbs@cury~sub~\l_pbs_width_tl~add
+ exch~\l_pbs_depth_tl~add~
+ exch~\l_pbs_width_tl~add
} ifelse
}{
% portrait
- exch~pbs@curx~sub~
- exch~pbs@cury~sub~\l_pbs_depth_tl~add
- } ifelse~translate
- }?pdfmark~
- %move origin (0,0) to the current position
- gsave~pbs@curx~pbs@cury~translate~
- %distill graphics to XObject
- mark~
- /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~
- /BBox~[ % rotated BBoxes; o = reference point = origin (0,0),
- isls { % x = top-left page corner, vert. coord downwards positive
- landplus90 { % x----o-+
- % geometry with landscape | | |
- \l_pbs_height_tl~neg~ % llx | | |
- \l_pbs_width_tl~ % lly | | |
- \l_pbs_depth_tl~0 % urx ury +----+-+
+ \l_pbs_depth_tl~add
+ } ifelse~translate~ % move origin (0,0) to page location as shown
+ mark~ % distill graphics to XObject below
+ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~
+ /BBox~[ % rotated BBoxes; o = origin (0,0), x = top-left page
+ isls { % corner, vert. coord downwards positive
+ landplus90 { % x----o-+
+ % geometry with landscape | | |
+ \l_pbs_height_tl~neg~ % llx | | |
+ \l_pbs_width_tl~ % lly | | |
+ \l_pbs_depth_tl~0 % urx ury +----+-+
+ }{
+ % landscape as class option x-+----+
+ \l_pbs_depth_tl~neg~0~ % llx lly | | |
+ \l_pbs_height_tl~ % urx | | |
+ \l_pbs_width_tl~neg % ury | | |
+ } ifelse % +-o----+
}{
- % landscape as class option x-+----+
- \l_pbs_depth_tl~neg~0~ % llx lly | | |
- \l_pbs_height_tl~ % urx | | |
- \l_pbs_width_tl~neg % ury | | |
- } ifelse % +-o----+
- }{
- % portrait x----------+
- 0~\l_pbs_height_tl~ % llx lly | |
- \l_pbs_width_tl~ % urx o----------+
- \l_pbs_depth_tl~neg % ury | |
- } ifelse % | |
- ] % +----------+
- %insert additional dict entries (the Distiller way)
- \str_if_eq:eeF{\l_tmpa_tl}{}{
- product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~
- }
- /BP~pdfmark~grestore~
- % content transformations required for appearances, cf. BBox
- { % orientations above
- pbs@curx~pbs@cury~2~copy~translate~1~
- -1~scale~ % upside-down (mirrored)
+ % portrait x----------+
+ 0~\l_pbs_height_tl~ % llx lly | |
+ \l_pbs_width_tl~ % urx o----------+
+ \l_pbs_depth_tl~neg % ury | |
+ } ifelse % | |
+ ] % +----------+
+ %insert additional dict entries (the Distiller way)
+ \str_if_eq:eeF{\l_tmpa_tl}{}{
+ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~
+ }
+ /BP~pdfmark~
+ % content transformations required for appearances, cf. BBox
+ % orientations above
+ 1~-1~scale~ % upside-down (mirrored)
isls {90~landplus90 {neg} if~rotate} if~ % rotated
- neg~exch~neg~exch~translate
+ %finally, move the graphic's ref point (still on the stack) to (0,0)
+ exch~neg~exch~neg~translate
}?pdfmark
}
\box_set_wd:Nn#5{\c_zero_dim}
@@ -1522,8 +1515,8 @@
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2021/07/29}
-\def\g@pbs@version@tl{0.50}
+\def\g@pbs@date@tl{2021/08/13}
+\def\g@pbs@version@tl{0.51}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
@@ -2385,7 +2378,7 @@
output.
}
- \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used
+ \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used as
\mode_leave_vertical: % resources 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,
@@ -2413,66 +2406,59 @@
%additional dict entries
\tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl
\pbs_special:n{
- gsave~
- currentpoint~/pbs@cury~exch~def~/pbs@curx~exch~def~
%translate graphics to upper left page corner, so we have the whole
%clipbox (i. e. page area) available for distilling; outlying parts
%get clipped
{
+ gsave~currentpoint~ % put graphic's ref point coords on the stack
initclip~ % restore default clipping path (page device/whole page)
- clippath~pathbbox~newpath~pop~pop~ % top-left coordinates
+ clippath~pathbbox~newpath~pop~pop~ %page device top-left coordinates
isls {
landplus90 {
% pkg geometry with landscape option
- exch~pbs@curx~sub~\l_pbs_height_tl~add~
- exch~pbs@cury~sub
+ exch~\l_pbs_height_tl~add~exch
}{
% landscape as class option
- exch~pbs@curx~sub~\l_pbs_depth_tl~add~
- exch~pbs@cury~sub~\l_pbs_width_tl~add
+ exch~\l_pbs_depth_tl~add~
+ exch~\l_pbs_width_tl~add
} ifelse
}{
% portrait
- exch~pbs@curx~sub~
- exch~pbs@cury~sub~\l_pbs_depth_tl~add
- } ifelse~translate
- }?pdfmark~
- %move origin (0,0) to the current position
- gsave~pbs@curx~pbs@cury~translate~
- %distill graphics to XObject
- mark~
- /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~
- /BBox~[ % rotated BBoxes; o = reference point = origin (0,0),
- isls { % x = top-left page corner, vert. coord downwards positive
- landplus90 { % x----o-+
- % geometry with landscape | | |
- \l_pbs_height_tl~neg~ % llx | | |
- \l_pbs_width_tl~ % lly | | |
- \l_pbs_depth_tl~0 % urx ury +----+-+
+ \l_pbs_depth_tl~add
+ } ifelse~translate~ % move origin (0,0) to page location as shown
+ mark~ % distill graphics to XObject below
+ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~
+ /BBox~[ % rotated BBoxes; o = origin (0,0), x = top-left page
+ isls { % corner, vert. coord downwards positive
+ landplus90 { % x----o-+
+ % geometry with landscape | | |
+ \l_pbs_height_tl~neg~ % llx | | |
+ \l_pbs_width_tl~ % lly | | |
+ \l_pbs_depth_tl~0 % urx ury +----+-+
+ }{
+ % landscape as class option x-+----+
+ \l_pbs_depth_tl~neg~0~ % llx lly | | |
+ \l_pbs_height_tl~ % urx | | |
+ \l_pbs_width_tl~neg % ury | | |
+ } ifelse % +-o----+
}{
- % landscape as class option x-+----+
- \l_pbs_depth_tl~neg~0~ % llx lly | | |
- \l_pbs_height_tl~ % urx | | |
- \l_pbs_width_tl~neg % ury | | |
- } ifelse % +-o----+
- }{
- % portrait x----------+
- 0~\l_pbs_height_tl~ % llx lly | |
- \l_pbs_width_tl~ % urx o----------+
- \l_pbs_depth_tl~neg % ury | |
- } ifelse % | |
- ] % +----------+
- %insert additional dict entries (the Distiller way)
- \str_if_eq:eeF{\l_tmpa_tl}{}{
- product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~
- }
- /BP~pdfmark~grestore~
- % content transformations required for appearances, cf. BBox
- { % orientations above
- pbs@curx~pbs@cury~2~copy~translate~1~
- -1~scale~ % upside-down (mirrored)
+ % portrait x----------+
+ 0~\l_pbs_height_tl~ % llx lly | |
+ \l_pbs_width_tl~ % urx o----------+
+ \l_pbs_depth_tl~neg % ury | |
+ } ifelse % | |
+ ] % +----------+
+ %insert additional dict entries (the Distiller way)
+ \str_if_eq:eeF{\l_tmpa_tl}{}{
+ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~
+ }
+ /BP~pdfmark~
+ % content transformations required for appearances, cf. BBox
+ % orientations above
+ 1~-1~scale~ % upside-down (mirrored)
isls {90~landplus90 {neg} if~rotate} if~ % rotated
- neg~exch~neg~exch~translate
+ %finally, move the graphic's ref point (still on the stack) to (0,0)
+ exch~neg~exch~neg~translate
}?pdfmark
}
\box_set_wd:Nn#5{\c_zero_dim}