summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/bxpdfver/LICENSE2
-rw-r--r--Master/texmf-dist/doc/latex/bxpdfver/README-ja.md6
-rw-r--r--Master/texmf-dist/doc/latex/bxpdfver/README.md6
-rw-r--r--Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty61
4 files changed, 59 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/bxpdfver/LICENSE b/Master/texmf-dist/doc/latex/bxpdfver/LICENSE
index 6464d05972f..9e57162d4c2 100644
--- a/Master/texmf-dist/doc/latex/bxpdfver/LICENSE
+++ b/Master/texmf-dist/doc/latex/bxpdfver/LICENSE
@@ -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
diff --git a/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md b/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md
index 78b35c6da60..5296c49a9cd 100644
--- a/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md
+++ b/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md
@@ -45,7 +45,7 @@ bxpdfver パッケージ
+ PDF 出力のエンジンの場合は、既定で適切なドライバが選択される
のでドライバオプションは不要である。
+ `dvipdfmx`: dvipdfmx 用のドライバを指定する。
- + `disabled`/`nodvidriver`: 全ての機能を無効化する。
+ + `nodvidriver`/`disabled`: 全ての機能を無効化する。
* `lenient`: サポートしない機能に対するエラーを警告に格下げする。
* `new-dvipdfmx`: dvipdfmx に対するバージョン検査を省略し、常に最新の
バージョンであると仮定する。
@@ -96,13 +96,15 @@ bxpdfver パッケージ
* 使用不可能な機能を使おうと試みるとエラーが発生する。
* `dvips` 等の“全く対応していない”若干のドライバオプションを認識
する。この場合、全ての機能の呼出でエラーが発生する。
- * `disabled` は特殊で、これを指定した場合は、どの機能の呼出でも
+ * `nodvidriver` は特殊で、これを指定した場合は、どの機能の呼出でも
エラーは発生しないが、全く何の動作も行わない。
更新履歴
--------
+ * Version 0.5a ‹2021/02/14›
+ - 新しい版の hyperref のための調整。
* Version 0.5 ‹2020/04/19›
- PDF バージョンの値として `2.0` をサポートする。
* Version 0.4 ‹2017/02/11›
diff --git a/Master/texmf-dist/doc/latex/bxpdfver/README.md b/Master/texmf-dist/doc/latex/bxpdfver/README.md
index ec17bff09a6..594c9ed8ddc 100644
--- a/Master/texmf-dist/doc/latex/bxpdfver/README.md
+++ b/Master/texmf-dist/doc/latex/bxpdfver/README.md
@@ -46,7 +46,7 @@ The available options are:
+ 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 @@ More notices:
* 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›
diff --git a/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty b/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty
index ad472da1b4f..826eef3efdd 100644
--- a/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty
+++ b/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty
@@ -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@pkgname{bxpdfver}
%% preparations
@@ -140,6 +140,10 @@
\else \expandafter\@gobble
\fi{\let\ifbxpv@defined\iffalse}
+%% \ifbxpv@old@hook@system
+\newif\ifbxpv@old@hook@system
+\@ifl@t@r\fmtversion{2020/10/01}{}{\bxpv@old@hook@systemtrue}
+
%--------------------------------------- internal dispatchers
%% \bxpv@suppress@compress
@@ -185,6 +189,9 @@
\@onlypreamble\bxpv@begin@document@hook
\let\bxpv@begin@document@hook\@empty
\AtBeginDocument{\bxpv@begin@document@hook}
+\g@addto@macro\bxpv@begin@document@hook{%
+ \bxpv@check@hyperref % must come first
+}
%% 'disabled' driver
\if 0\bxpv@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@tmpa\bxpv@tmpb\bxpv@end
\endgroup
+%% \bxpv@check@hyperref
+\def\bxpv@check@hyperref{%
+ \bxpv@oktrue
+ \ifx\bxpdfverMinorVersion\relax\else
+ \@ifpackageloaded{hyperref}{%
+ \expandafter\ifx\csname ifHy@setpdfversion\expandafter
+ \endcsname\csname iftrue\endcsname
+ \bxpv@okfalse
+ \fi
+ }{}%
+ \fi
+ \ifbxpv@ok\else
+ \PackageWarningNoLine\bxpv@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@drv@type % 'dvipdfmx'
%% required packages
+\ifbxpv@old@hook@system
\RequirePackage{atbegshi}[2007/04/19]% v1.2
+\fi
%% variables
\let\bxpv@C@value\relax
@@ -604,16 +644,12 @@
\fi
\ifbxpv@ok
\ifx\bxpdfverMinorVersion\relax\else
- \g@addto@macro\bxpv@page@specials{%
- \special{pdf:minorversion \the\bxpdfverMinorVersion}%
- }%
+ \bxpv@put@special{pdf:minorversion \the\bxpdfverMinorVersion}%
\fi
\ifx\bxpdfverMinorVersion\relax\else
\bxpv@cache@fetch{dvipdfmxver}%
\ifnum\bxpv@cache@@dvipdfmxver<20180217 \else
- \g@addto@macro\bxpv@page@specials{%
- \special{pdf:majorversion \the\bxpdfverMajorVersion}%
- }%
+ \bxpv@put@special{pdf:majorversion \the\bxpdfverMajorVersion}%
\fi
\fi
\fi
@@ -623,9 +659,7 @@
{Cannot suppress compression}%
\ifbxpv@ok
% New dvipdfmx supports this special.
- \g@addto@macro\bxpv@page@specials{%
- \special{dvipdfmx:config z 0}%
- }%
+ \bxpv@put@special{dvipdfmx:config z 0}%
\fi
\fi
% object compression
@@ -673,6 +707,7 @@
% special added to every page
\ifx\bxpv@page@specials\@empty\else
\edef\bxpv@page@specials{\bxpv@page@specials}%
+ \ifbxpv@old@hook@system
\AtBeginShipout{%
\setbox\AtBeginShipoutBox=\vbox{%
\baselineskip\z@skip\lineskip\z@skip\lineskiplimit\z@
@@ -680,6 +715,10 @@
\copy\AtBeginShipoutBox
}%
}%
+ \else
+ \AddToHook{shipout/foreground}{%
+ \hb@xt@\z@{\bxpv@page@specials\hss}}%
+ \fi
\fi
}