texlive[41837] Master/texmf-dist: bxpdfver (11aug16)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 11 23:42:45 CEST 2016


Revision: 41837
          http://tug.org/svn/texlive?view=revision&revision=41837
Author:   karl
Date:     2016-08-11 23:42:45 +0200 (Thu, 11 Aug 2016)
Log Message:
-----------
bxpdfver (11aug16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md
    trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/bxpdfver/README
    trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja

Deleted: trunk/Master/texmf-dist/doc/latex/bxpdfver/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/README	2016-08-11 02:09:46 UTC (rev 41836)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/README	2016-08-11 21:42:45 UTC (rev 41837)
@@ -1,84 +0,0 @@
-BXpdfver Package
-================
-
-LaTeX: To specify the version and compression level of output PDF files
-
-This package enables users to specify in their sources the following
-settings on the PDF document to output:
-
-  * PDF version (1.4, 1.5 etc.);
-  * whether or not to compress streams;
-  * whether or not to use object streams.
-
-### SYSTEM REQUIREMENT
-
-  * TeX format: LaTeX.
-  * TeX engine: pdfTeX, XeTeX, LuaTeX, and any DVI-output engines.
-  * DVI-ware: dvipdfmx.
-  * Required packages:
-      - atbegshi (when using dvipdfmx driver)
-
-### INSTALLATION
-
-  - `*.sty` → $TEXMF/tex/latex/BXpdfver
-
-### LICENSE
-
-This package is distributed under the MIT license.
-
-bxpdfver package
-----------------
-
-### PACKAGE LOADING
-
-    \usepackage[<option>,...]{bxpdfver}
-
-The available options are:
-
-  * `1.4`, `1.5`, `1.6`, or `1.7`: Sets PDF version.
-  * `nocompress`: Suppresses stream compression.
-  * `compress` (defalt): Does not suppress stream compression.
-  * `noobjcompress`: Suppresses use of object streams.
-  * `objcompress` (default): Does not suppress use of object streams.
-  * Driver options: As below:
-      + When using a PDF-output engine, you need not give driver options
-        since the appropriate one is auto-detected.
-      + `dvipdfmx`: Uses dvipdfmx driver.
-      + `disabled`: Disables all functions of the package.
-
-Note that the options `compress` and `objcompress` mean that this
-package *does not suppress* a feature. They do not active a feature
-when it is already suppressed by other means.
-
-### NOTE ON DRIVERS
-
-  * pdfTeX and LuaTeX support all features.
-  * XeTeX and dvipdfmx support only PDF version setting.
-  * If you try to use unavailable features, an error will occur.
-  * 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
-    issue an error).
-
-### COMMANDS
-
-  * `\setpdfversion{<version>}`: Sets PDF version.
-    Here `<version>` is either one of the following:
-      + `1.4`, `1.5`, `1.6`, or `1.7`; the version itself.
-      + the name of a PDF file; the version is set equal to that of
-        the given file.
-  * `\suppresspdfcompression`: Suppresses use of object streams.
-  * `\suppresspdfobjcompression`: Suppresses use of object streams.
-
-REVISION HISTORY
-----------------
-
-  * Version 0.2a [2015/08/05]
-      - Minor fix.
-  * Version 0.2  [2014/07/04]
-      - First public version.
-
---------------------
-Takayuki YATO (aka. "ZR")  
-http://zrbabbler.sp.land.to/

Deleted: trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja	2016-08-11 02:09:46 UTC (rev 41836)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja	2016-08-11 21:42:45 UTC (rev 41837)
@@ -1,87 +0,0 @@
-BXpdfver パッケージバンドル
-===========================
-
-LaTeX: 出力 PDF のバージョンや圧縮状態を指定する
-
-LaTeX 文書を PDF 文書に変換する際に出力 PDF に関する以下の設定を文書中で
-行う機能を提供する。
-
-  * PDF バージョン(1.4, 1.5 等)
-  * ストリームの圧縮の有無
-  * オブジェクトストリームの使用の有無
-
-### 前提環境
-
-  * フォーマット: LaTeX
-  * エンジン: 不問
-  * DVIウェア: dvipdfmx、および PDF 出力のエンジン
-  * 依存パッケージ:
-      - atbegshi(dvipdfmx ドライバの場合)
-
-### インストール
-
-  - `*.sty` → $TEXMF/tex/latex/BXpdfver
-
-### ライセンス
-
-本パッケージは MIT ライセンスの下で配布される。
-
-bxpdfver パッケージ
--------------------
-
-### パッケージ読込
-
-    \usepackage[<オプション>,...]{bxpdfver}
-
-利用可能なオプションは以下の通り。
-
-  * `1.4`、`1.5`、`1.6`、`1.7`: PDF バージョンを指定する。
-  * `nocompress`: ストリームの圧縮を抑止する。
-  * `compress`(既定): ストリームの圧縮を抑止しない。
-  * `noobjcompress`: オブジェクトストリームの使用を抑止する。
-  * `objcompress`(既定): オブジェクトストリームの使用を抑止しない。
-  * ドライバオプション: 以下の通り。なお、後述の「ドライバ指定」の
-    節も参照されたい。
-      + PDF 出力のエンジンの場合は、既定で適切なドライバが選択される
-        のでドライバオプションは不要である。
-      + `dvipdfmx`: dvipdfmx 用のドライバを指定する。
-      + `disabled`: 全ての機能を無効化する。
-
-`compress`、`objcompress` はこのパッケージによる抑止を行わないという意味
-であり、既に抑止されている場合にそれを再び有効化するものではない。
-
-### ドライバ指定
-
-  * pdfTeX および LuaTeX では全ての機能が使用可能。
-  * XeTeX および dvipdfmx では PDF バージョン指定のみ使用可能。
-  * 使用不可能な機能を使おうと試みるとエラーが発生する。
-  * `dvips` 等の“全く対応していない”若干のドライバオプションを認識
-    する。この場合、全ての機能の呼出でエラーが発生する。
-  * `disabled` は特殊で、これを指定した場合は、どの機能の呼出でも
-    エラーは発生しないが、全く何の動作も行わない。
-
-### 機能
-
-  * `\setpdfversion{<バージョン>}`: 出力 PDF バージョンを指定する。
-    `<バージョン>` には以下の何れかを指定する。
-      + `1.4`、`1.5`、`1.6`、`1.7` の何れか。バージョンをその値に設定
-        する。
-      + PDF ファイルの名前。この場合、その PDF のバージョンと同じ値に
-        設定する。
-  * `\suppresspdfcompression`: ストリームの圧縮を抑止する。
-  * `\suppresspdfobjcompression`: オブジェクトストリームの使用を抑止
-    する。(実はこの指定自体は圧縮とは無関係であるが、pdfTeX エンジンの
-    プリミティブ `\pdfobjcompresslevel` に合わせた命令名を用いた。)
-
-
-更新履歴
---------
-
-  * Version 0.2a [2015/08/05]
-      - 細かい修正。
-  * Version 0.2  [2014/07/04]
-      - 最初の公開版。
-
---------------------
-Takayuki YATO (aka. "ZR")  
-http://zrbabbler.sp.land.to/

Added: trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md	2016-08-11 21:42:45 UTC (rev 41837)
@@ -0,0 +1,102 @@
+BXpdfver パッケージバンドル
+===========================
+
+LaTeX: 出力 PDF のバージョンや圧縮状態を指定する
+
+LaTeX 文書を PDF 文書に変換する際に出力 PDF に関する以下の設定を文書中で
+行う機能を提供する。
+
+  * PDF バージョン(1.4, 1.5 等)
+  * ストリームの圧縮の有無
+  * オブジェクトストリームの使用の有無
+
+### 前提環境
+
+  * フォーマット: LaTeX
+  * エンジン: 不問
+  * DVIウェア: dvipdfmx、および PDF 出力のエンジン
+  * 依存パッケージ:
+      - atbegshi(dvipdfmx ドライバの場合)
+
+### インストール
+
+  - `*.sty` → $TEXMF/tex/latex/BXpdfver
+
+### ライセンス
+
+本パッケージは MIT ライセンスの下で配布される。
+
+bxpdfver パッケージ
+-------------------
+
+### パッケージ読込
+
+    \usepackage[<オプション>,...]{bxpdfver}
+
+利用可能なオプションは以下の通り。
+
+  * `1.4`、`1.5`、`1.6`、`1.7`: PDF バージョンを指定する。
+  * `nocompress`: ストリームの圧縮を抑止する。
+  * `compress`(既定): ストリームの圧縮を抑止しない。
+  * `noobjcompress`: オブジェクトストリームの使用を抑止する。
+  * `objcompress`(既定): オブジェクトストリームの使用を抑止しない。
+  * ドライバオプション: 以下の通り。なお、後述の「ドライバ指定」の
+    節も参照されたい。
+      + PDF 出力のエンジンの場合は、既定で適切なドライバが選択される
+        のでドライバオプションは不要である。
+      + `dvipdfmx`: dvipdfmx 用のドライバを指定する。
+      + `disabled`: 全ての機能を無効化する。
+  * `lenient`: サポートしない機能に対するエラーを警告に格下げする。
+
+`compress`、`objcompress` はこのパッケージによる抑止を行わないという意味
+であり、既に抑止されている場合にそれを再び有効化するものではない。
+
+### ドライバ指定
+
+  * pdfTeX および LuaTeX では全ての機能が使用可能。
+  * XeTeX および dvipdfmx の場合:
+      - 「PDF バージョン指定」は無条件に使用可能。
+      - 「オブジェクト圧縮抑止」および「オブジェクトストリーム抑止」の
+        機能を使用するためには、(x)dvipdfmx のバージョンが 20160307 以上
+        である必要がある。またバージョン判定のために外部プログラムの
+        起動を利用するため、シェルエスケープが制限付許可または完全許可
+        されている必要がある。
+      - dvipdfmx のバージョン情報は補助ファイル(.aux)中にキャッシュ
+        される。このため、何か状況が変わった場合は、一旦補助ファイルを
+        削除する必要が生じる。
+  * 使用不可能な機能を使おうと試みるとエラーが発生する。
+  * `dvips` 等の“全く対応していない”若干のドライバオプションを認識
+    する。この場合、全ての機能の呼出でエラーが発生する。
+  * `disabled` は特殊で、これを指定した場合は、どの機能の呼出でも
+    エラーは発生しないが、全く何の動作も行わない。
+
+### 機能
+
+  * `\setpdfversion{<バージョン>}`: 出力 PDF バージョンを指定する。
+    `<バージョン>` には以下の何れかを指定する。
+      + `1.4`、`1.5`、`1.6`、`1.7` の何れか。バージョンをその値に設定
+        する。
+      + PDF ファイルの名前。この場合、その PDF のバージョンと同じ値に
+        設定する。
+  * `\suppresspdfcompression`: ストリームの圧縮を抑止する。
+  * `\suppresspdfobjcompression`: オブジェクトストリームの使用を抑止
+    する。(実はこの指定自体は圧縮とは無関係であるが、pdfTeX エンジンの
+    プリミティブ `\pdfobjcompresslevel` に合わせた命令名を用いた。)
+
+
+更新履歴
+--------
+
+  * Version 0.3  ‹2016/08/11›
+      - dvipdfmx/XeTeX でも全ての機能がサポートされる。
+  * Version 0.2b ‹2016/08/10›
+      - `lenient` オプションを追加。
+      - 新しい LuaTeX エンジンのサポート。
+  * Version 0.2a ‹2015/08/05›
+      - 細かい修正。
+  * Version 0.2  ‹2014/07/04›
+      - 最初の公開版。
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+http://zrbabbler.sp.land.to/


Property changes on: trunk/Master/texmf-dist/doc/latex/bxpdfver/README-ja.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md	2016-08-11 21:42:45 UTC (rev 41837)
@@ -0,0 +1,96 @@
+BXpdfver Package
+================
+
+LaTeX: To specify the version and compression level of output PDF files
+
+This package enables users to specify in their sources the following
+settings on the PDF document to output:
+
+  * PDF version (1.4, 1.5 etc.);
+  * whether or not to compress streams;
+  * whether or not to use object streams.
+
+### SYSTEM REQUIREMENT
+
+  * TeX format: LaTeX.
+  * TeX engine: pdfTeX, XeTeX, LuaTeX, and any DVI-output engines.
+  * DVI-ware: dvipdfmx.
+  * Required packages:
+      - atbegshi (when using dvipdfmx driver)
+
+### INSTALLATION
+
+  - `*.sty` → $TEXMF/tex/latex/BXpdfver
+
+### LICENSE
+
+This package is distributed under the MIT license.
+
+bxpdfver package
+----------------
+
+### PACKAGE LOADING
+
+    \usepackage[<option>,...]{bxpdfver}
+
+The available options are:
+
+  * `1.4`, `1.5`, `1.6`, or `1.7`: Sets PDF version.
+  * `nocompress`: Suppresses stream compression.
+  * `compress` (default): Does not suppress stream compression.
+  * `noobjcompress`: Suppresses use of object streams.
+  * `objcompress` (default): Does not suppress use of object streams.
+  * Driver options: As below:
+      + When using a PDF-output engine, you need not give driver options
+        since the appropriate one is auto-detected.
+      + `dvipdfmx`: Uses dvipdfmx driver.
+      + `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
+package *does not suppress* a feature. They do not activate a feature
+when it is already suppressed by other means.
+
+### NOTE ON DRIVERS
+
+  * pdfTeX and LuaTeX support all features.
+  * When using XeTeX and dvipdfmx:
+      - PDF version setting is always available.
+      - Suppression of compression and suppression of object streams
+        are available only when the version of (x)dvipdfmx is 20160307
+        or later. Also shell escape must be accepted (with or without
+        restriction), because external programs (such as kpsewhich)
+        are invoked in order to detect the dvipdfmx version.
+  * If you try to use unavailable features, an error will occur.
+  * 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
+    issue an error).
+
+### COMMANDS
+
+  * `\setpdfversion{<version>}`: Sets PDF version.
+    Here `<version>` is either one of the following:
+      + `1.4`, `1.5`, `1.6`, or `1.7`; the version itself.
+      + the name of a PDF file; the version is set equal to that of
+        the given file.
+  * `\suppresspdfcompression`: Suppresses stream compression.
+  * `\suppresspdfobjcompression`: Suppresses use of object streams.
+
+REVISION HISTORY
+----------------
+
+  * Version 0.3  ‹2016/08/11›
+      - Supported all features on dvipdfmx/XeTeX.
+  * Version 0.2b ‹2016/08/10›
+      - Added the `lenient` option.
+      - Supported the newer version of LuaTeX.
+  * Version 0.2a ‹2015/08/05›
+      - Minor fix.
+  * Version 0.2  ‹2014/07/04›
+      - First public version.
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+http://zrbabbler.sp.land.to/


Property changes on: trunk/Master/texmf-dist/doc/latex/bxpdfver/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty	2016-08-11 02:09:46 UTC (rev 41836)
+++ trunk/Master/texmf-dist/tex/latex/bxpdfver/bxpdfver.sty	2016-08-11 21:42:45 UTC (rev 41837)
@@ -2,23 +2,26 @@
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxpdfver}[2015/08/05 v0.2a]
+\ProvidesPackage{bxpdfver}[2016/08/11 v0.3]
+\def\bxpv at pkgname{bxpdfver}
 
 %% preparations
-\def\bxpv at pkgname{bxpdfver}
-\def\bxpv at error{\PackageError\bxpv at pkgname}
-\def\bxpv at info{\PackageInfo\bxpv at pkgname}
+\RequirePackage{ifthen}[]% for \newboolean
+\newif\ifbxpv at ok
+\providecommand\bxDebug[1]{}
 
+%--------------------------------------- package options
+
 %% variables
-\newif\ifbxpv at ok
-\let\bxpv at drv@type\relax
-\let\bxpv at drv@name\relax
-\let\bxpv at version\relax
-\let\bxpv at mversion\relax
-\let\bxpv at compress=t
-\let\bxpv at obj@compress=t
+\let\bxpv at drv@type\relax  % driver type
+   % p=pdfmode,d=dvipdfmx,0=disabled,x=unsupported
+\let\bxpv at drv@name\relax  % driver name
+\let\bxpv at version\relax   % version value (eg. 1.4)
+\let\bxpv at compress=t      % use compression?
+\let\bxpv at obj@compress=t  % use object stream?
+\chardef\bxpv at infolevel=2 % info-log level
 
-%% process options
+%% options
 % (PDF version)
 \DeclareOption{1.4}{%
   \edef\bxpv at version{\CurrentOption}%
@@ -68,11 +71,20 @@
   \let\bxpv at drv@type=x%
   \def\bxpv at drv@name{dviout}%
 }
+\DeclareOption{xdvi}{%
+  \let\bxpv at drv@type=x%
+  \def\bxpv at drv@name{xdvi}%
+}
 \DeclareOption{disabled}{%
   \let\bxpv at drv@type=0%
   \def\bxpv at drv@name{disabled}%
 }
-%
+% (other)
+\DeclareOption{lenient}{%
+  \chardef\bxpv at infolevel=1
+}
+
+%% process
 \ProcessOptions*
 
 %--------------------------------------- helpers
@@ -79,35 +91,75 @@
 
 %% unique tokens
 \def\bxpv at end{\bxpv at end@}
+\def\bxpv at mkj{\bxpv at mk@}
 \def\bxpv at mt{\bxpv at mt@}
 
-%--------------------------------------- environment check
+%% \bxpv at csletcs
+\def\bxpv at csletcs#1#2{%
+  \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname
+}
 
+%% \bxpv at detokenize\CS
+\def\bxpv at detokenize#1{%
+  \expandafter\bxpv at detokenize@a\meaning#1\bxpv at end#1%
+}
+\def\bxpv at detokenize@a#1>#2\bxpv at end#3{%
+  \def#3{#2}%
+}
+
+%% \bxpv at fail{<message>}
+% Issues an error or a warning.
+\@onlypreamble\bxpv at fail
+\def\bxpv at fail#1{%
+  \ifcase\bxpv at infolevel % silenced
+  \or % lenient
+    \PackageWarningNoLine\bxpv at pkgname{#1}%
+  \or % strict
+    \PackageError\bxpv at pkgname{#1}{\@ehc}%
+  \fi
+}
+
+%--------------------------------------- internal dispatchers
+
 %% \bxpv at suppress@compress
 \@onlypreamble\bxpv at suppress@compress
 \def\bxpv at suppress@compress{%
-  \bxpv at error{Cannot suppress compression}%
-  \bxpv at errh@na
+  \bxpv at fail
+   {Cannot suppress compression, because\MessageBreak
+    the engine/driver does not support the feature}%
 }
 %% \bxpv at suppress@obj at compress
 \@onlypreamble\bxpv at suppress@obj at compress
 \def\bxpv at suppress@obj at compress{%
-  \bxpv at error{Cannot suppress object compression}%
-  \bxpv at errh@na
+  \bxpv at fail
+   {Cannot suppress object compression, because\MessageBreak
+    the engine/driver does not support the feature}%
 }
 %% \bxpv at set@version
 \@onlypreamble\bxpv at set@version
 \def\bxpv at set@version{%
-  \bxpv at error{Cannot set PDF version}%
-  \bxpv at errh@na
+  \bxpv at fail
+   {Cannot set PDF version, because\MessageBreak
+    the engine/driver does not support the feature}%
 }
-%% \bxpv at errh@na
-\@onlypreamble\bxpv at errh@na
-\def\bxpv at errh@na{%
-  This feature is not supported by the engine in use.%
-  \MessageBreak\@ehc
-}
+%% \bxpv at cancel@obj at compress
+% The silent version of \bxpv at suppress@obj at compress.
+\@onlypreamble\bxpv at cancel@obj at compress
+\let\bxpv at cancel@obj at compress\relax
 
+%% \bxpv at begin@document at hook
+% The begin-document hook.
+\@onlypreamble\bxpv at begin@document at hook
+\let\bxpv at begin@document at hook\@empty
+\AtBeginDocument{\bxpv at begin@document at hook}
+
+%% 'disabled' driver
+\if 0\bxpv at drv@type
+  \chardef\bxpv at infolevel=0
+\fi
+
+%% adjust internal dispatchers
+\ifx 0\bxpv at drv@type\else               %--------
 \begingroup
 
 %% \bxpv at check@prim\CS{<proc>}
@@ -120,89 +172,83 @@
   \fi
 }
 
-%% \bxpv at pdfoutput: use PDF output?
-\ifx\pdfoutput\@undefined
-  \chardef\bxpv at pdfoutput\z@
-  % XeTeX might support \pdfminorversion etc in the future :)
-  \bxpv at check@prim\XeTeXversion{\chardef\bxpv at pdfoutput\@ne}%
-  % pTeX-ng
-  \bxpv at check@prim\ngbanner{\chardef\bxpv at pdfoutput\@ne}%
-\else
-  \chardef\bxpv at pdfoutput\pdfoutput
-\fi
+%% \bxpv at pdfoutput
+\chardef\bxpv at pdfoutput\z@
+\bxpv at check@prim\pdfoutput{\chardef\bxpv at pdfoutput\pdfoutput}
+\bxpv at check@prim\outputmode{\chardef\bxpv at pdfoutput\outputmode}
+\bxpv at check@prim\ngbanner{\chardef\bxpv at pdfoutput\@ne}
 
-%% adjust internal dispatchers
-\bxpv at okfalse
-\ifnum\bxpv at pdfoutput>\z@ % PDF-output
+%% when in PDF mode
+\ifnum\bxpv at pdfoutput>\z@
   \global\let\bxpv at drv@type=p
-  % \bxpv at isupp@obj at compress: auto-supress of obj-compression
-  \@onlypreamble\bxpv at isupp@obj at compress
-  \global\let\bxpv at isupp@obj at compress\relax
-  % \bxpv at iunsupp@obj at compress: un-auto-supress
-  \@onlypreamble\bxpv at iunsupp@obj at compress
-  \global\let\bxpv at iunsupp@obj at compress\relax
-  %% If \pdfcompresslevel is available, use it.
-  \bxpv at check@prim\pdfcompresslevel{%
+  \global\let\bxpv@@compresslevel\pdfcompresslevel
+  \global\let\bxpv@@objcompresslevel\pdfobjcompresslevel
+  \global\let\bxpv@@minorversion\pdfminorversion
+  \bxpv at check@prim\pdfvariable{%
+    \protected\xdef\bxpv@@compresslevel{\pdfvariable compresslevel}%
+    \protected\xdef\bxpv@@objcompresslevel{\pdfvariable objcompresslevel}%
+    \protected\xdef\bxpv@@minorversion{\pdfvariable minorversion}%
+  }%
+  % If \pdfcompresslevel is available, use it.
+  \ifx\bxpv@@compresslevel\@undefined\else
     \gdef\bxpv at suppress@compress{%
-      \global\pdfcompresslevel\z@
+      \global\bxpv@@compresslevel\z@
     }%
-  }
-  %% If \pdfobjcompresslevel is available, use it.
-  \bxpv at check@prim\pdfobjcompresslevel{%
-    \global\chardef\bxpv at org@pdfobjcompresslevel\pdfobjcompresslevel
+  \fi
+  % If \pdfobjcompresslevel is available, use it.
+  \ifx\bxpv@@objcompresslevel\@undefined\else
+    \global\chardef\bxpv at org@objcompresslevel\bxpv@@objcompresslevel
     \gdef\bxpv at suppress@obj at compress{%
-      \global\pdfobjcompresslevel\z@
-      \global\let\bxpv at iunsupp@obj at compress\relax
+      \global\bxpv@@objcompresslevel\z@
     }%
-    \gdef\bxpv at isupp@obj at compress{%
-      \global\pdfobjcompresslevel\z@
+    \global\let\bxpv at cancel@obj at compress\bxpv at suppress@obj at compress
+  \fi
+  % If \pdfminorversion is available, use it.
+  \ifx\bxpv@@minorversion\@undefined\else
+    \global\chardef\bxpv at org@minorversion\bxpv@@minorversion
+    \gdef\bxpv at set@version{%
+      \ifx\bxpdfverMinorVersion\relax
+        \global\bxpv@@minorversion\bxpv at org@minorversion
+      \else
+        \global\bxpv@@minorversion\bxpdfverMinorVersion
+      \fi
     }%
-    \gdef\bxpv at iunsupp@obj at compress{%
-      \global\pdfobjcompresslevel\bxpv at org@pdfobjcompresslevel
+    \g at addto@macro\bxpv at begin@document at hook{%
+      \ifnum\bxpv@@minorversion<5
+        \bxpv at cancel@obj at compress
+      \fi
     }%
-  }
-  \bxpv at check@prim\pdfminorversion\bxpv at oktrue
-\fi
-\ifbxpv at ok % \pdfminorversion is available
-  \global\chardef\bxpv at org@pdfminorversion\pdfminorversion
-  \gdef\bxpv at set@version{%
-    \ifx\bxpv at mversion\relax
-      \global\pdfminorversion\bxpv at org@pdfminorversion
-    \else
-      \global\pdfminorversion\bxpv at mversion
-    \fi
-    \ifnum\pdfminorversion<5
-      \bxpv at isupp@obj at compress
-    \else
-      \bxpv at iunsupp@obj at compress
-    \fi
-  }%
+  \fi
 \else
-  % XeTeX now does not have \pdfminorversion,
-  % so do it just as dvipdfmx.
+  % XeTeX should do just as dvipdfmx.
   \bxpv at check@prim\XeTeXversion{%
     \global\let\bxpv at drv@type=d%
   }
 \fi
 
-%% driver check
+%% when in DVI mode
 \if x\bxpv at drv@type % 'bad' driver
-  \bxpv at error{Unsupported driver '\bxpv at drv@name'}\@ehc
+  \bxpv at fail{Unsupported driver '\bxpv at drv@name'}%
   % no further errors
-  \let\bxpv at drv@type=0\relax
-\fi
-\if d\bxpv at drv@type % 'dvipdfmx'
+  \global\chardef\bxpv at infolevel=0
+\else\if d\bxpv at drv@type % 'dvipdfmx'
+  \global\let\bxpv at suppress@compress\relax
+  \global\let\bxpv at suppress@obj at compress\relax
   \global\let\bxpv at set@version\relax
-  \AtBeginDocument{%
-    \bxpv at set@version at dvipdfmx
+  \g at addto@macro\bxpv at begin@document at hook{%
+    \bxpv at begin@document at dvipdfmx
   }
-\else\if 0\bxpv at drv@type % 'disabled'
-  \global\let\bxpv at set@version\relax
-  \global\let\bxpv at suppress@compress\relax
-  \global\let\bxpv at suppress@obj at compress\relax
-\fi\fi
+  \AtEndOfPackage{\g at addto@macro\bxpv at begin@document at hook{%
+    \bxpv at cache@finalize
+  }}
+\else\if \relax\bxpv at drv@type % no driver
+  \bxpv at fail
+   {No driver option is given}%
+  \global\chardef\bxpv at infolevel=0
+\fi\fi\fi
 
 \endgroup
+\fi                                     %--------
 
 %--------------------------------------- public interface
 
@@ -210,6 +256,7 @@
 \@onlypreamble\suppresspdfcompression
 \newcommand*\suppresspdfcompression{%
   \bxpv at suppress@compress
+  \global\bxpdfverCompressionSuppressedtrue
 }
 
 %%<*> \suppresspdfobjcompression
@@ -216,6 +263,7 @@
 \@onlypreamble\suppresspdfobjcompression
 \newcommand*\suppresspdfobjcompression{%
   \bxpv at suppress@obj at compress
+  \global\bxpdfverObjCompressionSuppressedtrue
 }
 
 %%<*> \setpdfversion{<version>}
@@ -226,15 +274,34 @@
   \bxpv at set@version
 }
 
+%%<+> \ifbxpdfverCompressionSuppressed
+\newboolean{bxpdfverCompressionSuppressed}
+
+%%<+> \ifbxpdfverObjCompressionSuppressed
+\newboolean{bxpdfverObjCompressionSuppressed}
+
+%%<+> \bxpdfverMinorVersion
+% The PDF minor version (eg. '4' for 1.4) that this package
+% will impose. It is a number constant, or \relax.
+% (number constant or \relax)
+\@ifdefinable{\bxpdfverMinorVersion}{%
+  \let\bxpdfverMinorVersion\relax
+}
+
 %--------------------------------------- version values
 
+%% variables
+\let\bxpv at mversion\relax  % minor version (temporary)
+
 %% \bxpv at get@mversion
-% Sets \bxpv at mversion.
-% Note: \bxpv at version is assumed to be already expnaded.
+% Sets \bxpdfverMinorVersion.
 \@onlypreamble\bxpv at get@mversion
 \def\bxpv at get@mversion{%
-  \let\bxpv at mversion\relax
-  \ifx\bxpv at version\@empty\else
+  \edef\bxpv at version{\bxpv at version}%
+  \ifx\bxpv at version\@empty
+    \global\let\bxpdfverMinorVersion\relax % unset
+  \else
+    \let\bxpv at mversion\relax
     \@tfor\bxpv at x:=456789\do{%
       \edef\bxpv at tmpa{1.\bxpv at x}%
       \ifx\bxpv at version\bxpv at tmpa
@@ -245,14 +312,17 @@
       \bxpv at file@mversion
     \fi
     \ifx\bxpv at mversion\relax
-      \bxpv at error{Invalid value given for PDF version\MessageBreak
+      \PackageError\bxpv at pkgname
+       {Invalid value given for PDF version\MessageBreak
         (value=\bxpv at version)}{%
         PDF version must be either 1.4, 1.5, ..., 1.9, or\MessageBreak
         or the name of a PDF file from which the version is pulled.%
         \MessageBreak\@ehc}%
     \else
-      \bxpv at info{Output PDF version is set to 1.\the\bxpv at mversion
+      \PackageInfo\bxpv at pkgname
+       {Output PDF version is set to 1.\the\bxpv at mversion
         \MessageBreak}%
+      \global\let\bxpdfverMinorVersion\bxpv at mversion
     \fi
   \fi
 }
@@ -260,44 +330,33 @@
 %% \bxpv at file@mversion
 \@onlypreamble\bxpv at file@mversion
 \def\bxpv at file@mversion{%
-  \begingroup
-    \expandafter\bxpv at file@mversion at a\bxpv at version\bxpv at end
-    \global\let\bxpv at gtmpa\bxpv at mversion
-  \endgroup
-  \let\bxpv at mversion\bxpv at gtmpa
+  \let\bxpv at mversion\relax
+  \expandafter\bxpv at file@mversion at a\bxpv at version\bxpv at end
 }
 \@onlypreamble\bxpv at file@mversion at a
 \def\bxpv at file@mversion at a#1\bxpv at end{%
-  \bxpv at okfalse
-  \lowercase{\bxpv at file@mversion at b#1}%
-   \bxpv at mark.pdf\bxpv at mark\bxpv at end
-  \ifbxpv at ok
-    \openin\@inputcheck=#1\relax
-    \bxpv at file@mversion at c
-    \closein\@inputcheck
+  \filename at parse{#1}%
+  \edef\bxpv at next{%
+    \lowercase{\def\noexpand\filename at ext{\filename at ext}}%
+  }\bxpv at next
+  \def\bxpv at tmpb{pdf}%
+  \ifx\filename at ext\bxpv at tmpb
+    \global\let\bxpv at gtmpa\relax
+    \bxpv at read@file{#1}{%
+      \bxpv at file@mversion at xa{##1 }%
+      \bxpv at read@file at finish
+    }%
+    \ifbxpv at read@file at ok\else
+      \PackageWarning\bxpv at pkgname
+       {File '#1' not found}%
+    \fi
     \@tfor\bxpv at x:=456789\do{%
-      \ifx\bxpv at x\bxpv at tmpb
+      \ifx\bxpv at x\bxpv at gtmpa
         \chardef\bxpv at mversion=\bxpv at x\relax
       \fi
     }%
   \fi
 }
-\@onlypreamble\bxpv at file@mversion at b
-\def\bxpv at file@mversion at b#1.pdf\bxpv at mark#2\bxpv at end{%
-  \ifx\bxpv at mt#2\bxpv at mt\else \bxpv at oktrue \fi
-}
-\@onlypreamble\bxpv at file@mversion at c
-\def\bxpv at file@mversion at c{%
-  \@tempcnta\z@
-  \loop\ifnum\@tempcnta<\@cclvi
-    \catcode\@tempcnta12 %
-    \advance\@tempcnta\@ne
-  \repeat
-  \endlinechar=32
-  \catcode32=10
-  \read\@inputcheck to\bxpv at tmpb
-  \expandafter\bxpv at file@mversion at xa\bxpv at tmpb\bxpv at end
-}
 % some more subprocedures
 \@onlypreamble\bxpv at file@mversion at xa
 \@onlypreamble\bxpv at file@mversion at xb
@@ -305,7 +364,7 @@
 \begingroup
   \escapechar\m at ne
   \def\bxpv at tmpa#1\bxpv at end{%
-    \gdef\bxpv at file@mversion at xa##1\bxpv at end{%
+    \gdef\bxpv at file@mversion at xa##1{%
       \bxpv at file@mversion at xb##1#1\bxpv at end
     }%
     \gdef\bxpv at file@mversion at xb##1#1##2\bxpv at end{%
@@ -314,7 +373,7 @@
       \fi
     }%
     \gdef\bxpv at file@mversion at xc##1 ##2\bxpv at end{%
-      \def\bxpv at tmpb{##1}%
+      \gdef\bxpv at gtmpa{##1}%
     }%
   }
   \edef\bxpv at tmpb{{\expandafter\string\csname\string\%PDF-1.\endcsname}}%
@@ -325,17 +384,57 @@
 \ifx d\bxpv at drv@type % 'dvipdfmx'
 
 %% required packages
-\RequirePackage{atbegshi}[2009/07/70]
+\RequirePackage{atbegshi}[2007/04/19]% v1.2
 
-%% \bxpv at set@version at dvipdfmx
-\@onlypreamble\bxpv at set@version at dvipdfmx
-\def\bxpv at set@version at dvipdfmx{%
-  \ifx\bxpv at mversion\relax\else
-    % special added to every page
+%% variables
+\let\bxpv at C@value\relax
+
+%% \bxpv at page@specials
+\let\bxpv at page@specials\@empty
+
+%% \bxpv at begin@document at dvipdfmx
+\@onlypreamble\bxpv at begin@document at dvipdfmx
+\def\bxpv at begin@document at dvipdfmx{%
+  % PDF version
+  \ifx\bxpdfverMinorVersion\relax\else
+    \g at addto@macro\bxpv at page@specials{%
+      \special{pdf:minorversion \the\bxpdfverMinorVersion}%
+    }%
+  \fi
+  % compression
+  \ifbxpdfverCompressionSuppressed
+    \bxpv at check@dvipdfmx at version{Cannot suppress compression}%
+    \ifbxpv at ok
+      % New dvipdfmx supports this special.
+      \g at addto@macro\bxpv at page@specials{%
+        \special{dvipdfmx:config z 0}%
+      }%
+    \fi
+  \fi
+  % object compression
+  \ifbxpdfverObjCompressionSuppressed
+    \bxpv at check@dvipdfmx at version{Cannot suppress object compression}%
+    \ifbxpv at ok
+      \bxpv at cache@fetch{dvipdfmxcfg}%
+      \def\bxpv at C@value{0}%
+      \ifx\bxpv at cache@@dvipdfmxcfg\@empty\else
+        \def\bxpv at next##1##2{\def\bxpv at C@value{##1}}%
+        \expandafter\bxpv at next\bxpv at cache@@dvipdfmxcfg
+      \fi
+      \bxpv at rc@bitset{\bxpv at C@value}{64}%
+      \let\bxpv at C@value\bxpv at rc@num
+      \g at addto@macro\bxpv at page@specials{%
+        \special{dvipdfmx:config C \bxpv at C@value}%
+      }%
+    \fi
+  \fi
+  % special added to every page
+  \ifx\bxpv at page@specials\@empty\else
+    \edef\bxpv at page@specials{\bxpv at page@specials}%
     \AtBeginShipout{%
       \setbox\AtBeginShipoutBox=\vbox{%
         \baselineskip\z at skip\lineskip\z at skip\lineskiplimit\z@
-        \special{pdf:minorversion \the\bxpv at mversion}%
+        \bxpv at page@specials
         \copy\AtBeginShipoutBox
       }%
     }%
@@ -342,12 +441,284 @@
   \fi
 }
 
+%% \bxpv at check@dvipdfmx at version
+\@onlypreamble\bxpv at check@dvipdfmx at version
+\def\bxpv at check@dvipdfmx at version#1{%
+  \bxpv at cache@fetch{dvipdfmxver}%
+  \bxpv at okfalse
+  \ifnum\bxpv at cache@@dvipdfmxver=\z@
+    \bxpv at fail
+     {#1, because the\MessageBreak
+      version of dvipdfmx in use is unknown
+      \MessageBreak (v.20160307 or later is required)}%
+  \else\ifnum\bxpv at cache@@dvipdfmxver<20160307
+    \bxpv at fail
+     {#1, because the\MessageBreak
+      version of dvipdfmx in use (v.\bxpv at cache@@dvipdfmxver) is too old
+      \MessageBreak (v.20160307 or later is required)}%
+  \else
+    \PackageInfo\bxpv at pkgname
+     {dvipdfmx version is \bxpv at cache@@dvipdfmxver\@gobble}%
+    \bxpv at oktrue
+  \fi\fi
+}
+
 \fi
+%--------------------------------------- software version
+
+%% \bxpv at cache@get@@newtex
+% Returns 1 if the version of TeX is 3.14159265 (released on
+% 2014/01/20) or later, 0 otherwise.
+\@onlypreamble\bxpv at cache@get@@newtex
+\def\bxpv at cache@get@@newtex{%
+  \edef\bxpv at tmpa{\expandafter\noexpand\csname\endcsname}%
+  \def\bxpv at tmpb##1 ##2##3\@nil{\gdef\bxpv at g@value{##2}}%
+  \expandafter\bxpv at tmpb\meaning\bxpv at tmpa1 0\@nil
+}
+
+%% \bxpv at cache@get@@dvipdfmxver
+% Returns the version of dvipdfmx (eg. 20110311).
+% It returns 0 in failure.
+\@onlypreamble\bxpv at cache@get@@dvipdfmxver
+\def\bxpv at cache@get@@dvipdfmxver{%
+  % Here the version of TeX is checked, bacause on old TeX
+  % engines on Windows, pipe inputs will fail when the
+  % command line has arguments.
+  \bxpv at cache@fetch{newtex}%
+  \global\let\bxpv at gtmpa\relax
+  \ifnum\bxpv at cache@@newtex>\z@
+    \def\bxpv at tmpc{This is extractbb Version }%
+    \bxpv at detokenize\bxpv at tmpc
+    \bxpv at read@file{"|extractbb --version"}{%
+      \bxpv at split@at{\bxpv at tmpc}{##1}%
+      \ifx\bxpv at pre\relax\else
+        \global\let\bxpv at gtmpa\bxpv at post
+      \fi
+    }%
+  \fi
+  \ifx\bxpv at gtmpa\relax % failed somewhere
+    \gdef\bxpv at g@value{0}%
+  \else
+    \global\let\bxpv at g@value\bxpv at gtmpa
+  \fi
+}
+
+%--------------------------------------- dvipdfmx config
+
+%% variables
+\let\bxpv at rc@num\relax
+
+%% \bxpv at cache@get@@dvipdfmxcfg
+\@onlypreamble\bxpv at cache@get@@dvipdfmxcfg
+\def\bxpv at cache@get@@dvipdfmxcfg{%
+  % check TeX version
+  \bxpv at cache@fetch{newtex}%
+  \ifnum\bxpv at cache@@newtex>\z@
+    % search dvipdfmx.cfg
+    \global\let\bxpv at gtmpa\@empty
+    \bxpv at read@file{%
+      "|kpsewhich --progname=dvipdfmx --format=othertext dvipdfmx.cfg"%
+    }{%
+      \gdef\bxpv at gtmpa{##1}%
+      \bxpv at read@file at finish
+    }%
+    % read the file
+    \ifx\bxpv at gtmpa\@empty\else
+      \gdef\bxpv at g@rc at tmp@C{0}%
+      \def\bxpv at rc@tmp at C{C }%
+      \bxpv at detokenize\bxpv at rc@tmp at C
+      \gdef\bxpv at g@rc at tmp@V{5}%
+      \def\bxpv at rc@tmp at V{V }%
+      \bxpv at detokenize\bxpv at rc@tmp at V
+      \bxpv at read@file{\bxpv at gtmpa}{%
+        \bxpv at split@at{\bxpv at rc@tmp at C}{##1}%
+        \ifx\bxpv at pre\@empty
+          \bxpv at rc@parse at num{\bxpv at post}%
+          \global\let\bxpv at g@rc at tmp@C\bxpv at rc@num
+        \fi
+        \bxpv at split@at{\bxpv at rc@tmp at V}{##1}%
+        \ifx\bxpv at pre\@empty
+          \bxpv at rc@parse at num{\bxpv at post}%
+          \global\let\bxpv at g@rc at tmp@V\bxpv at rc@num
+        \fi
+      }%
+      % the return value
+      \xdef\bxpv at g@value{{\bxpv at g@rc at tmp@C}{\bxpv at g@rc at tmp@V}}%
+    \fi
+  \fi
+}
+
+%% \bxpv at rc@parse at num{<string>}
+% Returns to \bxpv at rc@num.
+\def\bxpv at rc@parse at num#1{%
+  \edef\bxpv at tmpy{#1\relax\relax}%
+  \expandafter\bxpv at rc@parse at num@a\bxpv at tmpy\bxpv at end
+}
+\def\bxpv at rc@parse at num@a#1#2\bxpv at end{%
+  % skip leading spaces and change to uppercase
+  \uppercase{\bxpv at rc@parse at num@b#1#2\bxpv at end}%
+}
+\def\bxpv at rc@parse at num@b#1#2#3\bxpv at end{%
+  \def\bxpv at tmpy{#1#2#3}%
+  \if0#1\if X#2% convert '0x' to '"'
+    \def\bxpv at tmpy{"#3}%
+  \fi\fi
+  \afterassignment\bxpv at rc@parse at num@c\@tempcnta=\bxpv at tmpy
+}
+\def\bxpv at rc@parse at num@c#1\relax{% discard trailer
+  \edef\bxpv at rc@num{\the\@tempcnta}%
+}
+
+%% \bxpv at rc@bitset{<number1>}{<number2>}
+% Returns to \bxpv at rc@num.
+\def\bxpv at rc@bitset#1#2{%
+  \@tempcnta=#1\relax \divide\@tempcnta#2\relax
+  \@tempcnta=\ifodd\@tempcnta\z@\else#2\relax\fi
+  \advance\@tempcnta#1\relax
+  \edef\bxpv at rc@num{\the\@tempcnta}%
+}
+
+%--------------------------------------- string splitter
+
+%% variables
+\let\bxpv at pre\relax
+\let\bxpv at post\relax
+
+%% \bxpv at split@at{<sep>}{<text>}
+% Splits the text by the given separator.
+% In success, it will set \bxpv at pre and \bxpv at post.
+\def\bxpv at split@at#1#2{%
+  \edef\bxpv at next{{#1}{#2}}%
+  \expandafter\bxpv at split@at at a\bxpv at next
+}
+\def\bxpv at split@at at a#1#2{%
+  \def\bxpv at next##1#1##2\bxpv at end{%
+    \bxpv at split@at at b{##1}{##2}}%
+  \bxpv at next#2\bxpv at mk#1\bxpv at end
+}
+\def\bxpv at split@at at b#1#2{%
+  \ifx\bxpv at mt#2\bxpv at mt
+    \let\bxpv at pre\relax \let\bxpv at post\relax
+  \else
+    \def\bxpv at pre{#1}%
+    \bxpv at split@at at c#2\bxpv at end
+  \fi
+}%
+\def\bxpv at split@at at c#1\bxpv at mk#2\bxpv at end{%
+  \def\bxpv at post{#1}%
+}%
+
+%--------------------------------------- file reader
+
+%% variables
+\let\bxpv at rf@parse\relax    % line parser
+\let\bxpv at rf@line\relax     % line content
+\let\bxpv at rf@cont\relax     % continue to read?
+
+%% \ifbxpv at read@file at ok
+% Whether or not the last \bxpv at read@file succeeded.
+\newboolean{bxpv at read@file at ok}
+
+%% \bxpv at read@file{<file-name>}{<line-parser-code>}
+% Reads from a text file. The line parser takes as #1 the
+% content of each line. 
+\def\bxpv at read@file#1{%
+  \bxpv at read@file at oktrue
+  \begingroup
+    \openin\@inputcheck=#1\relax
+    \afterassignment\bxpv at read@file at a
+      \def\bxpv at rf@parse##1%
+}
+\@onlypreamble\bxpv at read@file at a
+\def\bxpv at read@file at a{%
+    \ifeof\@inputcheck
+      \aftergroup\bxpv at read@file at okfalse
+    \else
+      % freeze special characters
+      \@tempcnta\z@
+      \loop\ifnum\@tempcnta<\@cclvi
+        \catcode\@tempcnta12
+        \advance\@tempcnta\@ne
+      \repeat
+      \endlinechar\m at ne
+      % go to loop
+      \chardef\bxpv at rf@cont\@ne
+      \bxpv at read@file at b
+    \fi
+  \endgroup
+}
+\@onlypreamble\bxpv at read@file at b
+\def\bxpv at read@file at b{%
+  \read\@inputcheck to\bxpv at rf@line
+  \bxpv at detokenize\bxpv at rf@line
+  \expandafter\bxpv at rf@parse\expandafter{\bxpv at rf@line}%
+  \ifeof\@inputcheck
+    \chardef\bxpv at rf@cont\z@
+  \fi
+  \ifnum\bxpv at rf@cont>\z@
+    \expandafter\bxpv at read@file at b
+  \fi
+}
+
+%% \bxpv at read@file at finish
+\@onlypreamble\bxpv at read@file at finish
+\def\bxpv at read@file at finish{%
+  \chardef\bxpv at rf@cont\z@
+}
+
+%--------------------------------------- simple cache system
+% - \bxpv at cache@xxx can be invoked only in \AtBeginDocument.
+% - \bxpv at cache@finalize must be called last.
+
+%% \bxpv at g@value
+% The return variable for fetchers.
+\@onlypreamble\bxpv at g@value
+\let\bxpv at g@value\@undefined
+
+%% \bxpv at cache@fetch{<key>}
+\@onlypreamble\bxpv at cache@fetch
+\def\bxpv at cache@fetch#1{%
+  \begingroup
+    \expandafter\ifx\csname bxpv at cache@@#1\endcsname\relax
+      \global\let\bxpv at g@value\@empty
+      \@nameuse{bxpv at cache@get@@#1}%
+      \bxpv at cache@store{#1}{\bxpv at g@value}%
+      \bxDebug{cache-fetch:#1=\@nameuse{bxpv at cache@@#1}}%
+    \fi
+  \endgroup
+}
+
+%% \bxpv at cache@store{<key>}{<value>}
+\def\bxpv at cache@store#1#2{%
+  \expandafter\ifx\csname bxpv at cache@@#1\endcsname\relax
+    \expandafter\xdef\csname bxpv at cache@@#1\endcsname{#2}%
+    \g at addto@macro\bxpv at cache@keylist{{#1}}%
+  \fi
+}
+\@onlypreamble\bxpv at cache@keylist
+\let\bxpv at cache@keylist\@empty
+
+%% \bxpv at cache@finalize
+\@onlypreamble\bxpv at cache@finalize
+\def\bxpv at cache@finalize{%
+  \if at filesw
+    \ifx\bxpv at cache@keylist\@empty\else
+      \immediate\write\@auxout{%
+        \string\providecommand\string\bxpv at cache@store[2]{}}%
+    \fi
+    \def\bxpv at x{\@tfor\bxpv at x:=}%
+    \expandafter\bxpv at x\bxpv at cache@keylist\do{%
+      \immediate\write\@auxout{%
+        \string\bxpv at cache@store{\bxpv at x}{\@nameuse{bxpv at cache@@\bxpv at x}}}}%
+  \fi
+  \global\let\bxpv at cache@store\@gobbletwo % for end-document clear-up
+}
+
 %--------------------------------------- start-up
 
 \ifx t\bxUseDebug
 \typeout{%
-  mversion=\meaning\bxpv at mversion^^J%
+  mversion=\meaning\bxpdfverMinorVersion^^J%
   compress=\meaning\bxpv at compress^^J%
   objcompress=\meaning\bxpv at obj@compress^^J%
   drvtype=\meaning\bxpv at drv@type^^J%
@@ -370,14 +741,13 @@
 
 %% Applies the setting specified by package options
 \ifx\bxpv at version\relax\else
-  \bxpv at get@mversion
-  \bxpv at set@version
+  \setpdfversion{\bxpv at version}
 \fi
 \if t\bxpv at compress\else
-  \bxpv at suppress@compress
+  \suppresspdfcompression
 \fi
 \if t\bxpv at obj@compress\else
-  \bxpv at suppress@obj at compress
+  \suppresspdfobjcompression
 \fi
 
 %--------------------------------------- all done



More information about the tex-live-commits mailing list