summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/plautopatch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-21 21:07:02 +0000
committerKarl Berry <karl@freefriends.org>2018-09-21 21:07:02 +0000
commita7130f1e9343b9d655100fef8c49e689549cbfe2 (patch)
tree5744cc9ba6a853c46ac72afdc41b85ebe7d86443 /Master/texmf-dist/tex/latex/plautopatch
parent9444430d73ece7ecf9adaf5b3f4ee373896f95be (diff)
plautopatch (21sep18)
git-svn-id: svn://tug.org/texlive/trunk@48723 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/plautopatch')
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty42
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty43
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty39
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty8
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty34
5 files changed, 151 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty b/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
index 483b77f67c8..8dbc7eb9383 100644
--- a/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
+++ b/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
@@ -6,9 +6,18 @@
% https://github.com/aminophen/plautopatch
%
-\NeedsTeXFormat{pLaTeX2e}
+\NeedsTeXFormat{LaTeX2e}% not pLaTeX2e on purpose!
\ProvidesPackage{plautopatch}
- [2018/08/22 v0.3 Automated patches for pLaTeX/upLaTeX]
+ [2018/09/21 v0.5 Automated patches for pLaTeX/upLaTeX]
+
+\ifx\pfmtname\@undefined
+ \PackageWarningNoLine{plautopatch}{%
+ This package is meant for pLaTeX/upLaTeX,\MessageBreak
+ you will not need it.}
+ \expandafter\endinput
+\fi
+
+\NeedsTeXFormat{pLaTeX2e}% just in case ...
\def\platpc@pkgname{plautopatch}
\def\platpc@err{\PackageError\platpc@pkgname}
\def\platpc@warn{\PackageWarningNoLine\platpc@pkgname}
@@ -40,13 +49,11 @@
\fi
}
-%% \platpc@ifloadederr{<package>}
-% = throw an error if <package> is already loaded.
-\def\platpc@ifloadederr#1{%
- \@ifpackageloaded{#1}{%
- \platpc@err{Package `#1' already loaded!\MessageBreak
- Use \string\RequirePackage{\platpc@pkgname} earlier}\@ehc
- }%
+%% \platpc@err@toolate{<package>}
+% = content of the "too-late" error.
+\def\platpc@err@toolate#1{%
+ \platpc@err{Package `#1' already loaded!\MessageBreak
+ Use \string\RequirePackage{\platpc@pkgname} earlier}\@ehc
}
% high-level helpers
@@ -124,9 +131,11 @@
}%
}%
% if <orig> is already loaded at this point, too late!
- \platpc@ifloadederr{#1}%
- % do it
- \AtBeginOfPackageFile{#1}{\csname platpc@begin@#1\endcsname}%
+ \@ifpackageloaded{#1}{%
+ \platpc@err@toolate{#1}%
+ }{% else
+ \AtBeginOfPackageFile{#1}{\csname platpc@begin@#1\endcsname}%
+ }%
}
\@onlypreamble\platpc@patch@before
@@ -168,10 +177,19 @@
\platpc@patch@after{array}{plarray}% platex-tools
\platpc@patch@after@both{array}{plext}{plextarray}% platex-tools
\platpc@patch@after@both{delarray}{plext}{plextdelarray}% platex-tools
+\platpc@patch@after@both{colortbl}{plext}{plextcolortbl}% (maintained here!)
\platpc@patch@after{everysel}{pxeverysel}% platex-tools
\platpc@patch@after{everyshi}{pxeveryshi}% platex-tools
\platpc@patch@after{atbegshi}{pxatbegshi}% platex-tools
\platpc@patch@before{ftnright}{pxftnright}% platex-tools
\platpc@patch@after{pdfpages}{pxpdfpages}% (maintained here!)
+% --- plextarydshln is not well tested, not activated for now
+%\platpc@patch@after@both{arydshln}{plext}{plextarydshln}% (maintained here!)
+
+% for TikZ/PGF
+\platpc@patch@after{pgfrcs}{pxpgfrcs}% (maintained here!)
+% --- pxpgfmark is useful on e-(u)pTeX + dvipdfmx
+% --- but does no harm for other conditions
+\platpc@patch@after{pgfcore}{pxpgfmark}% by Takayuki YATO (ZR)
\endinput
diff --git a/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty b/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty
new file mode 100644
index 00000000000..fc15b056043
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/plautopatch/plextarydshln.sty
@@ -0,0 +1,43 @@
+%
+% plextarydshln.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the plautopatch bundle.
+% https://github.com/aminophen/plautopatch
+%
+% This package is expected to be compatible with
+% * arydshln.sty
+% (????/??/??)
+% * plcore.ltx in platex
+% (2001/09/26 v1.2a -- 2018/09/02 v1.3)
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{plextarydshln}
+ [2018/09/19 v0.1 Merge plext and arydshln]
+\RequirePackage{plext}
+\RequirePackage{arydshln}
+
+%% handle package compatibility issues beforehand
+% Note: The "arydshln" manual requests users to load
+% the following packages *before* arydshln,
+% to ensure compatibility:
+% array, longtable, colortab, colortbl.
+% So, hoping that users are clever enough to load
+% them before plextarydshln, load known patches
+% at this point when they are detected.
+%\@ifpackageloaded{array}{\RequirePackage{plextarray}}{}
+%\@ifpackageloaded{colortbl}{\RequirePackage{plextcolortbl}}{}
+
+%% patching internal code for arydshln.sty and plext.sty
+%
+\let\adl@p@array\p@array
+\def\p@array{%
+ \adl@everyvbox\everyvbox
+ \everyvbox{\adl@arrayinit \the\adl@everyvbox \everyvbox\adl@everyvbox}%
+ \adl@p@array}
+%
+%% done
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty b/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty
new file mode 100644
index 00000000000..2a5c09a594f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/plautopatch/plextcolortbl.sty
@@ -0,0 +1,39 @@
+%
+% plextcolortbl.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the plautopatch bundle.
+% https://github.com/aminophen/plautopatch
+%
+% This package is expected to be compatible with
+% * colortbl.sty
+% (2012/06/21 v1.0b -- 2018/05/02 v1.0c)
+% * plext.sty in platex
+% (2001/09/26 v1.2 -- 2018/09/20 v1.2j)
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{plextcolortbl}
+ [2018/09/19 v0.1a Merge plext and colortbl]
+\RequirePackage{plextarray}% colortbl requires array
+\RequirePackageWithOptions{colortbl}
+
+%% patching internal code for colortbl.sty
+%
+\AtBeginDocument{%
+ % recover \@tabarray from plextarray.sty
+ \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<Z>}}
+ % change \p@tabarray instead
+ \expandafter\def\expandafter\p@tabarray
+ \expandafter<\expandafter#\expandafter1\expandafter>\expandafter{%
+ \expandafter\CT@start\p@tabarray<#1>}%
+}
+%
+\def\endarray{\crcr \egroup \egroup
+ \@end@alignbox %% added from plext.sty
+ \@arrayright \gdef\@preamble{}\CT@end}%
+%
+%% done
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty b/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty
index 3eb6ef13f34..43c8b274e8e 100644
--- a/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty
+++ b/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty
@@ -5,9 +5,11 @@
% This package is part of the plautopatch bundle.
% https://github.com/aminophen/plautopatch
%
-% This package `pxpdfpages.sty' is based on:
-% * pdfpages.sty (2017/10/31 v0.5l)
-% * plcore.ltx in platex (2018/05/13 v1.2z)
+% This package is expected to be compatible with
+% * pdfpages.sty
+% (2015/07/19 v0.5a -- 2017/10/31 v0.5l)
+% * plcore.ltx in platex
+% (2001/09/26 v1.2a -- 2018/09/02 v1.3)
%
%% package declaration
diff --git a/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty b/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty
new file mode 100644
index 00000000000..578e26de0b6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/plautopatch/pxpgfrcs.sty
@@ -0,0 +1,34 @@
+%
+% pxpgfrcs.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the plautopatch bundle.
+% https://github.com/aminophen/plautopatch
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{pxpgfrcs}
+ [2018/09/21 v0.1]
+\RequirePackage{pgfrcs}
+
+% Note: I chose the name "pxpgfrcs.sty"
+% (instead of "pgfutil-platex.def") because
+% * "pgfrcs.sty" is the only package
+% which contains \input pgfutil-latex.def.
+% * It is not common for LaTeX users to use
+% such an interface like \input pgfutil-platex.def.
+
+% patch pgfutil-latex.def
+\RequirePackage{pxeveryshi}% pgfutil-latex.def requires everyshi
+\def\pgfutil@insertatbegincurrentpagefrombox#1{%
+ \edef\pgf@temp{\the\wd\pgfutil@abb}%
+ \global\setbox\pgfutil@abb\hbox{%
+ \yoko %%% add \yoko
+ \unhbox\pgfutil@abb%
+ \hskip-\pgf@temp\relax%
+ #1%
+ }%
+}%
+
+\endinput