From a690b4a6532aa6444e8e98ff831569378cad7599 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 10 Mar 2019 21:00:33 +0000 Subject: bxjscls (10mar19) git-svn-id: svn://tug.org/texlive/trunk@50318 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx | 96 ++++++++++++++-------- 1 file changed, 60 insertions(+), 36 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx b/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx index 64863c426ad..1c7735c6dca 100644 --- a/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx +++ b/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx @@ -56,7 +56,8 @@ %<*driver> \ProvidesFile{bxjscls.dtx} % - [2019/01/13 v1.9e BXJS document classes] + [2019/03/10 v1.9f BXJS document classes] +% [2019/01/13 v1.9e BXJS document classes] % [2018/10/03 v1.9d BXJS document classes] % [2018/09/04 v1.9c BXJS document classes] % [2018/08/20 v1.9b BXJS document classes] @@ -10351,11 +10352,19 @@ % 不完全なBabelやPolyglossiaの設定を出力してしまう。 % これを防ぐための対策を行う。 % -% \begin{macro}{\bxjs@lang@pkg@options} -% Babel・Polyglossiaのオプション列のテキスト。 +% \begin{macro}{\bxjs@polyglossia@options} +% Polyglossiaのオプション列のテキスト。 % “実際には読み込まれていない”場合は |\relax| になる。 % \begin{macrocode} -\let\bxjs@lang@pkg@options\relax +\let\bxjs@polyglossia@options\relax +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bxjs@babel@options} +% Babelのオプション列のテキスト。 +% “実際には読み込まれていない”場合は |\relax| になる。 +% \begin{macrocode} +\let\bxjs@babel@options\relax % \end{macrocode} % \end{macro} % @@ -10374,7 +10383,7 @@ \bxjs@unset@dupload@proc{polyglossia.sty}% \ClassWarning\bxjs@clsname {Package polyglossia is required}% - \def\bxjs@lang@pkg@options{#1}% + \def\bxjs@polyglossia@options{#1}% % \end{macrocode} % % |polyglossia| の読込が指示された場合、 @@ -10401,7 +10410,7 @@ thus polyglossia will be loaded}% \csundef{ver@polyglossia.sty}% \edef\bxjs@next{% - \noexpand\RequirePackage[\bxjs@lang@pkg@options]{polyglossia}[]% + \noexpand\RequirePackage[\bxjs@polyglossia@options]{polyglossia}[]% }\bxjs@next \setmainlanguage[##1]{##2}% }}} @@ -10412,7 +10421,7 @@ % 読込済マークを外す。 % \begin{macrocode} \g@addto@macro\bxjs@endpreamble@hook{% - \ifx\bxjs@lang@pkg@options\relax + \ifx\bxjs@polyglossia@options\relax \csundef{ver@polyglossia.sty}% \fi} % \end{macrocode} @@ -10435,14 +10444,20 @@ % \end{macrocode} % Polyglossiaの読込済マークは外れるようにしておく。 % \begin{macrocode} - \let\bxjs@lang@pkg@options\relax}% + \let\bxjs@polyglossia@options\relax}% % \end{macrocode} % \end{macro} % +% \begin{macrocode} +\fi +% \end{macrocode} +% % \paragraph{Babelについて} -% {\XeTeX}・{Lua\TeX}以外の場合。 +% {\XeTeX}以外の場合。 +% \Note Pandoc 2.6版において、Lua{\TeX}で用いられる多言語パッケージが +% PolyglossiaからBabelに変更された。 % \begin{macrocode} -\else +\if x\jsEngine\else % \end{macrocode} % % パッケージの読込を検知するため読込済のマークを付けて @@ -10456,14 +10471,14 @@ % \end{macrocode} % パッケージオプションに言語名が空の |main=| があるかを調べる。 % ある場合は |lang=ja| 対策を実行する。 -% \Note |\bxjs@lang@pkg@options| には |main=| を除いたオプション列を +% \Note |\bxjs@babel@options| には |main=| を除いたオプション列を % 格納する。 % \begin{macrocode} - \@tempswafalse \let\bxjs@lang@pkg@options\@empty + \@tempswafalse \let\bxjs@babel@options\@empty \def\bxjs@tmpb{main=}% \@for\bxjs@tmpa:=#1\do{% \ifx\bxjs@tmpa\bxjs@tmpb \@tempswatrue - \else \edef\bxjs@lang@pkg@options{\bxjs@lang@pkg@options,\bxjs@tmpa}% + \else \edef\bxjs@babel@options{\bxjs@babel@options,\bxjs@tmpa}% \fi}% \if@tempswa \ClassWarning\bxjs@clsname @@ -10486,7 +10501,7 @@ % 読込済マークを外す。 % \begin{macrocode} \g@addto@macro\bxjs@endpreamble@hook{% - \ifx\bxjs@lang@pkg@options\relax + \ifx\bxjs@babel@options\relax \expandafter\let\csname ver@babel.sty\endcsname\@undefined \fi} % \end{macrocode} @@ -10498,7 +10513,7 @@ \def\bxjs@pandoc@lang@ja{% \expandafter\let\csname ver@babel.sty\endcsname\@undefined \edef\bxjs@next{% - \noexpand\RequirePackage[\bxjs@lang@pkg@options,english]{babel}[]% + \noexpand\RequirePackage[\bxjs@babel@options,english]{babel}[]% }\bxjs@next \if j\jsEngine \RequirePackage[main=japanese]{pxbabel}[]% @@ -11511,36 +11526,22 @@ FE70,FFF0,% % % これらの置換のうち、後の4つはPandocの |--no-tex-ligatures| オプションを % 指定すれば抑止できるが、「…」の置換を抑止する機能はないようである。 -% そこで、「|\ldots{}| を『…』に戻す」という処置を行う。 +% そこで、「|\ldots| を『…』に戻す」という処置を行う。 % % \begin{macro}{\pandocLdots} % Pandoc用の |\ldots| の実装。 -% 非数式でありかつ後続が |{}| の場合は代わりに |…| を実行する。 +% 非数式である場合は代わりに |…| を実行する。 +% \Note 以前は「Pandocが必ず |\ldots{}| の形で書き出す」ことを利用して +% 後続に |{}| があるかで「元が |…| であるか」を判断していた。 +% ところが、Pandoc 2.7版で |{}| を必ずしも付けなくなったため、 +% 1.9f版で非数式の |\ldots| を全て |…| に戻す動作に変更した。 % \begin{macrocode} \DeclareRobustCommand{\pandocLdots}{% \relax\ifmmode \expandafter\bxjsp@org@ldots - \else \expandafter\bxjsp@ldots@a + \else \expandafter\bxjsp@ja@ellipsis \fi} \def\bxjsp@ja@ellipsis{…} \let\bxjsp@org@ldots\ldots -\def\bxjsp@ldots@a{% - \futurelet\bxjsp@tok\bxjsp@ldots@b} -\def\bxjsp@ldots@b{% - \ifx\bxjsp@tok\bgroup \expandafter\bxjsp@ldots@c - \else \expandafter\bxjsp@org@ldots - \fi} -\def\bxjsp@ldots@c{% - \afterassignment\bxjsp@ldots@d \let\bxjsp@tok=} -\def\bxjsp@ldots@d{% - \futurelet\bxjsp@tok\bxjsp@ldots@e} -\def\bxjsp@ldots@e{% - \ifx\bxjsp@tok\egroup \expandafter\bxjsp@ldots@f - \else \expandafter\bxjsp@ldots@g - \fi} -\def\bxjsp@ldots@f{% - \bxjsp@ja@ellipsis \let\bxjsp@tok=} -\def\bxjsp@ldots@g{% - \expandafter\bxjsp@org@ldots\expandafter{\romannumeral-`} } % \end{macrocode} % \end{macro} % @@ -11552,6 +11553,29 @@ FE70,FFF0,% \ifbxjsp@english\else \let\ldots\pandocLdots \fi} % \end{macrocode} % +% |\ldots| の直後の文字が非英字の場合、Pandocは「|\ldots。|」の +% ように空白を入れずに並べて出力する。 +% 「Pandocは非英字と見なすが{\XeTeX}・{Lua\TeX}は英字と見なす +% (または将来その可能性がある)」文字で、特に日本語文書に現れる +% ものについて、非英字扱いにしておく。 +% \Note Pandocは「Unicode 7.0でGCがLetter」な文字を英字と判定している。 +% \begin{macrocode} +\chardef\bxjsp@cc@other=12 +\@onlypreamble\bxjsp@makeother@range +\def\bxjsp@makeother@range#1#2{% + \@tempcnta"#1\relax \@tempcntb"#2\relax + \loop\ifnum\@tempcnta<\@tempcntb + \catcode\@tempcnta\bxjsp@cc@other + \advance\@tempcnta\@ne + \repeat} +\ifnum0\if x\jsEngine1\fi\if l\jsEngine1\fi>0 + \catcode"1F23B=\bxjsp@cc@other + \bxjsp@makeother@range{9FCD}{A000} + \bxjsp@makeother@range{1B002}{1B170} + \bxjsp@makeother@range{2B820}{2EBF0} +\fi +% \end{macrocode} +% %^^A---------------- % \subsection{PandoLaモジュール} % インストール済であれば読み込む。 -- cgit v1.2.3