texlive[60082] Master/texmf-dist: media9 (26jul21)
commits+karl at tug.org
commits+karl at tug.org
Mon Jul 26 22:31:13 CEST 2021
Revision: 60082
http://tug.org/svn/texlive?view=revision&revision=60082
Author: karl
Date: 2021-07-26 22:31:12 +0200 (Mon, 26 Jul 2021)
Log Message:
-----------
media9 (26jul21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/media9/ChangeLog
trunk/Master/texmf-dist/doc/latex/media9/media9.pdf
trunk/Master/texmf-dist/tex/latex/media9/media9.sty
trunk/Master/texmf-dist/tex/latex/media9/pdfbase.sty
Modified: trunk/Master/texmf-dist/doc/latex/media9/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/media9/ChangeLog 2021-07-26 20:30:56 UTC (rev 60081)
+++ trunk/Master/texmf-dist/doc/latex/media9/ChangeLog 2021-07-26 20:31:12 UTC (rev 60082)
@@ -1,3 +1,8 @@
+2021-07-25
+ * v1.17 : media9.sty
+ * v0.48 : pdfbase.sty
+ * fix : improved xform generation with dvips
+
2021-06-11
* v1.16 : media9.sty
* v0.47 : pdfbase.sty
Modified: trunk/Master/texmf-dist/doc/latex/media9/media9.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/latex/media9/media9.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/media9/media9.sty 2021-07-26 20:30:56 UTC (rev 60081)
+++ trunk/Master/texmf-dist/tex/latex/media9/media9.sty 2021-07-26 20:31:12 UTC (rev 60082)
@@ -41,8 +41,8 @@
\RequirePackage{l3keys2e}
-\def\g at mix@date at tl{2021/06/11}
-\def\g at mix@version at tl{1.16}
+\def\g at mix@date at tl{2021/07/25}
+\def\g at mix@version at tl{1.17}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{media9}{\g at mix@date at tl}{\g at mix@version at tl}
@@ -2409,8 +2409,8 @@
\RequirePackage{l3keys2e}
-\def\g at mix@date at tl{2021/06/11}
-\def\g at mix@version at tl{1.16}
+\def\g at mix@date at tl{2021/07/25}
+\def\g at mix@version at tl{1.17}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{media9}{\g at mix@date at tl}{\g at mix@version at tl}
Modified: trunk/Master/texmf-dist/tex/latex/media9/pdfbase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/media9/pdfbase.sty 2021-07-26 20:30:56 UTC (rev 60081)
+++ trunk/Master/texmf-dist/tex/latex/media9/pdfbase.sty 2021-07-26 20:31:12 UTC (rev 60082)
@@ -84,7 +84,7 @@
%
% \pbs_pdfxform:nnnnn
% #1: add pgf/tikz resources (transparency, shading)? (1|0) %dvipdfmx/xetex
-% #2: used as PDF annotation appearance? (1|0) %dvips/pdftex
+% #2: (not used)
% #3: additional resources %all BUT dvips
% #4: additional dictionary entries
% #5: savebox number
@@ -158,8 +158,8 @@
\RequirePackage{l3keys2e}
-\def\g at pbs@date at tl{2021/06/11}
-\def\g at pbs@version at tl{0.47}
+\def\g at pbs@date at tl{2021/07/25}
+\def\g at pbs@version at tl{0.48}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{pdfbase}{\g at pbs@date at tl}{\g at pbs@version at tl}
@@ -605,7 +605,7 @@
}
}
- \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #2 not used
+ \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{
\group_begin:
\hbox_set:Nn\l_tmpa_box{
\special{pdf:bxobj~@pbs at obj\int_use:N\g_pbs_obj_int\space
@@ -1071,8 +1071,8 @@
output.
}
- \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources
- \mode_leave_vertical: % are managed automatically)
+ \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used (resources
+ \mode_leave_vertical: % are managed automatically)
%rescale box to fit within the papersize while distilling
\tl_gset:cx{scale_{pbs at obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0,
\dim_ratio:nn{\paperwidth}{\box_wd:N#5},
@@ -1083,23 +1083,13 @@
}{
\tl_use:c{scale_{pbs at obj\int_use:N\g_pbs_obj_int}}
}
- \group_begin:
- %mark bbox of box#5
- \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 at lly~exch~def~/pbs at llx~exch~def
- }}}
- \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 at ury~exch~def~/pbs at urx~exch~def
- }}}
- }
- \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:
+ %store dimensions (in "dots" units)
+ \tl_set:Nx\l_pbs_width_tl{
+ \dim_to_decimal:n{\box_wd:N#5}~72.27~div~Resolution~mul~}
+ \tl_set:Nx\l_pbs_height_tl{
+ \dim_to_decimal:n{\box_ht:N#5}~72.27~div~VResolution~mul~}
+ \tl_set:Nx\l_pbs_depth_tl{
+ \dim_to_decimal:n{\box_dp:N#5}~72.27~div~VResolution~mul~}
%additional dict entries
\tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl
\pbs_special:n{
@@ -1109,61 +1099,58 @@
%clipbox (i. e. page area) available for distilling; outlying parts
%get clipped
{
- clippath~pathbbox~newpath~pop~pop~translate~
- pbs at llx~neg~pbs at ury~neg~translate
+ clippath~pathbbox~newpath~pop~pop~
+ isls {
+ landplus90 {
+ % pkg geometry with landscape option
+ exch~pbs at curx~sub~\l_pbs_height_tl~add~
+ exch~pbs at cury~sub
+ }{
+ % landscape as class option
+ exch~pbs at curx~sub~\l_pbs_depth_tl~add~
+ exch~pbs at cury~sub~\l_pbs_width_tl~add
+ } ifelse
+ }{
+ % portrait
+ exch~pbs at curx~sub~
+ exch~pbs at cury~sub~\l_pbs_depth_tl~add
+ } ifelse~translate
}?pdfmark~
%move origin (0,0) to the current position
gsave~pbs at curx~pbs at cury~translate~
- %distillation-bbox left and top coords
- clippath~pathbbox~newpath~pop~pop~/pbs at bbox@top~exch~def~
- /pbs at bbox@left~exch~def~
%distill graphics to XObject
mark~
/_objdef~{pbs at obj\int_use:N\g_pbs_obj_int}~
/BBox~[
- pbs at bbox@left~pbs at bbox@top~pbs at bbox@left~pbs at urx~
- pbs at llx~sub~add~pbs at bbox@top~pbs at lly~pbs at ury~sub~add
- ]~
+ isls {
+ landplus90 {
+ % geometry with landscape
+ \l_pbs_height_tl~neg~\l_pbs_width_tl~\l_pbs_depth_tl~0
+ }{
+ % landscape as class option
+ \l_pbs_depth_tl~neg~0~\l_pbs_height_tl~\l_pbs_width_tl~neg
+ } ifelse
+ }{
+ % portrait
+ 0~\l_pbs_height_tl~\l_pbs_width_tl~\l_pbs_depth_tl~neg
+ } 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~
- \int_compare:nT{#2>\c_zero_int}{
- %operations needed if used as annotation appearance
- {
- % landscape mode (as class option, powerdot,
- % geometry or typearea /w pkg option)
- isls{
- /pbs at dxdy~{
- pbs at urx~pbs at llx~sub~abs~pbs at ury~pbs at lly~sub~abs~div
- }~bind~def~
- /pbs at dydx~{1~pbs at dxdy~div}~bind~def~
- /pbs at cx~{pbs at urx~pbs at llx~add~2~div}~bind~def~
- /pbs at cy~{pbs at ury~pbs at lly~add~2~div}~bind~def~
- % graphics needs to be rescaled for some reason ...
- [pbs at dxdy~0~0~pbs at dydx~1~pbs at dxdy~sub~pbs at cx~mul~
- 1~pbs at dydx~sub~pbs at cy~mul]~concat~
- %... rotated by 270 degrees ...
- [0~-1~1~0~pbs at cx~pbs at cy~sub~pbs at cx~pbs at cy~add]~concat~
- landplus90{
- %... and flipped around vertical axis (geometry, powerdot)
- [-1~0~0~1~pbs at llx~pbs at urx~add~0]~concat
- }{
- %... and flipped around horizontal axis (other)
- [1~0~0~-1~0~pbs at lly~pbs at ury~add]~concat
- }ifelse
- }{
- % flip around horizontal axis in portrait mode
- [1~0~0~-1~0~pbs at lly~pbs at ury~add]~concat
- }ifelse
- }?pdfmark
- }
+ % content transformations required for appearances
+ {
+ pbs at curx~pbs at cury~2~copy~translate~1~-1~scale~
+ isls {90~landplus90 {neg} if~rotate} if~
+ neg~exch~neg~exch~translate
+ }?pdfmark
}
\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}
+ \pbs_special:n{mark~/EP~pdfmark~grestore}
%insert additional dict entries (the Ghostscript way)
\str_if_eq:eeF{\l_tmpa_tl}{}{
\pbs_special:n{
@@ -1200,7 +1187,10 @@
}
}
\pbs_special:n{
- gsave~currentpoint~translate~1~\tl_use:c{scale_#1}~div~dup~scale~
+ gsave~currentpoint~translate~
+ % undo appearance-related content transformations
+ isls {90~landplus90~not {neg} if~rotate} if~
+ 1~\tl_use:c{scale_#1}~div~dup~neg~scale~
mark~#1~/SP~pdfmark~grestore
}
}
@@ -1518,8 +1508,8 @@
\RequirePackage{l3keys2e}
-\def\g at pbs@date at tl{2021/06/11}
-\def\g at pbs@version at tl{0.47}
+\def\g at pbs@date at tl{2021/07/25}
+\def\g at pbs@version at tl{0.48}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{pdfbase}{\g at pbs@date at tl}{\g at pbs@version at tl}
@@ -2381,8 +2371,8 @@
output.
}
- \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources
- \mode_leave_vertical: % are managed automatically)
+ \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{% #1, #3 not used (resources
+ \mode_leave_vertical: % are managed automatically)
%rescale box to fit within the papersize while distilling
\tl_gset:cx{scale_{pbs at obj\int_use:N\g_pbs_obj_int}}{\fp_eval:n{min(1.0,
\dim_ratio:nn{\paperwidth}{\box_wd:N#5},
@@ -2393,23 +2383,13 @@
}{
\tl_use:c{scale_{pbs at obj\int_use:N\g_pbs_obj_int}}
}
- \group_begin:
- %mark bbox of box#5
- \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 at lly~exch~def~/pbs at llx~exch~def
- }}}
- \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 at ury~exch~def~/pbs at urx~exch~def
- }}}
- }
- \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:
+ %store dimensions (in "dots" units)
+ \tl_set:Nx\l_pbs_width_tl{
+ \dim_to_decimal:n{\box_wd:N#5}~72.27~div~Resolution~mul~}
+ \tl_set:Nx\l_pbs_height_tl{
+ \dim_to_decimal:n{\box_ht:N#5}~72.27~div~VResolution~mul~}
+ \tl_set:Nx\l_pbs_depth_tl{
+ \dim_to_decimal:n{\box_dp:N#5}~72.27~div~VResolution~mul~}
%additional dict entries
\tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl
\pbs_special:n{
@@ -2419,61 +2399,58 @@
%clipbox (i. e. page area) available for distilling; outlying parts
%get clipped
{
- clippath~pathbbox~newpath~pop~pop~translate~
- pbs at llx~neg~pbs at ury~neg~translate
+ clippath~pathbbox~newpath~pop~pop~
+ isls {
+ landplus90 {
+ % pkg geometry with landscape option
+ exch~pbs at curx~sub~\l_pbs_height_tl~add~
+ exch~pbs at cury~sub
+ }{
+ % landscape as class option
+ exch~pbs at curx~sub~\l_pbs_depth_tl~add~
+ exch~pbs at cury~sub~\l_pbs_width_tl~add
+ } ifelse
+ }{
+ % portrait
+ exch~pbs at curx~sub~
+ exch~pbs at cury~sub~\l_pbs_depth_tl~add
+ } ifelse~translate
}?pdfmark~
%move origin (0,0) to the current position
gsave~pbs at curx~pbs at cury~translate~
- %distillation-bbox left and top coords
- clippath~pathbbox~newpath~pop~pop~/pbs at bbox@top~exch~def~
- /pbs at bbox@left~exch~def~
%distill graphics to XObject
mark~
/_objdef~{pbs at obj\int_use:N\g_pbs_obj_int}~
/BBox~[
- pbs at bbox@left~pbs at bbox@top~pbs at bbox@left~pbs at urx~
- pbs at llx~sub~add~pbs at bbox@top~pbs at lly~pbs at ury~sub~add
- ]~
+ isls {
+ landplus90 {
+ % geometry with landscape
+ \l_pbs_height_tl~neg~\l_pbs_width_tl~\l_pbs_depth_tl~0
+ }{
+ % landscape as class option
+ \l_pbs_depth_tl~neg~0~\l_pbs_height_tl~\l_pbs_width_tl~neg
+ } ifelse
+ }{
+ % portrait
+ 0~\l_pbs_height_tl~\l_pbs_width_tl~\l_pbs_depth_tl~neg
+ } 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~
- \int_compare:nT{#2>\c_zero_int}{
- %operations needed if used as annotation appearance
- {
- % landscape mode (as class option, powerdot,
- % geometry or typearea /w pkg option)
- isls{
- /pbs at dxdy~{
- pbs at urx~pbs at llx~sub~abs~pbs at ury~pbs at lly~sub~abs~div
- }~bind~def~
- /pbs at dydx~{1~pbs at dxdy~div}~bind~def~
- /pbs at cx~{pbs at urx~pbs at llx~add~2~div}~bind~def~
- /pbs at cy~{pbs at ury~pbs at lly~add~2~div}~bind~def~
- % graphics needs to be rescaled for some reason ...
- [pbs at dxdy~0~0~pbs at dydx~1~pbs at dxdy~sub~pbs at cx~mul~
- 1~pbs at dydx~sub~pbs at cy~mul]~concat~
- %... rotated by 270 degrees ...
- [0~-1~1~0~pbs at cx~pbs at cy~sub~pbs at cx~pbs at cy~add]~concat~
- landplus90{
- %... and flipped around vertical axis (geometry, powerdot)
- [-1~0~0~1~pbs at llx~pbs at urx~add~0]~concat
- }{
- %... and flipped around horizontal axis (other)
- [1~0~0~-1~0~pbs at lly~pbs at ury~add]~concat
- }ifelse
- }{
- % flip around horizontal axis in portrait mode
- [1~0~0~-1~0~pbs at lly~pbs at ury~add]~concat
- }ifelse
- }?pdfmark
- }
+ % content transformations required for appearances
+ {
+ pbs at curx~pbs at cury~2~copy~translate~1~-1~scale~
+ isls {90~landplus90 {neg} if~rotate} if~
+ neg~exch~neg~exch~translate
+ }?pdfmark
}
\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}
+ \pbs_special:n{mark~/EP~pdfmark~grestore}
%insert additional dict entries (the Ghostscript way)
\str_if_eq:eeF{\l_tmpa_tl}{}{
\pbs_special:n{
@@ -2510,7 +2487,10 @@
}
}
\pbs_special:n{
- gsave~currentpoint~translate~1~\tl_use:c{scale_#1}~div~dup~scale~
+ gsave~currentpoint~translate~
+ % undo appearance-related content transformations
+ isls {90~landplus90~not {neg} if~rotate} if~
+ 1~\tl_use:c{scale_#1}~div~dup~neg~scale~
mark~#1~/SP~pdfmark~grestore
}
}
More information about the tex-live-commits
mailing list.