summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/plautopatch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-03 21:05:34 +0000
committerKarl Berry <karl@freefriends.org>2018-11-03 21:05:34 +0000
commit6b8b8bd5509050cb9147beae29eb8f7323347bb8 (patch)
treeedbc028df4832eb7f2f0095fc6b9f08a96dc8e36 /Master/texmf-dist/tex/latex/plautopatch
parentd1cb1abb7a3749120bef54f2d5d5b0a67f6f844b (diff)
plautopatch (3nov18)
git-svn-id: svn://tug.org/texlive/trunk@49059 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/plautopatch')
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty3
-rw-r--r--Master/texmf-dist/tex/latex/plautopatch/plsiunitx.sty76
2 files changed, 78 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty b/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
index 900e1cc31e3..6c707573501 100644
--- a/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
+++ b/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
@@ -8,7 +8,7 @@
\NeedsTeXFormat{LaTeX2e}% not pLaTeX2e on purpose!
\ProvidesPackage{plautopatch}
- [2018/10/27 v0.8 Automated patches for pLaTeX/upLaTeX]
+ [2018/11/03 v0.9 Automated patches for pLaTeX/upLaTeX]
\ifx\pfmtname\@undefined
\PackageWarningNoLine{plautopatch}{%
@@ -180,6 +180,7 @@
\platpc@patch@after@both{colortbl}{plext}{plextcolortbl}% (maintained here!)
\platpc@patch@after{arydshln}{plarydshln}% (maintained here!)
\platpc@patch@after@both{arydshln}{plext}{plextarydshln}% (maintained here!)
+\platpc@patch@after{siunitx}{plsiunitx}% (maintained here!)
% --- in most cases, pxeverysel can be safely loaded even after everysel
% --- but it can fail when \AtBeginDocument{everysel} is involved
\platpc@patch@before{everysel}{pxeverysel}% platex-tools
diff --git a/Master/texmf-dist/tex/latex/plautopatch/plsiunitx.sty b/Master/texmf-dist/tex/latex/plautopatch/plsiunitx.sty
new file mode 100644
index 00000000000..c76efed7bca
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/plautopatch/plsiunitx.sty
@@ -0,0 +1,76 @@
+%
+% plsiunitx.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the plautopatch bundle.
+% https://github.com/aminophen/plautopatch
+% (mostly based on lltjp-siunitx.sty 2018-11-02)
+%
+% This package is expected to be compatible with
+% * siunitx.sty
+% (????/??/?? v?.?? -- 2018/05/17 v2.7s)
+% * plarray.sty in platex-tools
+% (2018/03/01 v0.1d -- 2018/10/27 v0.1h)
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{plsiunitx}
+ [2018/11/03 v0.1 siunitx package for pLaTeX/upLaTeX]
+\RequirePackageWithOptions{siunitx}
+\RequirePackage{plarray}% siunitx requires array
+
+\ExplSyntaxOn
+
+%% patching internal code for siunitx.sty
+%
+%% inhibit JFM glue around tabular cell components (pLaTeX2e 2018/03/09)
+\@ifl@t@r{\pfmtversion}{2017/07/29}{\@firstofone}{\@gobble}
+{% = for pLaTeX2e 2017/07/29 or newer
+%% new table column: S and s
+\cs_set_protected:Npn \__siunitx_table_collect_not_braced:N #1
+ {
+ \token_if_eq_meaning:NNF #1 \relax {
+ \token_if_eq_meaning:NNF #1 \pltx@next@inhibitglue {
+ \token_if_eq_meaning:NNF #1 \removejfmglue {
+ \token_if_eq_meaning:NNF #1 \tex_ignorespaces:D
+ {
+ \token_if_eq_meaning:NNF #1 \tex_unskip:D
+ { \__siunitx_table_collect_not_braced_aux_i:N #1 }
+ }
+ }}}
+ \__siunitx_table_collect_next:
+ }
+\AtBeginDocument
+ {
+ \@ifpackageloaded { mdwtab }
+ {
+ \cs_set_protected:Npn \__siunitx_table_collect_not_braced:N #1
+ {
+ \token_if_eq_meaning:NNF #1 \relax {
+ \token_if_eq_meaning:NNF #1 \pltx@next@inhibitglue {
+ \token_if_eq_meaning:NNF #1 \removejfmglue {
+ \token_if_eq_meaning:NNF #1 \tex_ignorespaces:D
+ {
+ \token_if_eq_meaning:NNF #1 \tex_unskip:D
+ {
+ \token_if_eq_meaning:NNF #1 \tab@setcr
+ {
+ \token_if_eq_meaning:NNF #1 \@maybe@unskip
+ { \__siunitx_table_collect_not_braced_aux_i:N #1 }
+ }
+ }
+ }
+ }}}
+ \__siunitx_table_collect_next:
+ }
+ }
+ { }
+ }
+}% =
+%
+%% done
+
+\ExplSyntaxOff
+
+\endinput