texjporg / platex

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

platex / uplatex の sync の効率化など #56

Closed aminophen closed 6 years ago

aminophen commented 6 years ago

現状は platex と uplatex のリポジトリが別々で,毎回 plcore.dtx だけのために sync しないといけないのが手間となっています。今後アスキーが pLaTeX を開発再開した場合に元に戻せるのかという懸念はあるかもしれませんが,コミュニティ版としては,次のリリースで

という仕組みに分離したいのですが,よろしいでしょうか。同時に,そのリリースを以って「e-TeX 必須」かつ「ISO 8601 な日付書式の LaTeX2e 2017-04-15 必須」としたいのですがどうでしょう。

aminophen commented 6 years ago

あと,元号が変わった場合の \和暦 もどうするか考えないといけないような。ファイル構成を変更するのであれば,元号だけを定義したパッケージを作って,それを platex / uplatex / jsclasses / bxjscls / ltjsclasses などで共通で利用するというのもあり得るのかもしれません。

aminophen commented 6 years ago

作業メモを兼ねて書いておきます。

  • plcore.ltx を platex / uplatex 共通のコードだけに制約し,
  • platex.ltx / uplatex.ltx では plcore.ltx および他のフォーマット固有のファイルを \input する

本件を進めるにあたり,(u)plcore.ltx をいじってみました。最新のものは common ブランチです。

以上の変更をすると,plcore.ltx と uplcore.ltx の間の差分がほぼなくなり,実質的には

 \def\pfmtversion
-   {2017/12/10}
+   {2017/12/10u01}
+\def\documentstyle{%
+  \@latex@error{upLaTeX does NOT support LaTeX 2.09 compatibility
+    mode.\MessageBreak Use \noexpand\documentclass instead}{%
+    \noexpand\documentstyle is an old convention of LaTeX 2.09,
+    which has been\MessageBreak obsolete since 1995. upLaTeX is
+    first released in 2007, so we do\MessageBreak not provide any
+    emulation of the LaTeX 2.09 author environment.\MessageBreak
+    New documents should use Standard LaTeX conventions, and
+    start\MessageBreak with the \noexpand\documentclass command.}%
+  \documentclass}

だけになりました。こうなると uplcore.ltx はもはや以下のコードと等価と言えるはずです:

\input plcore.ltx
\edef\pfmtversion{\pfmtversion u01}
\def\documentstyle{…略…}

こうすれば platex → uplatex のカーネルの sync が必要なくなり,手間が省けるだけでなく作業ミスを減らせます!(もちろん jclasses → ujclasses は今後も sync を続ける。)あとは

の2点だけで良いはずですが,「uplatex は独立な方がいい」とか他の意見があれば早めにお願いします。

aminophen commented 6 years ago

2018/03/09 付けで完了とします。e-TeX 必須にする処理や LaTeX 2017-04-15 以降必須とする処理は含んでいませんが,追って必要な時にやります。

aminophen commented 6 years ago

b14ba7e を以って,LaTeX2e 2017-04-15 以降必須にしました。これで latex.ltx に従い自動的に e-TeX 必須となります。(2017-04-15 必須とすることで,例えば \document@default@language を provide したりするコードを削除することができた。)