summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/plautopatch/plautopatch.tex
blob: 58b514d883436e6b5c82233489d59e7b7c3765df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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}