summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/uplatex/base/uplvers.dtx
blob: 147a9026e61e9f0e90f2c61b27119eeb8b2e26f8 (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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
% \iffalse meta-comment
%% File: uplvers.dtx
%
%    pLaTeX version setting file:
%       Copyright 1995-2006 ASCII Corporation.
%    and modified for upLaTeX
%
%  Copyright (c) 2010 ASCII MEDIA WORKS
%  Copyright (c) 2016 Takuji Tanaka
%  Copyright (c) 2016 Japanese TeX Development Community
%
%  This file is part of the upLaTeX2e system (community edition).
%  --------------------------------------------------------------
%
% \fi
%
% \CheckSum{192}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%
% \setcounter{StandardModuleDepth}{1}
% \StopEventually{}
%
% \iffalse
% \changes{v1.0}{1995/05/16}{p\LaTeXe\ 用に\file{ltvers.dtx}を修正}
% \changes{v1.0a}{1995/08/30}{\LaTeX\ \texttt{!<1995/06/01!>}版用に修正}
% \changes{v1.0b}{1996/01/31}{\LaTeX\ \texttt{!<1995/12/01!>}版用に修正}
% \changes{v1.0c}{1997/01/11}{\LaTeX\ \texttt{!<1996/06/01!>}版用に修正}
% \changes{v1.0d}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}版用に修正}
% \changes{v1.0e}{1997/07/02}{\LaTeX\ \texttt{!<1997/06/01!>}版用に修正}
% \changes{v1.0f}{1998/02/17}{\LaTeX\ \texttt{!<1997/12/01!>}版用に修正}
% \changes{v1.0g}{1998/09/01}{\LaTeX\ \texttt{!<1998/06/01!>}版用に修正}
% \changes{v1.0h}{1999/04/05}{\LaTeX\ \texttt{!<1998/12/01!>}版用に修正}
% \changes{v1.0i}{1999/08/09}{\LaTeX\ \texttt{!<1999/06/01!>}版用に修正}
% \changes{v1.0j}{2000/02/29}{\LaTeX\ \texttt{!<1999/12/01!>}版用に修正}
% \changes{v1.0k}{2000/11/03}{\LaTeX\ \texttt{!<2000/06/01!>}版用に修正}
% \changes{v1.0l}{2001/09/04}{\LaTeX\ \texttt{!<2001/06/01!>}版用に修正}
% \changes{v1.0m}{2004/08/10}{\LaTeX\ \texttt{!<2003/12/01!>}版対応確認}
% \changes{v1.0n}{2005/01/04}{plfonts.dtxバグ修正}
% \changes{v1.0o}{2006/01/04}{plfonts.dtxバグ修正}
% \changes{v1.0p}{2006/06/27}{plfonts.dtx \LaTeX\ \texttt{!<2005/12/01!>}対応}
% \changes{v1.0q}{2006/11/10}{plfonts.dtxバグ修正}
% \changes{v1.0q-u00}{2011/05/07}{p\LaTeX{}用からup\LaTeX{}用に修正。}
% \changes{v1.0r}{2016/01/26}{plcore.dtx p\TeX\ (r28720)対応}
% \changes{v1.0s}{2016/02/01}{\LaTeX\ \texttt{!<2015/01/01!>}のlatexreleaseに
%    対応するためのコードを導入}
% \changes{v1.0t}{2016/02/03}{\cs{plIncludeInRelease}と
%    \cs{plEndIncludeInRelease}を新設。}
% \changes{v1.0t-u00}{2016/04/06}{p\LaTeX{}の変更に追随。}
% \changes{v1.0u-u00}{2016/04/17}{\LaTeX\ \texttt{!<2016/03/31!>}版対応確認}
% \changes{v1.0v-u00}{2016/05/07}{パッチファイルをロードするのをやめた。}
% \changes{v1.0v-u00}{2016/05/07}{起動時の文字列を最新の\LaTeX{}に合わせた。}
% \changes{v1.0w-u00}{2016/05/12}{起動時の文字列に入れる\LaTeX{}のバージョンを
%    元の\LaTeX{}のバナーから引き継ぐように改良}
% \changes{v1.0w-u00}{2016/05/12}{起動時の文字列に入れるBabelのバージョンを
%    元の\LaTeX{}のバナーから取得するコードを\file{uplatex.ini}から取り入れた}
% \changes{v1.0w-u01}{2016/05/21}{サポート外の\LaTeX~2.09互換モードが
%    使われた場合に明確なエラーを出すようにした。}
% \fi
%
% \iffalse
%<*driver>
% \fi
\ProvidesFile{uplvers.dtx}[2016/05/21 v1.0w-u01 upLaTeX Kernel (Version Info)]
% \iffalse
\documentclass{jltxdoc}
\GetFileInfo{uplvers.dtx}
\author{Ken Nakano \& Hideaki Togashi \& TTK}
\title{\filename}
\date{作成日:\filedate}
\begin{document}
  \maketitle
  \DocInput{\filename}
\end{document}
%</driver>
% \fi
%
% \section{バージョンの設定}
% まず、このディストリビューションでのup\LaTeXe{}の日付とバージョン番号
% を定義します。また、up\LaTeXe{}が起動されたときに表示される文字列の
% 設定もします。
%
% \changes{v1.0}{1995/05/16}{p\LaTeXe\ 用に\file{ltvers.dtx}を修正}
% \changes{v1.0a}{1995/08/30}{\LaTeX\ \texttt{!<1995/06/01!>}版用に修正}
% \changes{v1.0b}{1996/01/31}{\LaTeX\ \texttt{!<1995/12/01!>}版用に修正}
% \changes{v1.0c}{1997/01/11}{\LaTeX\ \texttt{!<1996/06/01!>}版用に修正}
% \changes{v1.0d}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}版用に修正}
% \changes{v1.0e}{1997/07/02}{\LaTeX\ \texttt{!<1997/06/01!>}版用に修正}
% \changes{v1.0f}{1998/02/17}{\LaTeX\ \texttt{!<1997/12/01!>}版用に修正}
% \changes{v1.0g}{1998/09/01}{\LaTeX\ \texttt{!<1998/06/01!>}版用に修正}
% \changes{v1.0h}{1999/04/05}{\LaTeX\ \texttt{!<1998/12/01!>}版用に修正}
% \changes{v1.0i}{1999/08/09}{\LaTeX\ \texttt{!<1999/06/01!>}版用に修正}
% \changes{v1.0j}{2000/02/29}{\LaTeX\ \texttt{!<1999/12/01!>}版用に修正}
% \changes{v1.0k}{2000/11/03}{\LaTeX\ \texttt{!<2000/06/01!>}版用に修正}
% \changes{v1.0l}{2001/09/04}{\LaTeX\ \texttt{!<2001/06/01!>}版用に修正}
% \changes{v1.0m}{2004/08/10}{\LaTeX\ \texttt{!<2003/12/01!>}版対応確認}
% \changes{v1.0s}{2016/02/01}{\LaTeX\ \texttt{!<2015/01/01!>}版用に修正}
% \changes{v1.0u-u00}{2016/04/17}{\LaTeX\ \texttt{!<2016/03/31!>}版対応確認}
%
% このバージョンのup\LaTeXe{}は、次のバージョンの\LaTeX{}\footnote{%
% \LaTeX\ authors: Johannes Braams, David Carlisle, Alan Jeffrey,
%   Leslie Lamport, Frank Mittelbach, Chris Rowley, Rainer Sch\"opf}を
% もとにしています。
%    \begin{macrocode}
%<*2ekernel>
%\def\fmtname{LaTeX2e}
%\edef\fmtversion
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<platexrelease>\edef\p@known@latexreleaseversion
%<*2ekernel|latexrelease|platexrelease>
   {2016/03/31}
%</2ekernel|latexrelease|platexrelease>
%    \end{macrocode}
%
% \begin{macro}{\pfmtname}
% \begin{macro}{\pfmtversion}
% up\LaTeXe{}のフォーマットファイル名とバージョンです。
%    \begin{macrocode}
%<*plcore>
\def\pfmtname{pLaTeX2e}
\def\pfmtversion
%</plcore>
%<platexrelease>\edef\platexreleaseversion
%<*plcore|platexrelease>
   {2016/06/10u01}
%</plcore|platexrelease>
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{\LaTeX~2.09互換モードの抑制}
%
% \begin{macro}{\documentstyle}
% p\LaTeX{}は、|\documentclass|の代わりに|\documentstyle|が使われると
% \LaTeX~2.09互換モードに入ります。しかし、up\LaTeX{}は新しいマクロ
% パッケージですので、\LaTeX~2.09互換モードをサポートしません。
% このため、\file{plcore.dtx}の定義を上書きして明確なエラーを出します。
% \changes{v1.0w-u01}{2016/05/21}{サポート外の\LaTeX~2.09互換モードが
%    使われた場合に明確なエラーを出すようにした。}
%    \begin{macrocode}
%<*plfinal>
\def\documentstyle{%
  \@latex@error{upLaTeX does NOT support LaTeX 2.09 compatibility mode}\@ehc
  \documentclass}
%    \end{macrocode}
% \end{macro}
%
% \subsection{パッチファイルのロード}
%
% 次の部分は、up\LaTeXe{}のパッチファイルをロードするためのコードです。
% バグを修正するためのパッチを配布するかもしれません。
%
% パッチファイルをロードするコードはコメントアウトしました。
% \changes{v1.0v-u00}{2016/05/07}{パッチファイルをロードするのをやめた。}
%    \begin{macrocode}
%\IfFileExists{uplpatch.ltx}
%  {\typeout{************************************^^J%
%            * Appliying patch file uplpatch.ltx *^^J%
%            ************************************}
%  \def\pfmtversion@topatch{unknown}
%  \input{uplpatch.ltx}
%  \ifx\pfmtversion\pfmtversion@topatch
%    \ifx\ppatch@level\@undefined
%      \typeout{^^J^^J^^J%
%   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
%   !! Patch file `uplpatch.ltx' (for version <\pfmtversion@topatch>)^^J%
%   !! is not suitable for version <\pfmtversion> of upLaTeX.^^J^^J%
%   !! Please check if iniptex found an old patch file:^^J%
%   !! --- if so, rename it or delete it, and redo the^^J%
%   !!     iniptex run.^^J%
%   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
%      \batchmode \@@end
%    \fi
%  \else
%      \typeout{^^J^^J^^J%
%   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
%   !! Patch file `uplpatch.ltx' (for version <\pfmtversion@topatch>)^^J%
%   !! is not suitable for version <\pfmtversion> of upLaTeX.^^J%
%   !!^^J%
%   !! Please check if iniptex found an old patch file:^^J%
%   !! --- if so, rename it or delete it, and redo the^^J%
%   !!     iniptex run.^^J%
%   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}%
%      \batchmode \@@end
%  \fi
%  \let\pfmtversion@topatch\relax
%  }{}
%    \end{macrocode}
%
% 起動時に表示される文字列です。
% \LaTeX{}にパッチがあてられている場合は、それも表示します。
% \changes{v1.0v-u00}{2016/05/07}{起動時の文字列を最新の\LaTeX{}に合わせた。}
% \changes{v1.0w-u00}{2016/05/12}{起動時の文字列に入れる\LaTeX{}のバージョンを
%    元の\LaTeX{}のバナーから引き継ぐように改良}
%    \begin{macrocode}
\ifx\patch@level\@undefined % fallback if undefined in LaTeX
  \def\patch@level{0}\fi
\ifx\ppatch@level\@undefined % fallback if undefined in upLaTeX
  \def\ppatch@level{0}\fi
\begingroup
  \def\parse@BANNER#1{\expandafter\parse@@BANNER#1}
  \def\parse@@BANNER#1#2#3#4{#2}
  \edef\platexTMP{%
    \ifnum\ppatch@level=0
      \everyjob{\noexpand\typeout{%
        \pfmtname\space<\pfmtversion>\space
          (based on \parse@BANNER{\platexBANNER})}}%
    \else
      \everyjob{\noexpand\typeout{%
        \pfmtname\space<\pfmtversion>+\ppatch@level\space
          (based on \parse@BANNER{\platexBANNER})}}%
    \fi
  }
\expandafter
\endgroup \platexTMP
%    \end{macrocode}
%
% p\LaTeX{}やup\LaTeX{}は、独自のハイフネーション・パターンを定義していません。
% 代わりに、\LaTeX{}が読み込んでいるBabelパッケージのものが適用されます。
% 起動時の文字列にも\file{hyphen.cfg}のバージョンを反映します。
% \changes{v1.0w-u00}{2016/05/12}{起動時の文字列に入れるBabelのバージョンを
%    元の\LaTeX{}のバナーから取得するコードを\file{uplatex.ini}から取り入れた}
%    \begin{macrocode}
\begingroup
  \def\parse@BANNER#1{\expandafter\parse@@BANNER#1}
  \def\parse@@BANNER#1#2#3#4{#4}
  \edef\platexTMP{%
    \the\everyjob\noexpand\typeout{\parse@BANNER{\platexBANNER}}%
  }
  \everyjob=\expandafter{\platexTMP}%
  \edef\platexTMP{%
    \noexpand\let\noexpand\platexBANNER=\noexpand\@undefined
    \noexpand\everyjob={\the\everyjob}%
  }
  \expandafter
\endgroup \platexTMP
%</plfinal>
%    \end{macrocode}
%
% \subsection{latexreleaseパッケージへの対応}
%
% 最後に、latexreleaseパッケージへの対応です。
% \begin{macro}{\plIncludeInRelease}
% \changes{v1.0t}{2016/02/03}{\cs{plIncludeInRelease}と
%    \cs{plEndIncludeInRelease}を新設。}
%    \begin{macrocode}
%<*plcore|platexrelease>
\def\plIncludeInRelease#1{\kernel@ifnextchar[%
  {\@plIncludeInRelease{#1}}
  {\@plIncludeInRelease{#1}[#1]}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@plIncludeInRelease#1[#2]{\@plIncludeInRele@se{#2}}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\@plIncludeInRele@se#1#2#3{%
  \toks@{[#1] #3}%
  \expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax
    \ifnum\expandafter\@parse@version#1//00\@nil
          >\expandafter\@parse@version\pfmtversion//00\@nil
      \GenericInfo{}{Skipping: \the\toks@}%
     \expandafter\expandafter\expandafter\@gobble@plIncludeInRelease
    \else
      \GenericInfo{}{Applying: \the\toks@}%
      \expandafter\let\csname\string#2+\@currname+IIR\endcsname\@empty
    \fi
  \else
    \GenericInfo{}{Already applied: \the\toks@}%
    \expandafter\@gobble@plIncludeInRelease
  \fi
}
%    \end{macrocode}
%
%    \begin{macrocode}
\long\def\@gobble@plIncludeInRelease#1\plEndIncludeInRelease{}
\let\plEndIncludeInRelease\relax
%</plcore|platexrelease>
%    \end{macrocode}
% \end{macro}
%
% \LaTeXe{}が提供するlatexreleaseパッケージが読み込まれていて、
% かつp\LaTeXe{}が提供するplatexreleaseパッケージが読み込まれていない
% 場合は、警告を出します。
% \changes{v1.0s}{2016/02/01}{latexrelease利用時に警告を出すようにした}
%    \begin{macrocode}
%<*plfinal>
\AtBeginDocument{%
  \@ifpackageloaded{latexrelease}{%
    \@ifpackageloaded{platexrelease}{}{%
      \@latex@warning@no@line{%
        Package latexrelease is loaded.\MessageBreak
        Some patches in pLaTeX2e core may be overwritten.\MessageBreak
        Consider using platexrelease.\MessageBreak
        See platex.pdf for detail}%
    }%
  }{}%
}
%</plfinal>
%    \end{macrocode}
%
% \Finale
%
\endinput