texlive[52304] Master/texmf-dist: bxpapersize (6oct19)
commits+karl at tug.org
commits+karl at tug.org
Sun Oct 6 22:07:16 CEST 2019
Revision: 52304
http://tug.org/svn/texlive?view=revision&revision=52304
Author: karl
Date: 2019-10-06 22:07:16 +0200 (Sun, 06 Oct 2019)
Log Message:
-----------
bxpapersize (6oct19)
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 2019-10-06 20:06:58 UTC (rev 52303)
+++ trunk/Master/texmf-dist/doc/latex/bxpapersize/LICENSE 2019-10-06 20:07:16 UTC (rev 52304)
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+Copyright (c) 2019 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 2019-10-06 20:06:58 UTC (rev 52303)
+++ trunk/Master/texmf-dist/doc/latex/bxpapersize/README.md 2019-10-06 20:07:16 UTC (rev 52304)
@@ -24,6 +24,7 @@
- ifpdf, ifxetex, ifluatex, ifvtex
- xkeyval
- atbegshi
+ - pxatbegshi (when priority setting is used on (u)pTeX)
### Installation
@@ -59,6 +60,7 @@
- `low`: Priotizes specials by others.
- `middle`/`default` (default): Does not care about priority.
- `high`: Priotizes specials by this package.
+ Note: The priority setting will be ignored in PDF mode.
* `olddvips`: Must be specified when you use dvips older than that
included in TeX Live 2017, so as to make the `priority` option
work correctly.
@@ -133,6 +135,9 @@
Revision History
----------------
+ * Version 0.4 ‹2019/10/05›
+ - Load pxatbegshi to properly handle pTeX tate mode.
+ - Remove (experimental) `adjustmag` option.
* Version 0.3b ‹2017/10/08›
- Support pTeX-ng (ApTeX) engine properly.
- (Experimental) Add `adjustmag` option.
Modified: trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty 2019-10-06 20:06:58 UTC (rev 52303)
+++ trunk/Master/texmf-dist/tex/latex/bxpapersize/bxpapersize.sty 2019-10-06 20:07:16 UTC (rev 52304)
@@ -1,7 +1,7 @@
%%
%% This is file 'bxpapersize.sty'.
%%
-%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2019 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxpapersize}[2017/10/08 v0.3b]
+\ProvidesPackage{bxpapersize}[2019/10/05 v0.4]
%% preparation
\def\bxpr at pkgname{bxpapersize}
@@ -48,12 +48,13 @@
%% load packages
\RequirePackage{xkeyval}[2008/08/10]% v2.6
\RequirePackage{atbegshi}
-\RequirePackage{ifpdf,ifxetex,ifluatex,ifvtex}
+\RequirePackage{ifpdf,ifxetex,ifluatex,ifvtex,ifptex}
%% variables
\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
@@ -62,11 +63,6 @@
%% unique tokens
\def\bxpr at end{\bxpr at end@}
-%% \bxpr at ptexng
-\chardef\bxpr at ptexng=0
-\edef\bxpr at tmpa{\string\ngbanner}\edef\bxpr at tmpb{\meaning\ngbanner}
-\ifx\bxpr at tmpa\bxpr at tmpb \chardef\bxpr at ptexng=1 \fi
-
%% \bxpr at pagewidth / \bxpr at pageheight
%% \bxpr at horigin / \bxpr at vorigin
\ifluatex % LuaTeX
@@ -89,7 +85,7 @@
\else\ifvtex % VTeX
\let\bxpr at pagewidth\mediawidth
\let\bxpr at pageheight\mediaheight
-\else\ifnum0\the\bxpr at ptexng\ifpdf1\fi>0 % pdfTeX in PDF mode
+\else\ifnum0\ifptexng1\fi\ifpdf1\fi>0 % pdfTeX in PDF mode
\let\bxpr at pagewidth\pdfpagewidth
\let\bxpr at pageheight\pdfpageheight
\let\bxpr at horigin\pdfhorigin
@@ -170,11 +166,6 @@
\def\bxpr at set@priority#1{% invalidate
\bxpr at err@nlprm{priority}}}
-%% 'adjustmag'
-\define at boolkey+[bxpr]{prm}{adjustmag}[true]%
- {}%
- {\bxpr at err@ivval{adjustmag}{#1}}
-
%% 'truedimen'
\define at boolkey+[bxpr]{prm}{truedimen}[true]%
{\bxpr at needs@reset at sizetrue}%
@@ -287,6 +278,18 @@
\noexpand\bxpapersizesetup{\bxpr at kvopt}%
}\bxpr at tmpa
+% if priority is not middle...
+\ifnum\bxpr at priority=\bxpr at priority@@default\else
+ \ifcase\bxpr at mode % dvi
+ \ifptex
+ \RequirePackage{pxatbegshi}[]
+ \fi
+ \or % pdf
+ \PackageWarningNoLine\bxpr at pkgname
+ {The priority setting will be ignored in PDF mdoe}
+ \fi
+\fi
+
%--------------------------------------- page hook
%% \bxpr at begindoc@first at hook
@@ -399,12 +402,7 @@
\edef\bxpr at special@chunk{\special{papersize=\bxpr at tmpb}}}%
\else %pdf
\def\bxpr at set@page at size#1#2{%
- \let\bxpr at tmpb\@empty
- \ifbxpr at prm@adjustmag
- \bxpr at let@real at mag@to\bxpr at tmpb
- \fi
- \bxpr at pagewidth=#1\relax \bxpr at pagewidth=\bxpr at tmpb\bxpr at pagewidth
- \bxpr at pageheight=#2\relax \bxpr at pageheight=\bxpr at tmpb\bxpr at pageheight
+ \bxpr at pagewidth=#1\relax \bxpr at pageheight=#2\relax
\bxDebug{papersize=\the\bxpr at pagewidth,\the\bxpr at pageheight}}%
\fi
@@ -469,79 +467,6 @@
\advance\bxpr at dima\dp\AtBeginShipoutBox
\edef\bxpr at height{\the\bxpr at dima}}
-%--------------------------------------- cope with tate-direction
-
-% In (u)pTeX engine, boxes and lists have the direction attribute,
-% and yoko boxes cannot be unboxed in tate lists (and vice versa).
-% This restriction can cause the atbegshi package to fail, and thus
-% the 'priority=low' setting results in an error when used together
-% with document classes of tate direction.
-
-% if '\tate' is invalid then quit now
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname tate\endcsname\relax
-\expandafter\endinput\fi\relax
-
-% if priority is middle then quit
-\ifnum\bxpr at priority=\bxpr at priority@@default
-\expandafter\endinput\fi\relax
-
-% check in advance
-\ifx\AtBegShi at Output\@undefined
- \PackageWarningNoLine\bxpr at pkgname
- {The patch to atbegshi failed, so\MessageBreak
- the package might not work well}
-\expandafter\endinput\fi\relax
-
-%% \ifbxpr at ddir
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ifddir\endcsname\relax
- \bxpr at csletcs{ifbxpr at ddir}{iffalse}
-\else
- \bxpr at csletcs{ifbxpr at ddir}{ifddir}
-\fi
-
-%% \bxpr at patch
-% Patches the internal macro \AtBegShi at Output of atbegshi package,
-% so that the macro is prepended by a `\yoko` primitive and appended
-% by a direction primitive to switch back to the original.
-\@onlypreamble\bxpr at patch
-\def\bxpr at patch{%
- \expandafter\bxpr at patch@a\AtBegShi at Output\bxpr at end}
-\@onlypreamble\bxpr at patch@a
-\def\bxpr at patch@a{%
- \futurelet\bxpr at tok\bxpr at patch@b}
-\@onlypreamble\bxpr at patch@b
-\def\bxpr at patch@b{%
- \ifx\bxpr at tok\egroup \expandafter\@firstoftwo
- \else \expandafter\@secondoftwo
- \fi{\bxpr at patch@c}{\bxpr at patch@d{}}}
-\@onlypreamble\bxpr at patch@c
-\def\bxpr at patch@c#1#2{%
- \bxpr at patch@d{#1#2}}
-\@onlypreamble\bxpr at patch@d
-\def\bxpr at patch@d#1#2\bxpr at end{%
- \def\AtBegShi at Output{#1\bxpr at ABS@prehook#2\bxpr at ABS@posthook}}
-% do patch
-\bxpr at patch
-
-%% \bxpr at restore@dir
-\let\bxpr at restore@dir\relax
-
-%% \bxpr at ABS@prehook
-\def\bxpr at ABS@prehook{%
- \iftdir \yoko \let\bxpr at restore@dir\tate
- \else\ifbxpr at ddir \yoko \let\bxpr at restore@dir\dtou
- \else \let\bxpr at restore@dir\relax
- \fi\fi
- \ifx\bxpr at restore@dir\relax\else
- \bxDebug{Temporarily switching \meaning\bxpr at restore@dir
- \space to \string\yoko}%
- \fi}
-%% \bxpr at ABS@posthook
-\def\bxpr at ABS@posthook{%
- \bxpr at restore@dir}
-
%--------------------------------------- all done
\endinput
%% EOF
More information about the tex-live-commits
mailing list