[latex3-commits] [git/LaTeX3-latex3-latex3] setpdfpagesize-alt: Support \mag for DVI-based routes (7d20f241f)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Sep 27 22:10:35 CEST 2022
Repository : https://github.com/latex3/latex3
On branch : setpdfpagesize-alt
Link : https://github.com/latex3/latex3/commit/7d20f241f72bf579d5edd2cf79c5d2999ca3ebac
>---------------------------------------------------------------
commit 7d20f241f72bf579d5edd2cf79c5d2999ca3ebac
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Jun 23 15:11:50 2022 +0100
Support \mag for DVI-based routes
Fingers-crossed ...
>---------------------------------------------------------------
7d20f241f72bf579d5edd2cf79c5d2999ca3ebac
l3backend/l3backend-pdf.dtx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/l3backend/l3backend-pdf.dtx b/l3backend/l3backend-pdf.dtx
index cc4400142..be68acbed 100644
--- a/l3backend/l3backend-pdf.dtx
+++ b/l3backend/l3backend-pdf.dtx
@@ -1710,8 +1710,10 @@
% \end{macrocode}
%
% \begin{macro}{\@@_backend_pagesize_set:nn}
+% \begin{macro}[EXP]{\@@_backend_pagesize_set:n}
% This is done as a backend literal, so we deal with it using the shipout
-% hook.
+% hook. The inclusion of \cs{tex_mag:D} here is essentially to work with
+% (u)p\LaTeX{}, where this is used to adjust apparent font size.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_pagesize_set:nn #1#2
{
@@ -1721,17 +1723,22 @@
{
%<*dvipdfmx>
pdf:pagesize ~
- width ~ \dim_eval:n {#1} ~
- height ~ \dim_eval:n {#2}
+ width ~ \@@_backend_pagesize_set:n {#1} ~
+ height ~ \@@_backend_pagesize_set:n {#2}
%</dvipdfmx>
%<*dvips>
- papersize = \dim_eval:n {#1} , \dim_eval:n {#2}
+ papersize =
+ \@@_backend_pagesize_set:n {#1} ,
+ \@@_backend_pagesize_set:n {#2}
%</dvips>
}
}
}
+\cs_new:Npn \@@_backend_pagesize_set:n #1
+ { \fp_to_dim:n { \tex_mag:D / 1000 * (#1) } }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</dvipdfmx|dvips>
More information about the latex3-commits
mailing list.