OSDN Git Service

luatexja-preset: fix that \ltjnewpreset* did not overwrite presets
[luatex-ja/luatexja.git] / src / ltjsclasses.dtx
index 5e57c11..8709f41 100644 (file)
@@ -44,7 +44,7 @@
 %<*driver>
 \ProvidesFile{ltjsclasses.dtx}
 %</driver>
-  [2018/06/09 ltjsclasses ]
+  [2018/07/30 ltjsclasses ]
 %<*driver>
 \IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{}
 \documentclass{ltjsarticle}
 %
 % [2016-11-24 LTJ] \texttt{autodetect-engine} はLua\TeX-jaでは意味がないので警告を表示させます.
 %
+% [2018-07-30 LTJ] \texttt{uplatex} 指定時のエラーが正しく表示されなかったので修正しました.
+%
 %    \begin{macrocode}
 \newif\ifmingoth
 \mingothfalse
 \newif\ifptexjis
 \ptexjisfalse
 \DeclareOption{winjis}{%
-  \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `winjis' option}}
+  \ClassWarningNoLine{\jsc@clsname}{this class does not support `winjis' option}}
 \DeclareOption{uplatex}{%
-  \ClassErrorNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `uplatex' option}}
+  \ClassError{\jsc@clsname}{this class does not support `uplatex' option}}
 \DeclareOption{autodetect-engine}{%
-  \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `autodetect-engine' option}}
+  \ClassWarningNoLine{\jsc@clsname}{this class does not support `autodetect-engine' option}}
 \DeclareOption{mingoth}{\mingothtrue}
 \DeclareOption{ptexjis}{\ptexjistrue}
 \DeclareOption{jis}{\jisfonttrue}
 %
 % [2017-02-17 LTJ] |\directlua|中で出力される数字のカテゴリーコードが12になるようにしました.
 % この保証をしないと例えば\texttt{listings}パッケージで無限ループになります.
+%
+% [2018-07-02 LTJ] 10ptオプションが指定されており,
+% 実際にはオプティカルサイズの補正が不要なときは「|xreal|オプションは指定されなかった」という
+% 扱いにしておきます.
 %    \begin{macrocode}
 \ifjsc@mag@xreal
-\ifdim\jsc@mpt=\p@\else
+\ifdim\jsc@mpt=\p@\jsc@mag@xrealfalse\else
   \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
   \expandafter\let\csname TU/lmr/m/n/10\endcsname\relax
   \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
 % \end{macro}
 %
 % \begin{macro}{\paragraph}
+% \begin{macro}{\jsParagraphMark}
 %
 %    見出しの後ろで改行されません。
 %
 \fi
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\subparagraph}
 %
 % \end{macro}
 %
 % \begin{macro}{\@dottedtocline}
+% \begin{macro}{\jsTocLine}
 %
 % \LaTeX 本体(\texttt{ltsect.dtx} 参照)での定義と同じですが,
 % |\@tempdima| を |\@lnumwidth| に変えています。
 %
+% [2018-06-23] デフォルトでは\jsTocLine のようにベースラインになります。\par
+% これを変更可能にするため,|\jsTocLine| というマクロに切り出しました。
+% 例えば,仮想ボディの中央
+% {\renewcommand{\jsTocLine}{\leaders \hbox {\hss ・\hss}\hfill}\jsTocLine}
+% に変更したい場合は
+%\begin{verbatim}
+%  \renewcommand{\jsTocLine}{\leaders \hbox {\hss ・\hss}\hfill}
+%\end{verbatim}
+% とします。
+%
 %    \begin{macrocode}
+\def\jsTocLine{\leaders\hbox{%
+  $\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill}
 \def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
   \vskip \z@ \@plus.2\jsc@mpt
   {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
    \@lnumwidth #3\relax
    \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
     {#4}\nobreak
-    \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
-       mu$}\hfill \nobreak\hb@xt@\@pnumwidth{%
+    \jsTocLine \nobreak\hb@xt@\@pnumwidth{%
          \hfil\normalfont \normalcolor #5}\par}\fi}
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \paragraph{図目次と表目次}
 %