% \iffalse meta-comment
%% File: platex.dtx
%
%  Copyright 1995,1996 ASCII Corporation.
%  Copyright (c) 2010 ASCII MEDIA WORKS
%  Copyright (c) 2016-2022 Japanese TeX Development Community
%
%  This file is part of the pLaTeX2e system (community edition).
%  -------------------------------------------------------------
%
% \fi
%
% \iffalse
%<*driver|pldoc>
\ifx\JAPANESEtrue\undefined
  \expandafter\newif\csname ifJAPANESE\endcsname
  \JAPANESEtrue
\fi
%</driver|pldoc>
% \fi
%
% \setcounter{StandardModuleDepth}{1}
% \makeatletter
%\ifJAPANESE
% \def\chuui{\@ifnextchar[{\@chuui}{\@chuui[$BCm0U!'(B]}}
%\else
% \def\chuui{\@ifnextchar[{\@chuui}{\@chuui[Attention: ]}}
%\fi
% \def\@chuui[#1]{\par\vskip.5\baselineskip
%   \noindent{\em #1}\par\bgroup\gtfamily\sffamily}
% \def\endchuui{\egroup\vskip.5\baselineskip}
% \makeatother
%
% \iffalse
%<*driver|pldoc>
\def\eTeX{$\varepsilon$-\TeX}
\def\pTeX{p\kern-.15em\TeX}
\def\epTeX{$\varepsilon$-\pTeX}
\def\pLaTeX{p\kern-.05em\LaTeX}
\def\pLaTeXe{p\kern-.05em\LaTeXe}
%</driver|pldoc>
% \fi
%
% \StopEventually{}
%
% \iffalse
%\ifJAPANESE
% \changes{v1.0}{1995/05/08}{$B:G=i$N%P!<%8%g%s(B}
% \changes{v1.0a}{1995/08/25}{$B8_49@-$K$D$$$F!"(B\dst{}$B$N;H$$J}!";29MJ88%$rDI2C(B}
% \changes{v1.0b}{1996/02/01}{\file{omake-sh.ins}, \file{omake-pl.ins}$B$r(B
%     \dst{}$B$NJQ99$K$H$b$J$&JQ99$r$7$?(B}
% \changes{v1.0c}{1997/01/23}{\dst{}$B$K$H$b$J$&JQ99(B}
% \changes{v1.0c}{1997/01/23}{\LaTeX\ \textt{!<1996/12/01!>}$B$K9g$o$;$F=$@5(B}
% \changes{v1.0c}{1997/01/23}{gind.ist$B$H(Bgglo.ist$B$r(B
%        \$TEXMF/tex/latex2e/base$B%G%#%l%/%H%j$+$i%3%T!<$7$J$$$h$&$K$7$?(B}
% \changes{v1.0c}{1997/01/25}{pldoc.dic$B$r(Bfilecontents$B4D6-$K$h$j:n@.(B}
% \changes{v1.0c}{1997/01/29}{\file{pltpatch.ltx}$B$r(B\file{plpatch.ltx}$B$KL>>NJQ99(B}
% \changes{v1.0d}{2016/01/27}{\pLaTeXe{}$B$KIUB0$9$k%U%!%$%k$N@bL@$r99?7(B}
% \changes{v1.0d}{2016/01/27}{rm$B%3%^%s%I<B9TA0$KB8:_3NG'$9$k$h$&$K$7$?(B}
% \changes{v1.0e}{2016/02/16}{platexrelease$B$N@bL@$rDI2C(B}
% \changes{v1.0f}{2016/04/12}{$B%I%-%e%a%s%H$r99?7(B}
% \changes{v1.0g}{2016/05/07}{$B%U%)!<%^%C%H:n@.;~$K(B\LaTeX{}$B$N%P%J!<$r0lC6J]B8(B}
% \changes{v1.0h}{2016/05/08}{$B%I%-%e%a%s%H$+$i(B\file{plpatch.ltx}$B$r=|30(B}
% \changes{v1.0i}{2016/05/12}{$B0l;~%3%^%s%I(B\cs{orgdump}$B$r:G=*E*$KL$Dj5A$X(B}
% \changes{v1.0j}{2016/05/20}{pfltrace$B$N@bL@$rDI2C(B}
% \changes{v1.0k}{2016/05/21}{$BJQ99MzNr$b=PNO$9$k$h$&$K$7$?(B}
% \changes{v1.0l}{2016/06/19}{$B%Q%C%A%l%Y%k$r(B\file{plvers.dtx}$B$+$i<hF@(B}
% \changes{v1.0m}{2016/08/26}{\file{platex.cfg}$B$NFI$_9~$_$r(B
%    \file{plcore.ltx}$B$+$i(B\file{platex.ltx}$B$X0\F0(B}
% \changes{v1.0n}{2016/09/14}{\LaTeX{}$B$N%P%J!<$NJ]B8$7$+$?$r2~NI(B}
% \changes{v1.0o}{2017/09/24}{$B%Q%C%A%l%Y%k$,Ii$N?t$N>l9g$r(Bpre-release$B07$$$X(B}
% \changes{v1.0p}{2017/11/11}{\LaTeX{}$B$N%P%J!<$rJ]B8$9$k%3!<%I$r(B
%    \file{platex.ltx}$B$+$i(B\file{plcore.ltx}$B$X0\F0(B}
% \changes{v1.0q}{2017/11/29}{$B1Q8lHG%I%-%e%a%s%H$rDI2C(B}
% \changes{v1.0r}{2017/12/02}{$B1Q8l$N;29MJ88%$bDI2C(B}
% \changes{v1.0s}{2017/12/05}{$B%G%U%)%k%H@_Dj%U%!%$%k$NFI$_9~$_$r(B
%    \file{plcore.ltx}$B$+$i(B\file{platex.ltx}$B$X0\F0(B}
% \changes{v1.0t}{2018/02/07}{ascmac$B%Q%C%1!<%8$rFHN)$5$;$?(B}
% \changes{v1.0u}{2018/02/18}{nidanfloat$B%Q%C%1!<%8$rFHN)$5$;$?(B}
% \changes{v1.0v}{2018/04/06}{$B:G?7$N(Bsource2e$B$X$NDI?o(B}
% \changes{v1.0w}{2018/04/08}{$B0BA4$N$?$a%U%)!<%^%C%H:n@.;~$N(B
%    $B%P%J!<I=<($r$d$a$?(B}
% \changes{v1.0x}{2018/09/03}{$B%I%-%e%a%s%H$r99?7(B}
% \changes{v1.0x}{2018/09/03}{platexcheat$B$K8@5Z(B}
% \changes{v1.0x}{2018/09/03}{plautopatch$B$K8@5Z(B}
% \changes{v1.0y}{2018/09/22}{$B:G=*99?7F|$r(B\file{pldoc.pdf}$B$KI=<((B}
% \changes{v1.0z}{2019/09/29}{$B%?%$%]=$@5(B}
% \changes{v1.1}{2020/03/24}{$B%I%-%e%a%s%H$r99?7(B}
% \changes{v1.1a}{2020/09/26}{\file{plexpl3.dtx}$B$rDI2C(B}
% \changes{v1.1b}{2020/09/28}{defs$BFI9~8e$K%U%C%/DI2C(B}
% \changes{v1.1c}{2021/02/25}{\file{latex.ltx}$B$NFI9~%A%'%C%/(B}
% \changes{v1.1d}{2021/03/14}{expl3$B%3%^%s%I$r0u;z$G$-$k$h$&$K(B}
% \changes{v1.1e}{2022/03/06}{$B?7(B\file{ltxdoc.cls}$B$KBP1~(B}
%\else
% \changes{v1.0}{1995/05/08}{first edition}
% \changes{v1.0a}{1995/08/25}{Added 'Compatibility', `Usage of \dst{}'
%    and `References'}
% \changes{v1.0b}{1996/02/01}{Adjusted for the latest
%    \dst\ (\file{omake-sh.ins} and \file{omake-pl.ins}.}
% \changes{v1.0c}{1997/01/23}{Adjusted for the latest \dst.}
% \changes{v1.0c}{1997/01/23}{Adjusted for \LaTeX\ \textt{!<1996/12/01!>}.}
% \changes{v1.0c}{1997/01/23}{Don't copy gind.ist and gglo.ist from
%        \$TEXMF/tex/latex2e/base directory.}
% \changes{v1.0c}{1997/01/25}{Add to filecontents environment for pldoc.dic.}
% \changes{v1.0c}{1997/01/29}{Rename \file{pltpatch.ltx} to \file{plpatch.ltx}.}
% \changes{v1.0d}{2016/01/27}{Updated descriptions of \pLaTeXe\ files}
% \changes{v1.0d}{2016/01/27}{Add -e test before rm command}
% \changes{v1.0e}{2016/02/16}{Add a description of platexrelease}
% \changes{v1.0f}{2016/04/12}{Update document.}
% \changes{v1.0g}{2016/05/07}{Save \LaTeX\ banner}
% \changes{v1.0h}{2016/05/08}{Exclude \file{plpatch.ltx} from the document}
% \changes{v1.0i}{2016/05/12}{Undefine temporary command
%    \cs{orgdump} in the end.}
% \changes{v1.0j}{2016/05/20}{Add description of `pfltrace'}
% \changes{v1.0k}{2016/05/21}{Print also changes.}
% \changes{v1.0l}{2016/06/19}{Get the patch level from \file{plvers.dtx}}
% \changes{v1.0m}{2016/08/26}{Moved loading \file{platex.cfg}
%    from \file{plcore.ltx} to \file{platex.ltx}}
% \changes{v1.0n}{2016/09/14}{Improved banner saving method}
% \changes{v1.0o}{2017/09/24}{Allow negative patch level for pre-release}
% \changes{v1.0p}{2017/11/11}{Moved banner saving code from
%    \file{platex.ltx} to \file{plcore.ltx}}
% \changes{v1.0q}{2017/11/29}{New English documentation added.}
% \changes{v1.0r}{2017/12/02}{English references added}
% \changes{v1.0s}{2017/12/05}{Moved loading default settings
%    from \file{plcore.ltx} to \file{platex.ltx}}
% \changes{v1.0t}{2018/02/07}{Moved ascmac package to separate bundle}
% \changes{v1.0u}{2018/02/18}{Moved nidanfloat package to separate bundle}
% \changes{v1.0v}{2018/04/06}{Sync with the latest \file{source2e.tex}}
% \changes{v1.0w}{2018/04/08}{Stop showing banner during
%    format generation for safety}
% \changes{v1.0x}{2018/09/03}{Update document.}
% \changes{v1.0x}{2018/09/03}{Mention platexcheat (Japanese only).}
% \changes{v1.0x}{2018/09/03}{Mention plautopatch.}
% \changes{v1.0y}{2018/09/22}{Show last update info on \file{pldoc.pdf}}
% \changes{v1.0z}{2019/09/29}{Fix typos in document.}
% \changes{v1.1}{2020/03/24}{Update document.}
% \changes{v1.1a}{2020/09/26}{Add \file{plexpl3.dtx}}
% \changes{v1.1b}{2020/09/28}{Add hook after loading defs}
% \changes{v1.1c}{2021/02/25}{Check for \file{latex.ltx} status}
% \changes{v1.1d}{2021/03/14}{Print expl3 commands correctly}
% \changes{v1.1e}{2022/03/06}{Adapt to new \file{ltxdoc.cls}}
%\fi
% \fi
%
% \iffalse
%<*driver>
\NeedsTeXFormat{pLaTeX2e}
% \fi
\ProvidesFile{platex.dtx}[2022/03/06 v1.1e pLaTeX document file]
% \iffalse
\RequirePackage{plautopatch}
\documentclass[dvipdfmx,a4paper]{jltxdoc}
\usepackage{plext}
\GetFileInfo{platex.dtx}
\ifJAPANESE
\title{\pLaTeXe{}$B$K$D$$$F(B}
\author{$BCfLn(B $B8-(B \& $BF|K\8l(B\TeX{}$B3+H/%3%_%e%K%F%#(B}
\date{$B:n@.F|!'(B\filedate}
\renewcommand{\refname}{$B;29MJ88%(B}
\GlossaryPrologue{\section*{$BJQ99MzNr(B}%
                  \markboth{$BJQ99MzNr(B}{$BJQ99MzNr(B}%
                  \addcontentsline{toc}{section}{$BJQ99MzNr(B}}
\else
\title{About \pLaTeXe{}}
\author{Ken Nakano \& Japanese \TeX\ Development Community}
\date{Date: \filedate}
\renewcommand{\refname}{References}
\GlossaryPrologue{\section*{Change History}%
                  \markboth{Change History}{Change History}%
                  \addcontentsline{toc}{section}{Change History}}
\fi
\makeatletter
\ifJAPANESE
\def\levelchar{>$B!&(B}
\fi
\def\changes@#1#2#3{%
  \let\protect\@unexpandable@protect
  \edef\@tempa{\noexpand\glossary{#2\space#1\levelchar
    \ifx\saved@macroname\@empty
%     \space\actualchar\generalname: %% comment out (platex.dtx only)
    \else
      \expandafter\@gobble
      \saved@macroname\actualchar
      \string\verb\quotechar*%
      \verbatimchar\saved@macroname
      \verbatimchar:
    \fi
    #3}}%
  \@tempa\endgroup\@esphack}
\makeatother
\RecordChanges
\begin{document}
   \MakeShortVerb{\+}
   \maketitle
   \DocInput{\filename}
   \StopEventually{\end{document}}
   \clearpage
   % Make TeX shut up.
   \hbadness=10000
   \newcount\hbadness
   \hfuzz=\maxdimen
   \PrintChanges
   \let\PrintChanges\relax
\end{document}
%</driver>
% \fi
%
%
%\ifJAPANESE
% \changes{v1.0f}{2016/04/12}{$B%I%-%e%a%s%H$r99?7(B}
% \changes{v1.0k}{2016/05/21}{$BJQ99MzNr$b=PNO$9$k$h$&$K$7$?(B}
% \changes{v1.0q}{2017/11/29}{$B1Q8lHG%I%-%e%a%s%H$rDI2C(B}
% \changes{v1.0x}{2018/09/03}{$B%I%-%e%a%s%H$r99?7(B}
% \changes{v1.0z}{2019/09/29}{$B%?%$%]=$@5(B}
% \changes{v1.1}{2020/03/24}{$B%I%-%e%a%s%H$r99?7(B}
%\else
% \changes{v1.0f}{2016/04/12}{Update document.}
% \changes{v1.0k}{2016/05/21}{Print also changes.}
% \changes{v1.0q}{2017/11/29}{New English documentation added.}
% \changes{v1.0x}{2018/09/03}{Update document.}
% \changes{v1.0z}{2019/09/29}{Fix typos in document.}
% \changes{v1.1}{2020/03/24}{Update document.}
%\fi
%\ifJAPANESE
% \begin{chuui}
% \pLaTeXe{}$B$O!"(B\LaTeXe{}$B$rF|K\8lAHHGMQ$K3HD%!&D4@0$7$?$b$N$G$9!#(B
% $B$3$NJ8=q$G$O!V%3%_%e%K%F%#HG(B\pLaTeXe{}$B!W$K$D$$$F4JC1$K@bL@$7$^$9!#(B
% $B3t<02q<R%"%9%-!<$*$h$S3t<02q<R%"%9%-!<!&%a%G%#%"%o!<%/%9$,(B
% $BG[I[$7$F$$$?(B\pLaTeXe{}$B!J0J2<!"!V%"%9%-!<HG(B\pLaTeXe{}$B!W!K$H$O(B
% $B0[$J$j$^$9$N$G!"Cm0U$7$F$/$@$5$$!#(B
% \end{chuui}
%\else
% ^^A \begin{chuui}[]
% ^^A This document provides a brief description of \pLaTeXe, the Japanese
% ^^A extended version of \LaTeXe. Current maintainer of
% ^^A \pLaTeXe\ is Japanese \TeX\ Development Community.
% ^^A \end{chuui}
%\fi
%
%\ifJAPANESE
% 2010$BG/0J9_!"%"%9%-!<(B\pTeX\footnote{$B%"%9%-!<F|K\8l(B\pTeX:
% \texttt{https://asciidwango.github.io/ptex/}}$B$O!"(B
% $B9q:]E*$K9-$/;H$o$l$F$$$k(B\TeX\ Live$B$H$$$&%G%#%9%H%j%S%e!<%7%g%s$K(B
% $B<h$j9~$^$l!"$=$3$GFH<+$N2~NI$d;EMMJQ99$,2C$($i$l$F$-$^$7$?!#(B
% $B:G6a!J(B2011$BG/0J9_!K$N(B\TeX\ Live$B$d(BW32\TeX{}$B$G$O!"(B\pLaTeX{}$B$b(B
% $B85!9$N(B\pTeX{}$B$G$O$J$/!"$=$N3HD%HG(B\epTeX{}$B$r%(%s%8%s$KMQ$$$k$h$&$K$J$C$F(B
% $B$$$^$9!#$^$?!"(B\pLaTeX{}$B$N%Y!<%9$G$"$k(B\LaTeX{}$B$b99?7$,?J$a$i$l$F$$$^$9!#(B
%
% $B$3$&$7$?N.$l$K$"$o$;$??7$7$$(B\pLaTeX{}$B$H$7$F!"%"%9%-!<HG$+$i(Bfork$B$7$F(B
% $BF|K\8l(B\TeX{}$B3+H/%3%_%e%K%F%#(B (Japanese \TeX\ Development Community) $B$,(B
% $BG[I[$7$F$$$k$b$N$,!"%3%_%e%K%F%#HG(B\pLaTeX{}$B$G$9!#3+H/Cf$NHG$O(BGitHub$B$N(B
% $B%j%]%8%H%j(B\footnote{\texttt{https://github.com/texjporg/platex}}$B$G(B
% $B4IM}$7$F$$$^$9!#%3%_%e%K%F%#HG(B\pLaTeX{}$B$O%"%9%-!<HG$H$O0[$J$j$^$9$N$G!"(B
% $B%P%0%l%]!<%H$O%"%9%-!<08$F$G$O$J$/!"F|K\8l(B\TeX{}$B3+H/%3%_%e%K%F%#$KJs9p(B
% $B$7$F$/$@$5$$!#(B\TeX\ Forum$B$d(BGitHub$B$N(BIssue$B%7%9%F%`$,MxMQ$G$-$^$9!#(B
%
% $B$3$NJ8=q(B(platex.pdf)$B$O%3%_%e%K%F%#HG(B\pLaTeX{}$B$N35MW$r@bL@$7$?$b$N$G$9(B
% $B$,!"FbMF$O%"%9%-!<HG!J(B1995$BG/:"!K$+$i$[$H$s$IJQ$o$C$F$$$^$;$s$N$G!"(B
% $B:#$G$ONr;KE*$JJ8=q$H$$$&$3$H$K$7$F$*$-$^$9!#(B
% $B:G6a$N(B\pLaTeX{}$B$N99?7FbMF$O(B\pLaTeX{}$B%K%e!<%9!J%"%9%-!<HG!'(Bplnews*.pdf$B!"(B
% $B%3%_%e%K%F%#HG!'(Bplnewsc*.pdf$B!K$r;2>H$7$F$/$@$5$$!#$^$?!"(B
% $B<B:]$N(B\pLaTeX{}$B$N%=!<%9%3!<%I$O(Bpldoc.pdf$B$G@bL@$7$F$$$^$9!#(B
%\else
% \def\JLaTeX{\leavevmode\lower.5ex\hbox{J}\kern-.15em\LaTeX}
% \pLaTeX\ is a Japanese \LaTeX\ format, which is adjusted/extended
% to be more suitable for writing Japanese documents.
% It requires \pTeX\footnote{The \pTeX\ website:
% \texttt{https://asciidwango.github.io/ptex/} (in Japanese)},
% a \TeX\ engine with extensions for Japanese typesetting,
% which is designed for high-quality
% Japanese book ``p''ublishing.\footnote{There is another
% old implementation of Japanese \LaTeX\ by
% NTT Electrical Communications Laboratories, named
% \JLaTeX\ (unavailable in \TeX\ Live).
% Also, MiK\TeX\ has another program \texttt{platex} for Polish, but
% it has nothing to do with our Japanese \pLaTeX!}
% Both of them were developed by ASCII Corporation
% (and its successor ASCII Media Works),
% so they are often referred to as ``ASCII \pTeX'' and ``ASCII \pLaTeX''
% respectively.
%
% In 2010, ASCII \pTeX\ was incorporated into the
% world-wide \TeX\ distribution, \TeX\ Live. Since then, \pTeX\ has
% been maintained/improved/changed along with \TeX\ Live sources.
% In recent versions of \TeX\ Live and W32\TeX\ (around 2011),
% the default engine of \pLaTeX\ changed from original \pTeX\ to
% \epTeX\ (\pTeX\ with \eTeX\ extension).
% Also, the original \LaTeX\ itself is also frequently updated.
% On the other hand, \pLaTeX\ remained unchanged since 2006,
% which resulted in some incompatibility and limitations.
%
% To follow these upstream changes, we (Japanese \TeX\ Development
% Community\footnote{\texttt{https://texjp.org}}) decided to fork
% ASCII \pLaTeX\ and distribute the ``community edition.''
% The development version is available from
% GitHub repository\footnote{\texttt{https://github.com/texjporg/platex}}.
% The forked community edition is different from the original ASCII
% edition, so any bug reports and requests should be sent to
% Japanese \TeX\ Development Community, using GitHub Issue system.
%
% This document (platex-en.pdf) is a brief explanation of
% the \pLaTeXe\ community edition. It is somewhat of a historical
% document now, since \pLaTeXe\ came into existence in 1995
% (although the English translation has been done by
% Japanese \TeX\ Development Community since 2017).
% ^^A The detail of source codes are described separately in pldoc-en.pdf.
%\fi
%
%
% \clearpage
%
%\ifJAPANESE
% \section{$B$3$NJ8=q$K$D$$$F(B}\label{platex:intro}
% $B$3$NJ8=q$O(B\pLaTeXe{}$B$N35MW$r<($7$F$$$^$9$,!";H$$J}$N%,%$%I$G$O$"$j$^$;$s!#(B
% \pLaTeXe{}$B$N5!G=A4HL$K$D$$$F$O!"(B\cite{platex2e-book}$B$r;2>H$7$F$/$@$5$$!#(B
% $B$^$?!"(B\cite{tate-book}$B$G@bL@$5$l$F$$$?=DAH8~$1$N3HD%%3%^%s%I$K(B
% $B$D$$$F$O!"(B\file{pldoc.pdf}$B$NCf$N(B\file{plext.dtx}$B$N9`L\$r;2>H$7$F$/$@$5$$!#(B
%
% $BF|K\8l$NAHHG=hM}$K$D$$$F$O!"(B
% \pTeX{}$B!J$"$k$$$O$=$NA0?H$N!VF|K\8l(B\TeX{}$B!W!K$K4X$9$kJ88%(B
% \cite{jtex-tech}$B$d(B\cite{ajt2008okumura}$B!J1Q8l!K(B, \cite{tb29hamano}$B!J1Q8l!K$b(B
% $BJ;$;$F$4;2>H$/$@$5$$!#(B
%
% \LaTeX{}$B$N5!G=$K$D$$$F$O!"(B\cite{latex-book2}$B$d(B\cite{latex-comp}$B$J$I$r(B
% $B;2>H$7$F$/$@$5$$!#?7$7$$5!G=$K$D$$$F$O(B\file{usrguide.tex}$B$r;2>H$7$F$/$@$5$$!#(B
% \pLaTeX{}$B$N%3%^%s%I0lMw$O!V(B\pLaTeXe{}$B%A!<%H%7!<%H!W(B(platexsheet.pdf) $B$^$?$O(B
% $B$=$N(B\textsf{jsclasses}$BHG(B (platexsheet-jsclasses.pdf) $B$,;29M$K(B
% $B$J$k$G$7$g$&(B\footnote{$BN><T$N(BPDF$B$H$b!"%3%^%s%I%i%$%s$G(B
% \texttt{texdoc -l platexcheat}$B$r<B9T$9$k$HI=<($5$l$^$9!#(B}$B!#(B
% \changes{v1.0}{1995/05/08}{$B:G=i$N%P!<%8%g%s(B}
% \changes{v1.0a}{1995/08/25}{$B8_49@-$K$D$$$F!"(B\dst{}$B$N;H$$J}!";29MJ88%$rDI2C(B}
% \changes{v1.0r}{2017/12/02}{$B1Q8l$N;29MJ88%$bDI2C(B}
% \changes{v1.0x}{2018/09/03}{platexcheat$B$K8@5Z(B}
%\else
% \section{Introduction to this document}\label{platex:intro}
% This document briefly describes \pLaTeXe, but is not a manual of \pLaTeXe.
% For the basic functions of \pLaTeXe, see \cite{platex2e-book} (in Japanese).
% For extensions of some commands for vertical writing (which were first
% described in \cite{tate-book} in Japanese), see \file{plext.dtx} section
% in \file{pldoc-en.pdf}.
%
% For Japanese typesetting, please refer to the documentation of \pTeX\ (or
% ``Japanese \TeX''; the preliminary version of \pTeX),
% \cite{jtex-tech} (in Japanese), \cite{ajt2008okumura} (in English)
% and \cite{tb29hamano} (in English).
% \changes{v1.0}{1995/05/08}{first edition}
% \changes{v1.0a}{1995/08/25}{Added 'Compatibility', `Usage of \dst{}'
%    and `References'}
% \changes{v1.0r}{2017/12/02}{English references added}
% \changes{v1.0x}{2018/09/03}{Mention platexcheat (Japanese only).}
%\fi
%
%\ifJAPANESE
% $B$3$NJ8=q$N9=@.$O<!$N$h$&$K$J$C$F$$$^$9!#(B
%
% \begin{quote}
% \begin{description}
% \item[$BBh(B\ref{platex:intro}$B@a(B]
%  $B$3$N@a$G$9!#$3$NJ8=q$K$D$$$F$N35MW$r=R$Y$F$$$^$9!#(B
%
% \item[$BBh(B\ref{platex:plcore}$B@a(B]
%  \pLaTeXe{}$B$G3HD%$7$?5!G=$K$D$$$F$N35MW$G$9!#(B
%  $BIUB0$N%/%i%9%U%!%$%k$d%Q%C%1!<%8%U%!%$%k$K$D$$$F$b4JC1$K(B
%  $B@bL@$7$F$$$^$9!#(B
%
% \item[$BBh(B\ref{platex:compatibility}$B@a(B]
%  $B8=:_$N%P!<%8%g%s$N(B\pLaTeX{}$B$H5l%P!<%8%g%s!"$"$k$$$O85$H$J$C$F$$$k(B
% \LaTeX{}$B$H$N8_49@-$K$D$$$F=R$Y$F$$$^$9!#(B
%
% \item[$BIUO?(B\ref{app:dst}]
%  $B$3$NJ8=q%=!<%9(B(platex.dtx)$B$N(B
%  \dst{}$B$N$?$a$N%*%W%7%g%s$K$D$$$F=R$Y$F$$$^$9!#(B
%
% \item[$BIUO?(B\ref{app:pldoc}]
%  \pLaTeXe{}$B$N(Bdtx$B%U%!%$%k$r$^$H$a$F!"0l$D$N%=!<%9%3!<%I@bL@=q$K(B
%  $B$9$k$?$a$NJ8=q%U%!%$%k$N@bL@$r$7$F$$$^$9!#(B
%
% \item[$BIUO?(B\ref{app:omake}]
%  $BIUO?(B\ref{app:pldoc}$B$G@bL@$7$?J8=q%U%!%$%k$r=hM}$9$k(Bsh$B%9%/%j%W%H!J<j=g!K!"(B
%  \dst{}$BJ8=q%U%!%$%kFb$NF~$l;R$NBP1~$rD4$Y$k(Bperl$B%9%/%j%W%H$J$I$K$D$$$F(B
%  $B@bL@$7$F$$$^$9!#(B
% \end{description}
% \end{quote}
%\else
% This document consists of following parts:
%
% \begin{quote}
% \begin{description}
% \item[Section \ref{platex:intro}]
%  This section; describes this document itself.
%
% \item[Section \ref{platex:plcore}]
%  Brief explanation of extensions in \pLaTeXe.
%  Also describes the standard classes and packages.
%
% \item[Section \ref{platex:compatibility}]
%  The compatibility note for users of the old version of
%  \pLaTeXe\ or those of the original \LaTeXe.
%
% \item[Appendix \ref{app:dst}]
%  Describes \dst\ Options for this document.
%
% \item[Appendix \ref{app:pldoc}]
%  Description of `pldoc.tex' (counterpart for `source2e.tex' in \LaTeXe).
%
% \item[Appendix \ref{app:omake}]
%  Description of a shell script to process `pldoc.tex', and
%  a tiny perl program to check \dst\ guards, etc.
% \end{description}
% \end{quote}
%\fi
%
%
%\ifJAPANESE
% \section{\pLaTeXe{}$B$N5!G=$K$D$$$F(B}\label{platex:plcore}
% \pLaTeXe{}$B$,Ds6!$9$k%U%!%$%k$O!"<!$N(B3$B<oN`$KJ,N`$9$k$3$H$,$G$-$^$9!#(B
%
% \begin{itemize}
% \item $B%U%)!<%^%C%H%U%!%$%k(B
% \item $B%/%i%9%U%!%$%k(B
% \item $B%Q%C%1!<%8%U%!%$%k(B
% \end{itemize}
%
% $B%U%)!<%^%C%H%U%!%$%k$K$O!"4pK\E*$J5!G=$,Dj5A$5$l$F$*$j!"(B
% \pLaTeXe{}$B$N3K$H$J$k%U%!%$%k$G$9!#(B
% $B$3$N%U%!%$%k$KDj5A$5$l$F$$$k%^%/%m$O!"<B9T;~$NB.EY$r9b$a$k$?$a$K!"(B
% $B$"$i$+$8$a(B\TeX{}$B$NFbIt7A<0$N7A$GJ]B8$5$l$F$$$^$9!#(B
%
% $B%/%i%9%U%!%$%k$OJ8=q$N%l%$%"%&%H$r@_Dj$9$k%U%!%$%k!"(B
% $B%Q%C%1!<%8%U%!%$%k$O%^%/%m$N3HD%$rDj5A$9$k%U%!%$%k$G$9!#(B
% $BA0<T$O(B|\documentclass|$B%3%^%s%I$rMQ$$$FFI$_9~$_!"(B
% $B8e<T$O(B|\usepackage|$B%3%^%s%I$rMQ$$$FFI$_9~$_$^$9!#(B
%
% \begin{chuui}[$B8E$$(B\pLaTeX~2.09$B%f!<%6$X$NCm0U!'(B]\normalfont
% $B%/%i%9%U%!%$%k$H%Q%C%1!<%8%U%!%$%k$O!"=>Mh!"%9%?%$%k%U%!%$%k$H8F$P$l$F$$$?(B
% $B$b$N$G$9!#(B\LaTeXe{}$B$G$O$=$l$i$r!"%l%$%"%&%H$K4X$9$k$b$N$r%/%i%9%U%!%$%k$H(B
% $B8F$S!"%^%/%m$N3HD%$r$9$k$b$N$r%Q%C%1!<%8%U%!%$%k$H8F$s$G6hJL$9$k$h$&$K(B
% $B$J$j$^$7$?!#(B
% \end{chuui}
%\else
% \section{About Functions of \pLaTeXe}\label{platex:plcore}
% The structure of \pLaTeXe\ is similar to that of \LaTeXe;
% it consists of 3 types of files: a format (platex.ltx),
% classes and packages.
%\fi
%
%\ifJAPANESE
% \subsection{$B%U%)!<%^%C%H%U%!%$%k(B}
% \pLaTeX{}$B$N%U%)!<%^%C%H%U%!%$%k$r:n@.$9$k$K$O!"(B
% $B%=!<%9%U%!%$%k(B``platex.ltx''$B$r(B\epTeX{}$B$N(BINI$B%b!<%I$G=hM}$7$^$9(B
% \footnote{2016$BG/0JA0$O(B\pTeX{}$B$H(B\epTeX{}$B$N$I$A$i$G$b%U%)!<%^%C%H$r:n@.$9$k(B
% $B$3$H$,$G$-$^$7$?$,!"(B2017$BG/$K(B\LaTeX{}$B$,(B\eTeX{}$BI,?\$H$J$C$?$3$H$KH<$$!"(B
% \pLaTeX{}$B$b(B\epTeX{}$B$,I,?\$H$J$j$^$7$?!#(B}$B!#(B
% $B$?$@$7!"(B\TeX\ Live$B$d(BW32\TeX{}$B$G$O$3$N=hM}$r4JC1$K$9$k(B|fmtutil-sys|$B$"$k$$$O(B
% |fmtutil|$B$H$$$&%W%m%0%i%`$,MQ0U$5$l$F$$$^$9!#(B
% $B0J2<$r<B9T$9$l$P!"%U%)!<%^%C%H%U%!%$%k(B\file{platex.fmt}$B$,:n@.$5$l$^$9!#(B
%\else
% \subsection{About the Format}
% To make a format for \pLaTeX,
% process ``platex.ltx'' with INI mode of \epTeX.\footnote{Formerly
% both \pTeX\ and \epTeX\ can make the format file for \pLaTeX, however,
% it's not true anymore because \LaTeX\ requires \eTeX\ since 2017.}
% A handy command `fmtutil-sys' (or `fmtutil') for this purpose
% is available in \TeX\ Live. The following command generates \file{platex.fmt}.
%\fi
%\begin{verbatim}
%   fmtutil-sys --byfmt platex
%\end{verbatim}
%
%\ifJAPANESE
% $B<!$N%j%9%H$,!"(B\file{platex.ltx}$B$NFbMF$G$9!#(B
% $B$?$@$7!"$3$N%P!<%8%g%s$G$O!"(B\LaTeX{}$B$+$i(B\pLaTeX{}$B$X$N3HD%$r(B
% \file{plcore.ltx}$B$r%m!<%I$9$k$3$H$G9T$J$$!"(B
% \file{latex.ltx}$B$K$OD>@\!"<j$r2C$($J$$$h$&$K$7$F$$$^$9!#(B
% $B$7$?$,$C$F(B\file{platex.ltx}$B$O$H$F$bC;$$$b$N$H$J$C$F$$$^$9!#(B
% \file{latex.ltx}$B$K$O(B\LaTeX{}$B$N%3%^%s%I$,!"(B
% \file{plcore.ltx}$B$K$O(B\pLaTeX{}$B$G3HD%$7$?%3%^%s%I$,Dj5A$5$l$F$$$^$9!#(B
%\else
% The content of \file{platex.ltx} is shown below.
% In the current version of \pLaTeX,
% first we simply load \file{latex.ltx} and
% modify/extend some definitions by loading \file{plcore.ltx}.
%\fi
%    \begin{macrocode}
%<*plcore>
%    \end{macrocode}
%
%\ifJAPANESE
% \file{latex.ltx}$B$NKvHx$G;H$o$l$F$$$k(B|\dump|$B$r$$$C$?$sL58z2=$7$^$9!#(B
%\else
% Temporarily disable |\dump| at the end of \file{latex.ltx}.
%\fi
%    \begin{macrocode}
\let\orgdump\dump
\let\dump\relax
%    \end{macrocode}
%
%\ifJAPANESE
% \file{latex.ltx}$B$rFI$_9~$_$^$9!#(B
% \TeX\ Live$B$NI8=`E*%$%s%9%H!<%k$G$O!"$3$NCf$G(BBabel$BM3Mh$N(B
% $B%O%$%U%M!<%7%g%s!&%Q%?!<%s(B\file{hyphen.cfg}$B$,FI$_9~$^$l$k$O$:$G$9!#(B
% \changes{v1.0g}{2016/05/07}{$B%U%)!<%^%C%H:n@.;~$K(B\LaTeX{}$B$N%P%J!<$r0lC6J]B8(B}
% \changes{v1.0n}{2016/09/14}{\LaTeX{}$B$N%P%J!<$NJ]B8$7$+$?$r2~NI(B}
% \changes{v1.0p}{2017/11/11}{\LaTeX{}$B$N%P%J!<$rJ]B8$9$k%3!<%I$r(B
%    \file{platex.ltx}$B$+$i(B\file{plcore.ltx}$B$X0\F0(B}
%\else
% Load \file{latex.ltx} here.
% Within the standard installation of \TeX\ Live, \file{hyphen.cfg}
% provided by ``Babel'' package will be used.
% \changes{v1.0g}{2016/05/07}{Save \LaTeX\ banner}
% \changes{v1.0n}{2016/09/14}{Improved banner saving method}
% \changes{v1.0p}{2017/11/11}{Moved banner saving code from
%    \file{platex.ltx} to \file{plcore.ltx}}
%\fi
%    \begin{macrocode}
\input latex.ltx
%    \end{macrocode}
%
%\ifJAPANESE
% $B$3$N;~E@$G(B|\typeout|$B$,L$Dj5A$J$i!"(B\LaTeX{}$B%+!<%M%k$NFI$_9~$_$K(B
% $B<:GT$7$F$$$^$9$N$G!"6/@)=*N;$7$^$9!J(B\LaTeXe\ 2017/01/01$B0J9_$r(B
% $BHs(B\eTeX{}$B3HD%$G%U%)!<%^%C%H:n@.$7$h$&$H$7$?>l9g$J$I!K!#(B
% \changes{v1.1c}{2021/02/25}{\file{latex.ltx}$B$NFI9~%A%'%C%/(B}
%\else
% If |\typeout| is still undefined, the input of \LaTeX~kernel
% should have failed; abort now.
% \changes{v1.1c}{2021/02/25}{Check for \file{latex.ltx} status}
%\fi
%    \begin{macrocode}
\ifx\typeout\undefined
  \errhelp{Please reinstall LaTeX, or check e-TeX availability.}%
  \errmessage{Failed to load `latex.ltx' properly}%
  \expandafter\end
\fi
%    \end{macrocode}
%
%\ifJAPANESE
% \file{plcore.ltx}$B$rFI$_9~$_$^$9!#(B
%\else
% Load \file{plcore.ltx}.
%\fi
%    \begin{macrocode}
\typeout{**************************^^J%
         *^^J%
         * making pLaTeX format^^J%
         *^^J%
         **************************}
\makeatletter
\input plcore.ltx
%    \end{macrocode}
%
%\ifJAPANESE
% $B%U%)%s%H4XO"$N%G%U%)%k%H@_Dj%U%!%$%k$G$"$k!"(B
% \file{pldefs.ltx}$B$rFI$_9~$_$^$9!#(B
% \TeX{}$B$NF~NO%U%!%$%k8!:w%Q%9$K@_Dj$5$l$F$$$k(B
% $B%G%#%l%/%H%j$K(B\file{pldefs.cfg}$B%U%!%$%k$,$"$k>l9g$O!"(B
% $B$=$N%U%!%$%k$r;H$$$^$9!#(B
% $BFI$_9~$_8e$K%3!<%I$,<B9T$5$l$k$+$b$7$l$^$;$s!#(B
% \changes{v1.0s}{2017/12/05}{$B%G%U%)%k%H@_Dj%U%!%$%k$NFI$_9~$_$r(B
%    \file{plcore.ltx}$B$+$i(B\file{platex.ltx}$B$X0\F0(B}
% \changes{v1.1b}{2020/09/28}{defs$BFI9~8e$K%U%C%/DI2C(B}
%\else
% Load font-related default settings, \file{pldefs.ltx}.
% If a file \file{pldefs.cfg} is found, then that file will be
% used instead.
% Some code may be executed after loading.
% \changes{v1.0s}{2017/12/05}{Moved loading default settings
%    from \file{plcore.ltx} to \file{platex.ltx}}
% \changes{v1.1b}{2020/09/28}{Add hook after loading defs}
%\fi
%    \begin{macrocode}
\InputIfFileExists{pldefs.cfg}
           {\typeout{*************************************^^J%
                     * Local config file pldefs.cfg used^^J%
                     *************************************}}%
           {\input{pldefs.ltx}}
\ifx\code@after@pldefs\@undefined\else \code@after@pldefs \fi
%    \end{macrocode}
%
%\ifJAPANESE
% $B0JA0$N%P!<%8%g%s$G$O!"%U%)!<%^%C%H:n@.;~$K(B\pLaTeX{}$B$N%P!<%8%g%s$,(B
% $B$o$+$k$h$&$K!"C<Kv$KI=<($7$F$$$^$7$?$,!"(B|\everyjob| $B$K%P%J!<I=<((B
% $B0J30$N%3!<%I$,4^$^$l$k2DG=@-$r9MN8$7!"0BA4$N$?$a$d$a$^$7$?!#(B
% \changes{v1.0w}{2018/04/08}{$B0BA4$N$?$a%U%)!<%^%C%H:n@.;~$N(B
%    $B%P%J!<I=<($r$d$a$?(B}
%\else
% In the previous version, we displayed \pLaTeX\ version
% on the terminal, so that it can be easily recognized
% during format creation; however |\everyjob| can contain
% any code other than showing a banner, so now disabled.
% \changes{v1.0w}{2018/04/08}{Stop showing banner during
%    format generation for safety}
%\fi
%    \begin{macrocode}
%\the\everyjob
%    \end{macrocode}
%
%\ifJAPANESE
% \pLaTeXe{}$B$N5/F0;~$K(B\file{platex.cfg}$B$,$"$k>l9g!"$=$l$rFI$_9~$`(B
% $B$h$&$K$7$^$9!#(B
% $B%P!<%8%g%s(B2016/07/01$B$G$O%3!<%I$r(B\file{plcore.ltx}$B$KF~$l$F$$$^$7$?(B
% $B$,!"(B\file{platex.ltx}$B$X0\F0$7$^$7$?!#(B
% \changes{v1.0m}{2016/08/26}{\file{platex.cfg}$B$NFI$_9~$_$r(B
%    \file{plcore.ltx}$B$+$i(B\file{platex.ltx}$B$X0\F0(B}
%\else
% Load \file{platex.cfg} if it exists at runtime.
% \changes{v1.0m}{2016/08/26}{Moved loading \file{platex.cfg}
%    from \file{plcore.ltx} to \file{platex.ltx}}
%\fi
%    \begin{macrocode}
\everyjob\expandafter{%
  \the\everyjob
  \IfFileExists{platex.cfg}{%
    \typeout{*************************^^J%
             * Loading platex.cfg.^^J%
             *************************}%
    \input{platex.cfg}}{}%
}
%    \end{macrocode}
%
%\ifJAPANESE
% $B%U%)!<%^%C%H%U%!%$%k$K%@%s%W$7$^$9!#(B
% \changes{v1.0i}{2016/05/12}{$B0l;~%3%^%s%I(B\cs{orgdump}$B$r:G=*E*$KL$Dj5A$X(B}
%\else
% Dump to the format file.
% \changes{v1.0i}{2016/05/12}{Undefine temporary command
%    \cs{orgdump} in the end.}
%\fi
%    \begin{macrocode}
\let\dump\orgdump
\let\orgdump\@undefined
\makeatother
\dump
%\endinput
%    \end{macrocode}
%
%    \begin{macrocode}
%</plcore>
%    \end{macrocode}
%
%\ifJAPANESE
% $B<B:]$K(B\pLaTeXe{}$B$X$N3HD%$r9T$J$C$F$$$k(B\file{plcore.ltx}$B$O!"(B
% \dst{}$B%W%m%0%i%`$K$h$C$F!"<!$N%U%!%$%k$NCGJR$,O"7k$5$l$?$b$N$G$9!#(B
%
% \begin{itemize}
% \item \file{plvers.dtx}$B$O!"(B\pLaTeXe{}$B$N%U%)!<%^%C%H%P!<%8%g%s$r(B
%   $BDj5A$7$F$$$^$9!#(B
% \item \file{plfonts.dtx}$B$O!"(B\NFSS2$B$r3HD%$7$F$$$^$9!#(B
% \item \file{plcore.dtx}$B$O!">e5-0J30$N%3%^%s%I$G%U%)!<%^%C%H%U%!%$%k$K(B
%   $B3JG<$5$l$k%3%^%s%I$rDj5A$7$F$$$^$9!#(B
% \end{itemize}
%
% $B$^$?!"%W%j%m!<%I%U%)%s%H$dAHHG%Q%i%a!<%?$J$I$N%G%U%)%k%H@_Dj$O!"(B
% \file{platex.ltx}$B$NCf$G(B\file{pldefs.ltx}$B$r%m!<%I$9$k$3$H$K$h$j9T$$$^$9(B
% \footnote{$B%"%9%-!<HG$G$O(B\file{plcore.ltx}$B$NCf$G%m!<%I$7$F$$$^$7$?$,!"(B
% 2018$BG/0J9_$N?7$7$$%3%_%e%K%F%#HG(B\pLaTeX{}$B$G$O(B
% \file{platex.ltx}$B$+$iFI$_9~$`$3$H$K$7$^$7$?!#(B}$B!#(B
% $B$3$N%U%!%$%k(B\file{pldefs.ltx}$B$b(B\file{plfonts.dtx}$B$+$i@8@.$5$l$^$9!#(B
% \begin{chuui}
% $B$3$N%U%!%$%k$K5-=R$5$l$F$$$k@_Dj$rJQ99$9$l$P(B
% \pLaTeXe{}$B$r%+%9%?%^%$%:$9$k$3$H$,$G$-$^$9$,!"(B
% $B$=$N>l9g$O(B\file{pldefs.ltx}$B$rD>@\=$@5$9$k$N$G$O$J$/!"$$$C$?$s(B
% \file{pldefs.cfg}$B$H$$$&L>A0$G%3%T!<$7$F!"$=$N%U%!%$%k$rJT=8$7$F$/$@$5$$!#(B
% $B%U%)!<%^%C%H:n@.;~$K(B\file{pldefs.cfg}$B$,B8:_$7$?>l9g$O!"$=$A$i$,(B
% \file{pldefs.ltx}$B$NBe$o$j$KFI$_9~$^$l$^$9!#(B
% \end{chuui}
%\else
% The file \file{plcore.ltx}, which provides modifications/extensions
% to make \pLaTeXe, is a concatenation of stripped files below
% using \dst\ program.
%
% \begin{itemize}
% \item \file{plvers.dtx} defines the format version of \pLaTeXe.
% \item \file{plfonts.dtx} extends \NFSS2 for Japanese font selection.
% \item \file{plcore.dtx} defines other modifications to \LaTeXe.
% \end{itemize}
%
% Moreover, default settings of pre-loaded fonts and typesetting parameters
% are done by loading \file{pldefs.ltx} inside
% \file{platex.ltx}.\footnote{ASCII \pLaTeX\ loaded \file{pldefs.ltx}
% inside \file{plcore.ltx}; however, \pLaTeX\ community edition newer than
% 2018 loads \file{pldefs.ltx} inside \file{platex.ltx}.}
% This file \file{pldefs.ltx} is also stripped from \file{plfonts.dtx}.
% \begin{chuui}
% You can customize \pLaTeXe\ by tuning these settings.
% If you need to do that, copy/rename it as \file{pldefs.cfg} and edit it,
% instead of overwriting \file{pldefs.ltx} itself.
% If a file named \file{pldefs.cfg} is found at a format creation
% time, it will be read as a substitute of \file{pldefs.ltx}.
% \end{chuui}
%\fi
%
%
%\ifJAPANESE
% \subsubsection{$B%P!<%8%g%s(B}
% \pLaTeXe{}$B$N%P!<%8%g%s$d%U%)!<%^%C%H%U%!%$%kL>$O!"(B
% \file{plvers.dtx}$B$GDj5A$7$F$$$^$9!#(B
%\else
% \subsubsection{Version}
% The version (like ``\pfmtversion'') and the format name
% (``\pfmtname'') of \pLaTeXe\ are defined in \file{plvers.dtx}.
%\fi
%
%
%\ifJAPANESE
% \subsubsection{\NFSS2$B%3%^%s%I(B}
% \LaTeXe{}$B$G$O!"%U%)%s%HA*Br5!9=$H$7$F(B\NFSS2$B$rMQ$$$F$$$^$9!#(B
% \pLaTeXe{}$B$G$O!"%*%j%8%J%k$N(B\NFSS2$B$HF1MM$N%$%s%?!<%U%'%$%9$G!"(B
% $BOBJ8%U%)%s%H$rA*Br$G$-$k$h$&$K!"(B\file{plfonts.dtx}$B$G(B\NFSS2$B$r3HD%$7$F$$$^$9!#(B
%
% \pLaTeXe{}$B$N(B\NFSS2$B$O!"%U%)%s%H$r@ZBX$($k%3%^%s%I$r;XDj$9$k$H$-$K!"(B
% $B$=$l$,2$J8=qBN$+OBJ8=qBN$N$$$:$l$+$rBP>]$H$9$k$b$N$+$r!"(B
% $B$G$-$k$@$10U<1$7$J$$$h$&$K$9$kJ}8~$G3HD%$7$F$$$^$9!#(B
% $B$$$$$+$($l$P!"%3%^%s%I$,!J2DG=$J8B$j$N!KH=CG$r$7$^$9!#(B
% $B$7$?$,$C$F?tB?$/$"$k1Q8lHG$N%/%i%9%U%!%$%k$d%Q%C%1!<%8%U%!%$%k$J$I$G(B
% $B=qBN$NJQ99$r9T$C$F$$$k2U=j$r=$@5$9$kI,MW$O$"$^$j$"$j$^$;$s!#(B
%
% \NFSS2$B$K$D$$$F$N>\:Y$O!"(B\LaTeXe{}$B$KIUB0$N(B\file{fntguide.tex}$B$r;2>H$7$F(B
% $B$/$@$5$$!#(B
%\else
% \subsubsection{\NFSS2 Commands}
% \LaTeXe\ uses \NFSS2 as a font selection scheme, however, it
% supports only alphabetic fonts.
% \pLaTeXe\ extends \NFSS2 to enable selection of Japanese fonts in
% a consistent manner with the original \NFSS2.
%
% Most of the interface commands are defined to be clever enough,
% so that it can automatically judge whether it is going to
% change alphpabetic fonts or Japanese fonts.
% It works almost fine with most of the widely used classes and
% packages, without any modification.
%
% For the defail of (the original) \NFSS2, please refer to
% \file{fntguide.tex} in \LaTeXe.
%\fi
%
%
%\ifJAPANESE
% \subsubsection{$B=PNO%k!<%A%s$H%U%m!<%H(B}
% \file{plcore.dtx}$B$O!"<!$N9`L\$K4X$9$k%3%^%s%I$rF|K\8l=hM}MQ$K=$@5$d3HD%(B
% $B$r$7$F$$$^$9!#(B
%
% \begin{itemize}
% \item $B%W%j%"%s%V%k%3%^%s%I(B
% \item $B2~%Z!<%8(B
% \item $B2~9T(B
% \item $B%*%V%8%'%/%H$N=PNO=g=x(B
% \item $B%H%s%\(B
% \item $B5SCm%^%/%m(B
% \item $BAj8_;2>H(B
% \item $B5?;w%?%$%WF~NO(B
% \end{itemize}
%\else
% \subsubsection{Output Routine and Floats}
% \file{plcore.dtx} modifies and extends some \LaTeXe\ commands
% for Japanese processing.
%
% \begin{itemize}
% \item Preamble commands
% \item Page breaking
% \item Line breaking
% \item The order of float objects
% \item Crop marks (``tombow'')
% \item Footnote macros
% \item Cross-referencing
% \item Verbatim
% \end{itemize}
%\fi
%
%
%\ifJAPANESE
% \subsection{$B%/%i%9%U%!%$%k$H%Q%C%1!<%8%U%!%$%k(B}
%
% \pLaTeXe{}$B$,Ds6!$r$9$k%/%i%9%U%!%$%k$d%Q%C%1!<%8%U%!%$%k$O!"(B
% $B%*%j%8%J%k$N%U%!%$%k$r4p$K$7$F$$$^$9!#(B
%
% \pLaTeXe{}$B$KIUB0$N%/%i%9%U%!%$%k$O!"<!$N$H$*$j$G$9!#(B
%
% \begin{itemize}
% \item jarticle.cls, jbook.cls, jreport.cls\par
%   $B2#AHMQ$NI8=`%/%i%9%U%!%$%k!#(B
%   \file{jclasses.dtx}$B$+$i:n@.$5$l$k!#(B
%
% \item tarticle.cls, tbook.cls, treport.cls\par
%   $B=DAHMQ$NI8=`%/%i%9%U%!%$%k!#(B
%   \file{jclasses.dtx}$B$+$i:n@.$5$l$k!#(B
%
% \item jltxdoc.cls\par
%   $BF|K\8l$N(B\file{.dtx}$B%U%!%$%k$rAHHG$9$k$?$a$N%/%i%9%U%!%$%k!#(B
%   \file{jltxdoc.dtx}$B$+$i:n@.$5$l$k!#(B
% \end{itemize}
%\else
% \subsection{Classes and Packages}
%
% Classes and packages bundled with \pLaTeXe\ are based on
% those in original \LaTeXe, with some Japanese localization.
%
% \pLaTeXe\ classes:
%
% \begin{itemize}
% \item jarticle.cls, jbook.cls, jreport.cls\par
%   Standard \emph{yoko-kumi} (horizontal writing) classes;
%   stripped from \file{jclasses.dtx}.
%
% \item tarticle.cls, tbook.cls, treport.cls\par
%   Standard \emph{tate-kumi} (vertical writing) classes;
%   stripped from \file{jclasses.dtx}.
%
% \item jltxdoc.cls\par
%   Class for typesetting Japanese \file{.dtx} file;
%   stripped from \file{jltxdoc.dtx}.
% \end{itemize}
%\fi
%
%\ifJAPANESE
% $B$^$?!"(B\pLaTeXe{}$B$KIUB0$N%Q%C%1!<%8%U%!%$%k$O!"<!$N$H$*$j$G$9!#(B
% \changes{v1.0d}{2016/01/27}{\pLaTeXe{}$B$KIUB0$9$k%U%!%$%k$N@bL@$r99?7(B}
% \changes{v1.0j}{2016/05/20}{pfltrace$B$N@bL@$rDI2C(B}
%
% \begin{itemize}
% \item plext.sty\par
%   $B=DAHMQ$N3HD%%3%^%s%I$J$I$,Dj5A$5$l$F$$$k%U%!%$%k!#(B
%   \file{plext.dtx}$B$+$i:n@.$5$l$k!#(B
%
% \item ptrace.sty\par
%   \LaTeX{}$B$G%U%)%s%HA*Br%3%^%s%I$N%H%l!<%9$K;H$&(B\file{tracefnt.sty}$B$,(B
%   $B:FDj5A$7$F$7$^$&(B\NFSS2$B%3%^%s%I$r!"(B\pLaTeXe{}$BMQ$K:F!9Dj5A$9$k$?$a$N(B
%   $B%Q%C%1!<%8!#(B
%   \file{plfonts.dtx}$B$+$i:n@.$5$l$k!#(B
%
% \item pfltrace.sty\par
%   \LaTeX{}$B$G%U%m!<%H4XO"%3%^%s%I$N%H%l!<%9$K;H$&(B\file{fltrace.sty}%
%   \footnote{\LaTeXe\ 2014/05/01$B$GDI2C$5$l$^$7$?!#;29M!'(B
%   \LaTeXe\ News Issue 21 (ltnews21.tex)}$B$,:FDj5A$7$F$7$^$&%3%^%s%I(B
%   $B$r!"(B\pLaTeXe{}$BMQ$K:F!9Dj5A$9$k$?$a$N%Q%C%1!<%8!#(B
%   \file{plcore.dtx}$B$+$i:n@.$5$l$k!#(B
%
% \item oldpfont.sty\par
%   \pLaTeX~2.09$B$N%U%)%s%H%3%^%s%I$rDs6!$9$k%Q%C%1!<%8!#(B
%   \file{pl209.dtx}$B$+$i:n@.$5$l$k!#(B
% \end{itemize}
%
% $B$J$*!"0JA0$N%P!<%8%g%s$KF1:-$7$F$$$?(Bascmac$B%Q%C%1!<%8$H(B
% nidanfloat$B%Q%C%1!<%8$O!"JL$N%P%s%I%k$H$7$FFHN)$5$;$^$7$?!#(B
% \changes{v1.0t}{2018/02/07}{ascmac$B%Q%C%1!<%8$rFHN)$5$;$?(B}
% \changes{v1.0u}{2018/02/18}{nidanfloat$B%Q%C%1!<%8$rFHN)$5$;$?(B}
%\else
% \pLaTeXe\ packages:
% \changes{v1.0d}{2016/01/27}{Updated descriptions of \pLaTeXe\ files}
% \changes{v1.0j}{2016/05/20}{Add description of `pfltrace'}
%
% \begin{itemize}
% \item plext.sty\par
%   Useful macros and extensions for vertical writing;
%   stripped from \file{plext.dtx}.
%
% \item ptrace.sty\par
%   \pLaTeXe\ version of \file{tracefnt.sty};
%   the package \file{tracefnt.sty} overwrites \pLaTeXe-style \NFSS2
%   commands, so \file{ptrace.sty} provides redefinitions to recover
%   \pLaTeXe\ extensions.
%   Stripped from \file{plfonts.dtx}.
%
% \item pfltrace.sty\par
%   \pLaTeXe\ version of \file{fltrace.sty} (introduced in
%   \LaTeXe\ 2014/05/01);
%   stripped from \file{plcore.dtx}.
%
% \item oldpfont.sty\par
%   Provides \pLaTeX~2.09 font commands;
%   stripped from \file{pl209.dtx}.
% \end{itemize}
%
% The packages ``ascmac.sty'' and ``nidanfloat.sty'',
% which had been included in previous versions of \pLaTeX,
% is now distributed as a separate bundle.
% \changes{v1.0t}{2018/02/07}{Moved ascmac package to separate bundle}
% \changes{v1.0u}{2018/02/18}{Moved nidanfloat package to separate bundle}
%\fi
%
%
%\ifJAPANESE
% \section{$BB>$N%U%)!<%^%C%H!&5l%P!<%8%g%s$H$N8_49@-(B}
% \label{platex:compatibility}
% $B$3$3$G$O!"$3$N(B\pLaTeXe{}$B$N%P!<%8%g%s$H0JA0$N%P!<%8%g%s!"$"$k$$$O(B
% \LaTeXe{}$B$H$N8_49@-$K$D$$$F@bL@$r$7$F$$$^$9!#(B
%
% \subsection{\LaTeXe{}$B$H$N8_49@-(B}
% \pLaTeXe{}$B$O!"(B\LaTeXe{}$B$N>e0L8_49$H$$$&7A$r<h$C$F$$$^$9$,!"(B
% $B$$$/$D$+$NL?Na$NDj5A$d%Q%i%a!<%?$J$I$bJQ99$7$F$$$^$9!#(B
% $B$7$?$,$C$F1QJ8=q$J$I!"(B\LaTeXe{}$B$G$b=hM}$G$-$k%U%!%$%k$r(B
% \pLaTeXe{}$B$G=hM}$7$F$b!"40A4$KF1$87k2L$K$J$k$H$O8B$j$^$;$s!#(B
%
% \LaTeXe{}$B8~$1$K=q$+$l$?B?$/$N%/%i%9%U%!%$%k$d%Q%C%1!<%8%U%!%$%k$O!"(B
% $B$=$N$^$^;H$($k$H;W$$$^$9!#(B
% $B$?$@$7!"$=$l$i$,(B\pLaTeXe{}$B$G3HD%$7$F$$$k%3%^%s%I$HF1$8L>A0$N(B
% $B%3%^%s%I$r:FDj5A$7$F$$$k>l9g$O!"(B
% $B$=$N3HD%$N;EJ}$K$h$C$F$O%(%i!<$K$J$k$3$H$b$"$j$^$9!#(B
% $BMQ$$$h$&$H$7$F$$$k%/%i%9%U%!%$%k$d%Q%C%1!<%8%U%!%$%k$,(B
% $B$&$^$/F0$/$+$I$&$+$r!"40A4$K3N$+$a$kJ}K!$O;DG0$J$,$i$"$j$^$;$s!#(B
% $B0lHV4JC1$J$N$O!"F0$+$7$F$_$k$3$H$G$9!#IT9,$K$b$&$^$/F0$+$J$$>l9g$O!"(B
% $B%m%0%U%!%$%k$dIUB0$NJ8=q%U%!%$%k$r;29M$K860x$rD4$Y$F$/$@$5$$!#(B
%
% $B$J$*!"$$$/$D$+$N(B\LaTeX{}$B%Q%C%1!<%8$K$D$$$F$O!"(B\pLaTeX{}$B8~$1$N(B
% $B%Q%C%A$,MQ0U$5$l$F$$$^$9!#$=$N0lMw$O!"(B
% \texttt{plautopatch}$B%Q%C%1!<%8!J(BHironobu Yamashita$B:n!K$N(B
% $B%I%-%e%a%s%H!JF|K\8lHG$O(Bplautopatch-ja.pdf$B!K$K5-:\$5$l$F$$$^$9!#(B
% \changes{v1.0x}{2018/09/03}{plautopatch$B$K8@5Z(B}
%\else
% \section{Compatibility with Other Formats and Older Versions}
% \label{platex:compatibility}
% Here we provide some information about the compatibility between
% current \pLaTeXe\ and older versions or original \LaTeXe.
%
% \subsection{Compatibility with \LaTeXe}
% \pLaTeXe\ is in most part upward compatible with \LaTeXe,
% but some parameters are adjusted to be suitable for Japanese.
% Therefore, you should not expect identical output, even though
% the same source can be processed on both \LaTeXe\ and \pLaTeXe.
%
% We hope that most classes and packages meant for \LaTeXe\ works
% also for \pLaTeXe\ without any modification. However for example,
% if a class or a package redefines a command which is already
% modified by \pLaTeXe, it might cause an error at the worst case.
% We cannot tell whether a class or a package works fine with
% \pLaTeXe\ beforehand; the easiest way is to try to use it.
% If it fails, please refer to the log file or a package manual.
%
% Some \LaTeX\ packages are known to be incompatible with \pLaTeX.
% For those packages, \pLaTeX-specific patches might be available.
% Please refer to the documentation of the \texttt{plautopatch}
% package (by Hironobu Yamashita).
% \changes{v1.0x}{2018/09/03}{Mention plautopatch.}
%\fi
%
%\ifJAPANESE
% \subsection{\pLaTeX~2.09$B$H$N8_49@-(B}
% \pLaTeXe{}$B$G$O!"J8=q$,;HMQ$9$k%/%i%9$r!"(B
% $B%W%j%"%s%V%k$G(B|\documentclass|$B%3%^%s%I$K$h$j;XDj$7$^$9!#(B
% $B$3$3$G(B|\documentclass|$B$NBe$o$j$K(B|\documentstyle|$B$r(B
% $BMQ$$$k$H!"(B\pLaTeXe{}$B$O<+F0E*$K(B\emph{2.09$B8_49%b!<%I(B}$B$KF~$j$^$9!#(B
% $B$3$l$O(B\LaTeXe{}$B$,(B\LaTeX~2.09$B8_49%b!<%I$KF~$k$N$HF1MM$G!"(B
% $B8_49%b!<%I$O8E$$J8=q$rAHHG$9$k$?$a$@$1$K:n$i$l$F$$$^$9!#(B
% $B?7$7$/J8=q$r:n@.$9$k>l9g$O!"(B|\documentclass|$B%3%^%s%I$rMQ$$$F$/$@$5$$!#(B
%
% $B8_49%b!<%I$G$O(B(p)\LaTeXe{}$B$N?7$7$$5!G=$rMxMQ$G$-$:!"(B
% $B$^$?8E$$%M%$%F%#%V$J(B\pLaTeX~2.09$B4D6-$HHyL/$K0[$J$k7k2L$K$J$k(B
% $B2DG=@-$b$"$k$H$$$&E@$O!"1Q8lHG$N(B\LaTeXe{}$B$G$bF1$8$G$9!#(B
% $B>\:Y$O!"(B\LaTeXe $B$KIUB0$N(B\file{usrguide.tex}$B$r;2>H$7$F$/$@$5$$!#(B
%\else
% \subsection{Compatibility with \pLaTeX~2.09}
% \pLaTeXe\ has `\pLaTeX~2.09 compatibility mode'; use
% |\documentstyle| to enter it, but the support might be limited.
% Note that the 2.09 compatibility mode is provided solely to
% allow you to process very old documents,
% which were written for a very old system.
%\fi
%
%
%\ifJAPANESE
% \subsection{latexrelease$B%Q%C%1!<%8$X$NBP1~(B}
% \changes{v1.0e}{2016/02/16}{platexrelease$B$N@bL@$rDI2C(B}
% \LaTeX\ \texttt{<2015/01/01>}$B$GF3F~$5$l$?(Blatexrelease$B%Q%C%1!<%8$r(B
% $B$b$H$K!"?7$7$$(B\pLaTeX{}$B$G$O(Bplatexrelease$B%Q%C%1!<%8$rMQ0U$7$^$7$?!#(B
% platexrelease$B%Q%C%1!<%8$rMQ$$$k$H!"2a5n$N(B\pLaTeX{}$B$r%(%_%e%l!<%H(B
% $B$7$?$j!"%U%)!<%^%C%H$r:n$jD>$9$3$H$J$/?7$7$$(B\pLaTeX{}$B$r;n$7$?$j$9$k(B
% $B$3$H$,$G$-$^$9!#>\:Y$O(Bplatexrelease$B$N%I%-%e%a%s%H$r;2>H$7$F$/$@$5$$!#(B
%\else
% \subsection{Support for Package `latexrelease'}
% \changes{v1.0e}{2016/02/16}{Add a description of platexrelease}
% \pLaTeX\ provides `platexrelease' package, which is based on
% `latexrelease' package (introduced in \LaTeX\ \texttt{<2015/01/01>}).
% It may be used to ensure stability where needed, by emulating
% the specified format date without regenerating the format file.
% For more detail, please refer to its documentation.
%\fi
%
%
%
% \appendix
%
%\ifJAPANESE
% \section{\dst{}$B%W%m%0%i%`$N$?$a$N%*%W%7%g%s(B}\label{app:dst}
% $B$3$NJ8=q$N%=!<%9(B(\file{platex.dtx})$B$r(B\dst{}$B%W%m%0%i%`$G(B
% $B=hM}$9$k$3$H$K$h$C$F!"(B
% $B$$$/$D$+$N0[$J$k%U%!%$%k$r@8@.$9$k$3$H$,$G$-$^$9!#(B
% \dst{}$B%W%m%0%i%`$N>\:Y$O!"(B\file{docstrip.dtx}$B$r;2>H$7$F$/$@$5$$!#(B
%
% $B$3$NJ8=q$N(B\dst{}$B%W%m%0%i%`$N$?$a$N%*%W%7%g%s$O!"<!$N$H$*$j$G$9!#(B
%
% \DeleteShortVerb{\|}
% \begin{center}
% \begin{tabular}{l|p{.8\linewidth}}
% \emph{$B%*%W%7%g%s(B} & \emph{$B0UL#(B}\\\hline
% plcore & $B%U%)!<%^%C%H%U%!%$%k$r:n$k$?$a$N%U%!%$%k$r@8@.(B\\
% pldoc  & \pLaTeXe{}$B$N%=!<%9%U%!%$%k$r$^$H$a$FAHHG$9$k$?$a$N(B
%          $BJ8=q%U%!%$%k(B(pldoc.tex)$B$r@8@.(B\\[2mm]
% shprog & $B>e5-$N%U%!%$%k$r:n@.$9$k$?$a$N(Bsh$B%9%/%j%W%H$r@8@.(B\\
% plprog & $BF~$l;R9=B$$rD4$Y$k4JC1$J(Bperl$B%9%/%j%W%H$r@8@.(B\\
% Xins   & $B>e5-$N(Bsh$B%9%/%j%W%H$d(Bperl$B%9%/%j%W%H$r<h$j=P$9$?$a$N(B
%          \dst{}$B%P%C%A%U%!%$%k(B(Xins.ins)$B$r@8@.(B\\
% \end{tabular}
% \end{center}
% \MakeShortVerb{\|}
%\else
% \section{\dst\ Options}\label{app:dst}
% By processing \file{platex.dtx} with \dst\ program,
% different files can be generated.
% Here are the \dst\ options for this document:
%
% \DeleteShortVerb{\|}
% \begin{center}
% \begin{tabular}{l|p{.8\linewidth}}
% \emph{Option} & \emph{Function}\\\hline
% plcore & Generates a fragment of format sources\\
% pldoc  & Generates `pldoc.tex' for typesetting
%          \pLaTeXe\ sources\\[2mm]
% shprog & Generates a shell script to process `pldoc.tex'\\
% plprog & Generates a tiny perl program to check
%          \dst\ guards nesting\\
% Xins   & Generates a \dst\ batch file `Xins.ins' for
%          generating the above shell/perl scripts\\
% \end{tabular}
% \end{center}
% \MakeShortVerb{\|}
%\fi
%
%\ifJAPANESE
% \subsection{$B%U%!%$%k$N<h$j=P$7J}(B}
%
% $B$?$H$($P!"$3$NJ8=q$N(B``plcore''$B$NItJ,$r(B``\file{platex.ltx}''$B$H$$$&(B
% $B%U%!%$%k$K$9$k$H$-$N<j=g$O$D$.$N$h$&$K$J$j$^$9!#(B
%
% \begin{enumerate}
% \item platex docstrip
% \item $BF~NO%U%!%$%k$N3HD%;R!J(Bdtx$B!K$rF~NO$9$k!#(B
% \item $B=PNO%U%!%$%k$N3HD%;R!J(Bltx$B!K$rF~NO$9$k!#(B
% \item \dst{}$B%*%W%7%g%s!J(Bplcore$B!K$rF~NO$9$k!#(B
% \item $BF~NO%U%!%$%kL>!J(Bplatex$B!K$rF~NO$9$k!#(B
% \item \file{platex.ltx}$B$,B8:_$9$k>l9g$O!"3NG'$r5a$a$F$/$k$N$G!"(B
%  ``y''$B$rF~NO$9$k!#(B
% \item $BJL$N=hM}$r9T$J$&$+$rLd$o$l$k$N$G!"(B``n''$B$rF~NO$9$k!#(B
% \end{enumerate}
% $B$3$l$G!"(B\file{platex.ltx}$B$,:n$i$l$^$9!#(B
%
% $B$"$k$$$O!"<!$N$h$&$JFbMF$N%U%!%$%k(B\file{fmt.ins}$B$r:n@.$7!"(B
% |platex fmt.ins|$B$9$k$3$H$G$b(B\file{platex.ltx}$B$r:n$k$3$H$,$G$-$^$9!#(B
%
%\begin{verbatim}
%   \def\batchfile{fmt.ins}
%   \input docstrip.tex
%   \generateFile{platex.ltx}{t}{\from{platex.dtx}{plcore}}
%\end{verbatim}
%\else
% ^^A (- English version omitted, not so useful -)
%\fi
%
%
%\ifJAPANESE
% \section{$BJ8=q%U%!%$%k(B}\label{app:pldoc}
% \changes{v1.0c}{1997/01/25}{pldoc.dic$B$r(Bfilecontents$B4D6-$K$h$j:n@.(B}
% $B$3$3$G$O!"$3$N%Q%C%1!<%8$K4^$^$l$F$$$k(Bdtx$B%U%!%$%k$r$^$H$a$FAHHG$7!"(B
% $B%=!<%9%3!<%I@bL@=q$rF@$k$?$a$NJ8=q%U%!%$%k(B\file{pldoc.tex}$B$K$D$$$F(B
% $B@bL@$r$7$F$$$^$9!#8DJL$K=hM}$7$?>l9g$H0[$J$j!"(B
% $BJQ99MzNr$d:w0z$bIU$-$^$9!#A4BN$G!"$*$h$=(B200$B%Z!<%8DxEY$K$J$j$^$9!#(B
%
% $B%G%U%)%k%H$G$O%=!<%9%3!<%I$N@bL@$,F|K\8l$G=q$+$l$^$9!#(B
% $B$b$71Q8l$N@bL@=q$rFI$_$?$$>l9g$O!"(B\par\medskip
% \begin{minipage}{.5\textwidth}\ttfamily
% | |\cs{newif}\cs{ifJAPANESE}
% \end{minipage}\par\medskip\noindent
% $B$H$$$&FbMF$N(B\file{platex.cfg}$B$rM=$aMQ0U$7$F$+$i(B\file{pldoc.tex}$B$r(B
% $B=hM}$7$F$/$@$5$$!J(B2016$BG/(B7$B7n(B1$BF|0J9_$N%3%_%e%K%F%#HG(B\pLaTeXe{}$B$,I,MW!K!#(B
%\else
% \section{Documentation of \pLaTeXe\ sources}\label{app:pldoc}
% \changes{v1.0c}{1997/01/25}{Add to filecontents environment for pldoc.dic.}
% The contents of `pldoc.tex' for typesetting \pLaTeXe\ sources
% is described here. Compared to individual processings,
% batch processing using `pldoc.tex' prints also changes and an index.
% The whole document will have about 200 pages.
%
% By default, the description of \pLaTeXe\ sources is written in
% Japanese. If you need English version, first save\par\medskip
% \begin{minipage}{.5\textwidth}\ttfamily
% | |\cs{newif}\cs{ifJAPANESE}
% \end{minipage}\par\medskip\noindent
% as \file{platex.cfg}, and process \file{pldoc.tex}
% (\pLaTeXe\ Community Edition newer than July 2016 is required).
%\fi
%
%\ifJAPANESE
% |filecontents|$B4D6-$O!"0z?t$K;XDj$5$l$?%U%!%$%k$,B8:_$9$k$H$-$O2?$b(B
% $B$7$^$;$s$,!"B8:_$7$J$$$H$-$O!"4D6-Fb$NFbMF$G%U%!%$%k$r:n@.$7$^$9!#(B
% \file{pldoc.dic}$B%U%!%$%k$O!"(Bmendex$B%W%m%0%i%`$G:w0z$r=hM}$9$k$H$-$K(B
% \cs{$B@>Nq(B}, \cs{$BOBNq(B}$B$KBP$9$k!VFI$_!W$rIU$1$k$?$a$KI,MW$G$9!#(B
%\else
% First, create \file{pldoc.dic}; it serves as a dictionary
% for `mendex' (Japanese index processor\footnote{Developed by
% ASCII Corporation; the program `makeindex' cannot handle
% Japanese characters properly, especially Kanji characters
% which should be sorted by its readings.}), which is necessary
% for indexing control sequences containing Japanese characters
% (\cs{$B@>Nq(B} and \cs{$BOBNq(B}).
%\fi
%    \begin{macrocode}
%<*pldoc>
\begin{filecontents}{pldoc.dic}
$B@>Nq(B    $B$;$$$l$-(B
$BOBNq(B    $B$o$l$-(B
\end{filecontents}
%    \end{macrocode}
%
%\ifJAPANESE
% $BJ8=q%/%i%9$K$O!"(B\file{jltxdoc}$B%/%i%9$rMQ$$$^$9!#(B
% \file{plext.dtx}$B$NCf$G%5%s%W%k$rAH$_N)$F$F$$$^$9$N$G!"(B
% \file{plext}$B%Q%C%1!<%8$,I,MW$G$9!#(B
% $B$^$?!"(B2022$BG/$N(B\file{doc}$B%Q%C%1!<%8(Bv3.0$B$O(B\file{hyperref}$B0MB8$K(B
% $B$J$C$?$?$a!"%I%i%$%P%*%W%7%g%s(B|dvipdfmx|$B$rDI2C$7$F(B
% \file{plautopatch}$B7PM3$G(B\file{pxjahyper}$B%Q%C%1!<%8$bFI$_9~$_$^$9!#(B
% \changes{v1.1d}{2021/03/14}{expl3$B%3%^%s%I$r0u;z$G$-$k$h$&$K(B}
% \changes{v1.1e}{2022/03/06}{$B?7(B\file{ltxdoc.cls}$B$KBP1~(B}
%\else
% We use \file{jltxdoc} class; we also require \file{plext} package,
% since \file{plext.dtx} contains several examples of partial
% vertical writing.
% Also, as of 2022 \file{doc} package v3.0 depends on \file{hyperref},
% so we add a driver option |dvipdfmx| and load |pxjahyper| using
% |plautopatch| scheme.
% \file{plautopatch}$B7PM3$G(B\file{pxjahyper}$B%Q%C%1!<%8$bFI$_9~$_$^$9!#(B
% \changes{v1.1d}{2021/03/14}{Print expl3 commands correctly}
% \changes{v1.1e}{2022/03/06}{Adapt to new \file{ltxdoc.cls}}
%\fi
%    \begin{macrocode}
\RequirePackage{plautopatch}
\documentclass[dvipdfmx,a4paper]{jltxdoc}
\AddToHook{env/macro/before}{\catcode`\_=12\relax}
\AddToHook{env/macro/after}{\catcode`\_=8\relax}
\usepackage{plext}
\listfiles

%    \end{macrocode}
%\ifJAPANESE
% $B$$$/$D$+$N(B\TeX{}$B%W%j%_%F%#%V$H(Bplain \TeX{}$B%3%^%s%I$r(B
% $B:w0z$K=PNO$7$J$$$h$&$K$7$^$9!#(B
%\else
% Do not index some \TeX\ primitives, and some common
% plain \TeX\ commands.
%\fi
%    \begin{macrocode}
\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
\DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,%
            \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi}
\DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,%
            \vbox,\vtop,\vcenter}
\DoNotIndex{\@empty,\immediate,\write}
\DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup}
\DoNotIndex{\divide,\advance,\multiply,\count,\dimen}
\DoNotIndex{\relax,\space,\string}
\DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,%
            \closein,\closeout}
\DoNotIndex{\catcode,\endinput}
\DoNotIndex{\jobname,\message,\read,\the,\m@ne,\noexpand}
\DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss,\vss,\unskip}
\DoNotIndex{\m@ne,\z@,\z@skip,\@ne,\tw@,\p@,\@minus,\@plus}
\DoNotIndex{\dp,\wd,\ht,\setlength,\addtolength}
\DoNotIndex{\newcommand, \renewcommand}

%    \end{macrocode}
%\ifJAPANESE
% $B:w0z$HJQ99MzNr$N8+=P$7$K(B|\part|$B$rMQ$$$k$h$&$K@_Dj$r$7$^$9!#(B
%\else
% Set up the Index and Change History to use |\part|.
%\fi
%    \begin{macrocode}
\ifJAPANESE
\IndexPrologue{\part*{$B:w(B $B0z(B}%
                 \markboth{$B:w(B $B0z(B}{$B:w(B $B0z(B}%
                 \addcontentsline{toc}{part}{$B:w(B $B0z(B}%
$B%$%?%j%C%/BN$N?t;z$O!"$=$N9`L\$,@bL@$5$l$F$$$k%Z!<%8$r<($7$F$$$^$9!#(B
$B2<@~$N0z$+$l$??t;z$O!"Dj5A$5$l$F$$$k%Z!<%8$r<($7$F$$$^$9!#(B
$B$=$NB>$N?t;z$O!"$=$N9`L\$,;H$o$l$F$$$k%Z!<%8$r<($7$F$$$^$9!#(B}
\else
\IndexPrologue{\part*{Index}%
                 \markboth{Index}{Index}%
                 \addcontentsline{toc}{part}{Index}%
The italic numbers denote the pages where the corresponding entry
is described, numbers underlined point to the definition,
all others indicate the places where it is used.}
\fi
%
\ifJAPANESE
\GlossaryPrologue{\part*{$BJQ99MzNr(B}%
                 \markboth{$BJQ99MzNr(B}{$BJQ99MzNr(B}%
                 \addcontentsline{toc}{part}{$BJQ99MzNr(B}}
\else
\GlossaryPrologue{\part*{Change History}%
                 \markboth{Change History}{Change History}%
                 \addcontentsline{toc}{part}{Change History}}
\fi

%    \end{macrocode}
%\ifJAPANESE
% $BI8=`$N(B|\changes|$B%3%^%s%I$r!"J#?t%U%!%$%k$NJ8=q$K9g$&$h$&$K=$@5$7$F$$$^$9!#(B
%\else
% Modify the standard |\changes| command slightly, to better cope with
% this multiple file document.
%\fi
%    \begin{macrocode}
\makeatletter
\def\changes@#1#2#3{%
  \let\protect\@unexpandable@protect
  \edef\@tempa{\noexpand\glossary{#2\space
               \currentfile\space#1\levelchar
               \ifx\saved@macroname\@empty
                  \space\actualchar\generalname
               \else
                  \expandafter\@gobble
                  \saved@macroname\actualchar
                  \string\verb\quotechar*%
                  \verbatimchar\saved@macroname
                  \verbatimchar
               \fi
               :\levelchar #3}}%
  \@tempa\endgroup\@esphack}
%    \end{macrocode}
%\ifJAPANESE
% $B%3!<%I9T$G$O!">/$7$N(BOverfull$B$r7Y9pL5$7$K5vMF$7$^$9!#(B
% \changes{v1.0v}{2018/04/06}{$B:G?7$N(Bsource2e$B$X$NDI?o(B}
%\else
% Codelines are allowed to run over a bit without
% showing up as overfull.
% \changes{v1.0v}{2018/04/06}{Sync with the latest \file{source2e.tex}}
%\fi
%    \begin{macrocode}
\renewcommand*\MacroFont{\fontencoding\encodingdefault
                   \fontfamily\ttdefault
                   \fontseries\mddefault
                   \fontshape\updefault
                   \small
                   \hfuzz 6pt\relax}
%    \end{macrocode}
%\ifJAPANESE
% $B>OHV9f$N7e?t$,B?$$>l9g$r9MN8$7!"L\<!$G$N%9%Z!<%9$r>/$7A}$d$7$^$9!#(B
%\else
% Section numbers now reach eg 19.12 which need more space.
%\fi
%    \begin{macrocode}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.8em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.4em}}
\makeatother
%    \end{macrocode}
%\ifJAPANESE
% $BJQ99MzNr$H(B2$BCJAH$N:w0z$r:n@.$7$^$9!#(B
%\else
% Produce a Change Log and (2 column) Index.
%\fi
%    \begin{macrocode}
\RecordChanges
\CodelineIndex
\EnableCrossrefs
\setcounter{IndexColumns}{2}
\settowidth\MacroIndent{\ttfamily\scriptsize 000\ }
%    \end{macrocode}
%\ifJAPANESE
% $B$3$NJ8=q$N%?%$%H%k!&Cx<T!&F|IU$r@_Dj$7$^$9!#(B
% \changes{v1.0c}{1997/01/29}{\file{pltpatch.ltx}$B$r(B\file{plpatch.ltx}$B$KL>>NJQ99(B}
% \changes{v1.0h}{2016/05/08}{$B%I%-%e%a%s%H$+$i(B\file{plpatch.ltx}$B$r=|30(B}
% \changes{v1.0l}{2016/06/19}{$B%Q%C%A%l%Y%k$r(B\file{plvers.dtx}$B$+$i<hF@(B}
% \changes{v1.0o}{2017/09/24}{$B%Q%C%A%l%Y%k$,Ii$N?t$N>l9g$r(Bpre-release$B07$$$X(B}
% \changes{v1.0y}{2018/09/22}{$B:G=*99?7F|$r(B\file{pldoc.pdf}$B$KI=<((B}
%\else
% Set the title, authors and the date for this document.
% \changes{v1.0c}{1997/01/29}{Rename \file{pltpatch.ltx} to \file{plpatch.ltx}.}
% \changes{v1.0h}{2016/05/08}{Exclude \file{plpatch.ltx} from the document}
% \changes{v1.0l}{2016/06/19}{Get the patch level from \file{plvers.dtx}}
% \changes{v1.0o}{2017/09/24}{Allow negative patch level for pre-release}
% \changes{v1.0y}{2018/09/22}{Show last update info on \file{pldoc.pdf}}
%\fi
%    \begin{macrocode}
 \title{The \pLaTeXe\ Sources}
 \author{Ken Nakano \& Japanese \TeX\ Development Community}

% Get the date and patch level from plvers.dtx
\makeatletter
\let\patchdate=\@empty
\begingroup
   \def\ProvidesFile#1\pfmtversion#2#3\ppatch@level#4{%
      \date{#2}\xdef\patchdate{#4}\endinput}
   \input{plvers.dtx}
\endgroup

% Add the patch version if available.
\def\Xpatch{0}
\ifx\patchdate\Xpatch\else
% number is assumed
\ifnum\patchdate>0
  \edef\@date{\@date\space Patch level\space\patchdate}
\else
  \edef\@date{\@date\space Pre-Release\patchdate}
\fi\fi

% Add the last update info, in case format date unchanged
% Note: \@ifl@t@r can be used only in preamble.
\def\lastupd@te{0000/00/00}
\begingroup
   \def\ProvidesFile#1[#2 #3]{%
      \def\@tempd@te{#2}\endinput
      \@ifl@t@r{\@tempd@te}{\lastupd@te}{%
         \global\let\lastupd@te\@tempd@te
      }{}}
   \let\ProvidesClass\ProvidesFile
   \let\ProvidesPackage\ProvidesFile
   \input{plvers.dtx}
   \input{plexpl3.dtx}
   \input{plfonts.dtx}
   \input{plcore.dtx}
   \input{plext.dtx}
   \input{pl209.dtx}
   \input{kinsoku.dtx}
   \input{jclasses.dtx}
   \input{jltxdoc.cls}
\endgroup
\@ifl@t@r{\lastupd@te}{\pfmtversion}{%
  \edef\@date{\@date\break (last updated: \lastupd@te)}%
}{}
\makeatother
%    \end{macrocode}
%\ifJAPANESE
% $B$3$3$+$i$,K\J8%Z!<%8$H$J$j$^$9!#(B
% \changes{v1.1a}{2020/09/26}{\file{plexpl3.dtx}$B$rDI2C(B}
%\else
% Here starts the document body.
% \changes{v1.1a}{2020/09/26}{Add \file{plexpl3.dtx}}
%\fi
%    \begin{macrocode}
\begin{document}
\pagenumbering{roman}
\maketitle
\renewcommand\maketitle{}
\tableofcontents
\clearpage
\pagenumbering{arabic}

\DocInclude{plvers}   % pLaTeX version

\DocInclude{plexpl3}  % additions to expl3

\DocInclude{plfonts}  % NFSS2 commands

\DocInclude{plcore}   % kernel commands

\DocInclude{plext}    % external commands

\DocInclude{pl209}    % 2.09 compatibility mode commands

\DocInclude{kinsoku}  % kinsoku parameter

\DocInclude{jclasses} % Standard class

\DocInclude{jltxdoc}  % dtx documents class

%    \end{macrocode}
%\ifJAPANESE
% \file{ltxdoc.cfg}$B$K(B|\AtEndOfClass{\OnlyDescription}|$B$,;XDj$5$l$F$$$k>l9g$O!"(B
% $B$3$3$G=*N;$7$^$9!#(B
%\else
% Stop here if \file{ltxdoc.cfg} says |\AtEndOfClass{\OnlyDescription}|.
%\fi
%    \begin{macrocode}
\StopEventually{\end{document}}

%    \end{macrocode}
%\ifJAPANESE
% $BJQ99MzNr$H:w0z$rAHHG$7$^$9!#(B
% $BJQ99MzNr%U%!%$%k$H:w0z$N:n$jJ}$N>\:Y$K$D$$$F$O!"(B
% $B$*$^$1(B\ref{app:shprog}$B$r;2>H$7$F$/$@$5$$!#(B
%\else
% Print Change History and Index.
% Please refer to Appendix \ref{app:shprog} for
% processing of Change History and Index.
%\fi
%    \begin{macrocode}
\clearpage
\pagestyle{headings}
% Make TeX shut up.
\hbadness=10000
\newcount\hbadness
\hfuzz=\maxdimen
%
\PrintChanges
\clearpage
%
\begingroup
  \def\endash{--}
  \catcode`\-\active
  \def-{\futurelet\temp\indexdash}
  \def\indexdash{\ifx\temp-\endash\fi}

  \PrintIndex
\endgroup
%    \end{macrocode}
%\ifJAPANESE
% \file{ltxdoc.cfg}$B$K(B2$BEYL\$N(B|\PrintIndex|$B$,;XDj$5$l$F$$$k$+$b$7$l$^$;$s!#(B
% $B$=$3$G!":G8e$K!"JQ99MzNr$d:w0z$,(B2$BEYAHHG$5$l$J$$$h$&$K(B|\PrintChanges|$B$*$h$S(B
% |\PrintIndex|$B%3%^%s%I$r2?$b<B9T$7$J$$$h$&$K$7$^$9!#(B
%\else
% Make sure that the index is not printed twice
% (ltxdoc.cfg might have a second \PrintIndex command).
%\fi
%    \begin{macrocode}
\let\PrintChanges\relax
\let\PrintIndex\relax
\end{document}
%</pldoc>
%    \end{macrocode}
%
%
%
%\ifJAPANESE
% \section{$B$*$^$1%W%m%0%i%`(B}\label{app:omake}
%
% \subsection{$B%7%'%k%9%/%j%W%H(B\file{mkpldoc.sh}}\label{app:shprog}
% \pLaTeXe{}$B$N%^%/%mDj5A%U%!%$%k$r$^$H$a$FAHHG$7!"JQ99MzNr$H:w0z$b(B
% $BIU$1$k$H$-$KJXMx$J%7%'%k%9%/%j%W%H$G$9!#(B
% $B$3$N%7%'%k%9%/%j%W%H(B\footnote{$B$3$N%7%'%k%9%/%j%W%H$O(BUNIX$BMQ$G$9!#(B
% $B$7$+$7(Brm$B%3%^%s%I$r(Bdelete$B%3%^%s%I$K$9$k$J$I$9$l$P!"4JC1$K(BDOS$B$J$I$N%P%C%A(B
% $B%U%!%$%k$K=$@5$9$k$3$H$,$G$-$^$9!#(B}$B$N;HMQJ}K!$O<!$N$H$*$j$G$9!#(B
%\begin{verbatim}
%    sh mkpldoc.sh
%\end{verbatim}
%\else
% \section{Additional Utility Programs}\label{app:omake}
%
% \subsection{Shell Script \file{mkpldoc.sh}}\label{app:shprog}
% A shell script to process `pldoc.tex' and produce a fully indexed
% source code description. Run |sh mkpldoc.sh| to use it.
%\fi
%
%\ifJAPANESE
% \subsubsection{\file{mkpldoc.sh}$B$NFbMF(B}
% $B$^$:!"0JA0$K(B\file{pldoc.tex}$B$r=hM}$7$?$H$-$K:n@.$5$l$?!"(B
% $BL\<!%U%!%$%k$d:w0z%U%!%$%k$J$I$r:o=|$7$^$9!#(B
% \changes{v1.0c}{1997/01/23}{gind.ist$B$H(Bgglo.ist$B$r(B
%        \$TEXMF/tex/latex2e/base$B%G%#%l%/%H%j$+$i%3%T!<$7$J$$$h$&$K$7$?(B}
% \changes{v1.0d}{2016/01/27}{rm$B%3%^%s%I<B9TA0$KB8:_3NG'$9$k$h$&$K$7$?(B}
%\else
% \subsubsection{Content of \file{mkpldoc.sh}}
% First, delete auxiliary files which might be created in the
% previous runs.
% \changes{v1.0c}{1997/01/23}{Don't copy gind.ist and gglo.ist from
%        \$TEXMF/tex/latex2e/base directory.}
% \changes{v1.0d}{2016/01/27}{Add -e test before rm command}
%\fi
%    \begin{macrocode}
%<*shprog>
%<ja>rm -f pldoc.toc pldoc.idx pldoc.glo
%<en>rm -f pldoc-en.toc pldoc-en.idx pldoc-en.glo
%    \end{macrocode}
%\ifJAPANESE
% $B$=$7$F!"(B\file{ltxdoc.cfg}$B$r6u$K$7$^$9!#(B
% $B$3$N%U%!%$%k$O!"(B\file{jltxdoc.cls}$B$NDj5A$rJQ99$9$k$b$N$G$9$,!"(B
% $B$3$3$G$O!"JQ99$5$l$?$/$"$j$^$;$s!#(B
%\else
% First run: empty the config file \file{ltxdoc.cfg}.
%\fi
%    \begin{macrocode}
echo "" > ltxdoc.cfg
%    \end{macrocode}
%\ifJAPANESE
% $B$=$7$F!"(B\file{pldoc.tex}$B$r=hM}$7$^$9!#(B
%\else
% Now process \file{pldoc.tex}.
%\fi
%    \begin{macrocode}
%<ja>platex pldoc.tex
%<en>platex -jobname=pldoc-en pldoc.tex
%    \end{macrocode}
%\ifJAPANESE
% $B:w0z$HJQ99MzNr$r:n@.$7$^$9!#(B
% $B$3$N%9%/%j%W%H$G$O!"JQ99MzNr$d:w0z$r@8@.$9$k$N$K(Bmendex$B%W%m%0%i%`$rMQ$$$F(B
% $B$$$^$9!#(Bmendex$B$O(Bmakeindex$B$N>e0L8_49$N%U%!%$%k@07A%3%^%s%I$G!"(B
% $B:w0z8l$NFI$_$r<+F0E*$KIU$1$k$J$I$N5!G=$,$"$j$^$9!#(B
%
% |-s|$B%*%W%7%g%s$O!":w0z%U%!%$%k$r@07A$9$k$?$a$N%9%?%$%k%*%W%7%g%s$G$9!#(B
% $B:w0zMQ$N(B\file{gind.ist}$B$HJQ99MzNrMQ$N(B\file{gglo.ist}$B$O!"(B
% \LaTeX{}$B$N%G%#%9%H%j%S%e!<%7%g%s$KIUB0$7$F$$$^$9!#(B
%
% |-o|$B$O!"=PNO$9$k%U%!%$%kL>$r;XDj$9$k%*%W%7%g%s$G$9!#(B
%
% |-f|$B$O!"9`L\$K(B``$BFI$_(B''$B$,$J$/$F$b%(%i!<$H$7$J$$%*%W%7%g%s$G$9!#(B
% makeindex$B%3%^%s%I$K$O!"$3$N%*%W%7%g%s$,$"$j$^$;$s!#(B
%\else
% Make the Change log and Glossary (Change History) using mendex.
% `Mendex' is a Japanese index processor, which is mostly upward
% compatible with `makeindex' and automatically handles readings
% of Kanji words.
%
% Option |-s| employs a style file for formatting.
% Here we use \file{gind.ist} and \file{gglo.ist} from \LaTeXe.
%
% Option |-o| specifies output index file name.
%
% Option |-f| forces to output Kanji characters even non-existent
% in dictionaries. (Makeindex does not have this option.)
%\fi
%    \begin{macrocode}
%<ja>mendex -s gind.ist -d pldoc.dic -o pldoc.ind pldoc.idx
%<en>mendex -s gind.ist -d pldoc.dic -o pldoc-en.ind pldoc-en.idx
%<ja>mendex -f -s gglo.ist -o pldoc.gls pldoc.glo
%<en>mendex -f -s gglo.ist -o pldoc-en.gls pldoc-en.glo
%    \end{macrocode}
%\ifJAPANESE
% \file{ltxdoc.cfg}$B$NFbMF$r(B|\includeonly{}|$B$K$7!"(B\file{pldoc.tex}$B$r=hM}$7$^$9!#(B
% $B$3$N%3%^%s%I$O!"0z?t$K;XDj$5$l$?%U%!%$%k$@$1$r(B``|\include|''$B$9$k$?$a$N(B
% $B%3%^%s%I$G$9$,!"$3$3$G$O2?$b(B|\include|$B$7$?$/(B\emph{$B$J$$(B}$B$N$G!"(B
% $B0z?t$K$O2?$b;XDj$r$7$^$;$s!#(B
% $B$7$+$7!"(B|\input|$B$G;XDj$5$l$F$$$k%U%!%$%k$OFI$_9~$^$l$^$9!#(B
% $B$7$?$,$C$F!"L\<!$d:w0z$dJQ99MzNr$N%U%!%$%k$,=hM}$5$l$^$9!#(B
% $B$3$N=hM}$O!"<g$K!"$3$l$i$G%(%i!<$,=P$k$+$I$&$+$N3NG'$G$9!#(B
%\else
% Second run: append |\includeonly{}| to \file{ltxdoc.cfg} to
% speed up things. This run is needed only to get changes and index
% listed in \file{.toc} file.
%\fi
%    \begin{macrocode}
echo "\includeonly{}" > ltxdoc.cfg
%<ja>platex pldoc.tex
%<en>platex -jobname=pldoc-en pldoc.tex
%    \end{macrocode}
%\ifJAPANESE
% $B:G8e$K!":F$S(B\file{ltxdoc.cfg}$B$r6u$K$7$F!"(B\file{pldoc.tex}$B$r=hM}$r$7$^$9!#(B
% $BK\J8$r(B1$B%Z!<%8$+$i3+;O$7$F$$$^$9$N$G!"$3$N8e!"$b$&0lEY=hM}$r$9$k(B
% $BI,MW$O$"$j$^$;$s!#(B
%\else
% Third and final run: restore the cfg file to put
% everything together.
%\fi
%    \begin{macrocode}
echo "" > ltxdoc.cfg
%<ja>platex pldoc.tex
%<en>platex -jobname=pldoc-en pldoc.tex
# EOT
%</shprog>
%    \end{macrocode}
%
%
%\ifJAPANESE
% \subsection{Perl$B%9%/%j%W%H(B\file{dstcheck.pl}}\label{app:plprog}
% \dst{}$BJ8=q%U%!%$%k$O!"(B\LaTeX{}$B$N%=!<%9$H$=$NJ8=q$rF1;~$K4IM}$9$kJ}K!$H$7$F!"(B
% $B$H$F$b$9$0$l$F$$$k$H;W$$$^$9!#$7$+$7!"$?$H$($P(B\file{jclasses.dtx}$B$N$h$&$K!"(B
% $B>r7o$,B?$/$J$k$H!"F~$l;R9=B$$,$o$+$i$J$/$J$C$F$7$^$$$,$A$G$9!#(B
% \LaTeX{}$B$G=hM}$9$l$P!"%(%i!<$K$h$C$F$o$+$j$^$9$,!"(B
% $BJ8=q%U%!%$%k$,Bg$-$/$J$k$HLLE]$G$9!#(B
%
% $B$3$3$G$O!"(B\dst{}$BJ8=q%U%!%$%k$NF~$l;R9=B$$rD4$Y$k$N$KJXMx$J!"(B
% perl$B%9%/%j%W%H$K$D$$$F@bL@$r$7$F$$$^$9!#(B
%
% $B$3$N(Bperl$B%9%/%j%W%H$N;HMQJ}K!$O<!$N$H$*$j$G$9!#(B
%\else
% \subsection{Perl Script \file{dstcheck.pl}}\label{app:plprog}
% Here we provide a perl script which helps checking the nested
% \dst\ guards. Usage:
%\fi
%
%\begin{verbatim}
%    perl dstcheck.pl <file-name>
%\end{verbatim}
%
%\ifJAPANESE
%\else
% The description of this script itself is available only in Japanese.
%\fi
%
%\ifJAPANESE
% \subsubsection{\file{dstcheck.pl}$B$NFbMF(B}
% $B:G=i$K!"$3$N(Bperl$B%9%/%j%W%H$,2?$r$9$k$N$+$r4JC1$K5-=R$7$?%3%a%s%H$r(B
% $BIU$1$^$9!#(B
%\fi
%    \begin{macrocode}
%<*plprog>
##
## DOCSTRIP $BJ8=qFb$N4D6-$d>r7o$NF~$l;R$rD4$Y$k(B perl $B%9%/%j%W%H(B
##
%    \end{macrocode}
%\ifJAPANESE
% $B$3$N%9%/%j%W%H$O!"F~$l;R$NBP1~$rD4$Y$k$?$a$K!"<!$N%9%?%C%/$rMQ$$$^$9!#(B
% \meta{$B>r7o(B}$B$"$k$$$O(B\meta{$B4D6-(B}$B$r3+;O$9$k%3!<%I$,8=$l$?$H$-$K!"(B
% $B$=$l$i$O%9%?%C%/$K%W%C%7%e$5$l!"=*N;$9$k%3!<%I$G%]%C%W$5$l$^$9!#(B
% $B$7$?$,$C$F!"8=:_$N(B\meta{$B>r7o(B}$B$"$k$$$O(B\meta{$B4D6-(B}$B$H!"(B
% $B%9%?%C%/$+$i<h$j=P$7$?(B\meta{$B>r7o(B}$B$"$k$$$O(B\meta{$B4D6-(B}$B$H0lCW$9$l$P!"(B
% $BBP1~$,<h$l$F$$$k$H$$$($^$9!#$=$&$G$J$1$l$P%(%i!<$G$9!#(B
%
% |@dst|$B%9%?%C%/$K$O!"(B\meta{$B>r7o(B}$B$,F~$j$^$9!#(B
% $B>r7o$N3+;O$O!"(B``|%<*|\meta{$B>r7o(B}|>|''$B$G$9!#(B
% $B>r7o$N=*N;$O!"(B``|%</|\meta{$B>r7o(B}|>|''$B$G$9!#(B
% \meta{$B>r7o(B}$B$K$O!"(B|>|$BJ8;z$,4^$^$l$^$;$s!#(B
% |@env|$B%9%?%C%/$K$O!"(B\meta{$B4D6-(B}$B$,F~$j$^$9!#(B
%
% $B@hF,$rL@<(E*$K<($9$?$a$K!"%@%_!<$NCM$r=i4|CM$H$7$FMQ$$$^$9!#(B
% $B%9%?%C%/$O!"(B\meta{$B>r7o(B}$B$"$k$$$O(B\meta{$B4D6-(B}$B$NL>A0$H!"$=$N9THV9f$r%Z%"$K$7$F(B
% $BA`:n$r$7$^$9!#(B
%\fi
%    \begin{macrocode}
push(@dst,"DUMMY"); push(@dst,"000");
push(@env,"DUMMY"); push(@env,"000");
%    \end{macrocode}
%\ifJAPANESE
% $B$3$N(B|while|$B%k!<%W$NCf$N%9%/%j%W%H$O!"J8=q%U%!%$%k$N#19T$4$H$K<B9T$r$7$^$9!#(B
%\fi
%    \begin{macrocode}
while (<>) {
%    \end{macrocode}
%\ifJAPANESE
% $BF~NO9T$,>r7o$r3+;O$9$k9T$J$N$+$rD4$Y$^$9!#(B
% $B>r7o$N3+;O9T$J$i$P!"(B|@dst|$B%9%?%C%/$K(B\meta{$B>r7o(B}$B$H9THV9f$r%W%C%7%e$7$^$9!#(B
%\fi
%    \begin{macrocode}
  if (/^%<\*([^>]+)>/) { # check conditions
    push(@dst,$1);
    push(@dst,$.);
%    \end{macrocode}
%\ifJAPANESE
% $B$=$&$G$J$1$l$P!">r7o$N=*N;9T$J$N$+$rD4$Y$^$9!#(B
% $B8=:_9T$,>r7o$N=*N;$r<($7$F$$$k>l9g$O!"(B|@dst|$B%9%?%C%/$r%]%C%W$7$^$9!#(B
%\fi
%    \begin{macrocode}
  } elsif (/^%<\/([^>]+)>/) {
    $linenum = pop(@dst);
    $conditions = pop(@dst);
%    \end{macrocode}
%\ifJAPANESE
% $B8=:_9T$N(B\meta{$B>r7o(B}$B$H!"%9%?%C%/$+$i<h$j=P$7$?(B\meta{$B>r7o(B}$B$,0lCW$7$J$$>l9g!"(B
% $B$=$N;]$N%a%C%;!<%8$r=PNO$7$^$9!#(B
%
% $B$J$*!"(B|DUMMY|$B$H0lCW$7$?>l9g$O!"0lHV30B&$N%k!<%W$,9g$C$F$$$J$$$H(B
% $B$$$&$3$H$r<($7$F$$$^$9!#$3$N$H$-!"$3$l$i$N%@%_!<CM$r%9%?%C%/$KLa$7$^$9!#(B
% $B$$$D$G$b%9%?%C%/$N@hF,$r%@%_!<CM$K$9$k$?$a$G$9!#(B
%\fi
%    \begin{macrocode}
    if ($1 ne $conditions) {
      if ($conditions eq "DUMMY") {
        print "$ARGV: `</$1>' (l.$.) is not started.\n";
        push(@dst,"DUMMY");
        push(@dst,"000");
      } else {
        print "$ARGV: `<*$conditions>' (l.$linenum) is ended ";
        print "by `<*$1>' (l.$.)\n";
      }
    }
  }
%    \end{macrocode}
%\ifJAPANESE
% $B4D6-$NF~$l;R$b>r7o$HF1$8$h$&$KD4$Y$^$9!#(B
%
% verbatim$B4D6-$N$H$-$K!"$=$NFbB&$r%9%-%C%W$7$F$$$k$3$H$KCm0U$r$7$F$/$@$5$$!#(B
%\fi
%    \begin{macrocode}
  if (/^% *\\begin\{verbatim\}/) { # check environments
    while(<>) {
        last if (/^% *\\end\{verbatim\}/);
    }
  } elsif (/^% *\\begin\{([^{}]+)\}\{(.*)\}/) {
    push(@env,$1);
    push(@env,$.);
  } elsif (/^% *\\begin\{([^{}]+)\}/) {
    push(@env,$1);
    push(@env,$.);
  } elsif (/^% *\\end\{([^{}]+)\}/) {
    $linenum = pop(@env);
    $environment = pop(@env);
    if ($1 ne $environment) {
      if ($environment eq "DUMMY") {
        print "$ARGV: `\\end{$1}' (l.$.) is not started.\n";
        push(@env,"DUMMY");
        push(@env,"000");
      } else {
        print "$ARGV: \\begin{$environement} (l.$linenum) is ended ";
        print "by \\end{$1} (l.$.)\n";
      }
    }
  }
%    \end{macrocode}
%\ifJAPANESE
% $B$3$3$^$G$,!":G=i$N(B|while|$B%k!<%W$G$9!#(B
%\fi
%    \begin{macrocode}
}
%    \end{macrocode}
%\ifJAPANESE
% $BJ8=q%U%!%$%k$rFI$_9~$s$@8e!"=*N;$7$F$$$J$$>r7o$,$"$k$+$I$&$+$r3NG'$7$^$9!#(B
% $B$9$Y$F$N>r7o$NBP1~$,$H$l$F$$$l$P!"$3$N;~E@$G$N(B|@dst|$B%9%?%C%/$K$O(B
% $B%@%_!<CM$7$+F~$C$F$$$^$;$s!#$7$?$,$C$F!"BP1~$,<h$l$F$$$k>l9g$O!"(B
% $B:G=i$N#2$D$N%]%C%W$K$h$C$F!"%@%_!<CM$,@_Dj$5$l$^$9!#(B
% $B%@%_!<CM$G$J$1$l$P!"%@%_!<CM$K$J$k$^$G!"<h$j=P$7$?CM$r=PNO$7$^$9!#(B
%\fi
%    \begin{macrocode}
$linenum = pop(@dst);
$conditions = pop(@dst);
while ($conditions ne "DUMMY") {
    print "$ARGV: `<*$conditions>' (l.$linenum) is not ended.\n";
    $linenum = pop(@dst);
    $conditions = pop(@dst);
}
%    \end{macrocode}
%\ifJAPANESE
% $B4D6-$NF~$l;R$K$D$$$F$b!">r7o$NF~$l;R$HF1MM$K3NG'$r$7$^$9!#(B
%\fi
%    \begin{macrocode}
$linenum = pop(@env);
$environment = pop(@env);
while ($environment ne "DUMMY") {
    print "$ARGV: `\\begin{$environment}' (l.$linenum) is not ended.\n";
    $linenum = pop(@env);
    $environment = pop(@env);
}
exit;
%</plprog>
%    \end{macrocode}
%
%\ifJAPANESE
% \subsection{\dst{}$B%P%C%A%U%!%$%k(B}
% \changes{v1.0b}{1996/02/01}{\file{omake-sh.ins}, \file{omake-pl.ins}$B$r(B
%     \dst{}$B$NJQ99$K$H$b$J$&JQ99$r$7$?(B}
% \changes{v1.0c}{1997/01/23}{\dst{}$B$K$H$b$J$&JQ99(B}
% $B$3$3$G$O!"IUO?(B\ref{app:shprog}$B$HIUO?(B\ref{app:plprog}$B$G@bL@$r$7$?Fs$D$N(B
% $B%9%/%j%W%H$r!"$3$N%U%!%$%k$+$i<h$j=P$9$?$a$N(B\dst{}$B%P%C%A%U%!%$%k$K$D$$$F(B
% $B@bL@$r$7$F$$$^$9!#(B
%\else
% \subsection{\dst{} Batch file}
% \changes{v1.0b}{1996/02/01}{Adjusted for the latest
%    \dst\ (\file{omake-sh.ins} and \file{omake-pl.ins}.}
% \changes{v1.0c}{1997/01/23}{Adjusted for the latest \dst.}
% Here we introduce a \dst\ batch file `Xins.ins,' which generates the
% scripts described in Appendix \ref{app:shprog} and \ref{app:plprog}.
%\fi
%
%\ifJAPANESE
% $B$^$:!"(B\dst{}$B%Q%C%1!<%8$r%m!<%I$7$^$9!#(B
% $B$^$?!"<B9T7P2a$N%a%C%;!<%8$r=PNO$7$J$$$h$&$K$7$F$$$^$9!#(B
%\fi
%    \begin{macrocode}
%<*Xins>
\input docstrip
\keepsilent
%    \end{macrocode}
%\ifJAPANESE
% \dst{}$B%W%m%0%i%`$O!"O"B3$9$kFs$D$N%Q!<%;%s%H5-9f(B(\%\%)$B$G$O$8$^$k9T$r(B
% $B%a%?%3%a%s%H$H$_$J$7!">r7o$K$h$i$:=PNO$r$7$^$9!#(B
% $B$7$+$7!"(B``\%''$B$O(B\TeX{}$B$G$O%3%a%s%H$G$"$C$F$b!"(Bsh$B$d(Bperl$B$K$H$C$F$O%3%a%s%H(B
% $B$G$O$"$j$^$;$s!#$=$3$G!"%a%?%3%a%s%H$H$7$F=PNO$9$kJ8;z$r(B``\#\#''$B$H(B
% $BJQ99$7$^$9!#(B
%\fi
%    \begin{macrocode}
{\catcode`#=12 \gdef\MetaPrefix{## }}
%    \end{macrocode}
%\ifJAPANESE
% $B$=$7$F!"%W%j%"%s%V%k$K=PNO$5$l$k%a%C%;!<%8$r@k8@$7$^$9!#(B
% $B$3$3$G$O!"$H$/$K2?$b;XDj$7$F$$$^$;$s$,!"@k8@$r$7$J$$$H%G%U%)%k%H$N5-=R$,(B
% `\%\%'$BIU$-$G=PNO$5$l$F$7$^$&$?$a!"$=$l$rM^@)$9$kL\E*$G;HMQ$7$F$$$^$9!#(B
%\fi
%    \begin{macrocode}
\declarepreamble\thispre
\endpreamble
\usepreamble\thispre
%    \end{macrocode}
%\ifJAPANESE
% $B%]%9%H%"%s%V%k$bF1MM$K!"@k8@$r$7$J$$$H(B`|\endinput|'$B$,=PNO$5$l$^$9!#(B
%\fi
%    \begin{macrocode}
\declarepostamble\thispost
\endpostamble
\usepostamble\thispost
%    \end{macrocode}
%\ifJAPANESE
% |\generate|$B%3%^%s%I$G!"$I$N%U%!%$%k$K!"$I$N%U%!%$%k$N$I$NItJ,$r=PNO$9$k$N$+(B
% $B$r;XDj$7$^$9!#(B
%\fi
%    \begin{macrocode}
\generate{
   \file{dstcheck.pl}{\from{platex.dtx}{plprog}}
   \file{mkpldoc.sh}{\from{platex.dtx}{shprog,ja}}
   \file{mkpldoc-en.sh}{\from{platex.dtx}{shprog,en}}
}
\endbatchfile
%</Xins>
%    \end{macrocode}
%
% \newpage
% \begin{thebibliography}{99}
% \bibitem{platex2e-book}
% $BCfLn(B $B8-(B
% \newblock $B!XF|K\8l(B\LaTeXe $B%V%C%/!Y(B
% \newblock $B%"%9%-!<(B, 1996.
%
% \bibitem{tate-book}
% $B%$%s%W%l%9!&%i%\4F=$(B, $B%"%9%-!<=q@RJT=8ItJT(B
% \newblock $B!X=DAHBP1~(B $B%Q!<%=%J%kF|K\8l(B\TeX{}$B!Y(B
% \newblock $B%"%9%-!<=PHG6I(B, 1994
%
% \bibitem{jtex-tech}
% $B%"%9%-!<=PHG5;=QIt@UG$JT=8(B
% \newblock $B!XF|K\8l(B\TeX $B%F%/%K%+%k%V%C%/(BI$B!Y(B
% \newblock $B%"%9%-!<(B, 1990.
%
% \bibitem{ajt2008okumura}
% Haruhiko Okumura,
% \newblock ``{\em \pTeX\ and Japanese Typesetting}''.
% \newblock The Asian Journal of \TeX, Volume~2, No.~1, 2008.\\
% (\texttt{http://ajt.ktug.org/2008/0201okumura.pdf})
%
% \bibitem{tb29hamano}
% Hisato Hamano,
% \newblock ``{\em Vertical Typesetting with \TeX}''.
% \newblock TUGboat issue 11:3, 1990.\\
% (\texttt{https://tug.org/TUGboat/tb11-3/tb29hamano.pdf})
%
% \bibitem{tex-book}
% Donald~E. Knuth.
% \newblock ``{\em The \TeX book}''.
% \newblock Addison-Wesley, 1984.
% \newblock ($BK.Lu!':XF#?.CK4F=$(B, $B:mC+9%51Lu(B,
%             \TeX $B%V%C%/(B $B2~D{?7HG(B, $B%"%9%-!<=PHG6I(B, 1989)
%
% \bibitem{latex-book2}
% Laslie Lamport.
% \newblock ``{\em {\LaTeX:} A Document Preparation System}''.
% \newblock Addison-Wesley, second edition, 1994.
%
% \bibitem{latex-book}
% Laslie Lamport.
% \newblock ``{\em {\LaTeX:} A Document Preparation System}''.
% \newblock Addison-Wesley, 1986.
% \newblock ($BK.Lu!'ARBtNI0l4F=$(B, $BBgLn=S<#!&>.JkGnDL!&F#1:$O$kH~Lu(B,
%            $BJ8=q=hM}%7%9%F%`(B \LaTeX, $B%"%9%-!<(B, 1990)
%
% \bibitem{latex-comp}
% Michel Goossens, Frank Mittelbach, Alexander Samarin.
% \newblock ``{\em The {\LaTeX} Companion}''.
% \newblock Addison-Wesley, 1994.
%
% \bibitem{perl}
% $B2OLn(B $B??<#(B
% \newblock $B!XF~Lg(BPerl$B!Y(B
% \newblock $B%"%9%-!<=PHG6I(B, 1994
% \end{thebibliography}
%
% \iffalse
% $B$3$3$G!"$3$N$"$H$KAHHG$5$l$k$+$b$7$l$J$$J8=q$N$?$a$K!"(B
% $B@a8+=P$7$NHV9f$r;;MQ?t;z$KLa$7$^$9!#(B
% \fi
%
% \renewcommand{\thesection}{\arabic{section}}
%
% \Finale
%
\endinput
