texlive[57755] Master/texmf-dist: bxpdfver (15feb21)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 15 23:18:48 CET 2021


Revision: 57755
          http://tug.org/svn/texlive?view=revision&revision=57755
Author:   karl
Date:     2021-02-15 23:18:48 +0100 (Mon, 15 Feb 2021)
Log Message:
-----------
bxpdfver (15feb21)

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

Modified: trunk/Master/texmf-dist/doc/latex/bxpdfver/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/LICENSE	2021-02-15 22:18:32 UTC (rev 57754)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/LICENSE	2021-02-15 22:18:48 UTC (rev 57755)
@@ -1,6 +1,6 @@
 The MIT License
 
-Copyright (c) 2014-2020 Takayuki YATO (aka. "ZR")
+Copyright (c) 2014-2021 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/bxpdfver/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md	2021-02-15 22:18:32 UTC (rev 57754)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md	2021-02-15 22:18:48 UTC (rev 57755)
@@ -45,7 +45,7 @@
       + PDF 出力のエンジンの場合は、既定で適切なドライバが選択される
         のでドライバオプションは不要である。
       + `dvipdfmx`: dvipdfmx 用のドライバを指定する。
-      + `disabled`/`nodvidriver`: 全ての機能を無効化する。
+      + `nodvidriver`/`disabled`: 全ての機能を無効化する。
   * `lenient`: サポートしない機能に対するエラーを警告に格下げする。
   * `new-dvipdfmx`: dvipdfmx に対するバージョン検査を省略し、常に最新の
     バージョンであると仮定する。
@@ -96,7 +96,7 @@
   * 使用不可能な機能を使おうと試みるとエラーが発生する。
   * `dvips` 等の“全く対応していない”若干のドライバオプションを認識
     する。この場合、全ての機能の呼出でエラーが発生する。
-  * `disabled` は特殊で、これを指定した場合は、どの機能の呼出でも
+  * `nodvidriver` は特殊で、これを指定した場合は、どの機能の呼出でも
     エラーは発生しないが、全く何の動作も行わない。
 
 
@@ -103,6 +103,8 @@
 更新履歴
 --------
 
+  * Version 0.5a ‹2021/02/14›
+      - 新しい版の hyperref のための調整。
   * Version 0.5  ‹2020/04/19›
       - PDF バージョンの値として `2.0` をサポートする。
   * Version 0.4  ‹2017/02/11›

Modified: trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md	2021-02-15 22:18:32 UTC (rev 57754)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md	2021-02-15 22:18:48 UTC (rev 57755)
@@ -46,7 +46,7 @@
       + When using a PDF-output engine, you need not give driver options
         since the appropriate one is auto-detected.
       + `dvipdfmx`: Uses dvipdfmx driver.
-      + `disabled`/`nodvidriver`: Disables all functions of the package.
+      + `nodvidriver`/`disabled`: Disables all functions of the package.
   * `lenient`: Turns the errors for unsupported features into warnings.
 
 Note that the options `compress` and `objcompress` mean that this
@@ -95,12 +95,14 @@
   * The package recognizes some “unsupported” driver options such as
     `dvips`; when such drivers are used, use of any feature will cause
     an error.
-  * When `disabled` is used, use of any feature will do nothing (nor
+  * When `nodvidriver` is used, use of any feature will do nothing (nor
     issue an error).
 
 REVISION HISTORY
 ----------------
 
+  * Version 0.5a ‹2021/02/14›
+      - Adjustment for the new version of hyperref.
   * Version 0.5  ‹2020/04/19›
       - Suuport PDF version value `2.0`.
   * Version 0.4  ‹2017/02/11›

Modified: trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty	2021-02-15 22:18:32 UTC (rev 57754)
+++ trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty	2021-02-15 22:18:48 UTC (rev 57755)
@@ -1,7 +1,7 @@
 %%
 %% This is file 'bxpdfver.sty'.
 %%
-%% Copyright (c) 2014-2020 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2014-2021 Takayuki YATO (aka. "ZR")
 %%   GitHub:   https://github.com/zr-tex8r
 %%   Twitter:  @zr_tex8r
 %%
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxpdfver}[2020/04/19 v0.5]
+\ProvidesPackage{bxpdfver}[2021/02/14 v0.5a]
 \def\bxpv at pkgname{bxpdfver}
 
 %% preparations
@@ -140,6 +140,10 @@
 \else \expandafter\@gobble
 \fi{\let\ifbxpv at defined\iffalse}
 
+%% \ifbxpv at old@hook at system
+\newif\ifbxpv at old@hook at system
+\@ifl at t@r\fmtversion{2020/10/01}{}{\bxpv at old@hook at systemtrue}
+
 %--------------------------------------- internal dispatchers
 
 %% \bxpv at suppress@compress
@@ -185,6 +189,9 @@
 \@onlypreamble\bxpv at begin@document at hook
 \let\bxpv at begin@document at hook\@empty
 \AtBeginDocument{\bxpv at begin@document at hook}
+\g at addto@macro\bxpv at begin@document at hook{%
+  \bxpv at check@hyperref % must come first
+}
 
 %% 'disabled' driver
 \if 0\bxpv at drv@type
@@ -363,6 +370,13 @@
   \global\bxpdfverObjCompressionSuppressedtrue
 }
 
+% Note: Priority against hyperref's 'pdfversion' parameter
+% The existing behaviors on PDF mode should be preserved:
+% - If hyperref is loaded but 'pdfversion' is not given, then
+%   bxpdfver's setting (explicit request) should win.
+% - If hyperref is loaded and 'pdfversion' is given, then
+%   hyperref should win (with a warning).
+
 %%<*> \setpdfversion{<version>}
 \@onlypreamble\setpdfversion
 \newcommand*\setpdfversion[1]{%
@@ -570,11 +584,37 @@
   \expandafter\bxpv at tmpa\bxpv at tmpb\bxpv at end
 \endgroup
 
+%% \bxpv at check@hyperref
+\def\bxpv at check@hyperref{%
+  \bxpv at oktrue
+  \ifx\bxpdfverMinorVersion\relax\else
+    \@ifpackageloaded{hyperref}{%
+      \expandafter\ifx\csname ifHy at setpdfversion\expandafter
+          \endcsname\csname iftrue\endcsname
+        \bxpv at okfalse
+      \fi
+    }{}%
+  \fi
+  \ifbxpv at ok\else
+    \PackageWarningNoLine\bxpv at pkgname
+     {Both hyperref and this package try to set the PDF\MessageBreak
+      version; this can cause problems. This package's\MessageBreak
+      setting will be withdrawn for now, but you must\MessageBreak
+      fix your source to avoid it}%
+    % Note: In PDF mode, the real parameters will be overwritten
+    % later by hyperref.
+    \let\bxpdfverMinorVersion\relax
+    \let\bxpdfverMajorVersion\relax
+  \fi
+}
+
 %--------------------------------------- dvipdfmx something
 \ifx d\bxpv at drv@type % 'dvipdfmx'
 
 %% required packages
+\ifbxpv at old@hook at system
 \RequirePackage{atbegshi}[2007/04/19]% v1.2
+\fi
 
 %% variables
 \let\bxpv at C@value\relax
@@ -604,16 +644,12 @@
   \fi
   \ifbxpv at ok
     \ifx\bxpdfverMinorVersion\relax\else
-      \g at addto@macro\bxpv at page@specials{%
-        \special{pdf:minorversion \the\bxpdfverMinorVersion}%
-      }%
+      \bxpv at put@special{pdf:minorversion \the\bxpdfverMinorVersion}%
     \fi
     \ifx\bxpdfverMinorVersion\relax\else
       \bxpv at cache@fetch{dvipdfmxver}%
       \ifnum\bxpv at cache@@dvipdfmxver<20180217 \else
-        \g at addto@macro\bxpv at page@specials{%
-          \special{pdf:majorversion \the\bxpdfverMajorVersion}%
-        }%
+        \bxpv at put@special{pdf:majorversion \the\bxpdfverMajorVersion}%
       \fi
     \fi
   \fi
@@ -623,9 +659,7 @@
      {Cannot suppress compression}%
     \ifbxpv at ok
       % New dvipdfmx supports this special.
-      \g at addto@macro\bxpv at page@specials{%
-        \special{dvipdfmx:config z 0}%
-      }%
+      \bxpv at put@special{dvipdfmx:config z 0}%
     \fi
   \fi
   % object compression
@@ -673,6 +707,7 @@
   % special added to every page
   \ifx\bxpv at page@specials\@empty\else
     \edef\bxpv at page@specials{\bxpv at page@specials}%
+    \ifbxpv at old@hook at system
     \AtBeginShipout{%
       \setbox\AtBeginShipoutBox=\vbox{%
         \baselineskip\z at skip\lineskip\z at skip\lineskiplimit\z@
@@ -680,6 +715,10 @@
         \copy\AtBeginShipoutBox
       }%
     }%
+    \else
+      \AddToHook{shipout/foreground}{%
+        \hb at xt@\z@{\bxpv at page@specials\hss}}%
+    \fi
   \fi
 }
 



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