summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-30 21:28:23 +0000
committerKarl Berry <karl@freefriends.org>2020-09-30 21:28:23 +0000
commitacc0e369555df911c4c094eb7d39c1936b3ea4fd (patch)
treed86761edd60e66a00625431fb56458fa4bff7b7b /Master
parent3d72ca06ea45a25c546b1753f93ab5021e988326 (diff)
bxpapersize (30sep20)
git-svn-id: svn://tug.org/texlive/trunk@56491 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/bxpapersize/LICENSE2
-rw-r--r--Master/texmf-dist/doc/latex/bxpapersize/README.md6
-rw-r--r--Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty33
3 files changed, 37 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/bxpapersize/LICENSE b/Master/texmf-dist/doc/latex/bxpapersize/LICENSE
index 534324b7566..ac1eff31490 100644
--- a/Master/texmf-dist/doc/latex/bxpapersize/LICENSE
+++ b/Master/texmf-dist/doc/latex/bxpapersize/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2019 Takayuki YATO (aka. "ZR")
+Copyright (c) 2016-2020 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/bxpapersize/README.md b/Master/texmf-dist/doc/latex/bxpapersize/README.md
index 9575d883a70..ebd10daa7bb 100644
--- a/Master/texmf-dist/doc/latex/bxpapersize/README.md
+++ b/Master/texmf-dist/doc/latex/bxpapersize/README.md
@@ -53,6 +53,9 @@ The available options are described hereafter.
#### Priority
+**Important**: The `priority` option is not (yet) supported under the
+new LaTeX kernel 2020-10-01.
+
* `priority=<value>`: In DVI mode, this decides the priority of the
‘papersize’ specials issued by this package relative to the
‘papersize’ specials issued by others.
@@ -135,6 +138,9 @@ but `\bxpapersizesetup` will be always provided.
Revision History
----------------
+ * Version 0.5 ‹2020/10/01›
+ - Support LaTeX kernel 2020/10/01.
+ (But priority setting is not yet supported.)
* Version 0.4 ‹2019/10/05›
- Load pxatbegshi to properly handle pTeX tate mode.
- Remove (experimental) `adjustmag` option.
diff --git a/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty b/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty
index 4fe8782cfc6..b91e56384c7 100644
--- a/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty
+++ b/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty
@@ -1,7 +1,7 @@
%%
%% This is file 'bxpapersize.sty'.
-%%
-%% Copyright (c) 2019 Takayuki YATO (aka. "ZR")
+%%
+%% Copyright (c) 2016-2020 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxpapersize}[2019/10/05 v0.4]
+\ProvidesPackage{bxpapersize}[2020/10/01 v0.5]
%% preparation
\def\bxpr@pkgname{bxpapersize}
@@ -63,6 +63,15 @@
%% unique tokens
\def\bxpr@end{\bxpr@end@}
+%% switch 'bxpr@new@hook@system'
+% Whether the new hook management system is present.
+\newif\ifbxpr@new@hook@system
+\ifx\AddToHook\@undefined\else
+ \PackageInfo\bxpr@pkgname
+ {Detected the new LaTeX kernel (2020-10-01)\@gobble}
+ \bxpr@new@hook@systemtrue
+\fi
+
%% \bxpr@pagewidth / \bxpr@pageheight
%% \bxpr@horigin / \bxpr@vorigin
\ifluatex % LuaTeX
@@ -280,6 +289,15 @@
% if priority is not middle...
\ifnum\bxpr@priority=\bxpr@priority@@default\else
+\ifbxpr@new@hook@system %----
+ \PackageWarningNoLine\bxpr@pkgname
+ {!!!!!!!!!! WARNING !!!!!!!!!!\MessageBreak
+ You use the new LaTeX kernel (2020-10-01)!\MessageBreak
+ Unfortunately, priority setting is not yet\MessageBreak
+ available on the new kernel, and thus\MessageBreak
+ will be ignored}
+ \let\bxpr@priority\bxpr@priority@@default
+\else %----
\ifcase\bxpr@mode % dvi
\ifptex
\RequirePackage{pxatbegshi}[]
@@ -288,6 +306,7 @@
\PackageWarningNoLine\bxpr@pkgname
{The priority setting will be ignored in PDF mdoe}
\fi
+\fi %----
\fi
%--------------------------------------- page hook
@@ -296,19 +315,27 @@
% Placed at the head of the begin-docuemnt hook.
\@onlypreamble\bxpr@begindoc@first@hook
\let\bxpr@begindoc@first@hook\@empty
+\ifbxpr@new@hook@system %----
+\AddToHook{begindocument/before}{\bxpr@begindoc@first@hook}
+\else %----
\begingroup
\toks@\expandafter{\@begindocumenthook}
\xdef\@begindocumenthook{%
\noexpand\bxpr@begindoc@first@hook
\the\toks@}
\endgroup
+\fi %----
%% \bxpr@begindoc@last@hook
% Placed after the begin-docuemnt hook.
\def\bxpr@begindoc@last@hook{%
\let\bxpr@begindoc@last@hook\@undefined}
+\ifbxpr@new@hook@system %----
+\AddToHook{begindocument/end}{\bxpr@begindoc@last@hook}
+\else %----
\g@addto@macro\document{%
\bxpr@begindoc@last@hook}
+\fi %----
%% add hook for every page
\g@addto@macro\bxpr@begindoc@first@hook{%