texlive[63174] Master/texmf-dist: bxpapersize (29apr22)

commits+karl at tug.org commits+karl at tug.org
Fri Apr 29 23:13:14 CEST 2022


Revision: 63174
          http://tug.org/svn/texlive?view=revision&revision=63174
Author:   karl
Date:     2022-04-29 23:13:14 +0200 (Fri, 29 Apr 2022)
Log Message:
-----------
bxpapersize (29apr22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bxpapersize/LICENSE
    trunk/Master/texmf-dist/doc/latex/bxpapersize/README.md
    trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty

Modified: trunk/Master/texmf-dist/doc/latex/bxpapersize/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpapersize/LICENSE	2022-04-29 03:14:26 UTC (rev 63173)
+++ trunk/Master/texmf-dist/doc/latex/bxpapersize/LICENSE	2022-04-29 21:13:14 UTC (rev 63174)
@@ -1,6 +1,6 @@
 The MIT License
 
-Copyright (c) 2016-2020 Takayuki YATO (aka. "ZR")
+Copyright (c) 2016-2022 Takayuki YATO (aka. "ZR")
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: trunk/Master/texmf-dist/doc/latex/bxpapersize/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpapersize/README.md	2022-04-29 03:14:26 UTC (rev 63173)
+++ trunk/Master/texmf-dist/doc/latex/bxpapersize/README.md	2022-04-29 21:13:14 UTC (rev 63174)
@@ -24,7 +24,7 @@
       - ifpdf, ifxetex, ifluatex, ifvtex
       - xkeyval
       - atbegshi
-      - pxatbegshi (when priority setting is used on (u)pTeX)
+      - pxatbegshi: on (u)pLaTeX
 
 ### Installation
 
@@ -34,6 +34,7 @@
 
 This package is distributed under the MIT License.
 
+
 The bxpapersize Package
 -----------------------
 
@@ -50,6 +51,8 @@
     the bxpapersize package. Note that once `disabled` is used there
     is no way to enable the functionality.
   * `nodvidriver`: A synonym for `disabled`.
+  * `autodvidriver`: Negation of `disabled`/`nodvidriver`.  
+    Note: Options `dvips` and `dvipdfmx` also negate `disabled`.
 
 #### Priority
 
@@ -92,7 +95,7 @@
 You can change the settings of this package using `\papersizesetup`
 command, invoked as follows:
 
-    \bxpapersizesetup[<key>=<value>,...]
+    \papersizesetup[<key>=<value>,...]
 
 The available keys are listed below:
 
@@ -112,7 +115,7 @@
         It is provided because option strings including braces are not
         permitted in the package option list.
       - `<papersize-name>`: The output should be equal to the given
-        size. The set pf available paper-size names is the same as the
+        size. The set of available paper-size names is the same as in the
         [geometry package] and is listed below:  
         a0paper--a6paper, b0paper--b6paper, c0paper--c6paper, b0j--b6j,
         ansiapaper--ansiepaper, letterpaper, legalpaper, executivepaper,
@@ -135,9 +138,13 @@
 will be not (re)defined if the command of that name is already defined,
 but `\bxpapersizesetup` will be always provided.
 
+
 Revision History
 ----------------
 
+  * Version 0.6  ‹2022/04/28›
+      - Add `autodvidriver` option.
+      - Rearrange spec on driver options.
   * Version 0.5  ‹2020/10/01›
       - Support LaTeX kernel 2020/10/01.
         (But priority setting is not yet supported.)

Modified: trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty	2022-04-29 03:14:26 UTC (rev 63173)
+++ trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty	2022-04-29 21:13:14 UTC (rev 63174)
@@ -1,7 +1,7 @@
 %%
 %% This is file 'bxpapersize.sty'.
 %%
-%% Copyright (c) 2016-2020 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2016-2022  Takayuki YATO (aka. "ZR")
 %%   GitHub:   https://github.com/zr-tex8r
 %%   Twitter:  @zr_tex8r
 %%
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxpapersize}[2020/10/01 v0.5]
+\ProvidesPackage{bxpapersize}[2022/04/28 v0.6]
 
 %% preparation
 \def\bxpr at pkgname{bxpapersize}
@@ -20,15 +20,22 @@
 
 % Note: Only non-key-value global options should be picked.
 
-%% 'disabled' / 'nodvidriver'
+%% driver options (or 'disabled')
 \chardef\bxpr at disabled=0
 \DeclareOption{disabled}{%
   \chardef\bxpr at disabled=1 }
 \DeclareOption{nodvidriver}{%
   \chardef\bxpr at disabled=1 }
+\DeclareOption{autodvidriver}{%
+  \chardef\bxpr at disabled=0 }
+\DeclareOption{dvips}{%
+  \chardef\bxpr at disabled=0 }
+\DeclareOption{dvipdfmx}{%
+  \chardef\bxpr at disabled=0 }
 %% 'olddvips'
 \chardef\bxpr at olddvips=0
 \DeclareOption{olddvips}{%
+  \chardef\bxpr at disabled=0
   \chardef\bxpr at olddvips=1 }
 %% keyval
 \@onlypreamble\bxpr at kvopt
@@ -47,7 +54,6 @@
 
 %% load packages
 \RequirePackage{xkeyval}[2008/08/10]% v2.6
-\RequirePackage{atbegshi}
 \RequirePackage{ifpdf,ifxetex,ifluatex,ifvtex,ifptex}
 
 %% variables
@@ -54,15 +60,19 @@
 \newdimen\bxpr at dima
 \let\bxpr at width\relax
 \let\bxpr at height\relax
-\newif\ifbxpr at pxatbegshi
 
 %% constants
-\chardef\bxpr at mode@@dvimode=0
-\chardef\bxpr at mode@@pdfmode=1
+\chardef\bxpr at mode@@papersize=0 % papersize special
+\chardef\bxpr at mode@@pdfmode=1 % PDF-mode primitive
+\chardef\bxpr at mode@@void=2 % no operation
 
 %% unique tokens
 \def\bxpr at end{\bxpr at end@}
 
+%% switch 'bxpr at nosize'
+\newif\ifbxpr at nosize
+\ifx\ifhint\iftrue \bxpr at nosizetrue \fi
+
 %% switch 'bxpr at new@hook at system'
 % Whether the new hook management system is present.
 \newif\ifbxpr at new@hook at system
@@ -106,16 +116,23 @@
 \fi
 
 %% \bxpr at mode
-\ifx\bxpr at pagewidth\@undefined
-  \let\bxpr at mode\bxpr at mode@@dvimode
+\ifbxpr at nosize
+  \let\bxpr at mode\bxpr at mode@@void
+\else\ifx\bxpr at pagewidth\@undefined
+  \let\bxpr at mode\bxpr at mode@@papersize
 \else
   \let\bxpr at mode\bxpr at mode@@pdfmode
-\fi
+\fi\fi
 
 %% \bxpr at csletcs{<CSa>}{<CSb>}
 \def\bxpr at csletcs#1#2{%
   \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
 
+%% load 'atbegshi' package
+\ifnum\bxpr at mode=\bxpr at mode@@void\else
+  \RequirePackage{atbegshi}\relax
+\fi
+
 %--------------------------------------- parameters
 
 %% constants
@@ -298,7 +315,7 @@
     will be ignored}
   \let\bxpr at priority\bxpr at priority@@default
 \else %----
-  \ifcase\bxpr at mode % dvi
+  \ifcase\bxpr at mode % papersize
     \ifptex
       \RequirePackage{pxatbegshi}[]
     \fi
@@ -345,7 +362,7 @@
     size=\the\bxpr at size(\bxpr at cs@width,\bxpr at cs@height)%
     \ifnum\bxpr at tombow>\z@ [tombow]\fi}%
   \bxpr at geometry@hack
-  \ifcase\bxpr at mode % dvi
+  \ifcase\bxpr at mode % papersize
     \ifcase\bxpr at priority % low
       \AtBeginShipoutInit
       \def\bxpr at every@page at hook{%
@@ -369,7 +386,7 @@
         \AtBeginShipoutNext{\bxpr at every@page at hook}}%
       \AtBeginShipoutNext{\bxpr at every@page at hook}%
     \fi
-  \else % pdf
+  \or % pdf
     \def\bxpr at every@page at hook{%
       \bxpr at page@process
       \bxpr at modify@output at box\relax\bxpr at special@chunk}%
@@ -416,7 +433,7 @@
 \let\bxpr at special@chunk\@empty
 
 %% \bxpr at set@page at size{<width>}{<height>}
-\ifcase\bxpr at mode %dvi
+\ifcase\bxpr at mode % dvi
   \def\bxpr at set@page at size#1#2{%
     \begingroup
       \bxpr at let@real at mag@to\bxpr at tmpa
@@ -427,10 +444,13 @@
     \endgroup \bxpr at g@next
     \bxDebug{papersize=\bxpr at tmpb}%
     \edef\bxpr at special@chunk{\special{papersize=\bxpr at tmpb}}}%
-\else %pdf
+\or % pdf
   \def\bxpr at set@page at size#1#2{%
     \bxpr at pagewidth=#1\relax \bxpr at pageheight=#2\relax
     \bxDebug{papersize=\the\bxpr at pagewidth,\the\bxpr at pageheight}}%
+\else % void
+  \def\bxpr at set@page at size#1#2{%
+    \bxDebug{papersize ignored}}
 \fi
 
 %% \bxpr at let@real at mag@to\CS



More information about the tex-live-commits mailing list.