Skip to content

Commit

Permalink
Support \mag for DVI-based routes
Browse files Browse the repository at this point in the history
Fingers-crossed ...
  • Loading branch information
josephwright committed Jun 23, 2022
1 parent 38051c2 commit fbf5a92
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions l3backend/l3backend-pdf.dtx
Expand Up @@ -1687,8 +1687,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
{
Expand All @@ -1698,17 +1700,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>
Expand Down

0 comments on commit fbf5a92

Please sign in to comment.