From 1af85f82c48d00dfbf27a720ea711d12e27895e8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 Dec 2017 23:54:32 +0000 Subject: platex (7dec17) git-svn-id: svn://tug.org/texlive/trunk@45999 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/platex/base/README.md | 2 +- Master/texmf-dist/doc/platex/base/ascmac.pdf | Bin 148502 -> 148536 bytes Master/texmf-dist/doc/platex/base/exppl2e.pdf | Bin 158053 -> 144232 bytes Master/texmf-dist/doc/platex/base/platex-en.pdf | Bin 0 -> 145626 bytes Master/texmf-dist/doc/platex/base/platex.pdf | Bin 263565 -> 277817 bytes .../texmf-dist/doc/platex/base/platexrelease.pdf | Bin 120438 -> 120317 bytes Master/texmf-dist/doc/platex/base/pldoc.pdf | Bin 781224 -> 786628 bytes Master/texmf-dist/source/platex/base/Makefile | 38 +- Master/texmf-dist/source/platex/base/ascmac.dtx | 9 +- Master/texmf-dist/source/platex/base/platex.dtx | 1027 ++++++++++++++++---- .../source/platex/base/platexrelease.dtx | 6 +- Master/texmf-dist/source/platex/base/plcore.dtx | 7 +- Master/texmf-dist/source/platex/base/plfonts.dtx | 120 ++- Master/texmf-dist/source/platex/base/plvers.dtx | 129 ++- Master/texmf-dist/tex/platex/base/ascmac.sty | 2 +- Master/texmf-dist/tex/platex/base/exppl2e.sty | 69 +- Master/texmf-dist/tex/platex/base/platex.ltx | 1 - .../texmf-dist/tex/platex/base/platexrelease.sty | 8 +- Master/texmf-dist/tex/platex/base/plcore.ltx | 60 +- Master/texmf-dist/tex/platex/base/pldefs.ltx | 3 +- Master/texmf-dist/tex/platex/base/tascmac.sty | 6 +- 21 files changed, 1061 insertions(+), 426 deletions(-) create mode 100644 Master/texmf-dist/doc/platex/base/platex-en.pdf (limited to 'Master') diff --git a/Master/texmf-dist/doc/platex/base/README.md b/Master/texmf-dist/doc/platex/base/README.md index 8e0141aaf71..473ca2ad4f3 100644 --- a/Master/texmf-dist/doc/platex/base/README.md +++ b/Master/texmf-dist/doc/platex/base/README.md @@ -61,6 +61,6 @@ the 3-clause BSD license (see [LICENSE](./LICENSE)). ## Release Date -2017-11-05 +2017-12-06 Japanese TeX Development Community diff --git a/Master/texmf-dist/doc/platex/base/ascmac.pdf b/Master/texmf-dist/doc/platex/base/ascmac.pdf index 47b2abba1d9..52f1db6d560 100644 Binary files a/Master/texmf-dist/doc/platex/base/ascmac.pdf and b/Master/texmf-dist/doc/platex/base/ascmac.pdf differ diff --git a/Master/texmf-dist/doc/platex/base/exppl2e.pdf b/Master/texmf-dist/doc/platex/base/exppl2e.pdf index 6a2559aa365..bbf690ebf16 100644 Binary files a/Master/texmf-dist/doc/platex/base/exppl2e.pdf and b/Master/texmf-dist/doc/platex/base/exppl2e.pdf differ diff --git a/Master/texmf-dist/doc/platex/base/platex-en.pdf b/Master/texmf-dist/doc/platex/base/platex-en.pdf new file mode 100644 index 00000000000..230ea9c31f3 Binary files /dev/null and b/Master/texmf-dist/doc/platex/base/platex-en.pdf differ diff --git a/Master/texmf-dist/doc/platex/base/platex.pdf b/Master/texmf-dist/doc/platex/base/platex.pdf index 1b5b67202a4..5180aefc1bf 100644 Binary files a/Master/texmf-dist/doc/platex/base/platex.pdf and b/Master/texmf-dist/doc/platex/base/platex.pdf differ diff --git a/Master/texmf-dist/doc/platex/base/platexrelease.pdf b/Master/texmf-dist/doc/platex/base/platexrelease.pdf index 75b4abc068d..ad6944dc1dc 100644 Binary files a/Master/texmf-dist/doc/platex/base/platexrelease.pdf and b/Master/texmf-dist/doc/platex/base/platexrelease.pdf differ diff --git a/Master/texmf-dist/doc/platex/base/pldoc.pdf b/Master/texmf-dist/doc/platex/base/pldoc.pdf index 4d468cf2f62..6ffe50b86e1 100644 Binary files a/Master/texmf-dist/doc/platex/base/pldoc.pdf and b/Master/texmf-dist/doc/platex/base/pldoc.pdf differ diff --git a/Master/texmf-dist/source/platex/base/Makefile b/Master/texmf-dist/source/platex/base/Makefile index 6a19d0e89d5..b2e570e058d 100644 --- a/Master/texmf-dist/source/platex/base/Makefile +++ b/Master/texmf-dist/source/platex/base/Makefile @@ -1,9 +1,9 @@ STRIPTARGET = platex.ltx jarticle.cls pl209.def platexrelease.sty \ nidanfloat.sty tascmac.sty jltxdoc.cls -PDFTARGET = platex.pdf platexrelease.pdf pldoc.pdf \ - nidanfloat.pdf ascmac.pdf exppl2e.pdf -DVITARGET = platex.dvi platexrelease.dvi pldoc.dvi \ - nidanfloat.dvi ascmac.dvi exppl2e.dvi +DOCTARGET = platex platexrelease pldoc nidanfloat ascmac exppl2e \ + platex-en +PDFTARGET = $(addsuffix .pdf,$(DOCTARGET)) +DVITARGET = $(addsuffix .dvi,$(DOCTARGET)) KANJI = -kanji=jis FONTMAP = -f ipaex.map -f ptex-ipaex.map TEXMF = $(shell kpsewhich -var-value=TEXMFHOME) @@ -86,6 +86,7 @@ jltxdoc.cls: jltxdoc.dtx rm pldocs.log pldoc.tex Xins.ins platex.dvi: $(INTRODOC_SRC) + rm -f platex.cfg platex $(KANJI) platex.dtx mendex -J -f -s gglo.ist -o platex.gls platex.glo platex $(KANJI) platex.dtx @@ -93,11 +94,13 @@ platex.dvi: $(INTRODOC_SRC) rm platex.glo platex.gls platex.ilg platexrelease.dvi: $(PLRELDOC_SRC) + rm -f platex.cfg platex $(KANJI) platexrelease.dtx platex $(KANJI) platexrelease.dtx rm platexrelease.aux platexrelease.log pldoc.dvi: $(PLDOC_SRC) + rm -f platex.cfg rm -f jltxdoc.cls pldoc.tex Xins.ins platex $(KANJI) pldocs.ins rm -f mkpldoc.sh dstcheck.pl @@ -108,32 +111,47 @@ pldoc.dvi: $(PLDOC_SRC) rm ltxdoc.cfg pldoc.dic mkpldoc.sh dstcheck.pl nidanfloat.dvi: $(NIDAN_SRC) + rm -f platex.cfg platex $(KANJI) nidanfloat.dtx platex $(KANJI) nidanfloat.dtx rm nidanfloat.aux nidanfloat.log ascmac.dvi: $(ASCMAC_SRC) + rm -f platex.cfg platex $(KANJI) ascmac.dtx platex $(KANJI) ascmac.dtx rm ascmac.aux ascmac.log ascmac.toc exppl2e.dvi: exppl2e.sty + rm -f platex.cfg platex $(KANJI) exppl2e.sty platex $(KANJI) exppl2e.sty rm exppl2e.aux exppl2e.log +platex-en.dvi: $(INTRODOC_SRC) + # built-in echo in shell is troublesome, so use perl instead + perl -e "print \"\\\\newif\\\\ifJAPANESE\\n"\" >platex.cfg + platex -jobname=platex-en $(KANJI) platex.dtx + mendex -J -f -s gglo.ist -o platex-en.gls platex-en.glo + platex -jobname=platex-en $(KANJI) platex.dtx + rm platex-en.aux platex-en.log + rm platex-en.glo platex-en.gls platex-en.ilg + rm platex.cfg + platex.pdf: platex.dvi - dvipdfmx $(FONTMAP) platex.dvi + dvipdfmx $(FONTMAP) $< platexrelease.pdf: platexrelease.dvi - dvipdfmx $(FONTMAP) platexrelease.dvi + dvipdfmx $(FONTMAP) $< pldoc.pdf: pldoc.dvi - dvipdfmx $(FONTMAP) pldoc.dvi + dvipdfmx $(FONTMAP) $< nidanfloat.pdf: nidanfloat.dvi - dvipdfmx $(FONTMAP) nidanfloat.dvi + dvipdfmx $(FONTMAP) $< ascmac.pdf: ascmac.dvi - dvipdfmx $(FONTMAP) ascmac.dvi + dvipdfmx $(FONTMAP) $< exppl2e.pdf: exppl2e.dvi - dvipdfmx $(FONTMAP) exppl2e.dvi + dvipdfmx $(FONTMAP) $< +platex-en.pdf: platex-en.dvi + dvipdfmx $(FONTMAP) $< .PHONY: install clean cleanstrip cleanall cleandoc install: diff --git a/Master/texmf-dist/source/platex/base/ascmac.dtx b/Master/texmf-dist/source/platex/base/ascmac.dtx index 84f2197343f..edb5b6d0340 100644 --- a/Master/texmf-dist/source/platex/base/ascmac.dtx +++ b/Master/texmf-dist/source/platex/base/ascmac.dtx @@ -11,6 +11,8 @@ % % \iffalse % +% 2017/12/06 v2.0e +% - Again works with non-e-TeX engines. % 2017/07/22 v2.0d % - Check existing \Return definition and throw an error % if it is not compatible with ascmac. @@ -65,7 +67,7 @@ % %\ProvidesPackage{tascmac} %\ProvidesPackage{ascmac} - [2017/07/22 v2.0d + [2017/12/06 v2.0e % ascmac package (community edition) % ascmac wrapper (community edition) ] @@ -326,16 +328,17 @@ % pdf\LaTeX{}やLua\LaTeX{}のプリミティブを使って、ascgrpのType1フォントを % 使用できるように設定します。 % \changes{2016/08/21}{v2.0c}{pdf\LaTeX{}でascgrpのType1フォントを使用} +% \changes{2017/12/06}{v2.0e}{念のためe-拡張なしのエンジンでのエラーを防止} % \begin{macrocode} %% %% Use Type1 font for ascgrp (pdfLaTeX, LuaLaTeX) \ifascmac@ptex\else - \ifdefined\pdfextension + \ifx\pdfextension\@undefined % LuaTeX (>=0.85) \pdfextension mapline{+ascgrp +\ifx\JAPANESEtrue\undefined + \expandafter\newif\csname ifJAPANESE\endcsname + \JAPANESEtrue +\fi +% +% \fi % % \setcounter{StandardModuleDepth}{1} % \makeatletter +%\ifJAPANESE % \def\chuui{\@ifnextchar[{\@chuui}{\@chuui[注意:]}} +%\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 -% \def\pTeX{p\kern-.15em\TeX} -% \def\epTeX{$\varepsilon$-\pTeX} -% \def\pLaTeX{p\kern-.05em\LaTeX} -% \def\pLaTeXe{p\kern-.05em\LaTeXe} +% +% \iffalse +%<*driver|pldoc> +\def\eTeX{$\varepsilon$-\pTeX} +\def\pTeX{p\kern-.15em\TeX} +\def\epTeX{$\varepsilon$-\pTeX} +\def\pLaTeX{p\kern-.05em\LaTeX} +\def\pLaTeXe{p\kern-.05em\LaTeXe} +% +% \fi +% % \StopEventually{} % % \iffalse -% \changes{v1.0}{1995/05/08}{first edition} +%\ifJAPANESE +% \changes{v1.0}{1995/05/08}{最初のバージョン} % \changes{v1.0a}{1995/08/25}{互換性について、\dst{}の使い方、参考文献を追加} % \changes{v1.0b}{1996/02/01}{\file{omake-sh.ins}, \file{omake-pl.ins}を % \dst{}の変更にともなう変更をした} +% \changes{v1.0c}{1997/01/23}{\dst{}にともなう変更} % \changes{v1.0c}{1997/01/23}{\LaTeX\ \textt{!<1996/12/01!>}に合わせて修正} -% \changes{v1.0d}{2016/01/27}{\file{mkpldoc.sh}を改善。 -% p\LaTeXe{}に付属するファイルの説明を更新} +% \changes{v1.0c}{1997/01/23}{gind.istとgglo.istを +% \$TEXMF/tex/latex2e/baseディレクトリからコピーしないようにした} +% \changes{v1.0c}{1997/01/25}{pldoc.dicをfilecontents環境により作成} +% \changes{v1.0c}{1997/01/29}{\file{pltpatch.ltx}を\file{plpatch.ltx}に名称変更} +% \changes{v1.0d}{2016/01/27}{\pLaTeXe{}に付属するファイルの説明を更新} +% \changes{v1.0d}{2016/01/27}{rmコマンド実行前に存在確認するようにした} % \changes{v1.0e}{2016/02/16}{platexreleaseの説明を追加} % \changes{v1.0f}{2016/04/12}{ドキュメントを更新} % \changes{v1.0g}{2016/05/07}{フォーマット作成時に\LaTeX{}のバナーを一旦保存} @@ -44,26 +69,74 @@ % \file{plcore.ltx}から\file{platex.ltx}へ移動} % \changes{v1.0n}{2016/09/14}{\LaTeX{}のバナーの保存しかたを改良} % \changes{v1.0o}{2017/09/24}{パッチレベルが負の数の場合をpre-release扱いへ} +% \changes{v1.0p}{2017/11/11}{\LaTeX{}のバナーを保存するコードを +% \file{platex.ltx}から\file{plcore.ltx}へ移動} +% \changes{v1.0q}{2017/11/29}{英語版ドキュメントを追加} +% \changes{v1.0r}{2017/12/02}{英語の参考文献も追加} +%\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} +%\fi % \fi % % \iffalse %<*driver> \NeedsTeXFormat{pLaTeX2e} % \fi -\ProvidesFile{platex.dtx}[2017/09/24 v1.0o pLaTeX document file] +\ProvidesFile{platex.dtx}[2017/12/02 v1.0r pLaTeX document file] % \iffalse \documentclass{jltxdoc} \usepackage{plext} \GetFileInfo{platex.dtx} -\title{p\LaTeXe{}について} -\author{Ken Nakano \& Japanese \TeX\ Development Community} +\ifJAPANESE +\title{\pLaTeXe{}について} +\author{中野 賢 \& 日本語\TeX{}開発コミュニティ} \date{作成日:\filedate} \renewcommand{\refname}{参考文献} \GlossaryPrologue{\section*{変更履歴}% \markboth{変更履歴}{変更履歴}% \addcontentsline{toc}{section}{変更履歴}} +\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{>・} +\fi \def\changes@#1#2#3{% \let\protect\@unexpandable@protect \edef\@tempa{\noexpand\glossary{#2\space#1\levelchar @@ -97,15 +170,38 @@ % \fi % % +%\ifJAPANESE % \changes{v1.0f}{2016/04/12}{ドキュメントを更新} % \changes{v1.0k}{2016/05/21}{変更履歴も出力するようにした} +% \changes{v1.0q}{2017/11/29}{英語版ドキュメントを追加} +%\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!} +%\fi % \begin{chuui} -% これは、株式会社アスキー(現アスキー・メディアワークス\footnote{アスキー -% 日本語\TeX{}(\pTeX{})、\texttt{http://ascii.asciimw.jp/pb/ptex/}})が -% 配布している\pLaTeXe{}の付属文書ではありません。アスキーのオリジナル版 -% からforkしたコミュニティ版\pLaTeXe{}の付属文書です。 +%\ifJAPANESE +% この文書では「コミュニティ版\pLaTeXe{}」について簡単に説明します。 +% 株式会社アスキー(現アスキー・メディアワークス +% \footnote{アスキー日本語\TeX{}(\pTeX{})、 +% \texttt{http://ascii.asciimw.jp/pb/ptex/}})が配布している +% \pLaTeXe{}(以下、アスキー版\pLaTeXe{})とは異なる内容ですので、 +% 注意してください。 +%\else +% This document provides a brief description of \pLaTeXe, the Japanese +% extended version of \LaTeXe. The original version of +% \pLaTeXe\ (`ASCII \pLaTeXe') was developed by ASCII MEDIA +% WORKS\footnote{\texttt{http://ascii.asciimw.jp/pb/ptex/}} +% (formerly ASCII CORPORATION) during 1995 and 2006. +% The current version, which is now distributed in CTAN and +% \TeX\ Live, is a forked version called +% `\pLaTeXe\ Community Edition.' +% It is now maintained by Japanese \TeX\ Development +% Community\footnote{\texttt{https://texjp.org}}. +%\fi % \end{chuui} % +%\ifJAPANESE % 2010年以降、アスキー\pTeX{}は、国際的に広く使われている\TeX\ Liveという % ディストリビューションに取り込まれ、そこで独自の改良や仕様変更が加えられ % てきました。最近の\TeX\ LiveやW32\TeX{}では、\pLaTeX{}も元々の\pTeX{}で @@ -120,26 +216,89 @@ % バグレポートはアスキー宛てではなく、日本語\TeX{}開発コミュニティに報告 % してください。\TeX\ ForumやGitHubのIssueシステムが利用できます。 % -% この文書(platex.pdf)はコミュニティ版\pLaTeX{}の概要を説明した -% もので、実際の\pLaTeX{}のソースコードはpldoc.pdfで説明しています。 +% この文書(platex.pdf)はコミュニティ版\pLaTeX{}の概要を説明したものです +% が、内容はアスキー版(1995年頃)からほとんど変わっていませんので、 +% 今では歴史的な文書ということにしておきます。 +% 最近の\pLaTeX{}の更新内容は\pLaTeX{}ニュース(アスキー版:plnews*.pdf、 +% コミュニティ版:plnewsc*.pdf)を参照してください。また、 +% 実際の\pLaTeX{}のソースコードはpldoc.pdfで説明しています。 +%\else +% \def\JLaTeX{\leavevmode\lower.5ex\hbox{J}\kern-.15em\LaTeXe} +% \pLaTeX\ is a Japanese \LaTeX\ format, which is adjusted/extended +% to be more suitable for writing Japanese documents. +% It requires \pTeX\ (\TeX\ engine with extensions for Japanese +% typesetting; it is designed for high-quality Japanese book publishing, +% and the `p' stands for `publishing'\footnote{There is another +% old implementation of Japanese \LaTeX, called \JLaTeX\ (but +% not includeded in \TeX\ Live). Also, MiK\TeX\ has another program +% called `platex,' but it has nothing to do with our +% Japanese \pLaTeX!}), and the developent of both \pTeX\ and +% \pLaTeX\ was done by ASCII Corporation. +% +% 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, the default engine of +% \pLaTeX\ changed from original \pTeX\ to \epTeX\ (\pTeX\ with +% \eTeX\ extension), and 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) 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). +% The detail of source codes are described separately in pldoc-en.pdf. +%\fi % % % \clearpage % -% \section{概要}\label{platex:intro} -% この文書は、p\LaTeXe{}の概要を示していますが、使い方のガイドでは -% ありません。p\LaTeXe{}の機能についての説明は、\cite{platex2e-book}を -% 参照してください。日本語\TeX{}については\cite{jtex-tech}を参照してください。 -% \changes{v1.0}{1995/05/08}{first edition} -% \changes{v1.0a}{1995/08/25}{互換性について、\dst{}の使い方、参考文献を追加} +%\ifJAPANESE +% \section{この文書について}\label{platex:intro} +% この文書は\pLaTeXe{}の概要を示していますが、使い方のガイドではありません。 +% \pLaTeXe{}の機能全般については、\cite{platex2e-book}を参照してください。 +% また、\cite{tate-book}で説明されていた縦組向けの拡張コマンドに +% ついては、\file{pldoc.pdf}の中の\file{plext.dtx}の項目を参照してください。 % -% p\LaTeXe{}では\cite{tate-book}で説明されている、いくつかの拡張コマンドの -% 動作を修正しています。その詳細については、\file{plext.dtx}を参照して -% ください。 +% 日本語の組版処理については、 +% \pTeX{}(あるいはその前身の「日本語\TeX{}」)に関する文献 +% \cite{jtex-tech}や\cite{ajt2008okumura}(英語), \cite{tb29hamano}(英語)も +% 併せてご参照ください。 % % \LaTeX{}の機能については、\cite{latex-book2}や\cite{latex-comp}などを % 参照してください。新しい機能については\file{usrguide.tex}を参照してください。 +% \changes{v1.0}{1995/05/08}{最初のバージョン} +% \changes{v1.0a}{1995/08/25}{互換性について、\dst{}の使い方、参考文献を追加} +% \changes{v1.0r}{2017/12/02}{英語の参考文献も追加} +%\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} +%\fi % +%\ifJAPANESE % この文書の構成は次のようになっています。 % % \begin{quote} @@ -148,32 +307,61 @@ % この節です。この文書についての概要を述べています。 % % \item[第\ref{platex:plcore}節] -% p\LaTeXe{}で拡張した機能についての概要です。 +% \pLaTeXe{}で拡張した機能についての概要です。 % 付属のクラスファイルやパッケージファイルについても簡単に % 説明しています。 % % \item[第\ref{platex:compatibility}節] -% 旧バージョンのp\LaTeX{}との互換性について述べています。 +% 現在のバージョンの\pLaTeX{}と旧バージョン、あるいは元となっている +% \LaTeX{}との互換性について述べています。 % % \item[付録\ref{app:dst}] -% この文書ソースの\dst{}のためのオプションについて述べています。 +% この文書ソース(platex.dtx)の +% \dst{}のためのオプションについて述べています。 % % \item[付録\ref{app:pldoc}] -% p\LaTeXe{}のdtxファイルをまとめて一つのDVIファイルにするための -% 文書ファイルの説明をしています。 +% \pLaTeXe{}のdtxファイルをまとめて、一つのソースコード説明書に +% するための文書ファイルの説明をしています。 % % \item[付録\ref{app:omake}] -% 付録\ref{app:pldoc}で説明をした文書ファイルを処理するshスクリプト(手順)、 +% 付録\ref{app:pldoc}で説明した文書ファイルを処理するshスクリプト(手順)、 % \dst{}文書ファイル内の入れ子の対応を調べるperlスクリプトなどについて % 説明しています。 % \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 % % -% \section{p\LaTeXe{}の機能について}\label{platex:plcore} -% p\LaTeXe{}の機能は、いくつものファイルに分割されて実装されています。 -% これらのファイルはつぎの3種類に分類することができます。 +%\ifJAPANESE +% \section{\pLaTeXe{}の機能について}\label{platex:plcore} +% \pLaTeXe{}が提供するファイルは、次の3種類に分類することができます。 % % \begin{itemize} % \item フォーマットファイル @@ -182,111 +370,105 @@ % \end{itemize} % % フォーマットファイルには、基本的な機能が定義されており、 -% p\LaTeXe{}の核となるファイルです。このファイルに定義されているマクロは、 -% 実行時の速度を高めるために、あらかじめ\TeX の内部形式の形で保存されて -% います。 +% \pLaTeXe{}の核となるファイルです。 +% このファイルに定義されているマクロは、実行時の速度を高めるために、 +% あらかじめ\TeX{}の内部形式の形で保存されています。 % % クラスファイルは文書のレイアウトを設定するファイル、 % パッケージファイルはマクロの拡張を定義するファイルです。 % 前者は|\documentclass|コマンドを用いて読み込み、 % 後者は|\usepackage|コマンドを用いて読み込みます。 % -% \begin{chuui}[古いp\LaTeX~2.09ユーザへの注意:]\normalfont +% \begin{chuui}[古い\pLaTeX~2.09ユーザへの注意:]\normalfont % クラスファイルとパッケージファイルは、従来、スタイルファイルと呼ばれていた % ものです。\LaTeXe{}ではそれらを、レイアウトに関するものをクラスファイルと % 呼び、マクロの拡張をするものをパッケージファイルと呼んで区別するように % なりました。 -% -% \TeX{}文書が使用するクラスは、文書のプリアンブルで|\documentclass|コマンド -% を用いて指定します。|\documentclass|ではなく、旧版の|\documentstyle|を -% 用いると、自動的に\emph{2.09互換モード}に入ります。 -% 互換モードは旧版の文書を組版するためだけに作られていますので、 -% 新しく文書を作成する場合は、|\documentclass|コマンドを用いてください。 -% 互換モードでは\LaTeX{}の新機能も使えなくなります。 -% -% 旧版では、|\documentstyle|のオプションでマクロファイルを読み込んで -% いましたが、\LaTeX{}では、|\usepackage|コマンドを用いて読み込みます。 % \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{フォーマットファイル} -% フォーマットファイルには、基本的な機能が定義されていますが、 -% これらは\TeX{}の内部形式に変換された形式となっています。 -% フォーマットファイルを作成するには、 -% ソースファイル``platex.ltx''を|iniptex|プログラムで処理します。 +% \pLaTeX{}のフォーマットファイルを作成するには、 +% ソースファイル``platex.ltx''を\epTeX{}のINIモードで処理します +% \footnote{2016年以前は\pTeX{}と\epTeX{}のどちらでもフォーマットを作成する +% ことができましたが、2017年に\LaTeX{}が\eTeX{}必須となったことに伴い、 +% \pLaTeX{}も\epTeX{}が必須となりました。}。 % ただし、\TeX\ LiveやW32\TeX{}ではこの処理を簡単にする|fmtutil-sys|あるいは % |fmtutil|というプログラムが用意されています。 % 以下を実行すれば、フォーマットファイル\file{platex.fmt}が作成されます。 +%\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} % -% 次のリストが、``platex.ltx''の内容です。 -% ただし、このバージョンでは、\LaTeX{}からp\LaTeXe{}への拡張を +%\ifJAPANESE +% 次のリストが、\file{platex.ltx}の内容です。 +% ただし、このバージョンでは、\LaTeX{}から\pLaTeX{}への拡張を % \file{plcore.ltx}をロードすることで行ない、 % \file{latex.ltx}には直接、手を加えないようにしています。 % したがって\file{platex.ltx}はとても短いものとなっています。 % \file{latex.ltx}には\LaTeX{}のコマンドが、 -% \file{plcore.ltx}にはp\LaTeXe{}で拡張したコマンドが定義されています。 +% \file{plcore.ltx}には\pLaTeX{}で拡張したコマンドが定義されています。 +%\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}の末尾で使われている|\dump|をいったん無効化します。 +%\else +% Temporarily disable |\dump| at the end of \file{latex.ltx}. +%\fi % \begin{macrocode} \let\orgdump\dump \let\dump\relax % \end{macrocode} % -% \file{latex.ltx}を読み込み、起動時のバナーを保存します。\TeX\ Liveの標準的 -% インストールでは、この中でBabel由来のハイフネーション・パターン -% \file{hyphen.cfg}が読み込まれ、そのバージョンも含めて保存されるはずです。 -% -%\iffalse -% 2016/05/07の実装では、\file{platex.ltx}のなかで -%\begin{verbatim} -% \edef\platexBANNER{\the\everyjob} -%\end{verbatim} -% としてバナーを保存し、この内容が -%\begin{verbatim} -% \typeout{LaTeX2e version}\typeout{Babel version} -%\end{verbatim} -% という4つのトークンから成ると仮定して、\file{plcore.ltx}のなかで -%\begin{verbatim} -% \def\parse@@BANNER#1#2#3#4{#2} -%\end{verbatim} -% のようにパースしていました。ところが、この「4つのトークンから成る」と -% いう仮定はBabel由来の\file{hyphen.cfg}を使用した場合のみ成り立ち、 -% それ以外の特別な\file{hyphen.cfg}や\file{hyphen.ltx}を使用した場合に -% エラーになってしまいます。 -% そこで、新たに2016/09/14の実装では、\file{platex.ltx}のなかで -%\begin{verbatim} -% \edef\platexBANNER{\the\everyjob\noexpand\typeout{}\relax} -%\end{verbatim} -% としてダミーを追加します(|\relax|はただの区切りトークンの役割)。 -% こうすると、|\platexBANNER|の内容は、Babelの\file{hyphen.cfg}のとき -%\begin{verbatim} -% \typeout{LaTeX2e version}\typeout{Babel version}\typeout{}\relax -%\end{verbatim} -% となり、それ以外のとき -%\begin{verbatim} -% \typeout{LaTeX2e version}\typeout{}\relax -%\end{verbatim} -% となるはずです。このように、少なくとも|\typeout|が2回含まれています -% ので、\file{plcore.ltx}のなかで -%\begin{verbatim} -% \def\parse@@BANNER\typeout#1\typeout#2#3\relax{#1} -%\end{verbatim} -% とパースすることができるようになります。 -%\fi -% +%\ifJAPANESE +% \file{latex.ltx}を読み込みます。 +% \TeX\ Liveの標準的インストールでは、この中でBabel由来のハイフネーション・ +% パターン\file{hyphen.cfg}が読み込まれるはずです。 % \changes{v1.0g}{2016/05/07}{フォーマット作成時に\LaTeX{}のバナーを一旦保存} % \changes{v1.0n}{2016/09/14}{\LaTeX{}のバナーの保存しかたを改良} +% \changes{v1.0p}{2017/11/11}{\LaTeX{}のバナーを保存するコードを +% \file{platex.ltx}から\file{plcore.ltx}へ移動} +%\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 -\edef\platexBANNER{\the\everyjob\noexpand\typeout{}\relax}% save LaTeX banner % \end{macrocode} % -% \file{plcore.ltx}を読み込み、このp\LaTeX{}のバージョンを表示します。 +%\ifJAPANESE +% \file{plcore.ltx}を読み込みます。 +%\else +% Load \file{plcore.ltx}. +%\fi % \begin{macrocode} \typeout{**************************^^J% *^^J% @@ -295,14 +477,31 @@ **************************} \makeatletter \input plcore.ltx +% \end{macrocode} +% +%\ifJAPANESE +% フォーマット作成時に\pLaTeX{}のバージョンがわかるように、 +% 端末に表示します。 +%\else +% Display \pLaTeX\ version on the terminal, so that +% it can be easily recognized during format creation. +%\fi +% \begin{macrocode} \the\everyjob % \end{macrocode} % -% 起動時に\file{platex.cfg}がある場合、それを読み込むようにします。 +%\ifJAPANESE +% \pLaTeXe{}の起動時に\file{platex.cfg}がある場合、それを読み込む +% ようにします。 % バージョン2016/07/01ではコードを\file{plcore.ltx}に入れていました % が、\file{platex.ltx}へ移動しました。 % \changes{v1.0m}{2016/08/26}{\file{platex.cfg}の読み込みを % \file{plcore.ltx}から\file{platex.ltx}へ移動} +%\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 @@ -314,8 +513,14 @@ } % \end{macrocode} % +%\ifJAPANESE % フォーマットファイルにダンプします。 % \changes{v1.0i}{2016/05/12}{一時コマンド\cs{orgdump}を最終的に未定義へ} +%\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 @@ -328,51 +533,98 @@ % % \end{macrocode} % -% 実際にp\LaTeXe{}への拡張を行なっている\file{plcore.ltx}は、 +%\ifJAPANESE +% 実際に\pLaTeXe{}への拡張を行なっている\file{plcore.ltx}は、 % \dst{}プログラムによって、次のファイルの断片が連結されたものです。 % % \begin{itemize} -% \item \file{plvers.dtx}は、p\LaTeXe{}のフォーマットバージョンを +% \item \file{plvers.dtx}は、\pLaTeXe{}のフォーマットバージョンを % 定義しています。 % \item \file{plfonts.dtx}は、\NFSS2を拡張しています。 % \item \file{plcore.dtx}は、上記以外のコマンドでフォーマットファイルに % 格納されるコマンドを定義しています。 % \end{itemize} % -% プリロードフォントや組版パラメータなどの設定は、 -% \file{pldefs.ltx}をロードすることで行なっています。 -% このファイルに記述されている設定を変更すれば、 -% p\LaTeXe{}をカスタマイズすることができます。 -% カスタマイズする場合は、このファイルを直接、修正するのではなく、 -% \file{pldefs.cfg}という名前でコピーをして、そのファイルを編集します。 -% \file{pldefs.cfg}は\file{pldefs.ltx}の代わりに読み込まれます。 +% また、プリロードフォントや組版パラメータなどのデフォルト設定は、 +% \file{plcore.ltx}の中で\file{pldefs.ltx}をロードすることにより行います。 +% このファイル\file{pldefs.ltx}も\file{plfonts.dtx}から生成されます。 +% \begin{chuui} +% このファイルに記述されている設定を変更すれば +% \pLaTeXe{}をカスタマイズすることができますが、 +% その場合は\file{pldefs.ltx}を直接修正するのではなく、いったん +% \file{pldefs.cfg}という名前でコピーして、そのファイルを編集してください。 +% フォーマット作成時に\file{pldefs.cfg}が存在した場合は、そちらが +% \file{pldefs.ltx}の代わりに読み込まれます。 +% \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{plcore.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{バージョン} -% p\LaTeXe{}のバージョンやフォーマットファイル名は、 +% \pLaTeXe{}のバージョンやフォーマットファイル名は、 % \file{plvers.dtx}で定義しています。 +%\else +% \subsubsection{Version} +% The version (like ``\pfmtversion'') and the format name +% (``\pfmtname'') of \pLaTeXe\ are defined in \file{plvers.dtx}. +%\fi % % +%\ifJAPANESE % \subsubsection{\NFSS2コマンド} -% \LaTeX{}では、フォント選択機構として\NFSS2を用いています。 -% p\LaTeXe{}では、オリジナルの\NFSS2 と同様のインターフェイスで、 +% \LaTeXe{}では、フォント選択機構として\NFSS2を用いています。 +% \pLaTeXe{}では、オリジナルの\NFSS2と同様のインターフェイスで、 % 和文フォントを選択できるように、\file{plfonts.dtx}で\NFSS2を拡張しています。 % -% p\LaTeXe{}の\NFSS2は、フォントを切替えるコマンドを指定するときに、 +% \pLaTeXe{}の\NFSS2は、フォントを切替えるコマンドを指定するときに、 % それが欧文書体か和文書体のいずれかを対象とするものかを、 % できるだけ意識しないようにする方向で拡張しています。 % いいかえれば、コマンドが(可能な限りの)判断をします。 % したがって数多くある英語版のクラスファイルやパッケージファイルなどで % 書体の変更を行っている箇所を修正する必要はあまりありません。 % -% \file{plfonts.dtx}ファイルでは、\NFSS2コマンドの定義のほか、プリロード -% フォントの設定、和文エンコードの定義、組版パラメータなどの設定、 -% フォント定義ファイルなどの記述も含まれています。 -% -% \NFSS2についての詳細は、\LaTeXe に付属の\file{fntguide.tex}を参照して +% \NFSS2についての詳細は、\LaTeXe{}に付属の\file{fntguide.tex}を参照して % ください。 +%\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{出力ルーチンとフロート} % \file{plcore.dtx}は、次の項目に関するコマンドを日本語処理用に修正や拡張 % をしています。 @@ -387,103 +639,234 @@ % \item 相互参照 % \item 疑似タイプ入力 % \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{クラスファイルとパッケージファイル} -% ^^A クラスファイルとパッケージファイルは、従来、スタイルファイルと呼ばれていた -% ^^A ものです。\LaTeX{}ではそれらを、レイアウトに関するものをクラスファイルと -% ^^A 呼び、マクロの拡張をするものをパッケージファイルと呼んで区別するように -% ^^A なりました。 % -% p\LaTeXe{}が提供をする、クラスファイルやパッケージファイルのいくつかは、 -% オリジナルのファイルを修正しています。 -% ^^A 修正箇所には``\texttt{platex}''条件が付けられています。 +% \pLaTeXe{}が提供をするクラスファイルやパッケージファイルは、 +% オリジナルのファイルを基にしています。 % -% p\LaTeXe{}に付属のクラスファイルは、次のとおりです。 -% \changes{v1.0d}{2016/01/27}{p\LaTeXe{}に付属するファイルの説明を更新} -% \changes{v1.0j}{2016/05/20}{pfltraceの説明を追加} +% \pLaTeXe{}に付属のクラスファイルは、次のとおりです。 % % \begin{itemize} -% \item jbook.cls, jarticle.cls, jreport.cls\par -% 横組用の標準クラスファイル。\file{jclasses.dtx}から作成される。 +% \item jarticle.cls, jbook.cls, jreport.cls\par +% 横組用の標準クラスファイル。 +% \file{jclasses.dtx}から作成される。 % -% \item tbook.cls, tarticle.cls, treport.cls\par -% 縦組用の標準クラスファイル。\file{jclasses.dtx}から作成される。 +% \item tarticle.cls, tbook.cls, treport.cls\par +% 縦組用の標準クラスファイル。 +% \file{jclasses.dtx}から作成される。 % % \item jltxdoc.cls\par % 日本語の\file{.dtx}ファイルを組版するためのクラスファイル。 % \file{jltxdoc.dtx}から作成される。 % \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 % -% また、p\LaTeXe{}に付属のパッケージファイルは、次のとおりです。 +%\ifJAPANESE +% また、\pLaTeXe{}に付属のパッケージファイルは、次のとおりです。 +% \changes{v1.0d}{2016/01/27}{\pLaTeXe{}に付属するファイルの説明を更新} +% \changes{v1.0j}{2016/05/20}{pfltraceの説明を追加} % % \begin{itemize} % \item plext.sty\par % 縦組用の拡張コマンドなどが定義されているファイル。 -% -% \item oldpfont.sty\par -% p\LaTeX~2.09のフォントコマンドを提供するパッケージ。 -% \file{pl209.dtx}から作成される。 +% \file{plext.dtx}から作成される。 % % \item ptrace.sty\par % \LaTeX{}でフォント選択コマンドのトレースに使う\file{tracefnt.sty}が -% 再定義してしまう\NFSS2コマンドを、p\LaTeXe{}用に再々定義するための +% 再定義してしまう\NFSS2コマンドを、\pLaTeXe{}用に再々定義するための % パッケージ。 % \file{plfonts.dtx}から作成される。 % % \item pfltrace.sty\par % \LaTeX{}でフロート関連コマンドのトレースに使う\file{fltrace.sty}% -% \footnote{\LaTeX\ 2014/05/01で追加されました。参考: +% \footnote{\LaTeXe\ 2014/05/01で追加されました。参考: % \LaTeXe\ News Issue 21 (ltnews21.tex)}が再定義してしまうコマンド -% を、p\LaTeXe{}用に再々定義するためのパッケージ。 +% を、\pLaTeXe{}用に再々定義するためのパッケージ。 % \file{plcore.dtx}から作成される。 % +% \item oldpfont.sty\par +% \pLaTeX~2.09のフォントコマンドを提供するパッケージ。 +% \file{pl209.dtx}から作成される。 +% % \item ascmac.sty, tascmac.sty\par % \LaTeX{}の標準機能の範囲で、図や罫線で囲んだボックスを出力する命令 -% などを提供するパッケージ。旧バージョンのp\LaTeX{}でも配布されていた。 +% などを提供するパッケージ。旧バージョンの\pLaTeX{}でも配布されていた。 % % \item nidanfloat.sty\par % 二段組時に段抜きのフロートをページ下部にも配置可能にする % パッケージ。 % \end{itemize} +%\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}. % -% \section{旧バージョンとの互換性}\label{platex:compatibility} -% ここでは、このバージョンと以前のバージョンとの互換性や拡張部分について -% 説明をしています。 +% \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}. +% +% \item ascmac.sty, tascmac.sty\par +% Create fancy boxes etc., within the scope of native +% \LaTeXe\ picture commands (thus driver-independent). +% +% \item nidanfloat.sty\par +% Enable bottom (|b|) placement option for double float in +% two column mode (\emph{nidan-kumi}). +% \end{itemize} +%\fi % -% \subsection{p\LaTeX~2.09との互換性} -% p\LaTeXe{}は、\LaTeX{}の上位互換という形を取っていますが、 -% いくつかのパラメータなども変更しています。 -% したがって英文書など、\LaTeX{}でも処理できるファイルを -% p\LaTeXe{}で処理しても、完全に同じ結果になるとは限りません。 -% これは、英語版の\LaTeX{}でも同じです。 -% 詳細は、\LaTeXe に付属の\file{usrguide.tex}を参照してください。 % -% 多くのクラスファイルやパッケージファイルはそのまま使えると思います。 -% ただし、それらがp\LaTeXe{}で拡張しているコマンドと同じ名前のコマンドを -% 再定義している場合は、コマンドの拡張の仕方によってはエラーになることも -% あります。用いようとしている、クラスファイルやパッケージファイルが +%\ifJAPANESE +% \section{他のフォーマット・旧バージョンとの互換性} +% \label{platex:compatibility} +% ここでは、この\pLaTeXe{}のバージョンと以前のバージョン、あるいは +% \LaTeXe{}との互換性について説明をしています。 +% +% \subsection{\LaTeXe{}との互換性} +% \pLaTeXe{}は、\LaTeXe{}の上位互換という形を取っていますが、 +% いくつかの命令の定義やパラメータなども変更しています。 +% したがって英文書など、\LaTeXe{}でも処理できるファイルを +% \pLaTeXe{}で処理しても、完全に同じ結果になるとは限りません。 +% +% \LaTeXe{}向けに書かれた多くのクラスファイルやパッケージファイルは、 +% そのまま使えると思います。 +% ただし、それらが\pLaTeXe{}で拡張しているコマンドと同じ名前の +% コマンドを再定義している場合は、 +% その拡張の仕方によってはエラーになることもあります。 +% 用いようとしているクラスファイルやパッケージファイルが % うまく動くかどうかを、完全に確かめる方法は残念ながらありません。 % 一番簡単なのは、動かしてみることです。不幸にもうまく動かない場合は、 % ログファイルや付属の文書ファイルを参考に原因を調べてください。 +%\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 upper 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. +%\fi % +%\ifJAPANESE +% \subsection{\pLaTeX~2.09との互換性} +% \pLaTeXe{}では、文書が使用するクラスを、 +% プリアンブルで|\documentclass|コマンドにより指定します。 +% ここで|\documentclass|の代わりに|\documentstyle|を +% 用いると、\pLaTeXe{}は自動的に\emph{2.09互換モード}に入ります。 +% これは\LaTeXe{}が\LaTeX~2.09互換モードに入るのと同様で、 +% 互換モードは古い文書を組版するためだけに作られています。 +% 新しく文書を作成する場合は、|\documentclass|コマンドを用いてください。 +% +% 互換モードでは(p)\LaTeXe{}の新しい機能を利用できず、 +% また古いネイティブな\pLaTeX~2.09環境と微妙に異なる結果になる +% 可能性もあるという点は、英語版の\LaTeXe{}でも同じです。 +% 詳細は、\LaTeXe に付属の\file{usrguide.tex}を参照してください。 +%\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パッケージへの対応} % \changes{v1.0e}{2016/02/16}{platexreleaseの説明を追加} % \LaTeX\ \texttt{<2015/01/01>}で導入されたlatexreleaseパッケージを -% もとに、新しいp\LaTeX{}ではplatexreleaseパッケージを用意しました。 -% platexreleaseパッケージを用いると、過去のp\LaTeX{}をエミュレート -% したり、フォーマットを作り直すことなく新しいp\LaTeX{}を試したりする +% もとに、新しい\pLaTeX{}ではplatexreleaseパッケージを用意しました。 +% platexreleaseパッケージを用いると、過去の\pLaTeX{}をエミュレート +% したり、フォーマットを作り直すことなく新しい\pLaTeX{}を試したりする % ことができます。詳細はplatexreleaseのドキュメントを参照してください。 +%\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{}プログラムのためのオプション}\label{app:dst} -% この文書のソース(platex.dtx)を\dst{}プログラムによって処理することによって、 +% この文書のソース(\file{platex.dtx})を\dst{}プログラムで +% 処理することによって、 % いくつかの異なるファイルを生成することができます。 -% \dst プログラムの詳細は、\file{docstrip.dtx}を参照してください。 +% \dst{}プログラムの詳細は、\file{docstrip.dtx}を参照してください。 % % この文書の\dst{}プログラムのためのオプションは、次のとおりです。 % @@ -492,16 +875,39 @@ % \begin{tabular}{l|p{.8\linewidth}} % \emph{オプション} & \emph{意味}\\\hline % plcore & フォーマットファイルを作るためのファイルを生成\\ -% pldoc & p\LaTeXe{}のソースファイルをまとめて組版するための -% 文書ファイルを生成\\[2mm] +% pldoc & \pLaTeXe{}のソースファイルをまとめて組版するための +% 文書ファイル(pldoc.tex)を生成\\[2mm] % shprog & 上記のファイルを作成するためのshスクリプトを生成\\ % plprog & 入れ子構造を調べる簡単なperlスクリプトを生成\\ % Xins & 上記のshスクリプトやperlスクリプトを取り出すための -% \dst{}バッチファイルを生成\\ +% \dst{}バッチファイル(Xins.ins)を生成\\ % \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{ファイルの取り出し方} % % たとえば、この文書の``plcore''の部分を``\file{platex.ltx}''という @@ -527,18 +933,57 @@ % \input docstrip.tex % \generateFile{platex.ltx}{t}{\from{platex.dtx}{plcore}} %\end{verbatim} +%\else +% ^^A (- English version omitted, not so useful -) +%\fi % % +%\ifJAPANESE % \section{文書ファイル}\label{app:pldoc} +% \changes{v1.0c}{1997/01/25}{pldoc.dicをfilecontents環境により作成} +% ここでは、このパッケージに含まれているdtxファイルをまとめて組版し、 +% ソースコード説明書を得るための文書ファイル\file{pldoc.tex}について +% 説明をしています。個別に処理した場合と異なり、 +% 変更履歴や索引も付きます。全体で、およそ200ページ程度になります。 +% +% デフォルトではソースコードの説明が日本語で書かれます。 +% もし英語の説明書を読みたい場合は、\par\medskip +% \begin{minipage}{.5\textwidth}\ttfamily +% | |\cs{newif}\cs{ifJAPANESE} +% \end{minipage}\par\medskip\noindent +% という内容の\file{platex.cfg}を予め用意してから\file{pldoc.tex}を +% 処理してください(2016年7月1日以降のコミュニティ版\pLaTeXe{}が必要)。 +%\else +% \section{Documentation of \pLaTeXe\ sources}\label{app:pldoc} % \changes{v1.0c}{1997/01/25}{Add to filecontents environment for pldoc.dic.} -% ここでは、このパッケージに含まれているdtxファイルをまとめて組版をするための -% 文書ファイルについて説明をしています。個別に処理した場合と異なり、 -% 変更履歴や索引も付きます。全体で、およそ150ページ程度になります。 +% 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|環境は、引数に指定されたファイルが存在するときは何も % しませんが、存在しないときは、環境内の内容でファイルを作成します。 % \file{pldoc.dic}ファイルは、mendexプログラムで索引を処理するときに % \cs{西暦}, \cs{和暦}に対する「読み」を付けるために必要です。 +%\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{西暦} and \cs{和暦}). +%\fi % \begin{macrocode} %<*pldoc> \begin{filecontents}{pldoc.dic} @@ -546,16 +991,29 @@ 和暦 われき \end{filecontents} % \end{macrocode} +% +%\ifJAPANESE % 文書クラスには、\file{jltxdoc}クラスを用います。 % \file{plext.dtx}の中でサンプルを組み立てていますので、 % \file{plext}パッケージが必要です。 +%\else +% We use \file{jltxdoc} class; we also require \file{plext} package, +% since \file{plext.dtx} contains several examples of partial +% vertical writing. +%\fi % \begin{macrocode} \documentclass{jltxdoc} \usepackage{plext} \listfiles % \end{macrocode} -% いくつかの\TeX{}プリミティブとコマンドを索引に出力しないようにします。 +%\ifJAPANESE +% いくつかの\TeX{}プリミティブとplain \TeX{}コマンドを +% 索引に出力しないようにします。 +%\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,% @@ -576,21 +1034,45 @@ \DoNotIndex{\newcommand, \renewcommand} % \end{macrocode} -% 索引と変更履歴の見出しに\cs{part}を用いるように設定をします。 +%\ifJAPANESE +% 索引と変更履歴の見出しに|\part|を用いるように設定をします。 +%\else +% Set up the Index and Change History to use |\part|. +%\fi % \begin{macrocode} +\ifJAPANESE \IndexPrologue{\part*{索 引}% \markboth{索 引}{索 引}% \addcontentsline{toc}{part}{索 引}% イタリック体の数字は、その項目が説明されているページを示しています。 下線の引かれた数字は、定義されているページを示しています。 その他の数字は、その項目が使われているページを示しています。} +\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*{変更履歴}% \markboth{変更履歴}{変更履歴}% \addcontentsline{toc}{part}{変更履歴}} +\else +\GlossaryPrologue{\part*{Change History}% + \markboth{Change History}{Change History}% + \addcontentsline{toc}{part}{Change History}} +\fi % \end{macrocode} +%\ifJAPANESE % 標準の|\changes|コマンドを、複数ファイルの文書に合うように修正しています。 +%\else +% Modify the standard |\changes| command slightly, to better cope with +% this multiple file document. +%\fi % \begin{macrocode} \makeatletter \def\changes@#1#2#3{% @@ -608,20 +1090,35 @@ :\levelchar #3}}% \@tempa\endgroup\@esphack} \makeatother +% \end{macrocode} +%\ifJAPANESE +% 変更履歴と2段組の索引を作成します。 +%\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 % ここからが本文ページとなります。 -% \changes{v1.0c}{1997/01/29}{Rename pltpatch to plpatch.} +% \changes{v1.0c}{1997/01/29}{\file{pltpatch.ltx}を\file{plpatch.ltx}に名称変更} % \changes{v1.0h}{2016/05/08}{ドキュメントから\file{plpatch.ltx}を除外} % \changes{v1.0l}{2016/06/19}{パッチレベルを\file{plvers.dtx}から取得} % \changes{v1.0o}{2017/09/24}{パッチレベルが負の数の場合をpre-release扱いへ} +%\else +% Here starts the document body. +% \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} +%\fi % \begin{macrocode} \begin{document} - \title{The p\LaTeXe\ Sources} + \title{The \pLaTeXe\ Sources} \author{Ken Nakano \& Japanese \TeX\ Development Community} % This command will be used to input the patch file @@ -693,15 +1190,25 @@ %\includeltpatch % patch file (comment out May 8, 2016) % \end{macrocode} +%\ifJAPANESE % \file{ltxdoc.cfg}に|\AtEndOfClass{\OnlyDescription}|が指定されている場合は、 % ここで終了します。 +%\else +% Stop here if ltxdoc.cfg says |\AtEndOfClass{\OnlyDescription}|. +%\fi % \begin{macrocode} \StopEventually{\end{document}} % \end{macrocode} +%\ifJAPANESE % 変更履歴と索引を組版します。 % 変更履歴ファイルと索引の作り方の詳細については、 % おまけ\ref{app:shprog}を参照してください。 +%\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} @@ -722,9 +1229,14 @@ \PrintIndex \endgroup % \end{macrocode} -% \file{ltxdoc.cfg}に2度目の|\PrintIndex|が指定されているかもしれません。 -% そこで、最後に、変更履歴や索引が2度組版されないように|\PrintChanges|および +%\ifJAPANESE +% \file{ltxdoc.cfg}に2度目の|\PrintIndex|が指定されているかもしれません。 +% そこで、最後に、変更履歴や索引が2度組版されないように|\PrintChanges|および % |\PrintIndex|コマンドを何も実行しないようにします。 +%\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 @@ -734,39 +1246,66 @@ % % % +%\ifJAPANESE % \section{おまけプログラム}\label{app:omake} % % \subsection{シェルスクリプト\file{mkpldoc.sh}}\label{app:shprog} -% p\LaTeXe{}のマクロ定義ファイルをまとめて組版するときに便利なシェルスクリプトです。 +% \pLaTeXe{}のマクロ定義ファイルをまとめて組版し、変更履歴と索引も +% 付けるときに便利なシェルスクリプトです。 % このシェルスクリプト\footnote{このシェルスクリプトはUNIX用です。 % しかしrmコマンドをdeleteコマンドにするなどすれば、簡単にDOSなどのバッチ % ファイルに修正することができます。}の使用方法は次のとおりです。 %\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}の内容} % まず、以前に\file{pldoc.tex}を処理したときに作成された、 % 目次ファイルや索引ファイルなどを削除します。 +% \changes{v1.0c}{1997/01/23}{gind.istとgglo.istを +% \$TEXMF/tex/latex2e/baseディレクトリからコピーしないようにした} +% \changes{v1.0d}{2016/01/27}{rmコマンド実行前に存在確認するようにした} +%\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}{\file{mkpldoc.sh}を改善} +% \changes{v1.0d}{2016/01/27}{Add -e test before rm command} +%\fi % \begin{macrocode} %<*shprog> for f in pldoc.toc pldoc.idx pldoc.glo ; do if [ -e $f ]; then rm $f; fi done % \end{macrocode} +%\ifJAPANESE % そして、\file{ltxdoc.cfg}を空にします。 % このファイルは、\file{jltxdoc.cls}の定義を変更するものですが、 % ここでは、変更されたくありません。 +%\else +% First run: empty the config file \file{ltxdoc.cfg}. +%\fi % \begin{macrocode} echo "" > ltxdoc.cfg % \end{macrocode} +%\ifJAPANESE % そして、\file{pldoc.tex}を処理します。 +%\else +% Now process \file{pldoc.tex}. +%\fi % \begin{macrocode} platex pldoc.tex % \end{macrocode} +%\ifJAPANESE % 索引と変更履歴を作成します。 % このスクリプトでは、変更履歴や索引を生成するのにmendexプログラムを用いて % います。mendexはmakeindexの上位互換のファイル整形コマンドで、 @@ -780,10 +1319,25 @@ platex pldoc.tex % % |-f|は、項目に``読み''がなくてもエラーとしないオプションです。 % makeindexコマンドには、このオプションがありません。 +%\else +% Make the Change log and Glossary (Change History) using mendex. +% `Mendex' is a Japanese index processor, which is mostly upper +% 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} mendex -s gind.ist -d pldoc.dic -o pldoc.ind pldoc.idx mendex -f -s gglo.ist -o pldoc.gls pldoc.glo % \end{macrocode} +%\ifJAPANESE % \file{ltxdoc.cfg}の内容を|\includeonly{}|にし、\file{pldoc.tex}を処理します。 % このコマンドは、引数に指定されたファイルだけを``|\include|''するための % コマンドですが、ここでは何も|\include|したく\emph{ない}ので、 @@ -791,13 +1345,23 @@ mendex -f -s gglo.ist -o pldoc.gls pldoc.glo % しかし、|\input|で指定されているファイルは読み込まれます。 % したがって、目次や索引や変更履歴のファイルが処理されます。 % この処理は、主に、これらでエラーが出るかどうかの確認です。 +%\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 platex pldoc.tex % \end{macrocode} +%\ifJAPANESE % 最後に、再び\file{ltxdoc.cfg}を空にして、\file{pldoc.tex}を処理をします。 -% 本文を1ページから開始していますので、この後、もう一度処理をする +% 本文を1ページから開始していますので、この後、もう一度処理をする % 必要はありません。 +%\else +% Third and final run: restore the cfg file to put +% everything together. +%\fi % \begin{macrocode} echo "" > ltxdoc.cfg platex pldoc.tex @@ -806,7 +1370,8 @@ platex pldoc.tex % \end{macrocode} % % -% \subsection{perlスクリプト\file{dstcheck.pl}}\label{app:plprog} +%\ifJAPANESE +% \subsection{Perlスクリプト\file{dstcheck.pl}}\label{app:plprog} % \dst{}文書ファイルは、\LaTeX{}のソースとその文書を同時に管理する方法として、 % とてもすぐれていると思います。しかし、たとえば\file{jclasses.dtx}のように、 % 条件が多くなると、入れ子構造がわからなくなってしまいがちです。 @@ -817,20 +1382,33 @@ platex pldoc.tex % perlスクリプトについて説明をしています。 % % このperlスクリプトの使用方法は次のとおりです。 +%\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 +% perl dstcheck.pl %\end{verbatim} % +%\ifJAPANESE +%\else +% The description of this script itself is available only in Japanese. +%\fi +% +%\ifJAPANESE % \subsubsection{\file{dstcheck.pl}の内容} % 最初に、このperlスクリプトが何をするのかを簡単に記述したコメントを % 付けます。 +%\fi % \begin{macrocode} %<*plprog> ## ## DOCSTRIP 文書内の環境や条件の入れ子を調べる perl スクリプト ## % \end{macrocode} +%\ifJAPANESE % このスクリプトは、入れ子の対応を調べるために、次のスタックを用います。 % \meta{条件}あるいは\meta{環境}を開始するコードが現れたときに、 % それらはスタックにプッシュされ、終了するコードでポップされます。 @@ -847,34 +1425,43 @@ platex pldoc.tex % 先頭を明示的に示すために、ダミーの値を初期値として用います。 % スタックは、\meta{条件}あるいは\meta{環境}の名前と、その行番号をペアにして % 操作をします。 +%\fi % \begin{macrocode} push(@dst,"DUMMY"); push(@dst,"000"); push(@env,"DUMMY"); push(@env,"000"); % \end{macrocode} +%\ifJAPANESE % この|while|ループの中のスクリプトは、文書ファイルの1行ごとに実行をします。 +%\fi % \begin{macrocode} while (<>) { % \end{macrocode} +%\ifJAPANESE % 入力行が条件を開始する行なのかを調べます。 % 条件の開始行ならば、|@dst|スタックに\meta{条件}と行番号をプッシュします。 +%\fi % \begin{macrocode} if (/^%<\*([^>]+)>/) { # check conditions push(@dst,$1); push(@dst,$.); % \end{macrocode} +%\ifJAPANESE % そうでなければ、条件の終了行なのかを調べます。 % 現在行が条件の終了を示している場合は、|@dst|スタックをポップします。 +%\fi % \begin{macrocode} } elsif (/^%<\/([^>]+)>/) { $linenum = pop(@dst); $conditions = pop(@dst); % \end{macrocode} +%\ifJAPANESE % 現在行の\meta{条件}と、スタックから取り出した\meta{条件}が一致しない場合、 % その旨のメッセージを出力します。 % % なお、|DUMMY|と一致した場合は、一番外側のループが合っていないと % いうことを示しています。このとき、これらのダミー値をスタックに戻します。 % いつでもスタックの先頭をダミー値にするためです。 +%\fi % \begin{macrocode} if ($1 ne $conditions) { if ($conditions eq "DUMMY") { @@ -888,9 +1475,11 @@ while (<>) { } } % \end{macrocode} +%\ifJAPANESE % 環境の入れ子も条件と同じように調べます。 % % verbatim環境のときに、その内側をスキップしていることに注意をしてください。 +%\fi % \begin{macrocode} if (/^% *\\begin\{verbatim\}/) { # check environments while(<>) { @@ -917,15 +1506,19 @@ while (<>) { } } % \end{macrocode} +%\ifJAPANESE % ここまでが、最初の|while|ループです。 +%\fi % \begin{macrocode} } % \end{macrocode} +%\ifJAPANESE % 文書ファイルを読み込んだ後、終了していない条件があるかどうかを確認します。 % すべての条件の対応がとれていれば、この時点での|@dst|スタックには % ダミー値しか入っていません。したがって、対応が取れている場合は、 % 最初の2つのポップによって、ダミー値が設定されます。 % ダミー値でなければ、ダミー値になるまで、取り出した値を出力します。 +%\fi % \begin{macrocode} $linenum = pop(@dst); $conditions = pop(@dst); @@ -935,7 +1528,9 @@ while ($conditions ne "DUMMY") { $conditions = pop(@dst); } % \end{macrocode} +%\ifJAPANESE % 環境の入れ子についても、条件の入れ子と同様に確認をします。 +%\fi % \begin{macrocode} $linenum = pop(@env); $environment = pop(@env); @@ -948,44 +1543,64 @@ exit; % % \end{macrocode} % +%\ifJAPANESE % \subsection{\dst{}バッチファイル} -% \changes{v1.0b}{1996/02/01}{\dst{}にともなう変更} +% \changes{v1.0b}{1996/02/01}{\file{omake-sh.ins}, \file{omake-pl.ins}を +% \dst{}の変更にともなう変更をした} % \changes{v1.0c}{1997/01/23}{\dst{}にともなう変更} % ここでは、付録\ref{app:shprog}と付録\ref{app:plprog}で説明をした二つの % スクリプトを、このファイルから取り出すための\dst{}バッチファイルについて % 説明をしています。 +%\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 % まず、\dst{}パッケージをロードします。 % また、実行経過のメッセージを出力しないようにしています。 +%\fi % \begin{macrocode} %<*Xins> \input docstrip \keepsilent % \end{macrocode} +%\ifJAPANESE % \dst{}プログラムは、連続する二つのパーセント記号(\%\%)ではじまる行を % メタコメントとみなし、条件によらず出力をします。 % しかし、``\%''は\TeX{}ではコメントであっても、shやperlにとってはコメント % ではありません。そこで、メタコメントとして出力する文字を``\#\#''と % 変更します。 +%\fi % \begin{macrocode} {\catcode`#=12 \gdef\MetaPrefix{## }} % \end{macrocode} +%\ifJAPANESE % そして、プリアンブルに出力されるメッセージを宣言します。 % ここでは、とくに何も指定していませんが、宣言をしないとデフォルトの記述が % `\%\%'付きで出力されてしまうため、それを抑制する目的で使用しています。 +%\fi % \begin{macrocode} \declarepreamble\thispre \endpreamble \usepreamble\thispre % \end{macrocode} +%\ifJAPANESE % ポストアンブルも同様に、宣言をしないと`|\endinput|'が出力されます。 +%\fi % \begin{macrocode} \declarepostamble\thispost \endpostamble \usepostamble\thispost % \end{macrocode} +%\ifJAPANESE % |\generate|コマンドで、どのファイルに、どのファイルのどの部分を出力するのか % を指定します。 +%\fi % \begin{macrocode} \generate{ \file{dstcheck.pl}{\from{platex.dtx}{plprog}} @@ -996,23 +1611,40 @@ exit; % \end{macrocode} % % \newpage -% \begin{thebibliography}{1} -% \bibitem{tex-book} -% Donald~E. Knuth. -% \newblock ``{\em The \TeX book}''. -% \newblock Addison-Wesley, 1984. -% \newblock (邦訳:斎藤信男監修, 鷺谷好輝訳, -% \TeX ブック 改訂新版, アスキー出版局, 1989) +% \begin{thebibliography}{99} +% \bibitem{platex2e-book} +% 中野 賢 +% \newblock 『日本語\LaTeXe ブック』 +% \newblock アスキー, 1996. % % \bibitem{tate-book} % インプレス・ラボ監修, アスキー書籍編集部編 % \newblock 『縦組対応 パーソナル日本語\TeX{}』 % \newblock アスキー出版局, 1994 % -% \bibitem{latex-comp} -% Michel Goossens, Frank Mittelbach, Alexander Samarin. -% \newblock ``{\em The {\LaTeX} Companion}''. -% \newblock Addison-Wesley, 1994. +% \bibitem{jtex-tech} +% アスキー出版技術部責任編集 +% \newblock 『日本語\TeX テクニカルブックI』 +% \newblock アスキー, 1990. +% +% \bibitem{ajt2008okumura} +% Haruhiko Okumura, +% \newblock \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 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 (邦訳:斎藤信男監修, 鷺谷好輝訳, +% \TeX ブック 改訂新版, アスキー出版局, 1989) % % \bibitem{latex-book2} % Laslie Lamport. @@ -1026,19 +1658,14 @@ exit; % \newblock (邦訳:倉沢良一監修, 大野俊治・小暮博通・藤浦はる美訳, % 文書処理システム \LaTeX, アスキー, 1990) % -% \bibitem{jtex-tech} -% アスキー出版技術部責任編集 -% \newblock 『日本語\TeX テクニカルブックI』 -% \newblock アスキー, 1990. -% -% \bibitem{platex2e-book} -% 中野 賢 -% \newblock 『日本語\LaTeXe ブック』 -% \newblock アスキー, 1996. +% \bibitem{latex-comp} +% Michel Goossens, Frank Mittelbach, Alexander Samarin. +% \newblock ``{\em The {\LaTeX} Companion}''. +% \newblock Addison-Wesley, 1994. % % \bibitem{perl} -% 河野真治著 -% \newblock 『入門perl』 +% 河野 真治 +% \newblock 『入門Perl』 % \newblock アスキー出版局, 1994 % \end{thebibliography} % diff --git a/Master/texmf-dist/source/platex/base/platexrelease.dtx b/Master/texmf-dist/source/platex/base/platexrelease.dtx index 7fefa85b723..caccf3c2b3d 100644 --- a/Master/texmf-dist/source/platex/base/platexrelease.dtx +++ b/Master/texmf-dist/source/platex/base/platexrelease.dtx @@ -21,6 +21,7 @@ % なく\cs{platexreleaseversion}を使用(\LaTeXe\ r1207)} % \changes{v1.0g}{2016/09/08}{p\LaTeX\ \texttt{!<2016/09/03!>}版に警告} % \changes{v1.0h}{2017/09/26}{p\LaTeX\ \texttt{!<2017/07/29!>}版に警告} +% \changes{v1.0i}{2017/12/06}{タイポ修正} % \fi % % \iffalse @@ -29,7 +30,7 @@ \ProvidesFile{platexrelease.dtx} % %\ProvidesPackage{platexrelease} - [2017/09/26 v1.0h latexrelease support for pLaTeX Kernel] + [2017/12/06 v1.0i latexrelease support for pLaTeX Kernel] %<*driver> \documentclass{jltxdoc} \GetFileInfo{platexrelease.dtx} @@ -298,10 +299,11 @@ of this package available from CTAN} % \changes{v1.0e}{2016/06/30}{p\LaTeX\ \texttt{!<2016/06/10!>}版に警告} % \changes{v1.0g}{2016/09/08}{p\LaTeX\ \texttt{!<2016/09/03!>}版に警告} % \changes{v1.0h}{2017/09/26}{p\LaTeX\ \texttt{!<2017/07/29!>}版に警告} +% \changes{v1.0i}{2017/12/06}{タイポ修正} % \begin{macrocode} \plIncludeInRelease{2017/09/26}{\PackageWarning}{pLaTeX Info}% \plEndIncludeInRelease -\plIncludeInRelease{2016/07/29}{\PackageWarning}{pLaTeX Info}% +\plIncludeInRelease{2017/07/29}{\PackageWarning}{pLaTeX Info}% \PackageWarningNoLine{platexrelease}{% You selected pLaTeX2e <\pfmtversion>, but\MessageBreak this version of pLaTeX2e is known to have\MessageBreak diff --git a/Master/texmf-dist/source/platex/base/plcore.dtx b/Master/texmf-dist/source/platex/base/plcore.dtx index e81ad2c6726..24505c96e96 100644 --- a/Master/texmf-dist/source/platex/base/plcore.dtx +++ b/Master/texmf-dist/source/platex/base/plcore.dtx @@ -128,7 +128,7 @@ % % \subsection{プリアンブルコマンド} % 文書ファイルが必要とするフォーマットファイルの指定をするコマンドを -% 拡張子、p\LaTeXe{}フォーマットファイルも認識するようにします。 +% 拡張し、p\LaTeXe{}フォーマットファイルも認識するようにします。 % % \begin{macro}{\NeedsTeXFormat} % \begin{macro}{\@needsPformat} @@ -743,7 +743,7 @@ % デフォルトでは何も出力しません。 % |\@bannerfont|フォントは、その文字列を出力するためのフォントです。 % 9ポイントのタイプライタ体としています。 -% \changes{v1.1f}{1996/09/03}{Add \cs{@bannerbox}.} +% \changes{v1.1f}{1996/09/03}{Add \cs{@bannertoken}.} % \begin{macrocode} \font\@bannerfont=cmtt9 \newtoks\@bannertoken @@ -1867,7 +1867,8 @@ % ^^A なお、p\TeX{}-ngはe-p\TeX{}と同様にpdf\TeX{}拡張の % ^^A 一部(e-p\TeX{}と範囲が一致しない)を持っていること、 % ^^A また|\lastnodechar|などのe-p\TeX{}独自のプリミティブを -% ^^A 持っていないことにも注意。 +% ^^A 持っていないことにも注意…だったが、2017/09/06付で +% ^^A p\TeX{}-ngにも|\lastnodechar|が追加された。 % \begin{macrocode} \mathchardef\e@alloc@top=32767 \let\e@alloc@chardef\mathchardef diff --git a/Master/texmf-dist/source/platex/base/plfonts.dtx b/Master/texmf-dist/source/platex/base/plfonts.dtx index 47f216fd2fa..b603356b19c 100644 --- a/Master/texmf-dist/source/platex/base/plfonts.dtx +++ b/Master/texmf-dist/source/platex/base/plfonts.dtx @@ -69,13 +69,17 @@ % \changes{v1.6i}{2017/09/24}{2010年のp\TeX{}本体の修正により、v1.3iで入れた % 対処が不要になっていたので削除} % \changes{v1.6i}{2017/09/24}{\cs{<}が段落頭でも効くようにした} +% \changes{v1.6j}{2017/11/06}{\cs{cy@encoding}と\cs{ct@encoding}を +% 具体的な値ではなく「空」で初期化} +% \changes{v1.6j}{2017/11/06}{縦横のエンコーディングのセット化を +% plcoreからpldefsへ移動} % \fi % % \iffalse %<*driver> \NeedsTeXFormat{pLaTeX2e} % \fi -\ProvidesFile{plfonts.dtx}[2017/09/24 v1.6i pLaTeX New Font Selection Scheme] +\ProvidesFile{plfonts.dtx}[2017/11/06 v1.6j pLaTeX New Font Selection Scheme] % \iffalse \documentclass{jltxdoc} \GetFileInfo{plfonts.dtx} @@ -166,12 +170,21 @@ % |\ck@encoding|は、最後に選択された和文エンコード名を示しています。 % |\cy@encoding|と|\ct@encoding|はそれぞれ、最後に選択された、 % 横組用と縦組用の和文エンコード名を示しています。 +% +% ここでは単に「空」に初期化するだけにしています。 +% \iffalse +% アスキー版はJY1やJT1という具体的な値で初期化していたが、これらの値は +% \file{pldefs.ltx}で定義するものであるから、\file{plcore.ltx}で +% それを使うのはおかしい。 +% \fi +% \changes{v1.6j}{2017/11/06}{\cs{cy@encoding}と\cs{ct@encoding}を +% 具体的な値ではなく「空」で初期化} % \begin{macrocode} %<*plcore> \let\k@encoding\@empty \let\ck@encoding\@empty -\def\cy@encoding{JY1} -\def\ct@encoding{JT1} +\let\cy@encoding\@empty +\let\ct@encoding\@empty % \end{macrocode} % \end{macro} % \end{macro} @@ -722,6 +735,16 @@ % \end{macro} % % +% \begin{macro}{\KanjiEncodingPair} +% 和文の縦横のエンコーディングはそれぞれ対にして扱うため、セット化するための +% コマンドを定義します。 +% \changes{v1.3n}{2004/08/10}{和文エンコーディングの切り替えを有効化} +% \begin{macrocode} +\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\DeclareFontFamily} % 欧文ファミリを宣言するためのコマンドです。 % |\ffam@list|を作るように再定義をします。 @@ -1155,17 +1178,6 @@ % \end{macrocode} % \end{macro} % -% -% \begin{macro}{\KanjiEncodingPair} -% 和文の縦横のエンコーディングはそれぞれ対にして扱うため、セット化します -% \changes{v1.3n}{2004/08/10}{和文エンコーディングの切り替えを有効化} -% \begin{macrocode} -\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} -\KanjiEncodingPair{JY1}{JT1} -% \end{macrocode} -% \end{macro} -% -% % \begin{macro}{\set@fontsize} % |\fontsize|コマンドの内部形式です。 % ベースラインの設定と、支柱の設定を行ないます。 @@ -1797,7 +1809,6 @@ % \iftdir\raise-\tbaselineshift\fi % \vbox{\hrule\@width.3em}} %\plEndIncludeInRelease -%<*plcore> % \end{macrocode} % \end{macro} % @@ -1812,7 +1823,6 @@ % $-1$が返ります。 % \changes{v1.6c}{2016/06/06}{マクロ追加} % \begin{macrocode} -% %\plIncludeInRelease{2016/06/10}{\g@tlastchart@} % {Added \g@tlastchart@}% %<*plcore|platexrelease> @@ -1992,46 +2002,10 @@ % \fi % #1} %\plEndIncludeInRelease -%<*plcore> % \end{macrocode} % \end{macro} % % -% \subsection{デフォルト設定ファイルの読み込み} -% 最後に、デフォルト設定ファイルである、\file{pldefs.ltx}を読み込みます。 -% このファイルについての詳細は、第\ref{plfonts:pldefs}節を参照してください。 -% \TeX{}の入力ファイル検索パスに設定されているディレクトリに\file{pldefs.cfg}% -% ファイルがある場合は、そのファイルを使います。 -% \begin{macrocode} -\InputIfFileExists{pldefs.cfg} - {\typeout{*************************************^^J% - * Local config file pldefs.cfg used^^J% - *************************************}}% - {\input{pldefs.ltx}} -% -% \end{macrocode} -% -% -% -% -% \section{デフォルト設定ファイル}\label{plfonts:pldefs} -% ここでは、フォーマットファイルに読み込まれるデフォルト値を設定しています。 -% この節での内容は\file{pldefs.ltx}に出力されます。 -% このファイルの内容を\file{plcore.ltx}に含めてもよいのですが、 -% デフォルトの設定を参照しやすいように、別ファイルにしてあります。 -% \file{pldefs.ltx}は\file{plcore.ltx}から読み込まれます。 -% -% プリロードサイズは、\dst{}プログラムのオプションで変更することができます。 -% これ以外の設定を変更したい場合は、\file{pldefs.ltx}を -% 直接、修正するのではなく、このファイルを\file{pldefs.cfg}という名前で -% コピーをして、そのファイルに対して修正を加えるようにしてください。 -% \begin{macrocode} -%<*pldefs> -\ProvidesFile{pldefs.ltx} - [2017/08/05 v1.6h pLaTeX Kernel (Default settings)] -% -% \end{macrocode} -% % \subsection{イタリック補正と\cs{xkanjiskip}} % % \begin{macro}{\check@nocorr@} @@ -2111,6 +2085,42 @@ % \end{macro} % % +% \subsection{デフォルト設定ファイルの読み込み} +% 最後に、デフォルト設定ファイルである、\file{pldefs.ltx}を読み込みます。 +% このファイルについての詳細は、第\ref{plfonts:pldefs}節を参照してください。 +% \TeX{}の入力ファイル検索パスに設定されているディレクトリに\file{pldefs.cfg}% +% ファイルがある場合は、そのファイルを使います。 +% \begin{macrocode} +%<*plcore> +\InputIfFileExists{pldefs.cfg} + {\typeout{*************************************^^J% + * Local config file pldefs.cfg used^^J% + *************************************}}% + {\input{pldefs.ltx}} +% +% \end{macrocode} +% +% +% +% +% \section{デフォルト設定ファイル}\label{plfonts:pldefs} +% ここでは、フォーマットファイルに読み込まれるデフォルト値を設定しています。 +% この節での内容は\file{pldefs.ltx}に出力されます。 +% このファイルの内容を\file{plcore.ltx}に含めてもよいのですが、 +% デフォルトの設定を参照しやすいように、別ファイルにしてあります。 +% \file{pldefs.ltx}は\file{plcore.ltx}から読み込まれます。 +% +% プリロードサイズは、\dst{}プログラムのオプションで変更することができます。 +% これ以外の設定を変更したい場合は、\file{pldefs.ltx}を +% 直接、修正するのではなく、このファイルを\file{pldefs.cfg}という名前で +% コピーをして、そのファイルに対して修正を加えるようにしてください。 +% \begin{macrocode} +%<*pldefs> +\ProvidesFile{pldefs.ltx} + [2017/11/06 v1.6j pLaTeX Kernel (Default settings)] +% +% \end{macrocode} +% % \subsection{テキストフォント} % テキストフォントのための属性やエラー書体などの宣言です。 % @@ -2131,6 +2141,12 @@ \DeclareTateKanjiEncoding{JT1}{}{} \DeclareKanjiSubstitution{JT1}{mc}{m}{n} % \end{macrocode} +% 縦横のエンコーディングのセット化: +% \changes{v1.6j}{2017/11/06}{縦横のエンコーディングのセット化を +% plcoreからpldefsへ移動} +% \begin{macrocode} +\KanjiEncodingPair{JY1}{JT1} +% \end{macrocode} % フォント属性のデフォルト値: % \begin{macrocode} \newcommand\mcdefault{mc} diff --git a/Master/texmf-dist/source/platex/base/plvers.dtx b/Master/texmf-dist/source/platex/base/plvers.dtx index e24beeeba1b..0623fb07de2 100644 --- a/Master/texmf-dist/source/platex/base/plvers.dtx +++ b/Master/texmf-dist/source/platex/base/plvers.dtx @@ -57,12 +57,18 @@ % (sync with ltfinal 2017/03/09 v2.0t)} % \changes{v1.1c}{2017/04/23}{\LaTeX\ \texttt{!<2017/04/15!>}版対応確認} % \changes{v1.1d}{2017/09/24}{パッチレベルが負の数の場合をpre-release扱いへ} +% \changes{v1.1e}{2017/11/09}{\file{latexrelease}と +% \cs{platexrelease}のエミュレート内部処理を分離} +% \changes{v1.1f}{2017/11/11}{\LaTeX{}のバナーを保存するコードを +% \file{platex.ltx}から\file{plcore.ltx}へ移動} +% \changes{v1.1g}{2017/12/04}{\pLaTeX{}のバナーの定義時に +% \cs{pfmtname}, \cs{pfmtversion}, \cs{ppatch@level}を展開しないように} % \fi % % \iffalse %<*driver> % \fi -\ProvidesFile{plvers.dtx}[2017/09/24 v1.1d pLaTeX Kernel (Version Info)] +\ProvidesFile{plvers.dtx}[2017/12/04 v1.1g pLaTeX Kernel (Version Info)] % \iffalse \documentclass{jltxdoc} \GetFileInfo{plvers.dtx} @@ -76,10 +82,9 @@ % % \fi % -% \section{バージョンの設定} +% \section{p\LaTeXe{}のバージョンの設定} % まず、このディストリビューションでのp\LaTeXe{}の日付とバージョン番号 -% を定義します。また、p\LaTeXe{}が起動されたときに表示される文字列の -% 設定もします。 +% を定義します。 % % \changes{v1.0}{1995/05/16}{p\LaTeXe\ 用に\file{ltvers.dtx}を修正} % \changes{v1.0a}{1995/08/30}{\LaTeX\ \texttt{!<1995/06/01!>}版用に修正} @@ -131,13 +136,60 @@ {2017/10/28} % %<*plcore> -\def\ppatch@level{2} +\def\ppatch@level{3} % % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % +% \subsection{\LaTeXe{}のバージョンの取得} +% このファイルの直前で\LaTeXe{}の\file{latex.ltx}が読み込まれているはず +% なので、その起動時のバナーを保存します。 +% +% 2016/05/07の実装では、\file{platex.ltx}のなかで +%\begin{verbatim} +% \edef\platexBANNER{\the\everyjob} +%\end{verbatim} +% としてバナーを保存し、この内容が +%\begin{verbatim} +% \typeout{LaTeX2e version}\typeout{Babel version} +%\end{verbatim} +% という4つのトークンから成ると仮定して、\file{plcore.ltx}のなかで +%\begin{verbatim} +% \def\parse@@BANNER#1#2#3#4{#2} +%\end{verbatim} +% のようにパースしていました。ところが、この「4つのトークンから成る」と +% いう仮定はBabel由来の\file{hyphen.cfg}を使用した場合のみ成り立ち、 +% それ以外の特別な\file{hyphen.cfg}や\file{hyphen.ltx}を使用した場合に +% エラーになってしまいます。 +% そこで、新たに2016/09/14の実装では、\file{platex.ltx}のなかで +%\begin{verbatim} +% \edef\platexBANNER{\the\everyjob\noexpand\typeout{}\relax} +%\end{verbatim} +% としてダミーを追加します(|\relax|はただの区切りトークンの役割)。 +% こうすると、|\platexBANNER|の内容は、Babelの\file{hyphen.cfg}のとき +%\begin{verbatim} +% \typeout{LaTeX2e version}\typeout{Babel version}\typeout{}\relax +%\end{verbatim} +% となり、それ以外のとき +%\begin{verbatim} +% \typeout{LaTeX2e version}\typeout{}\relax +%\end{verbatim} +% となるはずです。このように、少なくとも|\typeout|が2回含まれています +% ので、\file{plcore.ltx}のなかで +%\begin{verbatim} +% \def\parse@@BANNER\typeout#1\typeout#2#3\relax{#1} +%\end{verbatim} +% とパースすることができるようになります。 +% \changes{v1.1f}{2017/11/11}{\LaTeX{}のバナーを保存するコードを +% \file{platex.ltx}から\file{plcore.ltx}へ移動} +% \begin{macrocode} +%<*plcore> +\edef\platexBANNER{\the\everyjob\noexpand\typeout{}\relax}% save LaTeX banner +% +% \end{macrocode} +% % \subsection{パッチファイルのロード} % % 次の部分は、p\LaTeXe{}のパッチファイルをロードするためのコードです。 @@ -184,18 +236,16 @@ % \subsection{起動時に表示するバナー} % % \begin{macro}{\everyjob} -% 起動時に表示される文字列です。 -% \LaTeX{}にパッチがあてられている場合は、それも表示します。 -% -%\iffalse -% この実装については\file{platex.dtx}のコメントを参照。(2016/09/14) -%\fi +% p\LaTeXe{}が起動されたときに表示される文字列です。 +% \LaTeXe{}のバージョンも併せて表示します。 % % \changes{v1.0v}{2016/05/07}{起動時の文字列を最新の\LaTeX{}に合わせた。} % \changes{v1.0w}{2016/05/12}{起動時の文字列に入れる\LaTeX{}のバージョンを % 元の\LaTeX{}のバナーから引き継ぐように改良} % \changes{v1.1}{2016/09/14}{起動時のバナーを取得するコードを改良} % \changes{v1.1d}{2017/09/24}{パッチレベルが負の数の場合をpre-release扱いへ} +% \changes{v1.1g}{2017/12/04}{\pLaTeX{}のバナーの定義時に +% \cs{pfmtname}, \cs{pfmtversion}, \cs{ppatch@level}を展開しないように} % \begin{macrocode} \ifx\patch@level\@undefined % fallback if undefined in LaTeX \def\patch@level{0}\fi @@ -203,23 +253,19 @@ \def\ppatch@level{0}\fi \begingroup \def\parse@@BANNER\typeout#1\typeout#2#3\relax{#1} - \edef\platexTMP{% - \ifnum\ppatch@level=0 - \everyjob{\noexpand\typeout{% - \pfmtname\space<\pfmtversion>\space - (based on \expandafter\parse@@BANNER\platexBANNER)}}% - \else\ifnum\ppatch@level>0 - \everyjob{\noexpand\typeout{% - \pfmtname\space<\pfmtversion>+\ppatch@level\space - (based on \expandafter\parse@@BANNER\platexBANNER)}}% - \else - \everyjob{\noexpand\typeout{% - \pfmtname\space<\pfmtversion>-pre\ppatch@level\space - (based on \expandafter\parse@@BANNER\platexBANNER)}}% - \fi\fi - } -\expandafter -\endgroup \platexTMP + \toks0=\expandafter\expandafter\expandafter{% + \expandafter\parse@@BANNER\platexBANNER} + \ifnum\ppatch@level=0 + \toks2={\pfmtname\space<\pfmtversion>\space}% + \else\ifnum\ppatch@level>0 + \toks2={\pfmtname\space<\pfmtversion>+\ppatch@level\space}% + \else + \toks2={\pfmtname\space<\pfmtversion>-pre\ppatch@level\space}% + \fi\fi + \edef\platexBANNER{\the\toks2 (based on \the\toks0)} + \global\everyjob\expandafter{% + \expandafter\typeout\expandafter{\platexBANNER}}% +\endgroup % \end{macrocode} % % p\LaTeX{}は、独自のハイフネーション・パターンを定義していません。 @@ -227,26 +273,17 @@ % Babelパッケージのものが適用されるはずですから、起動時の文字列にも % \file{hyphen.cfg}のバージョンを反映します(Babelパッケージの % \file{hyphen.cfg}でない場合は、何も表示されず空行になるはずです)。 -% -%\iffalse -% この実装については\file{platex.dtx}のコメントを参照。(2016/09/14) -%\fi -% % \changes{v1.0w}{2016/05/12}{起動時の文字列に入れるBabelのバージョンを % 元の\LaTeX{}のバナーから取得するコードを\file{platex.ini}から取り入れた} % \begin{macrocode} \begingroup \def\parse@@BANNER\typeout#1\typeout#2#3\relax{#2} - \edef\platexTMP{% - \the\everyjob\noexpand\typeout{\expandafter\parse@@BANNER\platexBANNER}% - } - \everyjob=\expandafter{\platexTMP}% - \edef\platexTMP{% - \noexpand\let\noexpand\platexBANNER=\noexpand\@undefined - \noexpand\everyjob={\the\everyjob}% - } - \expandafter -\endgroup \platexTMP + \toks0=\expandafter\expandafter\expandafter{% + \expandafter\parse@@BANNER\platexBANNER} + \edef\platexBANNER{\the\everyjob \noexpand\typeout{\the\toks0}} + \global\everyjob\expandafter{\platexBANNER}% +\endgroup +\let\platexBANNER=\@undefined % % \end{macrocode} % \end{macro} @@ -297,6 +334,8 @@ % \begin{macro}{\plIncludeInRelease} % \changes{v1.0t}{2016/02/03}{\cs{plIncludeInRelease}と % \cs{plEndIncludeInRelease}を新設。} +% \changes{v1.1e}{2017/11/09}{\file{latexrelease}と +% \cs{platexrelease}のエミュレート内部処理を分離} % \begin{macrocode} %<*plcore|platexrelease> \def\plIncludeInRelease#1{\kernel@ifnextchar[% @@ -311,14 +350,14 @@ % \begin{macrocode} \def\@plIncludeInRele@se#1#2#3{% \toks@{[#1] #3}% - \expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax + \expandafter\ifx\csname\string#2+\@currname+plIIR\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 + \expandafter\let\csname\string#2+\@currname+plIIR\endcsname\@empty \fi \else \GenericInfo{}{Already applied: \the\toks@}% diff --git a/Master/texmf-dist/tex/platex/base/ascmac.sty b/Master/texmf-dist/tex/platex/base/ascmac.sty index 5ee8fa6a08b..c7d11fa8cc2 100644 --- a/Master/texmf-dist/tex/platex/base/ascmac.sty +++ b/Master/texmf-dist/tex/platex/base/ascmac.sty @@ -16,7 +16,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ascmac} - [2017/07/22 v2.0d + [2017/12/06 v2.0e ascmac wrapper (community edition) ] \RequirePackage{tascmac} diff --git a/Master/texmf-dist/tex/platex/base/exppl2e.sty b/Master/texmf-dist/tex/platex/base/exppl2e.sty index 19cbf76d981..3365ad72fc3 100644 --- a/Master/texmf-dist/tex/platex/base/exppl2e.sty +++ b/Master/texmf-dist/tex/platex/base/exppl2e.sty @@ -34,7 +34,7 @@ % case 1: This file must be a normal package \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{exppl2e} - [2017/10/26 v1.0q Experimental pLaTeX2e features] + [2017/12/06 v1.0r Experimental pLaTeX2e features] \PackageWarningNoLine{exppl2e}{% This is the unstable, experimental part of pLaTeX2e.\MessageBreak This package may contain:\MessageBreak @@ -393,76 +393,13 @@ % % \section{tabbing環境の行冒頭のJFMグル―} % -% \begin{macro}{\@startline} -% tabbing環境の行で、中身が始め括弧類などで始まる場合、 -% 最初の項目だけJFMグルーが消えない現象に対処します。 -% \changes{v1.2s}{2017/09/27}{tabbing環境の行冒頭のJFMグル―を削除} -% \begin{macrocode} -%\plIncludeInRelease{2017/10/28}{\@startline} -% {Inhibit JFM glue at the beginning}% -%<*plcore|platexrelease> -\gdef\@startline{% - \ifnum \@nxttabmar >\@hightab - \@badtab - \global\@nxttabmar \@hightab - \fi - \global\@curtabmar \@nxttabmar - \global\@curtab \@curtabmar - \global\setbox\@curline \hbox {}% - \@startfield - \strut\inhibitglue} -% -%\plEndIncludeInRelease -%\plIncludeInRelease{0000/00/00}{\@startline} -% {Inhibit JFM glue at the beginning}% -%\gdef\@startline{% -% \ifnum \@nxttabmar >\@hightab -% \@badtab -% \global\@nxttabmar \@hightab -% \fi -% \global\@curtabmar \@nxttabmar -% \global\@curtab \@curtabmar -% \global\setbox\@curline \hbox {}% -% \@startfield -% \strut} -%\plEndIncludeInRelease -% \end{macrocode} -% \end{macro} +% p\LaTeXe{}カーネル(2017/10/28)に導入したため削除。 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \section{\cs{inhibitglue}の簡略形} % -% \begin{macro}{\<} -% 最後に、|\inhibitglue|の簡略形を定義します。 -% このコマンドは、和文フォントのメトリック情報から、自動的に挿入される -% グルーの挿入を禁止します。 -% -% 2014年のp\TeX{}の|\inhibitglue|のバグ修正に伴い、 -% |\inhibitglue|が垂直モードでは効かなくなりました。 -% \LaTeX{}では垂直モードと水平モードの区別が隠されていますので、 -% p\LaTeX{}の追加命令である|\<|は段落頭でも効くように修正します。 -% -% |\DeclareRobustCommand|を使うと|\protect|の影響で前方の文字に対する -% |\inhibitglue|が効かなくなるので、e-\TeX{}の|\protected|が必要です。 -% \changes{v1.6i}{2017/09/24}{\cs{<}が段落頭でも効くようにした} -% \begin{macrocode} -%\plIncludeInRelease{2017/10/28}{\<} -% {\inhibitglue in vertical mode}% -%<*pldefs|platexrelease> -\ifx\protected\@undefined -\def\<{\inhibitglue} -\else -\protected\def\<{\ifvmode\leavevmode\fi\inhibitglue} -\fi -% -%\plEndIncludeInRelease -%\plIncludeInRelease{0000/00/00}{\<} -% {\inhibitglue in vertical mode}% -%\def\<{\inhibitglue} -%\plEndIncludeInRelease -% \end{macrocode} -% \end{macro} +% p\LaTeXe{}カーネル(2017/10/28)に導入したため削除。 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % diff --git a/Master/texmf-dist/tex/platex/base/platex.ltx b/Master/texmf-dist/tex/platex/base/platex.ltx index 5d486ae53ef..37c4e0d7eb4 100644 --- a/Master/texmf-dist/tex/platex/base/platex.ltx +++ b/Master/texmf-dist/tex/platex/base/platex.ltx @@ -16,7 +16,6 @@ \let\orgdump\dump \let\dump\relax \input latex.ltx -\edef\platexBANNER{\the\everyjob\noexpand\typeout{}\relax}% save LaTeX banner \typeout{**************************^^J% *^^J% * making pLaTeX format^^J% diff --git a/Master/texmf-dist/tex/platex/base/platexrelease.sty b/Master/texmf-dist/tex/platex/base/platexrelease.sty index d59c8287771..3c696a41285 100644 --- a/Master/texmf-dist/tex/platex/base/platexrelease.sty +++ b/Master/texmf-dist/tex/platex/base/platexrelease.sty @@ -25,14 +25,14 @@ \def\@plIncludeInRelease#1[#2]{\@plIncludeInRele@se{#2}} \def\@plIncludeInRele@se#1#2#3{% \toks@{[#1] #3}% - \expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax + \expandafter\ifx\csname\string#2+\@currname+plIIR\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 + \expandafter\let\csname\string#2+\@currname+plIIR\endcsname\@empty \fi \else \GenericInfo{}{Already applied: \the\toks@}% @@ -44,7 +44,7 @@ %% File: platexrelease.dtx \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{platexrelease} - [2017/09/26 v1.0h latexrelease support for pLaTeX Kernel] + [2017/12/06 v1.0i latexrelease support for pLaTeX Kernel] \RequirePackageWithOptions{latexrelease} \ifnum\expandafter\@parse@version\latexreleaseversion//00\@nil >\expandafter\@parse@version\p@known@latexreleaseversion//00\@nil @@ -102,7 +102,7 @@ of this package available from CTAN} \let\currentpLaTeXdate\requestedpLaTeXdate \plIncludeInRelease{2017/09/26}{\PackageWarning}{pLaTeX Info}% \plEndIncludeInRelease -\plIncludeInRelease{2016/07/29}{\PackageWarning}{pLaTeX Info}% +\plIncludeInRelease{2017/07/29}{\PackageWarning}{pLaTeX Info}% \PackageWarningNoLine{platexrelease}{% You selected pLaTeX2e <\pfmtversion>, but\MessageBreak this version of pLaTeX2e is known to have\MessageBreak diff --git a/Master/texmf-dist/tex/platex/base/plcore.ltx b/Master/texmf-dist/tex/platex/base/plcore.ltx index a22cbc9e952..0c5fbf0477b 100644 --- a/Master/texmf-dist/tex/platex/base/plcore.ltx +++ b/Master/texmf-dist/tex/platex/base/plcore.ltx @@ -19,21 +19,22 @@ \def\pfmtname{pLaTeX2e} \def\pfmtversion {2017/10/28} -\def\ppatch@level{2} +\def\ppatch@level{3} +\edef\platexBANNER{\the\everyjob\noexpand\typeout{}\relax}% save LaTeX banner \def\plIncludeInRelease#1{\kernel@ifnextchar[% {\@plIncludeInRelease{#1}} {\@plIncludeInRelease{#1}[#1]}} \def\@plIncludeInRelease#1[#2]{\@plIncludeInRele@se{#2}} \def\@plIncludeInRele@se#1#2#3{% \toks@{[#1] #3}% - \expandafter\ifx\csname\string#2+\@currname+IIR\endcsname\relax + \expandafter\ifx\csname\string#2+\@currname+plIIR\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 + \expandafter\let\csname\string#2+\@currname+plIIR\endcsname\@empty \fi \else \GenericInfo{}{Already applied: \the\toks@}% @@ -45,8 +46,8 @@ %% File: plfonts.dtx \let\k@encoding\@empty \let\ck@encoding\@empty -\def\cy@encoding{JY1} -\def\ct@encoding{JT1} +\let\cy@encoding\@empty +\let\ct@encoding\@empty \let\k@family\@empty \let\k@series\@empty \let\k@shape\@empty @@ -194,6 +195,7 @@ \let\default@KT\@empty \let\default@KM\@empty \@onlypreamble\DeclareKanjiEncodingDefaults +\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} \def\DeclareFontFamily#1#2#3{% \@ifundefined{T@#1}% {\@latex@error{Encoding scheme `#1' unknown}\@eha}% @@ -417,8 +419,6 @@ \set@fontsize\baselinestretch\f@size\f@baselineskip \fi \size@update} -\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} -\KanjiEncodingPair{JY1}{JT1} \def\set@fontsize#1#2#3{% \@defaultunits\@tempdimb#2pt\relax\@nnil \edef\f@size{\strip@pt\@tempdimb}% @@ -1118,35 +1118,27 @@ \def\ppatch@level{0}\fi \begingroup \def\parse@@BANNER\typeout#1\typeout#2#3\relax{#1} - \edef\platexTMP{% - \ifnum\ppatch@level=0 - \everyjob{\noexpand\typeout{% - \pfmtname\space<\pfmtversion>\space - (based on \expandafter\parse@@BANNER\platexBANNER)}}% - \else\ifnum\ppatch@level>0 - \everyjob{\noexpand\typeout{% - \pfmtname\space<\pfmtversion>+\ppatch@level\space - (based on \expandafter\parse@@BANNER\platexBANNER)}}% - \else - \everyjob{\noexpand\typeout{% - \pfmtname\space<\pfmtversion>-pre\ppatch@level\space - (based on \expandafter\parse@@BANNER\platexBANNER)}}% - \fi\fi - } -\expandafter -\endgroup \platexTMP + \toks0=\expandafter\expandafter\expandafter{% + \expandafter\parse@@BANNER\platexBANNER} + \ifnum\ppatch@level=0 + \toks2={\pfmtname\space<\pfmtversion>\space}% + \else\ifnum\ppatch@level>0 + \toks2={\pfmtname\space<\pfmtversion>+\ppatch@level\space}% + \else + \toks2={\pfmtname\space<\pfmtversion>-pre\ppatch@level\space}% + \fi\fi + \edef\platexBANNER{\the\toks2 (based on \the\toks0)} + \global\everyjob\expandafter{% + \expandafter\typeout\expandafter{\platexBANNER}}% +\endgroup \begingroup \def\parse@@BANNER\typeout#1\typeout#2#3\relax{#2} - \edef\platexTMP{% - \the\everyjob\noexpand\typeout{\expandafter\parse@@BANNER\platexBANNER}% - } - \everyjob=\expandafter{\platexTMP}% - \edef\platexTMP{% - \noexpand\let\noexpand\platexBANNER=\noexpand\@undefined - \noexpand\everyjob={\the\everyjob}% - } - \expandafter -\endgroup \platexTMP + \toks0=\expandafter\expandafter\expandafter{% + \expandafter\parse@@BANNER\platexBANNER} + \edef\platexBANNER{\the\everyjob \noexpand\typeout{\the\toks0}} + \global\everyjob\expandafter{\platexBANNER}% +\endgroup +\let\platexBANNER=\@undefined \ifx\l@nohyphenation \@undefined \newlanguage\l@nohyphenation \fi diff --git a/Master/texmf-dist/tex/platex/base/pldefs.ltx b/Master/texmf-dist/tex/platex/base/pldefs.ltx index dab26d03327..147f0190c5a 100644 --- a/Master/texmf-dist/tex/platex/base/pldefs.ltx +++ b/Master/texmf-dist/tex/platex/base/pldefs.ltx @@ -14,13 +14,14 @@ %% %% File: plfonts.dtx \ProvidesFile{pldefs.ltx} - [2017/08/05 v1.6h pLaTeX Kernel (Default settings)] + [2017/11/06 v1.6j pLaTeX Kernel (Default settings)] \DeclareKanjiEncodingDefaults{}{} \DeclareErrorKanjiFont{JY1}{mc}{m}{n}{10} \DeclareYokoKanjiEncoding{JY1}{}{} \DeclareKanjiSubstitution{JY1}{mc}{m}{n} \DeclareTateKanjiEncoding{JT1}{}{} \DeclareKanjiSubstitution{JT1}{mc}{m}{n} +\KanjiEncodingPair{JY1}{JT1} \newcommand\mcdefault{mc} \newcommand\gtdefault{gt} \newcommand\kanjiencodingdefault{JY1} diff --git a/Master/texmf-dist/tex/platex/base/tascmac.sty b/Master/texmf-dist/tex/platex/base/tascmac.sty index 3fcd103cc9f..317f97565d0 100644 --- a/Master/texmf-dist/tex/platex/base/tascmac.sty +++ b/Master/texmf-dist/tex/platex/base/tascmac.sty @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{tascmac} - [2017/07/22 v2.0d + [2017/12/06 v2.0e ascmac package (community edition) ] %% @@ -52,12 +52,12 @@ %% %% Use Type1 font for ascgrp (pdfLaTeX, LuaLaTeX) \ifascmac@ptex\else - \ifdefined\pdfextension + \ifx\pdfextension\@undefined % LuaTeX (>=0.85) \pdfextension mapline{+ascgrp