texjporg / platex

pLaTeX community edition
BSD 3-Clause "New" or "Revised" License
49 stars 8 forks source link

LaTeX2e 2019-10-01 対応 #85

Closed aminophen closed 4 years ago

aminophen commented 5 years ago

LaTeX2e 2019-10-01 release candidate ('develop' branch) について気づいた点を書いていくコーナーです。【このコメントは随時状況アップデートしていきます】

aminophen commented 5 years ago

pLaTeX の問題ではないですが,情報として。

! Package filehook Error: Detected unknown definition of \InputIfFileExists.
Use the 'force' option of 'filehook' to overwrite it..

→ 対処されています。(2019-08-20)

aminophen commented 5 years ago

\DeclareErrorKanjiFont

\DeclareErrorFont の変更の意図を汲むと,\DeclareErrorKanjiFont も要修正ですね。

\documentclass[12pt]{article}

% Emulate lgrenc.def until v0.13.1 (2015-12-07).
% Note: v0.13.3 (2019-07-09) dropped \DeclareErrorFont due to bug latex/4399.
%\usepackage[LGR,T1]{fontenc}
\DeclareFontEncoding{LGR}{}{}
\DeclareFontSubstitution{LGR}{cmr}{m}{n}
\DeclareErrorFont{LGR}{cmr}{m}{n}{10}

\makeatletter
\usepackage{etoolbox}
\AtEndPreamble{\PackageWarningNoLine{mine}{font size is \f@size}}
\makeatother

\begin{document}

some text

\end{document}

これは platex では Package mine Warning: font size is 10. ですが platex-dev (2019-10-01-pre2) では Package mine Warning: font size is 12. です。ところが

\DeclareErrorKanjiFont{JY1}{mc}{m}{n}{8}

をプリアンブルに一行足してやると,どちらも Package mine Warning: font size is 8. になり,LaTeX の変更意図をキャンセルしてしまっています。後日対応します。

aminophen commented 5 years ago

つい先ほど

Merge branch 'robustness' into develop (latex3/latex2e@cffc0dc)

で沢山のコマンドが robust になりました。これは要チェックです。

aminophen commented 5 years ago

沢山のコマンドが robust になった中で,pLaTeX カーネルが再定義しているものとして以下を見つけました。(github-robust-0123.lvt というテストファイルが用意されていたので,これを単純に pLaTeX で走らせて LaTeX との差分を見ただけ。)

ただ,他に \DeclareMathSymbol など数式用コマンド定義のためのコマンドも改修されているので,mathfam256 パッケージも改修が必要となっておりこちらの方が面倒そう…。

aminophen commented 5 years ago

mathfam256 パッケージは https://github.com/aminophen/mathfam256/compare/8b6e255...d86b940 でなんとかなりました。(従来の LaTeX でもうまく動いていなかった部分があった…。)

pLaTeX カーネルの方は,上の4つも \DeclareRobustCommand に切り替えるつもりですが,この4つ以外にも今回の意図を汲み取ると他の pLaTeX 独自命令も robust にすべきものがありそうです。

aminophen commented 4 years ago
pLaTeX2e <2019-10-01>-pre-2

\AtBeginDvi, \strut, \underline, \usefont と \usekanji, \useroman は robust にしました。

aminophen commented 4 years ago

luatexja を見て,たしかにと思ったので \tstrut, \zstrut, \ystrut も robust にしました。


さて,pLaTeX が追加している「ユーザ用命令」には以下のものもあります:

他に plext のこの辺も気になっています:

これらも robust にしようかと考え中。

(plext の \bou は実際に \section で使うとぶっ壊れるので,必要そう。そうすると okumacro の \kenten も,必要だろうなあ…。あと,標準クラスの \西暦 と \和暦 も?)

h-kitagawa commented 4 years ago

\adjustbaseline, \userelfont, \bou, \kasen

とりあえず LuaTeX-ja では robust にしておきました. 他にないかなあ,というのと.エンジンレベルの \protected を使わない利点は何か,というのが気になっているところです.

edit: 後者は https://tex.stackexchange.com/questions/4736/what-is-the-difference-between-fragile-and-robust-commands の Joseph Wright さんのコメントに書いてありました.

aminophen commented 4 years ago

\adjustbaseline, \userelfont, \bou, \kasen

platex でも robust にしました。「他にないかなあ」は十分調べられていません…。

aminophen commented 4 years ago

ひとまず LaTeX2e 2019-10-01 が出たらその日じゅうに pLaTeX2e 2019-10-01 として出そうと考えています。upLaTeX の方も同日に出します。

aminophen commented 4 years ago

https://github.com/latex3/latex2e/releases/tag/release-2019-10-01

LaTeX2e 2019-10-01 が出ました。本日帰宅次第,pLaTeX2e 2019-10-01 を出します。

aminophen commented 4 years ago

classes.dtx が更新されているのを忘れていました。\normalsize, \Large などフォントサイズ変更命令や \title 系命令が robust になっているので,追随しようと思います。

aminophen commented 4 years ago

texjporg/platex@dd53826 と texjporg/uplatex@c5969bc で jclasses.dtx と ujclasses.dtx を更新しました。(リリースは他の案件が出てくるまで待とうと思っていますが)

aminophen commented 4 years ago

他の案件が出てきてしまった… → 2cb7ea6 ので,これが正常動作していれば pLaTeX2e 2019-10-01 patch level 1 としてリリースしようと思います。