From 8e7cee93b8e73580a81e4d353d4843345b2c2998 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 16 Apr 2017 22:05:53 +0000 Subject: platex (16apr17) git-svn-id: svn://tug.org/texlive/trunk@43852 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/platex/base/Makefile | 50 +-- Master/texmf-dist/source/platex/base/jclasses.dtx | 339 ++++++++++++++++++--- Master/texmf-dist/source/platex/base/plcore.dtx | 253 ++++++++++++++- Master/texmf-dist/source/platex/base/plext.dtx | 121 +++++++- Master/texmf-dist/source/platex/base/plfonts.dtx | 215 +++++++++++-- Master/texmf-dist/source/platex/base/plnewsc06.tex | 114 +++++++ Master/texmf-dist/source/platex/base/plvers.dtx | 52 +++- 7 files changed, 1025 insertions(+), 119 deletions(-) create mode 100644 Master/texmf-dist/source/platex/base/plnewsc06.tex (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/platex/base/Makefile b/Master/texmf-dist/source/platex/base/Makefile index e15431380d9..6a19d0e89d5 100644 --- a/Master/texmf-dist/source/platex/base/Makefile +++ b/Master/texmf-dist/source/platex/base/Makefile @@ -1,15 +1,16 @@ -TARGET1 = platex.ltx jarticle.cls pl209.def platexrelease.sty \ +STRIPTARGET = platex.ltx jarticle.cls pl209.def platexrelease.sty \ nidanfloat.sty tascmac.sty jltxdoc.cls -TARGET2 = platex.pdf platexrelease.pdf pldoc.pdf \ +PDFTARGET = platex.pdf platexrelease.pdf pldoc.pdf \ nidanfloat.pdf ascmac.pdf exppl2e.pdf -TARGET3 = platex.dvi platexrelease.dvi pldoc.dvi \ +DVITARGET = platex.dvi platexrelease.dvi pldoc.dvi \ nidanfloat.dvi ascmac.dvi exppl2e.dvi KANJI = -kanji=jis FONTMAP = -f ipaex.map -f ptex-ipaex.map +TEXMF = $(shell kpsewhich -var-value=TEXMFHOME) -default: $(TARGET1) $(TARGET3) -strip: $(TARGET1) -all: $(TARGET1) $(TARGET2) +default: $(STRIPTARGET) $(DVITARGET) +strip: $(STRIPTARGET) +all: $(STRIPTARGET) $(PDFTARGET) PLFMT = platex.ltx plcore.ltx kinsoku.tex pldefs.ltx \ jy1mc.fd jy1gt.fd jt1mc.fd jt1gt.fd plext.sty \ @@ -134,12 +135,32 @@ ascmac.pdf: ascmac.dvi exppl2e.pdf: exppl2e.dvi dvipdfmx $(FONTMAP) exppl2e.dvi -.PHONY: clean cleanstrip cleanall cleandoc +.PHONY: install clean cleanstrip cleanall cleandoc +install: + mkdir -p ${TEXMF}/doc/platex/base + cp ./LICENSE ${TEXMF}/doc/platex/base/ + cp ./README.md ${TEXMF}/doc/platex/base/ + cp ./*.pdf ${TEXMF}/doc/platex/base/ + cp ./*.txt ${TEXMF}/doc/platex/base/ + mkdir -p ${TEXMF}/source/platex/base + cp ./Makefile ${TEXMF}/source/platex/base/ + cp ./plnews* ${TEXMF}/source/platex/base/ + cp ./*.dtx ${TEXMF}/source/platex/base/ + cp ./*.ins ${TEXMF}/source/platex/base/ + mkdir -p ${TEXMF}/tex/platex/base + cp ./kinsoku.tex ${TEXMF}/tex/platex/base/ + cp ./*.clo ${TEXMF}/tex/platex/base/ + ls ./*.cls | grep -v plnews.cls | xargs -I % cp % ${TEXMF}/tex/platex/base + cp ./*.def ${TEXMF}/tex/platex/base/ + cp ./*.fd ${TEXMF}/tex/platex/base/ + cp ./*.ltx ${TEXMF}/tex/platex/base/ + cp ./*.sty ${TEXMF}/tex/platex/base/ + mkdir -p ${TEXMF}/tex/platex/config + cp ./platex.ini ${TEXMF}/tex/platex/config/ clean: rm -f $(PLFMT) $(PLCLS) $(PL209) $(PLREL) \ $(NIDAN) $(ASCMAC) \ - platex.dvi platexrelease.dvi pldoc.dvi \ - nidanfloat.dvi ascmac.dvi exppl2e.dvi \ + $(DVITARGET) \ jltxdoc.cls pldoc.tex Xins.ins cleanstrip: rm -f $(PLFMT) $(PLCLS) $(PL209) $(PLREL) \ @@ -148,14 +169,7 @@ cleanstrip: cleanall: rm -f $(PLFMT) $(PLCLS) $(PL209) $(PLREL) \ $(NIDAN) $(ASCMAC) \ - platex.dvi platexrelease.dvi pldoc.dvi \ - nidanfloat.dvi ascmac.dvi exppl2e.dvi \ - platex.pdf platexrelease.pdf pldoc.pdf \ - nidanfloat.pdf ascmac.pdf exppl2e.pdf \ + $(DVITARGET) $(PDFTARGET) \ jltxdoc.cls pldoc.tex Xins.ins cleandoc: - rm -f \ - platex.dvi platexrelease.dvi pldoc.dvi \ - nidanfloat.dvi ascmac.dvi exppl2e.dvi \ - platex.pdf platexrelease.pdf pldoc.pdf \ - nidanfloat.pdf ascmac.pdf exppl2e.pdf + rm -f $(DVITARGET) $(PDFTARGET) diff --git a/Master/texmf-dist/source/platex/base/jclasses.dtx b/Master/texmf-dist/source/platex/base/jclasses.dtx index 94281509de7..390cf78695c 100644 --- a/Master/texmf-dist/source/platex/base/jclasses.dtx +++ b/Master/texmf-dist/source/platex/base/jclasses.dtx @@ -3,7 +3,7 @@ % % Copyright 1995-2001 ASCII Corporation. % Copyright (c) 2010 ASCII MEDIA WORKS -% Copyright (c) 2016 Japanese TeX Development Community +% Copyright (c) 2016-2017 Japanese TeX Development Community % % This file is part of the pLaTeX2e system (community edition). % ------------------------------------------------------------- @@ -76,6 +76,21 @@ % \changes{v1.7a}{2016/11/16}{Use \cs{expandafter} % (sync with ltlists.dtx v1.0j)} % \changes{v1.7b}{2016/11/22}{補足ドキュメントを追加} +% \changes{v1.7c}{2016/12/18}{Only add empty page after part if +% twoside and openright (sync with classes.dtx v1.4b)} +% \changes{v1.7c}{2016/12/18}{奇妙なarticleガードとコードを削除して +% ドキュメントを追加} +% \changes{v1.7d}{2017/02/15}{\cs{if@openleft}スイッチ追加} +% \changes{v1.7d}{2017/02/15}{openleftオプション追加} +% \changes{v1.7d}{2017/02/15}{\cs{cleardoublepage}の代用となる命令群を追加} +% \changes{v1.7d}{2017/02/15}{bookクラスでtitlepageを必ず奇数ページ +% に送るように変更} +% \changes{v1.7d}{2017/02/15}{titlepageのページ番号を奇数ならば1に、 +% 偶数ならば0にリセットするように変更} +% \changes{v1.7d}{2017/02/15}{縦組クラスの所属表示の番号を直立にした} +% \changes{v1.7e}{2017/03/05}{トンボに表示するジョブ情報の書式を変更} +% \changes{v1.7e}{2017/03/05}{\cs{frontmatter}と\cs{mainmatter}を +% 奇数ページに送るように変更} % \fi % % \iffalse @@ -105,7 +120,7 @@ %<11pt&bk>\ProvidesFile{tbk11.clo} %<12pt&bk>\ProvidesFile{tbk12.clo} % - [2016/11/22 v1.7b + [2017/03/05 v1.7e % Standard pLaTeX class] %<10pt|11pt|12pt> Standard pLaTeX file (size option)] %<*driver> @@ -152,7 +167,7 @@ % % \begin{macro}{\c@@paper} % 用紙サイズを示すために使います。 -% A4, A5, B4, B5 用紙はそれぞれ、1, 2, 3, 4 として表されます。 +% A4, A5, B4, B5用紙はそれぞれ、1, 2, 3, 4として表されます。 % \begin{macrocode} %<*article|report|book> \newcounter{@paper} @@ -168,7 +183,7 @@ % % \begin{macro}{\@ptsize} % 組版をするポイント数の一の位を保存するために使います。 -% 0, 1, 2 のいずれかです。 +% 0, 1, 2のいずれかです。 % \begin{macrocode} \newcommand{\@ptsize}{} % \end{macrocode} @@ -193,7 +208,8 @@ % \end{macro} % % \begin{macro}{\if@openright} -% chapterレベルを奇数ページからはじめるかどうかのスイッチです。 +% chapterレベルを右ページからはじめるかどうかのスイッチです。 +% 横組では奇数ページ、縦組では偶数ページから始まることになります。 % reportクラスのデフォルトは、``no''です。 % bookクラスのデフォルトは、``yes''です。 % \begin{macrocode} @@ -201,6 +217,17 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\if@openleft} +% chapterレベルを左ページからはじめるかどうかのスイッチです。 +% 日本語\TeX{}開発コミュニティ版で新たに追加されました。 +% 横組では偶数ページ、縦組では奇数ページから始まることになります。 +% reportクラスとbookクラスの両方で、デフォルトは``no''です。 +% \changes{v1.7d}{2017/02/15}{\cs{if@openleft}スイッチ追加} +% \begin{macrocode} +%\newif\if@openleft +% \end{macrocode} +% \end{macro} +% % \changes{v1.0c}{1995/12/25}{Macro \cs{if@openbib} removed} % % \begin{macro}{\if@mainmatter} @@ -323,15 +350,19 @@ % |tombow|オプションが指定されると、用紙サイズに合わせてトンボを出力します。 % このとき、トンボの脇にDVIを作成した日付が出力されます。 % 作成日付の出力を抑制するには、|tombow|ではなく、|tombo|と指定をします。 +% +% ジョブ情報の書式は元々|filename : 2017/3/5(13:3)|のような書式でしたが、 +% jsclassesにあわせて桁数固定の|filename (2017-03-05 13:03)|に直しました。 % \changes{v1.0g}{1996/09/03}{Add to \cs{@bannertoken}.} % \changes{v1.1a}{1997/01/23}{日付出力オプション} +% \changes{v1.7e}{2017/03/05}{トンボに表示するジョブ情報の書式を変更} % \begin{macrocode} \DeclareOption{tombow}{% \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse @@ -389,12 +420,15 @@ % \subsection{右左起こしオプション} % chapterを右ページあるいは左ページから % はじめるかどうかを指定するオプションです。 +% |openleft|オプションは日本語\TeX{}開発コミュニティによって追加されました。 +% \changes{v1.7d}{2017/02/15}{openleftオプション追加} % \begin{macrocode} %\if@compatibility %\@openrighttrue %\else -%\DeclareOption{openright}{\@openrighttrue} -%\DeclareOption{openany}{\@openrightfalse} +%\DeclareOption{openright}{\@openrighttrue\@openleftfalse} +%\DeclareOption{openleft}{\@openlefttrue\@openrightfalse} +%\DeclareOption{openany}{\@openrightfalse\@openleftfalse} %\fi % \end{macrocode} % @@ -441,6 +475,13 @@ % |disablejfam|オプションを指定しても|\textmc|や|\textgt|などを用いて、 % 数式内に日本語を記述することは可能です。 % +% \noindent\emph{日本語\TeX{}開発コミュニティによる補足}: +% コミュニティ版p\LaTeX{}の2016/11/29以降の版では、e-p\TeX{}の拡張機能 +% (通称「旧FAM256パッチ」)が利用可能な場合に、\LaTeX{}の機能で宣言 +% できる数式ファミリ(数式アルファベット)の上限を256個に増やしています。 +% したがって、新しい環境では|disablejfam|を指定しなくても上限を超える +% ことが起きにくくなっています。 +% % |mathrmmc|オプションは、 % |\mathrm|と|\mathbf|を和欧文両対応にするためのクラスオプションです。 % \changes{v1.1d}{1992/02/04}{disablejfamの判断を間違えてたのを修正} @@ -1605,6 +1646,92 @@ % \end{macro} % % +% \section{改ページ(日本語\TeX{}開発コミュニティ版のみ)}\label{sec:cleardoublepage} +% +% \begin{macro}{\pltx@cleartorightpage} +% \begin{macro}{\pltx@cleartoleftpage} +% \begin{macro}{\pltx@cleartooddpage} +% \begin{macro}{\pltx@cleartoevenpage} +% |\cleardoublepage|命令は、\LaTeX{}カーネルでは「奇数ページになるまでページを +% 繰る命令」として定義されています。しかしp\LaTeX{}カーネルでは、アスキーの方針 +% により「横組では奇数ページになるまで、縦組では偶数ページになるまでページを +% 繰る命令」に再定義されています。すなわち、p\LaTeX{}では縦組でも横組でも +% 右ページになるまでページを繰ることになります。 +% +% p\LaTeX{}標準クラスのbookは、横組も縦組も|openright|がデフォルトになっていて、 +% これは従来p\LaTeX{}カーネルで定義された|\cleardoublepage|を利用していました。 +% しかし、縦組で奇数ページ始まりの文書を作りたい場合もあるでしょうから、 +% コミュニティ版クラスでは以下の(非ユーザ向け)命令を追加します。 +% \begin{enumerate} +% \item|\pltx@cleartorightpage|:右ページになるまでページを繰る命令 +% \item|\pltx@cleartoleftpage|:左ページになるまでページを繰る命令 +% \item|\pltx@cleartooddpage|:奇数ページになるまでページを繰る命令 +% \item|\pltx@cleartoevenpage|:偶数ページになるまでページを繰る命令 +% \end{enumerate} +% \changes{v1.7d}{2017/02/15}{\cs{cleardoublepage}の代用となる命令群を追加} +% \begin{macrocode} +\def\pltx@cleartorightpage{\clearpage\if@twoside + \ifodd\c@page + \iftdir + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi + \else + \ifydir + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\c@page + \ifydir + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi + \else + \iftdir + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi + \fi\fi} +% \end{macrocode} +% +% |\pltx@cleartooddpage|は\LaTeX{}の|\cleardoublepage|に似ていますが、 +% 上の2つに合わせるため|\thispagestyle{empty}|を追加してあります。 +% \begin{macrocode} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\cleardoublepage} +% そしてreportとbookクラスの場合は、ユーザ向け命令である|\cleardoublepage|を、 +% |openright|オプションが指定されている場合は|\pltx@cleartorightpage|に、 +% |openleft|オプションが指定されている場合は|\pltx@cleartoleftpage|に、 +% それぞれ|\let|します。|openany|の場合はp\LaTeX{}カーネルの定義のままです。 +% \begin{macrocode} +%<*!article> +\if@openleft + \let\cleardoublepage\pltx@cleartoleftpage +\else\if@openright + \let\cleardoublepage\pltx@cleartorightpage +\fi\fi +% +% \end{macrocode} +% \end{macro} +% +% % % \section{ページスタイル}\label{sec:pagestyle} % p\LaTeXe{}では、つぎの6種類のページスタイルを使用できます。 @@ -1774,9 +1901,9 @@ %<*report|book> \def\chaptermark##1{\markboth{% \ifnum \c@secnumdepth >\m@ne -% \if@mainmatter +% \if@mainmatter \@chapapp\thechapter\@chappos\hskip1zw -% \fi +% \fi \fi ##1}{}}% \def\sectionmark##1{\markright{% @@ -1803,9 +1930,9 @@ %<*report|book> \def\chaptermark##1{\markright{% \ifnum \c@secnumdepth >\m@ne -% \if@mainmatter +% \if@mainmatter \@chapapp\thechapter\@chappos\hskip1zw -% \fi +% \fi \fi ##1}}% % @@ -1821,7 +1948,7 @@ % ヘッダに見出しを、フッタにページ番号を出力します。 % % このスタイルは、両面印刷と片面印刷とで形式が異なります。 -% \changes{v1.0d}{1995/08/23}{横組の evenfoot が中央揃えになっていたのを修正} +% \changes{v1.0d}{1995/08/23}{横組のevenfootが中央揃えになっていたのを修正} % \changes{v1.0d}{1996/03/05}{横組で偶数ページと奇数ページの設定が逆なのを修正} % \begin{macrocode} \if@twoside @@ -1850,9 +1977,9 @@ %<*report|book> \def\chaptermark##1{\markboth{% \ifnum \c@secnumdepth >\m@ne -% \if@mainmatter +% \if@mainmatter \@chapapp\thechapter\@chappos\hskip1zw -% \fi +% \fi \fi ##1}{}}% \def\sectionmark##1{\markright{% @@ -1881,9 +2008,9 @@ %<*report|book> \def\chaptermark##1{\markright{% \ifnum \c@secnumdepth >\m@ne -% \if@mainmatter +% \if@mainmatter \@chapapp\thechapter\@chappos\hskip1zw -% \fi +% \fi \fi ##1}}% % @@ -1916,7 +2043,7 @@ % % \section{文書コマンド} % -% \subsubsection{表題} +% \subsection{表題} % % \begin{macro}{\title} % \begin{macro}{\author} @@ -1945,12 +2072,90 @@ % 右起こしページ用のページパラメータでは誤った結果になります。 % 二段組スタイルでも一段組のページが作られます。 % +% \noindent\emph{日本語\TeX{}開発コミュニティによる変更}: +% 上にあるのはアスキー版の説明です。改めてアスキー版の挙動を整理すると、 +% 以下のようになります。 +% \begin{enumerate} +% \item アスキー版では、タイトルページの番号を必ず1にリセットしていましたが、 +% これは正しくありません。これは、タイトルページが奇数ページ目か偶数ページ目 +% かにかかわらず、レイアウトだけ奇数ページ用が適用されてしまうからです。 +% さらに、タイトルの次のページも偶数のページ番号を持ってしまうため、両面印刷 +% で奇数ページと偶数ページが交互に出なくなるという問題もあります。 +% \item アスキー版bookクラスは、タイトルページを必ず|\cleardoublepage|で始めて +% いました。p\LaTeX{}カーネルでの|\cleardoublepage|の定義から、縦組の既定では +% タイトルが偶数ページ目に出ることになります。これ自体が正しくないと断定する +% ことはできませんが、タイトルのページ番号を1にリセットすることと合わさって、 +% 偶数ページに送ったタイトルに奇数ページ用レイアウトが適用されてしまうという +% 結果は正しくありません。 +% \end{enumerate} +% そこで、コミュニティ版ではタイトルのレイアウトが必ず奇数ページ用になるという +% 挙動を支持し、bookクラスではタイトルページを奇数ページ目に送ることにしました。 +% これでタイトルページが表紙らしく見えるようになります。また、reportクラスの +% ようなタイトルが成り行きに従って出る場合には +% \begin{itemize} +% \item 奇数ページ目に出る場合、ページ番号を1(奇数)にリセット +% \item 偶数ページ目に出る場合、ページ番号を0(偶数)にリセット +% \end{itemize} +% としました。 +% +% 一つめの例を考えます。 +%\begin{verbatim} +% \documentclass{tbook} +% \title{タイトル}\author{著者} +% \begin{document} +% \maketitle +% \chapter{チャプター} +% \end{document} +%\end{verbatim} +% アスキー版tbookクラスでの結果は +%\begin{verbatim} +% 1ページ目:空白(ページ番号1は非表示) +% 2ページ目:タイトル(奇数レイアウト、ページ番号1は非表示) +% 3ページ目:チャプター(偶数レイアウト、ページ番号2) +%\end{verbatim} +% ですが、仮に最初の空白ページさえなければ +%\begin{verbatim} +% 1ページ目:タイトルすなわち表紙(奇数レイアウト、ページ番号1は非表示) +% 2ページ目:チャプター(偶数レイアウト、ページ番号2) +%\end{verbatim} +% とみなせるため、コミュニティ版では空白ページを発生させないようにしました。 +% +% 二つめの例を考えます。 +%\begin{verbatim} +% \documentclass{tbook} +% \title{タイトル}\author{著者} +% \begin{document} +% テスト文章 +% \maketitle +% \chapter{チャプター} +% \end{document} +%\end{verbatim} +% アスキー版tbookクラスでの結果は +%\begin{verbatim} +% 1ページ目:テスト文章(奇数レイアウト、ページ番号1) +% 2ページ目:タイトル(奇数レイアウト、ページ番号1は非表示) +% 3ページ目:チャプター(偶数レイアウト、ページ番号2) +%\end{verbatim} +% ですが、これでは奇数と偶数のページ番号が交互になっていないので正しく +% ありません。そこで、コミュニティ版では +%\begin{verbatim} +% 1ページ目:テスト文章(奇数レイアウト、ページ番号1) +% 2ページ目:空白ページ(ページ番号2は非表示) +% 3ページ目:タイトル(奇数レイアウト、ページ番号1は非表示) +% 4ページ目:チャプター(偶数レイアウト、ページ番号2) +%\end{verbatim} +% と直しました。 +% +% なお、p\LaTeX~2.09互換モードはアスキー版のまま、すなわち「ページ番号をゼロに +% 設定」としてあります。これは、横組の右起こしの挙動としては誤りですが、縦組の +% 右起こしの挙動としては一応正しくなっているといえます。 +% % 最初に互換モードの定義を作ります。 % \begin{macrocode} \if@compatibility \newenvironment{titlepage} {% -% \cleardoublepage +% \cleardoublepage \if@twocolumn\@restonecoltrue\onecolumn \else\@restonecolfalse\newpage\fi \thispagestyle{empty}% @@ -1961,22 +2166,26 @@ % \end{macrocode} % % そして、\LaTeX{}ネイティブのための定義です。 +% \changes{v1.7d}{2017/02/15}{bookクラスでtitlepageを必ず奇数ページ +% に送るように変更} +% \changes{v1.7d}{2017/02/15}{titlepageのページ番号を奇数ならば1に、 +% 偶数ならば0にリセットするように変更} % \begin{macrocode} \else \newenvironment{titlepage} {% -% \cleardoublepage +% \pltx@cleartooddpage %% 2017/02/15 \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi %% 2017/02/15 }% {\if@restonecol\twocolumn \else \newpage \fi % \end{macrocode} -% 二段組モードでなければ、タイトルページの直後のページのページ番号も1に +% 両面モードでなければ、タイトルページの直後のページのページ番号も1に % します。 % \begin{macrocode} \if@twoside\else @@ -1997,10 +2206,14 @@ % 縦組のときは、|\thanks|コマンドを|\p@thanks|に|\let|します。 % このコマンドは|\footnotetext|を使わず、直接、文字を|\@thanks|に格納 % していきます。 +% +% 著者名の脇に表示される合印は直立した数字、注釈側は横に寝た数字となっていまし +% たが、不自然なので|\hbox{\yoko ...}|を追加し、両方とも直立するようにしました。 +% \changes{v1.7d}{2017/02/15}{縦組クラスの所属表示の番号を直立にした} % \begin{macrocode} \def\p@thanks#1{\footnotemark \protected@xdef\@thanks{\@thanks - \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}} + \protect{\noindent\hbox{\yoko$\m@th^\thefootnote$}#1\protect\par}}} % \end{macrocode} % \end{macro} % @@ -2126,7 +2339,7 @@ % \end{macrocode} % \end{macro} % -% \subsubsection{概要} +% \subsection{概要} % % \begin{environment}{abstract} % 要約文のための環境です。bookクラスでは使えません。 @@ -2163,7 +2376,7 @@ % % \subsection{章見出し} % -% \subsection{マークコマンド} +% \subsubsection{マークコマンド} % % \begin{macro}{\chaptermark} % \begin{macro}{\sectionmark} @@ -2331,21 +2544,39 @@ % これらの命令を|openany|オプションに応じて切り替え、二回目はそれを % 元に戻しています。アスキーによるjclasses.dtxは、1997/01/15に % 一回目の修正に追随しましたが、二回目の修正には追随していません。 -% コミュニティ版では、アスキーによる仕様を維持することとし、 -% |openany|オプションの場合は|\cleardoublepage|ではなく|\clearpage|が -% 発行されます。もし|\cleardoublepage|が起きてほしい場合には、 -% 明示的に挿入してください。(参考:latex/2754) +% コミュニティ版では、一旦はアスキーによる仕様を維持しようと考え +% ました(2016/11/22)が、以下の理由により二回目の修正にも追随する +% ことにしました(2017/03/05)。 +% +% アスキー版での|\frontmatter|と|\mainmatter|の改ページ挙動は +%\begin{quote} +% |openright|なら|\cleardoublepage|、|openany|なら|\clearpage|を実行 +%\end{quote} +% というものでした。しかし、|\frontmatter|及び|\mainmatter|はノンブルを +% 1にリセットしますから、改ページの結果が偶数ページ目になる場合 +% \footnote{縦tbookのデフォルト(openright)が該当するほか、横jbookと +% 縦tbookのopenanyのときには成り行き次第で該当する可能性があります。}に +% ノンブルが偶奇逆転してしまいました。このままでは|openany|の場合に両面 +% 印刷がうまくいかないため、新しいコミュニティ版では +%\begin{quote} +% 必ず|\pltx@cleartooddpage|を実行 +%\end{quote} +% としました。これは両面印刷(twoside)の場合は奇数ページに送り、 +% 片面印刷(oneside)の場合は単に改ページとなります。(参考:latex/2754) % \changes{v1.7b}{2016/11/22}{補足ドキュメントを追加} +% \changes{v1.7e}{2017/03/05}{\cs{frontmatter}と\cs{mainmatter}を +% 奇数ページに送るように変更} % \begin{macrocode} %<*book> \newcommand{\frontmatter}{% - \if@openright \cleardoublepage \else \clearpage \fi + \pltx@cleartooddpage \@mainmatterfalse\pagenumbering{roman}} \newcommand{\mainmatter}{% - \if@openright \cleardoublepage \else \clearpage \fi + \pltx@cleartooddpage \@mainmattertrue\pagenumbering{arabic}} \newcommand{\backmatter}{% - \if@openright \cleardoublepage \else \clearpage \fi + \if@openleft \cleardoublepage \else + \if@openright \cleardoublepage \else \clearpage \fi \fi \@mainmatterfalse} % % \end{macrocode} @@ -2437,7 +2668,8 @@ % \begin{macrocode} %<*report|book> \newcommand{\part}{% - \if@openright \cleardoublepage \else \clearpage \fi + \if@openleft \cleardoublepage \else + \if@openright \cleardoublepage \else \clearpage \fi \fi \thispagestyle{empty}% \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi \null\vfil @@ -2532,10 +2764,21 @@ % |\@part|と|\@spart|の最後で実行されるマクロです。 % 両面印刷モードのときは、白ページを追加します。 % 二段組モードのときには、これ以降のページを二段組に戻します。 +% 2016年12月から、|openany| のときに白ページを追加するのをやめました。 +% このバグは\LaTeX{}ではclasses.dtx v1.4b (2000/05/19)で修正されていました。 +% (参考:latex/3155、texjporg/jsclasses\#48) +% \changes{v1.7c}{2016/12/18}{Only add empty page after part if +% twoside and openright (sync with classes.dtx v1.4b)} % \begin{macrocode} %<*report|book> \def\@endpart{\vfil\newpage - \if@twoside\null\thispagestyle{empty}\newpage\fi + \if@twoside + \if@openleft %% \if@openleft added (2017/02/15) + \null\thispagestyle{empty}\newpage + \else\if@openright %% \if@openright added (2016/12/18) + \null\thispagestyle{empty}\newpage + \fi\fi %% added (2016/12/18, 2017/02/15) + \fi % \end{macrocode} % 二段組文書のとき、スイッチを二段組モードに戻す必要があります。 % \begin{macrocode} @@ -2554,6 +2797,10 @@ % なお、縦組の場合でも右ページからはじまるように、 % フォーマットファイルで|\clerdoublepage|が定義されています。 % +% \emph{日本語\TeX{}開発コミュニティによる補足}:コミュニティ版の実装では、 +% |openright|と|openleft|の場合に|\cleardoublepage|をクラスファイルの中で +% 再々定義しています。\ref{sec:cleardoublepage}を参照してください。 +% % 章見出しが出力されるページのスタイルは、\pstyle{jpl@in}になります。 % \pstyle{jpl@in}は、\pstyle{headnomble}か\pstyle{footnomble}のいずれかです。 % 詳細は、第\ref{sec:pagestyle}節を参照してください。 @@ -2563,7 +2810,8 @@ % \begin{macrocode} %<*report|book> \newcommand{\chapter}{% - \if@openright\cleardoublepage\else\clearpage\fi + \if@openleft \cleardoublepage \else + \if@openright \cleardoublepage \else \clearpage \fi \fi \thispagestyle{jpl@in}% \global\@topnum\z@ \@afterindenttrue @@ -2575,6 +2823,12 @@ % このマクロは、章見出しに番号を付けるときに呼び出されます。 % \Lcount{secnumdepth}が$-1$よりも大きく、 % |\@mainmatter|が真(bookクラスの場合)のときに、番号を出力します。 +% +% \emph{日本語\TeX{}開発コミュニティによる補足}:本家\LaTeX{}の +% \file{classes}では、二段組のときチャプタータイトルは一段組に戻され +% ますが、アスキーによる\file{jclasses}では二段組のままにされています。 +% したがって、チャプタータイトルより高い位置に右カラムの始点が来るという +% 挙動になっていますが、コミュニティ版でもアスキー版の挙動を維持しています。 % \begin{macrocode} \def\@chapter[#1]#2{% \ifnum \c@secnumdepth >\m@ne @@ -2625,11 +2879,14 @@ % % \begin{macro}{\@schapter} % このマクロは、章見出しに番号を付けないときに呼び出されます。 +% +% \emph{日本語\TeX{}開発コミュニティによる補足}:やはり二段組でチャプター +% タイトルより高い位置に右カラムの始点が来るという挙動を維持してあります。 +% \changes{v1.7c}{2016/12/18}{奇妙なarticleガードとコードを削除して +% ドキュメントを追加} % \begin{macrocode} \def\@schapter#1{% -%
\if@twocolumn\@topnewpage[\@makeschapterhead{#1}]\else \@makeschapterhead{#1}\@afterheading -%
\fi } % \end{macrocode} % \end{macro} @@ -2707,9 +2964,9 @@ % \begin{macro}{\subparagraph} % 見出しの前に空白を付け、|\normalsize\bfseries|で出力をします。 % 見出しの後ろで改行されません。 -% \begin{macrocode} % \changes{v1.7a}{2016/11/16}{replace \cs{reset@font} with % \cs{normalfont} (sync with classes.dtx v1.3c)} +% \begin{macrocode} \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}% {3.25ex \@plus 1ex \@minus .2ex}% {-1em}% @@ -3452,7 +3709,7 @@ % % \changes{v1.6}{2006/06/27}{フォントコマンドを修正。ありがとう、ymtさん。} % p\LaTeX{} 2.09 -% compatibility mode では和文数式フォントfam が2重定義されていた +% compatibility modeでは和文数式フォントfamが2重定義されていた % ので、その部分を変更しました。 % \begin{macrocode} \if@enablejfam @@ -4201,7 +4458,7 @@ %<*yoko> \if@twoside \@mparswitchtrue -\else +\else \@mparswitchfalse \fi % diff --git a/Master/texmf-dist/source/platex/base/plcore.dtx b/Master/texmf-dist/source/platex/base/plcore.dtx index 0bb4c60b7d5..bfe4d5a0861 100644 --- a/Master/texmf-dist/source/platex/base/plcore.dtx +++ b/Master/texmf-dist/source/platex/base/plcore.dtx @@ -3,7 +3,7 @@ % % Copyright 1994-2001 ASCII Corporation. % Copyright (c) 2010 ASCII MEDIA WORKS -% Copyright (c) 2016 Japanese TeX Development Community +% Copyright (c) 2016-2017 Japanese TeX Development Community % % This file is part of the pLaTeX2e system (community edition). % ------------------------------------------------------------- @@ -54,13 +54,23 @@ % \changes{v1.2i}{2016/09/08}{v1.2gの修正で入れた\cs{null}がまずかったので % 水平モードのときだけ発行することにした(Issue 23)} % \changes{v1.2j}{2016/11/09}{FAM256パッチ適用e-p\TeX{}に対応} +% \changes{v1.2k}{2017/02/20}{目次で\cs{ref}を使った場合に後ろの空白が消える +% 現象に対処するため、\cs{relax}のあとに\{\}を追加} +% \changes{v1.2l}{2017/02/25}{脚注とボトムフロートの順序を入れ替えたことで +% 版面全体の垂直位置がずれていたのを修正(Issue 32)} +% \changes{v1.2l}{2017/02/25}{\cs{@makecol}を変更したのに +% \cs{@makespecialcolbox}を変更しない、という判断について明文化} +% \changes{v1.2m}{2017/03/19}{\cs{language}をリセット +% (sync with ltoutput.dtx 2017/03/10 v1.3c)} +% \changes{v1.2m}{2017/03/19}{\cs{verb}の途中でハイフネーションが起きない +% ように\cs{language}を設定(sync with ltmiscen.dtx 2017/03/09 v1.1m)} % \fi % % \iffalse %<*driver> \NeedsTeXFormat{pLaTeX2e} % \fi -\ProvidesFile{plcore.dtx}[2016/11/09 v1.2j pLaTeX core file] +\ProvidesFile{plcore.dtx}[2017/03/19 v1.2m pLaTeX core file] % \iffalse \documentclass{jltxdoc} \GetFileInfo{plcore.dtx} @@ -253,13 +263,40 @@ % このマクロが組み立てる部分の中心となります。 % \file{ltoutput.dtx}で定義されているものです。 % \begin{macrocode} -%\plIncludeInRelease{2016/09/03}{\@makecol}{\@makecol}% +%\plIncludeInRelease{2017/04/08}{\@makecol}{\@makecol}% %<*plcore|platexrelease> \gdef\@makecol{% \setbox\@outputbox\box\@cclv% + \let\@elt\relax % added on LaTeX (ltoutput.dtx 2003/12/16 v1.2k) \xdef\@freelist{\@freelist\@midlist}% \global \let \@midlist \@empty \@combinefloats +% \end{macrocode} +% オリジナルの\LaTeX{}は、トップフロート、本文、脚注、ボトムフロートの順番で +% 出力します。一方p\LaTeX{}は、トップフロート、本文、ボトムフロート、脚注の +% 順番で出力します。ところが、アスキー版のコードは順番を入れ替えるだけでなく、 +% 版面全体の垂直位置が(特に縦組で顕著に)ずれてしまっていました。 +% これは補正量|\dp\@outputbox|の取得が早すぎたためですので、コミュニティ版 +% p\LaTeX{}ではこの問題に対処してあります。結果的に、fnposパッケージ(yafoot)の +% |\makeFNbottom|かつ|\makeFNbelow|な状態と完全に等価になりました。 +% \changes{v1.2l}{2017/02/25}{脚注とボトムフロートの順序を入れ替えたことで +% 版面全体の垂直位置がずれていたのを修正(Issue 32)} +% \begin{macrocode} + \let\pltx@textbottom\@textbottom % save (pLaTeX 2017/02/25) + \ifvoid\footins\else % changed (pLaTeX 2017/02/25) + \setbox\@outputbox \vbox {% + \boxmaxdepth \@maxdepth + \unvbox \@outputbox + \@textbottom % inserted here (pLaTeX 2017/02/25) + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule + \unvbox \footins + \color@endgroup + }% + \let\@textbottom\relax % disable temporarily (pLaTeX 2017/02/25) + \fi \ifvbox\@kludgeins \@makespecialcolbox \else @@ -288,20 +325,43 @@ \iftdir\vbox{\hskip\z@}\fi \vskip -\dimen@ \@textbottom - \ifvoid\footins\else % for pLaTeX - \vskip \skip\footins - \color@begingroup - \normalcolor - \footnoterule - \unvbox \footins - \color@endgroup - \fi }% \fi + \let\@textbottom\pltx@textbottom % restore (pLaTeX 2017/02/25) \global \maxdepth \@maxdepth } % %\plEndIncludeInRelease +%\plIncludeInRelease{2016/09/03}{\@makecol}{\@makecol}% +%\gdef\@makecol{% +% \setbox\@outputbox\box\@cclv% +% \xdef\@freelist{\@freelist\@midlist}% +% \global \let \@midlist \@empty +% \@combinefloats +% \ifvbox\@kludgeins +% \@makespecialcolbox +% \else +% \setbox\@outputbox \vbox to\@colht {% +%% \boxmaxdepth \@maxdepth % comment out on LaTeX 1997/12/01 +% \@texttop +% \dimen@ \dp\@outputbox +% \unvbox \@outputbox +% \iftdir\vbox{\hskip\z@}\fi +% \vskip -\dimen@ +% \@textbottom +% \ifvoid\footins\else % for pLaTeX +% \vskip \skip\footins +% \color@begingroup +% \normalcolor +% \footnoterule +% \unvbox \footins +% \color@endgroup +% \fi +% }% +% \fi +% \global \maxdepth \@maxdepth +%} +%\plEndIncludeInRelease %\plIncludeInRelease{2016/04/17}{\@makecol}{\@makecol}% %\gdef\@makecol{% % \setbox\@outputbox\box\@cclv% @@ -373,13 +433,34 @@ % % このマクロは、|\enlargethispage|が使われたときに、 % |\@makecol|マクロから呼び出されます。 +% +% \noindent\emph{日本語\TeX{}開発コミュニティによる補足(2017/02/25)}: +% 2016/11/29以前のp\LaTeX{}では、|\@makecol|はボトムフロートを挿入した後、 +% すぐに|\@kludgeins|が空かどうか判定し +% \begin{itemize} +% \item 空の場合は、残りすべての処理を|\@makespecialcolbox|に任せる +% \item 空でない場合は、|\@makecol|自身で残りすべての処理を行う +% \end{itemize} +% としていました。しかし2017/04/08以降のp\LaTeX{}では、|\@makecol|はボトム +% フロートと脚注を挿入してから|\@kludgeins|の判定に移るようにしています。 +% したがって、新しい|\@makecol|から以下に記す|\@makespecialcolbox|が呼び +% 出される場合は、|\ifvoid\footins|(二箇所)の判定は常に真となるはずです。 +% 要するに「つぎの部分がp\LaTeX{}用の修正です。」という二箇所のコードは +% 実質的に不要となりました。 +% +% しかし、だからといって消してしまうと、古いp\LaTeX{}の|\@makecol|を +% ベースに作られた外部パッケージから|\@makespecialcolbox|が呼び出される +% 場合に脚注が消滅するおそれがあります。このため、|\@makespecialcolbox|は +% 従来のコードのまま維持してあります(害はありません)。 +% \changes{v1.2l}{2017/02/25}{\cs{@makecol}を変更したのに +% \cs{@makespecialcolbox}を変更しない、という判断について明文化} % \begin{macrocode} %<*plcore|fltrace> \gdef\@makespecialcolbox{% %<*trace> \fl@trace{Krudgeins ht \the\ht\@kludgeins\space - dp \the\dp\@kludgeins\space - wd \the\wd\@kludgeins}% + dp \the\dp\@kludgeins\space + wd \the\wd\@kludgeins}% % \setbox\@outputbox \vbox {% \@texttop @@ -708,12 +789,30 @@ % |\begingroup|と|\endgroup|で囲みます。 % \changes{v1.2a}{2001/09/26}{\LaTeX\ \texttt{!<2001/06/01!>}に対応} % \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\@outputpage} +% {Reset language for hyphenation}% +%<*plcore|platexrelease> \def\@outputpage{% \begingroup % the \endgroup is put in by \aftergroup \iftdir \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@ \fi \let \protect \noexpand +% \end{macrocode} +% \LaTeXe\ 2017-04-15ではverbatim環境内でハイフネーションが起きないように +% 修正されましたが、verbatim環境の途中で改ページが起きた場合にヘッダで +% ハイフネーションが抑制されるのは正しくないので、|\language|を +% |\begin{document}|での値にリセットします(参考:latex2e svn r1407)。 +% プリアンブルで特別に設定されればその値、設定されなければ0です(万が一 +% |\document|の定義が古い場合\footnote{\LaTeXe\ 2017/01/01以前を使って +% p\LaTeXe{}のフォーマットを作成した場合や、dinbrief.clsのように独自の +% 再定義を行うクラスやパッケージを使った場合に起こるかもしれません。}は +% $-1$になりますが、これは0と同じはたらきをするので問題は起きません)。 +% \changes{v1.2m}{2017/03/19}{\cs{language}をリセット +% (sync with ltoutput.dtx 2017/03/10 v1.3c)} +% \begin{macrocode} + \language\document@default@language \@resetactivechars \global\let\@@if@newlist\if@newlist \global\@newlistfalse @@ -794,6 +893,78 @@ \stepcounter{page}% \let\firstmark\botmark } +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\@outputpage} +% {Reset language for hyphenation}% +%\def\@outputpage{% +%\begingroup % the \endgroup is put in by \aftergroup +% \iftdir +% \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@ +% \fi +% \let \protect \noexpand +% \@resetactivechars +% \global\let\@@if@newlist\if@newlist +% \global\@newlistfalse +% \@parboxrestore +% \shipout\vbox{\yoko +% \set@typeset@protect +% \aftergroup\endgroup +% \aftergroup\set@typeset@protect +% \if@specialpage +% \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% +% \fi +% \if@twoside +% \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot +% \iftdir\let\@themargin\evensidemargin +% \else\let\@themargin\oddsidemargin\fi +% \else \let\@thehead\@evenhead +% \let\@thefoot\@evenfoot +% \iftdir\let\@themargin\oddsidemargin +% \else\let\@themargin\evensidemargin\fi +% \fi\fi +% \@@topmargin\topmargin +% \iftombow +% \@@paperwidth\paperwidth \advance\@@paperwidth 6mm\relax +% \@@paperheight\paperheight \advance\@@paperheight 16mm\relax +% \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax +% \fi +% \reset@font +% \normalsize +% \normalsfcodes +% \let\label\@gobble +% \let\index\@gobble +% \let\glossary\@gobble +% \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ +% \@begindvi +% \@outputtombow +% \vskip \@@topmargin +% \moveright\@themargin\vbox{% +% \setbox\@tempboxa \vbox to\headheight{% +% \vfil +% \color@hbox +% \normalcolor +% \hb@xt@\textwidth{\@thehead}% +% \color@endbox +% }% %% 22 Feb 87 +% \dp\@tempboxa \z@ +% \box\@tempboxa +% \vskip \headsep +% \box\@outputbox +% \baselineskip \footskip +% \color@hbox +% \normalcolor +% \hb@xt@\textwidth{\@thefoot}% +% \color@endbox +% }% +% }% +% \global\let\if@newlist\@@if@newlist +% \global \@colht \textheight +% \stepcounter{page}% +% \let\firstmark\botmark +%} +%\plEndIncludeInRelease +%<*plcore> % \end{macrocode} % \end{macro} % @@ -1090,12 +1261,24 @@ % % \begin{macro}{\@setref} % \changes{v1.1c}{1995/09/07}{change \cs{null} to \cs{relax} in \cs{@setref}.} +% \changes{v1.2k}{2017/02/20}{目次で\cs{ref}を使った場合に後ろの空白が消える +% 現象に対処するため、\cs{relax}のあとに\{\}を追加} % |\ref|コマンドや|\pageref|コマンドで参照したとき、これらのコマンドに % よって出力された番号と続く2バイト文字との間に|\xkanjiskip|が入りません。 % これは、|\null|が|\hbox{}|と定義されているためです。 % そこで|\null|を取り除きます。 % このコマンドは、\file{ltxref.dtx}で定義されているものです。 +% +% しかし、単に|\null|を|\relax|に置き換えるだけでは、|\section|のような +% 「動く引数」で|\ref|などを使った場合に、目次で後ろの空白が消えてしまいます。 +% そこで、|\relax|のあとに|{}|を追加しました。従来も|\protect\ref|のように使えば +% 問題ありませんでしたが、\LaTeX{}では展開されても問題が起きないrobustな実装に +% なっていますので、これに従います。 % \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\@setref} +% {Spacing after \ref in moving arguments}% +%<*plcore|platexrelease> \def\@setref#1#2#3{% \ifx#1\relax \protect\G@refundefinedtrue @@ -1103,8 +1286,23 @@ \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else - \expandafter#2#1\relax% change \null to \relax + \expandafter#2#1\relax{}% change \null to \relax{} \fi} +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\@setref} +% {Spacing after \ref in moving arguments}% +%\def\@setref#1#2#3{% +% \ifx#1\relax +% \protect\G@refundefinedtrue +% \nfss@text{\reset@font\bfseries ??}% +% \@latex@warning{Reference `#3' on page \thepage \space +% undefined}% +% \else +% \expandafter#2#1\relax% change \null to \relax +% \fi} +%\plEndIncludeInRelease +%<*plcore> % \end{macrocode} % \end{macro} % @@ -1122,18 +1320,44 @@ % そこで、|\null|を出力しないようマクロを修正します。 % このマクロは、\file{ltmiscen.dtx}で定義されています。 % \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\verb} +% {Disable hyphenation in verb}% +%<*plcore|platexrelease> \if@compatibility\else \def\verb{\relax\ifmmode\hbox\else\leavevmode\fi \bgroup \verb@eol@error \let\do\@makeother \dospecials \verbatim@font\@noligs +% \end{macrocode} +% \LaTeXe\ 2017-04-15に追随して、|\verb|の途中でハイフネーションが起きない +% ように|\language|を設定します(参考:latex2e svn r1405)。 +% \changes{v1.2m}{2017/03/19}{\cs{verb}の途中でハイフネーションが起きない +% ように\cs{language}を設定(sync with ltmiscen.dtx 2017/03/09 v1.1m)} +% \begin{macrocode} + \language\l@nohyphenation \@ifstar\@sverb\@verb} \fi +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\verb} +% {Disable hyphenation in verb}% +%\if@compatibility\else +%\def\verb{\relax\ifmmode\hbox\else\leavevmode\fi +% \bgroup +% \verb@eol@error \let\do\@makeother \dospecials +% \verbatim@font\@noligs +% \@ifstar\@sverb\@verb} +%\fi +%\plEndIncludeInRelease +%<*plcore> % \end{macrocode} % \end{macro} % % % \subsection{tabbing環境} +% +% \begin{macro}{\@stopfield} % \changes{v1.1d}{1996/03/12}{\cs{=}の後ろに和欧文間スペースが入るのを修正} % 相互参照や疑似タイプ入力では、和欧文間スペースが入らないので、|\null|を % 取り除きましたが、|tabbing|環境では、逆に|\null|がないため、 @@ -1142,6 +1366,7 @@ % \begin{macrocode} \gdef\@stopfield{\null\color@endgroup\egroup} % \end{macrocode} +% \end{macro} % % \subsection{用語集の出力} % \LaTeX{}には、なぜか用語集を出力するためのコマンドがありませんので、 diff --git a/Master/texmf-dist/source/platex/base/plext.dtx b/Master/texmf-dist/source/platex/base/plext.dtx index 80a83b1a587..d4cae9c7cf3 100644 --- a/Master/texmf-dist/source/platex/base/plext.dtx +++ b/Master/texmf-dist/source/platex/base/plext.dtx @@ -3,7 +3,7 @@ % % Copyright 2001 ASCII Corporation. % Copyright (c) 2010 ASCII MEDIA WORKS -% Copyright (c) 2016 Japanese TeX Development Community +% Copyright (c) 2016-2017 Japanese TeX Development Community % % This file is part of the pLaTeX2e system (community edition). % ------------------------------------------------------------- @@ -50,6 +50,12 @@ % \changes{v1.2c}{2016/11/19}{Ensure \cs{@parboxto} holds the value % of \cs{@tempdimb} not the register itself (pr/3867) % (sync with ltboxes.dtx v1.1g)} +% \changes{v1.2d}{2017/02/04}{\cs{Kanji}の引数だけでなく後に連続する +% 数字も漢数字になってしまうバグを修正} +% \changes{v1.2e}{2017/03/02}{Make \cs{parbox} Robust +% (sync with ltboxes 2015/01/08 v1.1h)} +% \changes{v1.2f}{2017/03/28}{表と周囲との揃え位置を修正} +% \changes{v1.2f}{2017/03/28}{段落の箱と周囲との揃え位置を修正} % \fi % % \iffalse @@ -58,7 +64,7 @@ \ProvidesFile{plext.dtx} % %\ProvidesPackage{plext} - [2016/11/19 v1.2c pLaTeX package file (community edition)] + [2017/03/28 v1.2f pLaTeX package file (community edition)] %<*driver> \documentclass{jltxdoc} \usepackage{plext} @@ -280,6 +286,43 @@ % \begin{macro}{\fork@array@option} % array環境とtabular環境で与えられた % 第一引数と第二引数の組合せの分岐を行ないます。 +% +% コミュニティ版では、アスキー版で不自然だった表組(array環境およびtabular環境)と +% 周囲の本文との揃え位置を修正し、以下のように設計しました。 +% \begin{itemize} +% \item 周囲の組方向が横組かつ組方向が||, ||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \end{itemize} +% \item 周囲の組方向が横組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\表組の上端が周囲の和文ベースラインと一致 +% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\表組の下端が周囲の和文ベースラインと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\表組の上端が周囲の和文ベースラインと一致 +% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\表組の下端が周囲の和文ベースラインと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置) +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% [TODO] 未定! +%^^A \begin{itemize} +%^^A \item |[t]|指定のとき\\表組の上端が周囲の和文ベースラインと一致 +%^^A \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +%^^A \item |[b]|指定のとき\\表組の下端が周囲の和文ベースラインと一致 +%^^A \end{itemize} +% \end{itemize} +% \changes{v1.2f}{2017/03/28}{表と周囲との揃え位置を修正} % \begin{macrocode} \def\fork@array@option<#1>[#2]{% \@rotswfalse @@ -289,10 +332,16 @@ \iftdir \if #1y\relax\let\box@dir\yoko \if #2t\relax - \def\@begin@alignbox{\raise\cdp\vtop\bgroup\kern\z@\vbox}% + \def\@begin@alignbox{% + \@tempdima=\tbaselineshift + \advance\@tempdima-\ybaselineshift + \raise\@tempdima\vtop\bgroup\kern\z@\vtop}% \let\@end@alignbox\egroup \else\if #2b\relax - \def\@begin@alignbox{\lower\cdp\vbox\bgroup\vbox}% + \def\@begin@alignbox{% + \@tempdima=\tbaselineshift + \advance\@tempdima-\ybaselineshift + \raise\@tempdima\vbox\bgroup\vbox}% \def\@end@alignbox{\kern\z@\egroup}% \else \let\@begin@alignbox\vcenter @@ -311,7 +360,7 @@ \fi\fi \else\let\box@dir\tate \if #2t\relax - \def\@begin@alignbox{\raise\cdp\vtop}% + \let\@begin@alignbox\vtop \let\@end@alignbox\relax \else\if #2b\relax \let\@begin@alignbox\vbox @@ -338,7 +387,7 @@ \fi\fi \else\let\box@dir\yoko \if #2t\relax - \def\@begin@alignbox{\raise\cdp\vtop}% + \let\@begin@alignbox\vtop \let\@end@alignbox\relax \else\if #2b\relax \let\@begin@alignbox\vbox @@ -759,8 +808,10 @@ % % \begin{macro}{\parbox} % 組方向オプションを調べます。 +% \changes{v1.2e}{2017/03/02}{Make \cs{parbox} Robust +% (sync with ltboxes 2015/01/08 v1.1h)} % \begin{macrocode} -\def\parbox{\@ifnextchar<%> +\DeclareRobustCommand\parbox{\@ifnextchar<%> {\X@parbox}{\X@parbox}} % \end{macrocode} % \end{macro} @@ -833,6 +884,43 @@ % % \begin{macro}{\fork@parbox@option} % |\parbox|で与えられた第一引数と第二引数の組合せの分岐を行ないます。 +% +% コミュニティ版では、アスキー版で不自然だった|\parbox|の箱と +% 周囲の本文との揃え位置を修正し、以下のように設計しました。 +% \begin{itemize} +% \item 周囲の組方向が横組かつ組方向が||, ||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致 +% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致 +% \end{itemize} +% \item 周囲の組方向が横組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\箱の上端が周囲の和文文字の高さと一致 +% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\箱の下端が周囲の和文文字の深さと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\箱の上端が周囲の和文文字の高さと一致 +% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\箱の下端が周囲の和文文字の深さと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% \begin{itemize} +% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致 +% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致 +% \end{itemize} +% \item 周囲の組方向が縦組かつ組方向が||指定の場合 +% [TODO] 未定! +%^^A \begin{itemize} +%^^A \item |[t]|指定のとき\\箱の上端が周囲の和文ベースラインと一致 +%^^A \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下) +%^^A \item |[b]|指定のとき\\箱の下端が周囲の和文ベースラインと一致 +%^^A \end{itemize} +% \end{itemize} +% \changes{v1.2f}{2017/03/28}{段落の箱と周囲との揃え位置を修正} % \begin{macrocode} \def\fork@parbox@option<#1>[#2]{% \@rotswfalse @@ -842,7 +930,7 @@ \iftdir \if #1y\relax\let\box@dir\yoko \if #2t\relax - \def\@begin@parbox{\raise\cdp\vtop\bgroup\kern\z@\vtop}% + \def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vtop}% \let\@end@parbox\egroup \else\if #2b\relax \def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}% @@ -851,7 +939,7 @@ \let\@begin@parbox\vcenter \let\@end@parbox\relax \else - \def\@begin@parbox{\hskip\tbaselineshift$\vcenter}% + \def\@begin@parbox{$\vcenter}% \def\@end@parbox{\m@th$}% \fi\fi\fi \else\if #1z\relax\@rotswtrue \let\box@dir\relax @@ -865,7 +953,7 @@ \let\@begin@parbox\vcenter \let\@end@parbox\relax \else - \def\@begin@parbox{\hskip\tbaselineshift$\vcenter}% + \def\@begin@parbox{$\vcenter}% \def\@end@parbox{\m@th$}% \fi\fi\fi \else\let\box@dir\tate @@ -873,7 +961,7 @@ \let\@begin@parbox\vtop \let\@end@parbox\relax \else\if #2b\relax - \def\@begin@parbox{\lower\cdp\vbox}% + \let\@begin@parbox\vbox \let\@end@parbox\relax \else\ifmmode \let\@begin@parbox\vcenter @@ -889,10 +977,10 @@ \else \if #1t\relax\let\box@dir\tate \if #2t\relax - \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}% + \def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vtop}% \let\@end@parbox\egroup \else\if #2b\relax - \def\@begin@parbox{\vbox\bgroup\vbox}% + \def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}% \def\@end@parbox{\kern\z@\egroup}% \else\ifmmode \let\@begin@parbox\vcenter @@ -1167,7 +1255,7 @@ % \begin{macro}{\Kanji} % \begin{macro}{\@Kanji} % \begin{macro}{\kanji} -% |\Kanji|コマンドを定義します。|\Kanji|コマンドは|\Alpha|と同じように、 +% |\Kanji|コマンドを定義します。|\Kanji|コマンドは|\Alph|と同じように、 % カウンタに対してのみ使用することができます。 % % |\kanji|コマンドは、後続の半角数字を漢数字にします。 @@ -1175,10 +1263,13 @@ % ただし、横組モードのときには、何もしません。 % つねに漢数字にしたい場合は、|\kansuji|プリミティブを使ってください。 % +% 後続の数字まで漢数字になってしまうバグを修正しました(Issue~\#33)。 % \changes{v1.0h}{1996/03/13}{\cs{@Kanji}を追加。英語版と同様にした。} +% \changes{v1.2d}{2017/02/04}{\cs{Kanji}の引数だけでなく後に連続する +% 数字も漢数字になってしまうバグを修正} % \begin{macrocode} \def\Kanji#1{\expandafter\@Kanji\csname c@#1\endcsname} -\def\@Kanji#1{\expandafter\kansuji\number #1} +\def\@Kanji#1{\kansuji #1} \def\kanji{\iftdir\expandafter\kansuji\fi} % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/platex/base/plfonts.dtx b/Master/texmf-dist/source/platex/base/plfonts.dtx index c7a40e3cf50..7e116ebb358 100644 --- a/Master/texmf-dist/source/platex/base/plfonts.dtx +++ b/Master/texmf-dist/source/platex/base/plfonts.dtx @@ -3,7 +3,7 @@ % % Copyright 1994-2006 ASCII Corporation. % Copyright (c) 2010 ASCII MEDIA WORKS -% Copyright (c) 2016 Japanese TeX Development Community +% Copyright (c) 2016-2017 Japanese TeX Development Community % % This file is part of the pLaTeX2e system (community edition). % ------------------------------------------------------------- @@ -57,13 +57,20 @@ % \changes{v1.6d}{2016/06/19}{アクセント付き文字をさらに修正(forum:1951)} % \changes{v1.6e}{2016/06/26}{v1.6a以降の修正で全てのアクセント付き文字で % トラブルが相次いだため、いったんパッチを除去。} +% \changes{v1.6f}{2017/02/20}{ptrace.styのplatexrelease対応} +% \changes{v1.6f}{2017/02/20}{\cs{ystrutbox}を追加} +% \changes{v1.6f}{2017/02/20}{\cs{strutbox}を縦横両対応に} +% \changes{v1.6f}{2017/02/20}{\cs{strutbox}の代わりに\cs{ystrutbox}を使用} +% \changes{v1.6f}{2017/02/20}{\cs{ystrut}を追加} +% \changes{v1.6f}{2017/02/20}{\cs{ystrutbox}を組み立てるように} +% \changes{v1.6g}{2017/03/07}{ベースライン補正量を修正} % \fi % % \iffalse %<*driver> \NeedsTeXFormat{pLaTeX2e} % \fi -\ProvidesFile{plfonts.dtx}[2016/06/26 v1.6e pLaTeX New Font Selection Scheme] +\ProvidesFile{plfonts.dtx}[2017/03/07 v1.6g pLaTeX New Font Selection Scheme] % \iffalse \documentclass{jltxdoc} \GetFileInfo{plfonts.dtx} @@ -137,7 +144,7 @@ %<*trace> \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{ptrace} - [2016/04/30 v1.6b Standard pLaTeX package (font tracing)] + [2017/02/20 v1.6f Standard pLaTeX package (font tracing)] \RequirePackageWithOptions{tracefnt} % % \end{macrocode} @@ -406,12 +413,25 @@ % % フォントサイズが変更されたときに、|\set@fontsize|コマンドで更新されます。 % +% 従来、横組ボックス用の支柱は|\strutbox|で、高さと深さが7対3となっていました。 +% これはp\LaTeX{}単体では問題になりませんでしたが、海外製の\LaTeX{}パッケージを +% 縦組で使用した場合に、意図しない幅や高さが取得されることがありました。 +% この不都合を回避するため、コミュニティ版p\LaTeX{}では次の方法をとります。 +% \begin{itemize} +% \item |\ystrutbox|(新設):高さと深さが7対3の横組ボックス用の支柱 +% \item |\tstrutbox|:高さと深さが5対5の縦組ボックス用の支柱 +% \item |\zstrutbox|:高さと深さが7対3の縦組ボックス用の支柱 +% \item |\strutbox|(仕様変更):縦横のディレクションに応じて +% |\tstrutbox|または|\ystrutbox|に展開されるマクロ +% \end{itemize} +% すなわち、従来のp\LaTeX{}における|\strutbox|と同じ挙動を示すのが、 +% 新設された|\ystrutbox|ということになります。 +% % \begin{macro}{\tstrutbox} % \begin{macro}{\zstrutbox} -% |\tstrutbox|は高さと深さが5対5、 -% |\zstrutbox|は高さと深さが7対3の支柱ボックスとなります。 +% |\tstrutbox|は高さと深さが5対5、 +% |\zstrutbox|は高さと深さが7対3の支柱ボックスとなります。 % これらは縦組ボックスの行間の調整などに使います。 -% なお、横組ボックス用の支柱は|\strutbox|で、高さと深さが7対3となっています。 % \begin{macrocode} \newbox\tstrutbox \newbox\zstrutbox @@ -419,24 +439,80 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\ystrutbox} +% |\ystrutbox|は高さと深さが7対3の横組ボックス用の支柱です。 +% \changes{v1.6f}{2017/02/20}{\cs{ystrutbox}を追加} +% \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\ystrutbox} +% {Add \ystrutbox}% +%<*plcore|platexrelease> +\newbox\ystrutbox +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\ystrutbox} +% {Add \ystrutbox}% +%\let\ystrutbox\@undefined +%\plEndIncludeInRelease +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\strutbox} +% |\strutbox|は縦横両対応です。 +% \changes{v1.6f}{2017/02/20}{\cs{strutbox}を縦横両対応に} +% \begin{macrocode} +%\plIncludeInRelease{2017/04/08}{\strutbox} +% {Add \strutbox}% +%<*plcore|platexrelease> +\def\strutbox{\iftdir\tstrutbox\else\ystrutbox\fi} +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\strutbox} +% {Add \strutbox}% +%\newbox\strutbox % emulation purpose only +%\plEndIncludeInRelease +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\strut} -% \begin{macro}{\tstrut} -% \begin{macro}{\zstrut} -% |\strutbox|は|\yoko|ディレクションで組まれていますので、 -% 縦組ボックス内で|\unhcopy|をするとエラーとなります。 -% このマクロは\file{ltplain.dtx}で定義されています。 +% ディレクションに応じて|\ystrutbox|と|\tstrutbox|を使い分けます。 +% ^^A |\strutbox|は|\yoko|ディレクションで組まれていますので、 +% ^^A 縦組ボックス内で|\unhcopy|をするとエラーとなります。 +% 元々このマクロは\file{ltplain.dtx}で定義されています。 % % \changes{v1.1c}{1995/08/24}{``\cs{centerling}~\cs{strut}''の幅がゼロに % なってしまうのを修正} % \changes{v1.3h}{1999/08/09}{縦組のとき、幅のあるボックスになってしまう % のを修正} +% \changes{v1.6f}{2017/02/20}{\cs{strutbox}の代わりに\cs{ystrutbox}を使用} % \begin{macrocode} +%\plIncludeInRelease{2017/04/08}{\strut} +% {Use \ystrutbox}% +%<*plcore|platexrelease> \def\strut{\relax \ifydir - \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi + \ifmmode\copy\ystrutbox\else\unhcopy\ystrutbox\fi \else \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi \fi} +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\strut} +% {Use \ystrutbox}% +%\def\strut{\relax +% \ifydir +% \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi +% \else +% \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi +% \fi} +%\plEndIncludeInRelease +%<*plcore> +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tstrut} +% \begin{macro}{\zstrut} +% \begin{macrocode} \def\tstrut{\relax\hbox{\tate \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}} \def\zstrut{\relax\hbox{\tate @@ -444,6 +520,24 @@ % \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\ystrut} +% \changes{v1.6f}{2017/02/20}{\cs{ystrut}を追加} +% \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\ystrut} +% {Add \ystrut}% +%<*plcore|platexrelease> +\def\ystrut{\relax\hbox{\yoko + \ifmmode\copy\ystrutbox\else\unhcopy\ystrutbox\fi}} +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\ystrut} +% {Add \ystrut}% +%\let\ystrut\@undefined +%\plEndIncludeInRelease +%<*plcore> +% \end{macrocode} % \end{macro} % % @@ -1069,6 +1163,10 @@ % |\fontsize|コマンドの内部形式です。 % ベースラインの設定と、支柱の設定を行ないます。 % \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\set@fontsize} +% {Construct \ystrutbox}% +%<*plcore|platexrelease|trace> \def\set@fontsize#1#2#3{% \@defaultunits\@tempdimb#2pt\relax\@nnil \edef\f@size{\strip@pt\@tempdimb}% @@ -1082,9 +1180,10 @@ \normalbaselineskip\baselineskip % \end{macrocode} % ここで、ベースラインシフトの調整と支柱を組み立てます。 +% \changes{v1.6f}{2017/02/20}{\cs{ystrutbox}を組み立てるように} % \begin{macrocode} \adjustbaseline - \setbox\strutbox\hbox{\yoko + \setbox\ystrutbox\hbox{\yoko \vrule\@width\z@ \@height.7\baselineskip \@depth.3\baselineskip}% \setbox\tstrutbox\hbox{\tate @@ -1097,18 +1196,58 @@ % フォントサイズとベースラインに関する診断情報を出力します。 % \begin{macrocode} %<*trace> - \ifnum \tracingfonts>\tw@ - \ifx\f@linespread\@empty - \let\reserved@a\@empty - \else - \def\reserved@a{\f@linespread x}% - \fi - \@font@info{Changing size to\space - \f@size/\reserved@a \f@baselineskip}% - \aftergroup\type@restoreinfo - \fi + \ifnum \tracingfonts>\tw@ + \ifx\f@linespread\@empty + \let\reserved@a\@empty + \else + \def\reserved@a{\f@linespread x}% + \fi + \@font@info{Changing size to\space + \f@size/\reserved@a \f@baselineskip}% + \aftergroup\type@restoreinfo + \fi % \let\size@update\relax}} +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\set@fontsize} +% {Construct \ystrutbox}% +%\def\set@fontsize#1#2#3{% +% \@defaultunits\@tempdimb#2pt\relax\@nnil +% \edef\f@size{\strip@pt\@tempdimb}% +% \@defaultunits\@tempskipa#3pt\relax\@nnil +% \edef\f@baselineskip{\the\@tempskipa}% +% \edef\f@linespread{#1}% +% \let\baselinestretch\f@linespread +% \def\size@update{% +% \baselineskip\f@baselineskip\relax +% \baselineskip\f@linespread\baselineskip +% \normalbaselineskip\baselineskip +% \adjustbaseline +% \setbox\strutbox\hbox{\yoko +% \vrule\@width\z@ +% \@height.7\baselineskip \@depth.3\baselineskip}% +% \setbox\tstrutbox\hbox{\tate +% \vrule\@width\z@ +% \@height.5\baselineskip \@depth.5\baselineskip}% +% \setbox\zstrutbox\hbox{\tate +% \vrule\@width\z@ +% \@height.7\baselineskip \@depth.3\baselineskip}% +%<*trace> +% \ifnum \tracingfonts>\tw@ +% \ifx\f@linespread\@empty +% \let\reserved@a\@empty +% \else +% \def\reserved@a{\f@linespread x}% +% \fi +% \@font@info{Changing size to\space +% \f@size/\reserved@a \f@baselineskip}% +% \aftergroup\type@restoreinfo +% \fi +% +% \let\size@update\relax}} +%\plEndIncludeInRelease +%<*plcore|trace> % \end{macrocode} % \end{macro} % @@ -1132,7 +1271,8 @@ % しまうため、計算した値が大きくなってしまいます。そこで、このボックス % の中でゼロにするようにしました。また、``/''と比較していたのを``M''に % しました。 -% \changes{v1.3k}{2001/05/10}{\cs{adjustbaseline}の調整量} +% \changes{v1.3k}{2001/05/10}{\cs{adjustbaseline}の調整量 +% (再び`M'を基準にした)} % \begin{macrocode} \newbox\adjust@box \newdimen\adjust@dimen @@ -1154,9 +1294,9 @@ % % \begin{eqnarray*} % \textmc{ベースラインシフト量} &=& -% \{ (\textmc{全角空白の深さ}) - (\textmc{/の深さ}) \} \\ +% \{ (\textmc{全角空白の深さ}) - (\textmc{Mの深さ}) \} \\ % &&- \frac{(\textmc{全角空白の高さ$+$深さ}) -% - (\textmc{/の高さ$+$深さ})}{2} +% - (\textmc{Mの高さ$+$深さ})}{2} % \end{eqnarray*} % % \begin{macrocode} @@ -1584,11 +1724,32 @@ % もとは\file{ltoutenc.dtx}で定義されています。 % % なお、|\_|を数式モードで使うと|\mathunderscore|が実行されます。 +% +% コミュニティ版では縦数式ディレクションでベースライン補正量が +% 変だったのを直しました。あわせて横ディレクションでもベースライン +% 補正に追随するようにしています。 +% \changes{v1.6g}{2017/03/07}{ベースライン補正量を修正} % \begin{macrocode} +% +%\plIncludeInRelease{2017/04/08}{\textunderscore} +% {Baseline shift for \textunderscore}% +%<*plcore|platexrelease> \DeclareTextCommandDefault{\textunderscore}{% \leavevmode\kern.06em - \iftdir\raise-\tbaselineshift\fi + \raise-\iftdir\ifmdir\ybaselineshift + \else\tbaselineshift\fi + \else\ybaselineshift\fi \vbox{\hrule\@width.3em}} +% +%\plEndIncludeInRelease +%\plIncludeInRelease{0000/00/00}{\textunderscore} +% {Baseline shift for \textunderscore}% +%\DeclareTextCommandDefault{\textunderscore}{% +% \leavevmode\kern.06em +% \iftdir\raise-\tbaselineshift\fi +% \vbox{\hrule\@width.3em}} +%\plEndIncludeInRelease +%<*plcore> % \end{macrocode} % \end{macro} % diff --git a/Master/texmf-dist/source/platex/base/plnewsc06.tex b/Master/texmf-dist/source/platex/base/plnewsc06.tex new file mode 100644 index 00000000000..3181bd52266 --- /dev/null +++ b/Master/texmf-dist/source/platex/base/plnewsc06.tex @@ -0,0 +1,114 @@ +%% <2017/04/08> +\documentclass{plnews} + +\publicationyear{2017}% 発行年 +\publicationmonth{04}% 発行月 +\publicationissue{c6}% 番号 +\author{日本語\TeX{}開発コミュニティ(\texttt{https://texjp.org/})} + +\def\pTeX{p\kern-.15em\TeX} +\def\eTeX{$\varepsilon$-\TeX} +\def\epTeX{$\varepsilon$-\pTeX} +\def\pLaTeX{p\kern-.05em\LaTeX} +\def\pLaTeXe{p\kern-.05em\LaTeXe} + +\begin{document} + +\maketitle + +この文書はコミュニティ版\pLaTeXe\ \texttt{<2017/04/08>}について、 +\pLaTeXe\ \texttt{<2016/11/29>}からの更新箇所をまとめたものです。 + + +\section{標準クラスファイルの修正} +\file{jclasses}が全体的に新しくなりました。 +\begin{itemize} +\item (j,t)book/reportクラス:|openleft|オプションを追加しました。これは章の + 始まりを左起こし(横組では見開き起こし、縦組では片起こし)にします。 + 従来は|openright|(横組では片起こし、縦組では見開き起こし)と + |openany|(成り行きに従う)しかありませんでした。なお、|openleft|の場合は + |\cleardoublepage|命令も左起こし用に再々定義します。 +\item (j,t)book/reportクラス:|openany|指定時に|\part|のあとに白ページを + 入れるのをやめました。\LaTeX{}標準クラスの古いバグ修正にようやく追随した + ことになります。 +\item (j,t)bookクラス:タイトルページを必ず奇数ページ目に送るように変更しました。 + 今回の修正により、従来のtbookクラスでタイトルの前に出ていた空白ページは + 無くなります。また、|\frontmatter|と|\mainmatter|も必ず奇数ページ目に送るよう + に変更しました。 +\item タイトルを独立ページとする場合に、奇数レイアウトのページと偶数レイアウト + のページが交互にならない、すなわち両面印刷がうまくいかないことがある問題に + 対処しました。 +\item 縦組の所属表示(|\thanks|)の番号が寝るのは奇妙なので直しました。 +\item トンボに日付を表示する|tombow|オプションの日付表示を\file{jsclasses}に + あわせて桁数固定としました。 +\end{itemize} + + +\section{\file{plext}の揃え位置} +\file{plext}パッケージは|tabular|や|\parbox|などを拡張しますが、罫線やベース +ラインの揃え方に統一性がありませんでした。また、アスキー当時の2001年から +現在に至るまで、\pTeX{}の数々の仕様変更を受けて何度も揃え位置が(勝手に) +変化してきた経緯があります。今回、コミュニティ版で2017年の\pTeX{}に合わせて +仕様を策定することにしました。 +また、\LaTeXe\ 2015/01/01に追随して|\parbox|をrobustにしたほか、 +|\Kanji|命令のバグを修正しました。 + + +\section{支柱の高さ} +高さや深さだけを持つ見えない箱、すなわち支柱として、\LaTeX{}では +|\strutbox|というボックスが用意されます。縦組と横組という概念が追加された +\pLaTeX{}では、|\strutbox|を横組ボックスとして組み、別途に縦組ボックス +|\tstrutbox|を用意していました。これに従えば、支柱を利用したいパッケージ側が +「横組では|\strutbox|を呼び出し、縦組では|\tstrutbox|を呼び出す」と使い分け +る必要があります。 + +\pLaTeX{}と一緒に配布しているパッケージは実際にこの使い分けを行っており、 +ほとんど問題ありませんでした。ところが、\pLaTeX{}縦組を考慮していない外部の +パッケージはこのような運用になっていないため、縦組で|\strutbox|の寸法を取得 +しようとして、支柱の期待に反する値が返ってしまいます。 +結果的に、縦組で\file{amsmath}パッケージの|align|環境内の整列がうまくいかな +かったり、表の|\arraystretch|命令が効かなかったりという問題が生じていました。 + +新しい\pLaTeX{}では、横組ボックス|\ystrutbox|と縦組ボックス|\tstrutbox|を +用意し、|\strutbox|は「現在の組方向を判定し、横組なら|\ystrutbox|を、縦組なら +|\tstrutbox|を返すマクロ」へと変更しました。これで、何も考えなくても +|\strutbox|が常に支柱として機能するようになりました。 + + +\section{\LaTeXe\ \texttt{<2017-04-15>}対応} +\LaTeXe\ \texttt{<2017-04-15>}で入る予定の修正の一部が\pLaTeXe{}と衝突する +部分について、事前に対策を施しました。現時点では、|\verb|の途中で +ハイフネーション行分割を抑制するための修正、および|verbatim|環境中での +ハイフネーション抑制に絡んだ出力ルーチンの命令の修正に対応しました。 +なお、フォーマットの日付が\texttt{yyyy/mm/dd}から\texttt{yyyy-mm-dd}という +ISO書式に変更されましたが、\pLaTeXe{}のフォーマット日付はまだ従来の書式の +ままにしています。 + + +\section{その他のバグ修正} +\begin{itemize} +\item 相互参照の|\ref{ラベル}|や|\pageref{ラベル}|をセクションなどの + 「動く引数」で使うと、目次に出たときに後ろの半角スペースが消えるバグを + 修正しました。 +\item 出力ルーチンに関わるマクロの深さ補正の誤りにより、脚注を含むページ + の版面全体が(特に縦組で顕著に)ずれていたバグを直しました。 +\item 縦数式ディレクションでアンダースコア(|\_|)のベースライン補正量が + 間違っていたのを直しました +\end{itemize} + + +\section{開発版のテストのお願い} +今後p\LaTeX{}に導入するかもしれない修正パッチや仕様変更のテストにご協力くだ +さい。\TeX{}ファイルの冒頭(|\documentclass|より前)で +\begin{verbatim} + \RequirePackage{exppl2e} +\end{verbatim} +と書くことで、現在の開発版をテストすることができます。 +バグ報告やご意見を歓迎します。 +\TeX\ ForumやGitHubのIssueシステムが利用できます。 +\begin{itemize} +\item \texttt{https://github.com/texjporg/platex} +\item \texttt{https://github.com/texjporg/uplatex} +\end{itemize} + +\end{document} diff --git a/Master/texmf-dist/source/platex/base/plvers.dtx b/Master/texmf-dist/source/platex/base/plvers.dtx index da21dc6c688..43a72df3e70 100644 --- a/Master/texmf-dist/source/platex/base/plvers.dtx +++ b/Master/texmf-dist/source/platex/base/plvers.dtx @@ -3,7 +3,7 @@ % % Copyright 1995-2006 ASCII Corporation. % Copyright (c) 2010 ASCII MEDIA WORKS -% Copyright (c) 2016 Japanese TeX Development Community +% Copyright (c) 2016-2017 Japanese TeX Development Community % % This file is part of the pLaTeX2e system (community edition). % ------------------------------------------------------------- @@ -50,12 +50,17 @@ % \changes{v1.0z}{2016/08/26}{\file{platex.cfg}の読み込みを % \file{plcore.ltx}から\file{platex.ltx}へ移動} % \changes{v1.1}{2016/09/14}{起動時のバナーを取得するコードを改良} +% \changes{v1.1a}{2017/02/20}{\LaTeX\ \texttt{!<2017/01/01!>}版対応確認} +% \changes{v1.1b}{2017/03/19}{\cs{l@nohyphenation}の定義を保証 +% (sync with ltfinal 2017/03/09 v2.0t)} +% \changes{v1.1b}{2017/03/19}{\cs{document@default@language}の定義を保証 +% (sync with ltfinal 2017/03/09 v2.0t)} % \fi % % \iffalse %<*driver> % \fi -\ProvidesFile{plvers.dtx}[2016/09/14 v1.1 pLaTeX Kernel (Version Info)] +\ProvidesFile{plvers.dtx}[2017/03/19 v1.1b pLaTeX Kernel (Version Info)] % \iffalse \documentclass{jltxdoc} \GetFileInfo{plvers.dtx} @@ -90,6 +95,7 @@ % \changes{v1.0m}{2004/08/10}{\LaTeX\ \texttt{!<2003/12/01!>}版対応確認} % \changes{v1.0s}{2016/02/01}{\LaTeX\ \texttt{!<2015/01/01!>}版用に修正} % \changes{v1.0u}{2016/04/17}{\LaTeX\ \texttt{!<2016/03/31!>}版対応確認} +% \changes{v1.1a}{2017/02/20}{\LaTeX\ \texttt{!<2017/01/01!>}版対応確認} % % このバージョンのp\LaTeXe{}は、次のバージョンの\LaTeX{}\footnote{% % \LaTeX\ authors: Johannes Braams, David Carlisle, Alan Jeffrey, @@ -103,7 +109,7 @@ %\edef\latexreleaseversion %\edef\p@known@latexreleaseversion %<*2ekernel|latexrelease|platexrelease> - {2016/03/31} + {2017/01/01} % % \end{macrocode} % @@ -119,7 +125,7 @@ % %\edef\platexreleaseversion %<*plcore|platexrelease> - {2016/11/29} + {2017/04/08} % %<*plcore> \def\ppatch@level{0} @@ -172,6 +178,9 @@ % }{} % \end{macrocode} % +% \subsection{起動時に表示するバナー} +% +% \begin{macro}{\everyjob} % 起動時に表示される文字列です。 % \LaTeX{}にパッチがあてられている場合は、それも表示します。 % @@ -232,6 +241,7 @@ \endgroup \platexTMP % % \end{macrocode} +% \end{macro} % % ^^A 起動時に\file{platex.cfg}がある場合、それを読み込むようにする % ^^A コードは、\file{plcore.ltx}から\file{platex.ltx}へ移動しました。 @@ -239,6 +249,40 @@ % \changes{v1.0z}{2016/08/26}{\file{platex.cfg}の読み込みを % \file{plcore.ltx}から\file{platex.ltx}へ移動} % +% \subsection{ハイフネーション関連} +% +% \begin{macro}{\l@nohyphenation} +% \LaTeXe\ 2017-04-15で、|\verb|の途中でハイフネーションが起きないように +% する修正が入りました。この修正には|\l@nohyphenation|が定義済みでなければ +% なりませんが、通常はBabelの定義ファイルによって提供されています。 +% \LaTeXe{}は特殊な状況も想定してltfinalで対策しているようですので、 +% p\LaTeXe{}も念のためplfinalで対策します(参考:latex2e svn r1405)。 +% \changes{v1.1b}{2017/03/19}{\cs{l@nohyphenation}の定義を保証 +% (sync with ltfinal 2017/03/09 v2.0t)} +% \begin{macrocode} +%<*plfinal> +\ifx\l@nohyphenation \@undefined + \newlanguage\l@nohyphenation +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\document@default@language} +% \LaTeXe\ 2017-04-15で導入されたパラメータです。更新タイミングのずれの +% 可能性を考慮し、p\LaTeXe{}でも準備しておきます。verbatim環境の途中で +% 改ページが起きた場合にヘッダでハイフネーションが抑制されないように、 +% |\@outputpage|で|\language|をリセットするときに使われます +% (参考:latex2e svn r1407)。 +% \changes{v1.1b}{2017/03/19}{\cs{document@default@language}の定義を保証 +% (sync with ltfinal 2017/03/09 v2.0t)} +% \begin{macrocode} +\ifx\document@default@language \@undefined + \let\document@default@language\m@ne +\fi +% +% \end{macrocode} +% \end{macro} +% % \subsection{latexreleaseパッケージへの対応} % % 最後に、latexreleaseパッケージへの対応です。 -- cgit v1.2.3