texlive[48447] Master: plautopatch (21aug18)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 21 23:51:43 CEST 2018


Revision: 48447
          http://tug.org/svn/texlive?view=revision&revision=48447
Author:   karl
Date:     2018-08-21 23:51:42 +0200 (Tue, 21 Aug 2018)
Log Message:
-----------
plautopatch (21aug18)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/plautopatch/
    trunk/Master/texmf-dist/doc/latex/plautopatch/LICENSE
    trunk/Master/texmf-dist/doc/latex/plautopatch/Makefile
    trunk/Master/texmf-dist/doc/latex/plautopatch/README.md
    trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.pdf
    trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.tex
    trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.pdf
    trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.tex
    trunk/Master/texmf-dist/tex/latex/plautopatch/
    trunk/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
    trunk/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty
    trunk/Master/tlpkg/tlpsrc/plautopatch.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/plautopatch/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/LICENSE	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,27 @@
+Copyright (c) 2018 Hironobu Yamashita
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its contributors
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: trunk/Master/texmf-dist/doc/latex/plautopatch/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/Makefile	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,26 @@
+KANJI = -kanji=utf8
+FONTMAP = -f ipaex.map -f ptex-ipaex.map
+TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)
+
+all: plautopatch.pdf plautopatch-ja.pdf
+
+.SUFFIXES: .tex .dvi .pdf
+.tex.dvi:
+	platex $(KANJI) $<
+	platex $(KANJI) $<
+	rm *.aux *.log
+.dvi.pdf:
+	dvipdfmx $(FONTMAP) $<
+
+.PHONY: install clean
+install:
+	mkdir -p ${TEXMF}/doc/platex/plautopatch
+	cp ./Makefile ${TEXMF}/doc/platex/plautopatch/
+	cp ./LICENSE ${TEXMF}/doc/platex/plautopatch/
+	cp ./README.md ${TEXMF}/doc/platex/plautopatch/
+	cp ./*.pdf ${TEXMF}/doc/platex/plautopatch/
+	cp ./*.tex ${TEXMF}/doc/platex/plautopatch/
+	mkdir -p ${TEXMF}/tex/platex/plautopatch
+	cp ./*.sty ${TEXMF}/tex/platex/plautopatch/
+clean:
+	rm -f *.dvi *.pdf


Property changes on: trunk/Master/texmf-dist/doc/latex/plautopatch/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/plautopatch/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/README.md	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,63 @@
+# plautopatch
+
+Japanese pLaTeX/upLaTeX formats and packages often conflict
+with other LaTeX packages which are aware of pLaTeX/upLaTeX.
+In the worst case, such packages throw an fatal error or
+end up with a wrong output.
+
+The goal of this package "plautopatch" is that
+there is no need to worry about such incompatibilities,
+by automatically loading specific patches
+when they are necessary.
+This helps not only to simplify source files, but also
+to make the appearance of working pLaTeX/upLaTeX sources
+similar to that of ordinally LaTeX ones.
+
+The following patches are currently registered:
+
+- tracefnt (latex) -> ptrace/uptrace (platex/uplatex)
+- fltrace (latex) -> pfltrace (platex)
+- array (latex-tools) -> plarray (platex-tools)
+- array (latex-tools) + plext (platex) -> plextarray (platex-tools)
+- delarray (latex-tools) + plext (platex) -> plextdelarray (platex-tools)
+- everysel (ms) -> pxeverysel (platex-tools)
+- everyshi (ms) -> pxeveryshi (platex-tools)
+- atbegshi (oberdiek) -> pxatbegshi (platex-tools)
+- ftnright (latex-tools) -> pxftnright (platex-tools)
+- pdfpages -> pxpdfpages (maintained here!)
+
+## Requirements
+
+This package depends on "filehook" package,
+written by Martin Scharrer.
+
+## Miscellaneous
+
+This bundle may distribute some tiny patches
+together with the main package. Short information:
+
+- pxpdfpages.sty:
+    Patch for pdfpages.sty (by An­dreas Matthias) to support
+    Japanese-style crop marks (called 'tombow' in Japanese).
+    Can be used on pLaTeX/upLaTeX.
+
+## Installation
+
+- *.sty -> $TEXMF/tex/platex/plautopatch
+- *.tex, *.pdf -> $TEXMF/doc/platex/plautopatch
+
+## Repository
+
+The bundle is maintained on GitHub:
+  https://github.com/aminophen/plautopatch
+
+## License
+
+The bundle may be distributed and/or modified under the terms of
+the 3-clause BSD license (see [LICENSE](./LICENSE)).
+
+## Release Date
+
+2018-08-21
+
+Hironobu Yamashita


Property changes on: trunk/Master/texmf-dist/doc/latex/plautopatch/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.pdf	2018-08-21 21:47:21 UTC (rev 48446)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.pdf	2018-08-21 21:51:42 UTC (rev 48447)

Property changes on: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.tex	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,124 @@
+%# -*- coding: utf-8 -*-
+\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016)
+  \epTeXinputencoding utf8    % ensure utf-8 encoding for platex
+\fi
+
+\documentclass[a4paper]{jsarticle}
+\usepackage{doc}
+\usepackage{plautopatch}% load this here to make \GetFileInfo work
+\GetFileInfo{plautopatch.sty}
+\title{Package \textsf{plautopatch} \fileversion}
+\author{Hironobu Yamashita}
+\date{\filedate}
+\begin{document}
+
+\maketitle
+
+日本のp\LaTeX/up\LaTeX{}フォーマットや専用パッケージが、
+これらを知らない\LaTeX{}パッケージ(しばしば海外で作られた
+汎用のもの)と衝突することがあります。
+最悪の場合にはエラーが出たり、誤った出力が得られたり
+することがあります。
+
+この\textsf{plautopatch}の目的は、こうした非互換を意識せずに
+済むようにすることです。具体的には、p\LaTeX/up\LaTeX{}と
+衝突するパッケージが使われた場合に、その衝突を解消するパッチを
+提供するパッケージを必要に応じて自動的に読み込みます。
+こうすることで、ソースコードを簡潔にできるだけでなく、
+p\LaTeX/up\LaTeX{}で動作するソースと通常の\LaTeX{}ソースの
+見た目を近づけることができます。
+
+このパッケージはGitHubで開発しています。
+\begin{verbatim}
+    https://github.com/aminophen/plautopatch
+\end{verbatim}
+
+\section*{動作条件}
+
+このパッケージは
+\textsf{filehook}パッケージ(Martin Scharrer氏の作)に依存します。
+
+\section*{使い方}
+
+このパッケージを\LaTeX{}ソースの冒頭で読み込みます。
+このために、\verb+\RequirePackage{plautopatch}+を
+\verb+\documentclass+や他のコマンドよりも\emph{前}に
+読み込むことをお勧めします
+(クラスファイルなどが問題のあるパッケージを読み込む可能性もあるため)。
+
+例を示します。
+\begin{verbatim}
+  %\RequirePackage{plautopatch}
+  \documentclass{tarticle}% 縦組クラス(plext使用)
+  \usepackage{array}% plextと非互換
+  \begin{document}
+  ...
+  \end{document}
+\end{verbatim}
+上記の例では、
+\textsf{tarticle}クラスが内部で読み込む\textsf{plext}パッケージと、
+ソース中で\verb+\usepackage+している\textsf{array}パッケージが
+衝突してエラーになる場合があります。しかし、冒頭で
+\verb+\RequirePackage{plautopatch}+とだけ書いておけば、
+\textsf{array}パッケージの時点で\textsf{plextarray}パッケージが
+追加で読み込まれるため、問題が解消します。
+このように自動追加されたパッケージは、\verb+\end{document}+の
+時点で次のように一覧として表示されます(複数の場合は
+コンマと空白で区切ったリストになります)。
+\begin{verbatim}
+***** List of packages loaded by `plautopatch': *****
+ plextarray.
+*****************************************************
+\end{verbatim}
+
+\section*{現在対応しているパッケージの一覧}
+
+\def\ITEMoo#1 (#2) -> #3 (#4){%
+  \item \textsf{#1} (\textsf{#2})\\
+    $\rightarrow$ \textsf{#3} (\textsf{#4})}
+\def\ITEMooo#1 (#2) + #3 (#4) -> #5 (#6){%
+  \item \textsf{#1} (\textsf{#2}) + \textsf{#3} (\textsf{#4})\\
+    $\rightarrow$ \textsf{#5} (\textsf{#6})}
+\def\ITEM#1 -> #2 {%
+  \item \textsf{#1}\\
+    $\rightarrow$ \textsf{#2} }
+
+凡例:
+\begin{itemize}
+\item \texttt{<元のパッケージ>} (\texttt{<元が含まれるバンドル名>})\\
+  \texttt{<パッチのパッケージ>} (\texttt{<パッチが含まれるバンドル名>})
+\end{itemize}
+
+現在のバージョン (\filedate\space\fileversion) がサポートしているのは
+下記のパッケージです。
+\begin{itemize}
+\ITEMoo  tracefnt (latex) -> ptrace/uptrace (platex/uplatex)
+\ITEMoo  fltrace (latex) -> pfltrace (platex)
+\ITEMoo  array (latex-tools) -> plarray (platex-tools)
+\ITEMooo array (latex-tools) + plext (platex) -> plextarray (platex-tools)
+\ITEMooo delarray (latex-tools) + plext (platex) -> plextdelarray (platex-tools)
+\ITEMoo  everysel (ms) -> pxeverysel (platex-tools)
+\ITEMoo  everyshi (ms) -> pxeveryshi (platex-tools)
+\ITEMoo  atbegshi (oberdiek) -> pxatbegshi (platex-tools)
+\ITEMoo  ftnright (latex-tools) -> pxftnright (platex-tools)
+\ITEM    pdfpages -> pxpdfpages (maintained here!)
+\end{itemize}
+もちろん、このリストは随時、追加・削除・置き換えていく予定です。
+互換性の問題や追加したいパッケージがある場合はご一報ください。
+
+\section*{特定のパッケージを除外したい場合}
+
+デフォルトでは、上記のリストに登録されている\texttt{<元のパッケージ>}が
+使われたことを検出すると、全て自動的にパッチを読み込みます。
+しかし、時にはこれが逆効果となり、問題が起きる可能性は否定できません。
+そのような場合は
+\begin{verbatim}
+    \plautopatchdisable{<元のパッケージ>}
+\end{verbatim}
+と書くことで、そのパッケージを検出対象から除外します。複数ある場合は
+\begin{verbatim}
+    \plautopatchdisable{<元のパッケージ1>,<元のパッケージ2>}
+\end{verbatim}
+のようにコンマで区切っていくつでも除外できます。
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch-ja.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.pdf	2018-08-21 21:47:21 UTC (rev 48446)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.pdf	2018-08-21 21:51:42 UTC (rev 48447)

Property changes on: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.tex	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,126 @@
+%# -*- coding: utf-8 -*-
+\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016)
+  \epTeXinputencoding utf8    % ensure utf-8 encoding for platex
+\fi
+
+\documentclass[a4paper]{jsarticle}
+\usepackage{doc}
+\usepackage{plautopatch}% load this here to make \GetFileInfo work
+\GetFileInfo{plautopatch.sty}
+\title{Package \textsf{plautopatch} \fileversion}
+\author{Hironobu Yamashita}
+\date{\filedate}
+\begin{document}
+
+\maketitle
+
+Japanese p\LaTeX/up\LaTeX\ formats and packages often conflict
+with other \LaTeX\ packages which are aware of p\LaTeX/up\LaTeX.
+In the worst case, such packages throw an fatal error or
+end up with a wrong output.
+
+The goal of this package \textsf{plautopatch} is that
+there is no need to worry about such incompatibilities,
+by automatically loading specific patches
+when they are necessary.
+This helps not only to simplify source files, but also
+to make the appearance of working p\LaTeX/up\LaTeX\ sources
+similar to that of ordinally \LaTeX\ ones.
+
+The package is maintained on GitHub:
+\begin{verbatim}
+    https://github.com/aminophen/plautopatch
+\end{verbatim}
+
+\section*{Requirements}
+
+This package depends on \textsf{filehook} package,
+written by Martin Scharrer.
+
+\section*{Usage}
+
+Load this package at the very beginning of the \LaTeX\ source.
+It is strongly recommended to use
+\verb+\RequirePackage{plautopatch}+
+before \verb+\documentclass+ or any other commands,
+as such other classes and packages may load
+some problematic packages internally.
+
+Here is an example:
+\begin{verbatim}
+  %\RequirePackage{plautopatch}
+  \documentclass{tarticle}% vertical writing (requires plext)
+  \usepackage{array}% incompatible with plext
+  \begin{document}
+  ...
+  \end{document}
+\end{verbatim}
+In the above example, the class \textsf{tarticle} internally
+requires the package \textsf{plext}.
+However, \textsf{array} explicitly required by \verb+\usepackage+
+conflicts with \textsf{plext}.
+By using \verb+\RequirePackage{plautopatch}+,
+\textsf{plextarray} is automatically loaded and the problem goes.
+The list of automatically-loaded packages is shown at
+\verb+\end{document}+:
+\begin{verbatim}
+***** List of packages loaded by `plautopatch': *****
+ plextarray.
+*****************************************************
+\end{verbatim}
+When multiple packages are loaded, they are all printed
+as a list separated by commas and spaces.
+
+\section*{List of currently available patches}
+
+\def\ITEMoo#1 (#2) -> #3 (#4){%
+  \item \textsf{#1} (\textsf{#2})\\
+    $\rightarrow$ \textsf{#3} (\textsf{#4})}
+\def\ITEMooo#1 (#2) + #3 (#4) -> #5 (#6){%
+  \item \textsf{#1} (\textsf{#2}) + \textsf{#3} (\textsf{#4})\\
+    $\rightarrow$ \textsf{#5} (\textsf{#6})}
+\def\ITEM#1 -> #2 {%
+  \item \textsf{#1}\\
+    $\rightarrow$ \textsf{#2} }
+
+The legend:
+\begin{itemize}
+\item \texttt{<original package>} (\texttt{<bundle name of original package>})\\
+  \texttt{<patch package>} (\texttt{<bundle name of patch package>})
+\end{itemize}
+
+Current version (\filedate\space\fileversion) supports the followings:
+\begin{itemize}
+\ITEMoo  tracefnt (latex) -> ptrace/uptrace (platex/uplatex)
+\ITEMoo  fltrace (latex) -> pfltrace (platex)
+\ITEMoo  array (latex-tools) -> plarray (platex-tools)
+\ITEMooo array (latex-tools) + plext (platex) -> plextarray (platex-tools)
+\ITEMooo delarray (latex-tools) + plext (platex) -> plextdelarray (platex-tools)
+\ITEMoo  everysel (ms) -> pxeverysel (platex-tools)
+\ITEMoo  everyshi (ms) -> pxeveryshi (platex-tools)
+\ITEMoo  atbegshi (oberdiek) -> pxatbegshi (platex-tools)
+\ITEMoo  ftnright (latex-tools) -> pxftnright (platex-tools)
+\ITEM    pdfpages -> pxpdfpages (maintained here!)
+\end{itemize}
+Note that, of course, the list may be adjusted
+(addition, deletion or replacement)
+in the future to get the expected result.
+Feel free to report some compatibility issue or request changes!
+
+\section*{Disabling a specific patch}
+
+By default, \texttt{<patch package>} is automatically loaded when
+\texttt{<original package>} is detected, following the whole list.
+However, there is still a possibility of another regression issue.
+In that case, you can disable the detection of
+\texttt{<original package>} by using the command:
+\begin{verbatim}
+    \plautopatchdisable{<original package>}
+\end{verbatim}
+If you want to disable multiple packages, you can give
+a comma-separated list of them:
+\begin{verbatim}
+    \plautopatchdisable{<original package 1>,<original package 2>}
+\end{verbatim}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/plautopatch/plautopatch.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,147 @@
+%
+% plautopatch.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is part of the plautopatch bundle.
+% https://github.com/aminophen/plautopatch
+%
+
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{plautopatch}
+    [2018/08/21 v0.2 Automated patches for pLaTeX/upLaTeX]
+\def\platpc at pkgname{plautopatch}
+\def\platpc at warn{\PackageWarningNoLine\platpc at pkgname}
+\def\platpc at info{\PackageInfo\platpc at pkgname}
+
+\RequirePackage{filehook}
+
+% low-level helpers
+
+%% \platpc at req@add{<package>}
+% = if not loaded yet, \RequirePackage{<package>}
+%   and add to list.
+\def\platpc at req@add#1{%
+  \@ifpackageloaded{#1}{}{\RequirePackage{#1}\platpc at addtolist{#1}}%
+}
+
+%% \platpc at addtolist{<package>}
+% = add <package> to list named \platpc at list.
+\def\platpc at addtolist#1{\xdef\platpc at list{\platpc at list, #1}}
+\def\platpc at list{}% initialize
+
+% high-level helpers
+
+%% \platpc at patch@after{<orig>}{<patch>}
+% = Load <patch> after <orig>.
+\def\platpc at patch@after#1#2{%
+  \expandafter\def\csname platpc at end@#1\endcsname{%
+    \expandafter\ifx\csname platpc at disable@#1\endcsname\relax
+      \platpc at req@add{#2}%
+    \fi
+  }%
+  \AtEndOfPackageFile{#1}{\csname platpc at end@#1\endcsname}%
+}
+\@onlypreamble\platpc at patch@after
+
+%% \platpc at patch@after at both{<orig 1>}{<orig 2>}{<patch>}
+% = Load <patch> after both <orig 1> & <orig 2>.
+\def\platpc at patch@after at both#1#2#3{%
+  % for order #2 => #1
+  \expandafter\def\csname platpc at end@#1+#2\endcsname{%
+    \expandafter\ifx\csname platpc at disable@#1\endcsname\relax
+     \expandafter\ifx\csname platpc at disable@#2\endcsname\relax
+      \@ifpackageloaded{#2}{\platpc at req@add{#3}}{}%
+     \fi
+    \fi
+  }%
+  \AtEndOfPackageFile{#1}{\csname platpc at end@#1+#2\endcsname}%
+  % for order #1 => #2
+  \expandafter\def\csname platpc at end@#2+#1\endcsname{%
+    \expandafter\ifx\csname platpc at disable@#2\endcsname\relax
+     \expandafter\ifx\csname platpc at disable@#1\endcsname\relax
+      \@ifpackageloaded{#1}{\platpc at req@add{#3}}{}%
+     \fi
+    \fi
+  }%
+  \AtEndOfPackageFile{#2}{\csname platpc at end@#2+#1\endcsname}%
+}
+\@onlypreamble\platpc at patch@after at both
+
+%% \platpc at patch@before{<orig>}{<patch>}
+% = Load <patch> before <orig>.
+%   used when both conditions are met:
+%   - <patch> must be loaded *before* <orig>
+%   - <patch> contains \RequirePackage{<orig>}
+\def\platpc at patch@before#1#2{%
+  \expandafter\def\csname platpc at begin@#1\endcsname{%
+    % if <patch> is already loaded, nothing to do
+    \@ifpackageloaded{#2}{}{% else
+      \expandafter\ifx\csname platpc at disable@#1\endcsname\relax
+        % the code (*!) should be used only once,
+        % remove it immediately when this macro is executed
+        \expandafter\let\csname platpc at begin@#1\endcsname\relax
+        % pretend as if <orig> not loaded
+        \expandafter\let\csname ver@#1.sty\endcsname\relax
+        % load the <patch> package
+        \RequirePackage{#2}\platpc at addtolist{#2}%
+        % avoid loading <orig> twice by discarding "\@@input <orig>" (*!)
+        \let\platpc at filehook@@atbegin\filehook@@atbegin
+        \def\filehook@@atbegin\@@input####1\filehook at atend{%
+          \let\filehook@@atbegin\platpc at filehook@@atbegin
+          % avoid infinite loop even when \AtEndOfPackageFile used
+          \expandafter\let\csname filehook at atend@#1.sty\endcsname\relax
+          \filehook@@atbegin
+          \filehook at atend}%
+        % all done
+      \fi
+    }%
+  }%
+  \AtBeginOfPackageFile{#1}{\csname platpc at begin@#1\endcsname}%
+}
+\@onlypreamble\platpc at patch@before
+
+% interface for users who want don't patches
+
+%% \plautopatchdisable{<orig 1>,<orig 2>,...}
+% = Disable patches triggered by <orig 1>, <orig 2>, ...
+\newcommand{\plautopatchdisable}[1]{%
+  \edef\@tempa{\zap at space#1 \@empty}%
+  \@for\@tempa:=\@tempa\do{%
+    \expandafter\let\csname platpc at disable@\@tempa\endcsname\@empty
+  }%
+}
+\@onlypreamble\plautopatchdisable
+
+% show list of loaded patches
+
+\AtEndDocument{\platpc at showlist}
+\def\platpc at showlist{%
+  \ifx\platpc at list\@empty
+    \platpc at info{No additional packages loaded}
+  \else
+    % the first token of \platpc at list should be ','
+    \typeout{%
+      ***** List of packages loaded by `\platpc at pkgname': *****^^J%
+      \expandafter\@gobble\platpc at list.^^J%
+      *****************************************************}%
+  \fi
+}
+
+% register patches
+
+\ifx\enablecjktoken\@undefined
+  \platpc at patch@after{tracefnt}{ptrace}% platex
+\else
+  \platpc at patch@after{tracefnt}{uptrace}% uplatex
+\fi
+\platpc at patch@after{fltrace}{pfltrace}% platex
+\platpc at patch@after{array}{plarray}% platex-tools
+\platpc at patch@after at both{array}{plext}{plextarray}% platex-tools
+\platpc at patch@after at both{delarray}{plext}{plextdelarray}% platex-tools
+\platpc at patch@after{everysel}{pxeverysel}% platex-tools
+\platpc at patch@after{everyshi}{pxeveryshi}% platex-tools
+\platpc at patch@after{atbegshi}{pxatbegshi}% platex-tools
+\platpc at patch@before{ftnright}{pxftnright}% platex-tools
+\platpc at patch@after{pdfpages}{pxpdfpages}% (maintained here!)
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/plautopatch/plautopatch.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty	2018-08-21 21:51:42 UTC (rev 48447)
@@ -0,0 +1,49 @@
+%
+% pxpdfpages.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% 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)
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{pxpdfpages}
+  [2018/08/20 v0.1 Patch to pdfpages for (u)pLaTeX]
+
+%% preparations
+\def\pxpdpg at pkgname{pxpdfpages}
+\def\pxpdpg at warn{\PackageWarningNoLine\pxpdpg at pkgname}
+\def\pxpdpg at info{\PackageInfo\pxpdpg at pkgname}
+
+%% load it
+\RequirePackageWithOptions{pdfpages}
+\RequirePackage{pxatbegshi}% pdfpages requires atbegshi
+
+%% patch internal for pdfpages to work with tombow
+%% Note: this code should be copied to gentombow.sty!
+\def\pxpdpg at patch@pdfpages{%
+  \RequirePackage{etoolbox}
+  \patchcmd{\AM at output}{%
+    \setlength{\@tempdima}{\AM at xmargin}%
+    \edef\AM at xmargin{\the\@tempdima}%
+    \setlength{\@tempdima}{\AM at ymargin}%
+    \edef\AM at ymargin{\the\@tempdima}%
+  }{%
+    \setlength{\@tempdima}{\AM at xmargin\iftombow+1in\fi}%
+    \edef\AM at xmargin{\the\@tempdima}%
+    \setlength{\@tempdima}{\AM at ymargin\iftombow-1in\fi}%
+    \edef\AM at ymargin{\the\@tempdima}%
+  }
+  {\pxpdpg at info{Patch for pdfpages applied}}
+  {\pxpdpg at warn{Patch for pdfpages failed}}%
+  }
+\AtBeginDocument{\@ifpackageloaded{pdfpages}{\pxpdpg at patch@pdfpages}{}}
+
+%% all done
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/plautopatch/pxpdfpages.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-08-21 21:47:21 UTC (rev 48446)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-08-21 21:51:42 UTC (rev 48447)
@@ -506,7 +506,8 @@
     pinlabel pitex pittetd pixelart pkfix pkfix-helper pkgloader pkuthss
     pl placeat placeins placeins-plain
     plain-doc plainpkg plari plantslabels plantuml plates
-    platex platex-tools platexcheat play playfair plex plex-otf plipsum
+    platex platex-tools platexcheat plautopatch
+    play playfair plex plex-otf plipsum
     plnfss plstmary plweb pm-isomath pmgraph pmx pmxchords pnas2009
     poemscol poetry poetrytex polexpr polski poltawski
     polyglossia polynom polynomial

Modified: trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2018-08-21 21:47:21 UTC (rev 48446)
+++ trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2018-08-21 21:51:42 UTC (rev 48447)
@@ -30,10 +30,11 @@
 depend platex
 depend platex-tools
 depend platexcheat
+depend plautopatch
 depend ptex
 depend ptex-base
+depend ptex-fontmaps
 depend ptex-fonts
-depend ptex-fontmaps
 depend ptex2pdf
 depend pxbase
 depend pxchfon

Added: trunk/Master/tlpkg/tlpsrc/plautopatch.tlpsrc
===================================================================


More information about the tex-live-commits mailing list