OSDN Git Service

Fix a crash by "\ruby{Weierstraß}{ワイエルシュトラス}"
[luatex-ja/luatexja.git] / src / ltjclasses.dtx
index 5efdadb..ff744ea 100644 (file)
 % \changes{v1.7g}{2017/09/19}{内部処理で使ったボックス0を空にした}
 % \changes{v1.7h}{2018/02/04}{和文スケール値\cs{Cjascale}を定義}
 % \changes{v1.8}{2018/07/03}{\cs{today}のデフォルトを和暦から西暦に変更}
+% \changes{v1.8-ltj-16}{2018/10/08}{Lua\TeX-jaが|disablejfam|オプションをサポートしたことによる変更}
 % \fi
 %
 % \iffalse
 %<11pt&bk>\ProvidesFile{ltjtbk11.clo}
 %<12pt&bk>\ProvidesFile{ltjtbk12.clo}
 %</tate>
-  [2018/07/24 v1.8-ltj-15
+  [2018/10/08 v1.8-ltj-16
 %<article|report|book> Standard LuaLaTeX-ja class]
 %<10pt|11pt|12pt>  Standard LuaLaTeX-ja file (size option)]
 %<*driver>
 % 全ての変更点を知りたい場合は、|jclasses.dtx|と|ltjclasses.dtx|で|diff|を
 % とって下さい。
 % \begin{itemize}
-% \item |disablejfam|オプションを無効化。もし
+% \item もし
 % \begin{quotation}
 %   |! LaTeX Error: Too many math alphabets used in version ****.|
 % \end{quotation}
 % |mathrmmc|オプションは、
 % |\mathrm|と|\mathbf|を和欧文両対応にするためのクラスオプションです。
 % \changes{v1.1d}{1992/02/04}{disablejfamの判断を間違えてたのを修正}
+% \changes{v1.8-ltj-16}{2018/10/08}{Lua\TeX-ja本体が,主にメモリ消費を抑える目的で
+%   |disablejfam|オプションをサポートしました。そのため以前出していた警告は削除します。}
 %    \begin{macrocode}
 \if@compatibility
   \@mathrmmctrue
 \else
-  \DeclareOption{disablejfam}{%
-    \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}}
   \DeclareOption{mathrmmc}{\@mathrmmctrue}
 \fi
 %    \end{macrocode}
 %    \LaTeX{} 2.09
 %    compatibility mode では和文数式フォントfamが2重定義されていた
 %    ので、その部分を変更しました。
+%
+% \changes{v1.8-ltj-14}{2018/10/08}{Lua\TeX-ja本体が|disablejfam|オプションをサポートしました。
+%    クラス読み込み時に|disablejfam|オプションを指定した場合は、それがLua\TeX-jaに渡されて
+%       数式中に日本語を記述することができなくなります(|\mathmc|, |\mathgt|も定義されません)。}
 %    \begin{macrocode}
+\unless\ifltj@disablejfam
 \if@compatibility\else
   \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n}
   \DeclareSymbolFontAlphabet{\mathmc}{mincho}
   \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
 }%
 \fi
+\fi
 %    \end{macrocode}
 %
 % ここでは\LaTeX~2.09で一般的に使われていたコマンドを定義しています。
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@tocmarg}
+% \begin{macro}{\@tocrmarg}
 % 複数行にわたる場合の右マージンです。
 %    \begin{macrocode}
 \newcommand{\@tocrmarg}{2.55em}
 %
 % このマクロは\file{ltsect.dtx}で定義されています。
 %    \begin{macrocode}
+\providecommand*\protected@file@percent{}
 \def\addcontentsline#1#2#3{%
   \protected@write\@auxout
     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
 %<tate>\@temptokena{\rensuji{\thepage}}}%
 %<yoko>\@temptokena{\thepage}}%
     {\string\@writefile{#1}%
-       {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
+       {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+               \protected@file@percent}}%
 }
 %    \end{macrocode}
 % \end{macro}