From bc2d0660f4f460b55009ab4e525f2a0e4cde6187 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 8 Sep 2020 03:02:12 +0000 Subject: CTAN sync 202009080302 --- language/japanese/BX/bxjscls/README-ja.md | 8 + language/japanese/BX/bxjscls/README.md | 1 + language/japanese/BX/bxjscls/bxjscls-manual.pdf | Bin 373054 -> 374676 bytes language/japanese/BX/bxjscls/bxjscls-manual.tex | 93 +++++-- language/japanese/BX/bxjscls/bxjscls.dtx | 354 ++++++++++++++++++------ language/japanese/BX/bxjscls/bxjscls.pdf | Bin 1156825 -> 1164447 bytes 6 files changed, 340 insertions(+), 116 deletions(-) (limited to 'language/japanese/BX') diff --git a/language/japanese/BX/bxjscls/README-ja.md b/language/japanese/BX/bxjscls/README-ja.md index 68a65883b3..8ab481f151 100644 --- a/language/japanese/BX/bxjscls/README-ja.md +++ b/language/japanese/BX/bxjscls/README-ja.md @@ -99,6 +99,14 @@ XeLaTeX / LuaLaTeX の上でも日本語処理パッケージと連携して使 更新履歴 -------- + * Version 2.2 〈2020/09/04〉 + - `\strong` 命令・`strongenv` 環境の補填は standard 和文ドライバ + の機能に移した。 + - pandoc 和文ドライバパラメタ `strong` を追加。 + - `custompaper` オプションを追加。 + - (試験的) pandoc 和文ドライバパラメタ `fix-strong`・`fix-code` + を追加。 + - (試験的) 多数の用紙サイズ名オプションを追加。 * Version 2.1 〈2020/05/28〉 - fontspec と互換の `\strong` 命令・`strongenv` 環境を追加。 - 和文等幅フォントの挙動が ltjsclasses と異なるのを修正。 diff --git a/language/japanese/BX/bxjscls/README.md b/language/japanese/BX/bxjscls/README.md index 286eb94408..4182afcebe 100644 --- a/language/japanese/BX/bxjscls/README.md +++ b/language/japanese/BX/bxjscls/README.md @@ -89,6 +89,7 @@ This package is distributed under the BSD 2-Clause License. Revision History ---------------- + * Version 2.2 〈2020/09/04〉 * Version 2.1 〈2020/05/28〉 * Version 2.0a 〈2020/04/04〉 * Version 2.0 〈2020/03/25〉 diff --git a/language/japanese/BX/bxjscls/bxjscls-manual.pdf b/language/japanese/BX/bxjscls/bxjscls-manual.pdf index 07a3706e2b..6f3faa0a54 100644 Binary files a/language/japanese/BX/bxjscls/bxjscls-manual.pdf and b/language/japanese/BX/bxjscls/bxjscls-manual.pdf differ diff --git a/language/japanese/BX/bxjscls/bxjscls-manual.tex b/language/japanese/BX/bxjscls/bxjscls-manual.tex index 20cc993bc0..b34428b16d 100644 --- a/language/japanese/BX/bxjscls/bxjscls-manual.tex +++ b/language/japanese/BX/bxjscls/bxjscls-manual.tex @@ -11,8 +11,8 @@ \bxtexlogoimport{*} \usepackage{shortvrb} \MakeShortVerb{\|} -\newcommand{\PkgVersion}{2.1} -\newcommand{\PkgDate}{2020/05/28} +\newcommand{\PkgVersion}{2.2} +\newcommand{\PkgDate}{2020/09/04} \newcommand{\Pkg}[1]{\textsf{#1}} \newcommand{\Meta}[1]{$\langle$\mbox{}\nobr#1\nobr\mbox{}$\rangle$} \newcommand{\Note}{\par\noindent ※} @@ -510,6 +510,10 @@ dvipdfmx mydoc なお、ここで使われる |zw| は常に((u){\pLaTeX}でも) “規約上の全角幅”(|\jsZw|)を指す (和文フォント設定が未完了のため)。} +\item 真偽値を引数にもつオプションについて、 + 引数を省略してキー名のみを指定した場合は、 + 引数に |true| を与えたものと見なされる。 + 例えば、|use-zw| というオプション指定は |use-zw=true| と等価になる。 \end{itemize} %------------------- @@ -582,8 +586,8 @@ JSクラスには無くBXJSクラスで追加されたクラスオプション 出力用紙サイズ設定 (DVI出力の場合は所謂“papersize special出力”) を抑止する。 - \Note JSクラスとは異なり、出力用紙サイズ設定のオプション |papersize| - は既定で有効である。 + \Note JSクラスの |papersize| オプションの否定に相当する。 + JSクラスとは異なり、|papersize| は既定で有効である。 \Note 出力用紙サイズ設定を行う他のパッケージとの干渉に 対する対策。 \item |ja=|\Meta{名前}\Means @@ -684,7 +688,7 @@ JSクラスには無くBXJSクラスで追加されたクラスオプション \Note つまり |\zw| の命令名が衝突する場合に、 |use-zw=false| を指定する。 \item |disguise-js=|\Meta{真偽値}\Means - JSクラス(例えば\Pkg{bxjsreport}の場合は\Pkg{jsbook}) + 継承元のJSクラス(例えば\Pkg{bxjsbook}の場合は\Pkg{jsbook}) が読込済であるように振舞うか否か。 既定値は真。 \Note つまり「JSクラスの一種である」と判定されると不都合な場合に、 @@ -720,6 +724,11 @@ JSクラスには無くBXJSクラスで追加されたクラスオプション \item |a4varpaper|、|b5varpaper|\Means 用紙サイズ指定オプション |a4var|、|b5var| の別名。 \Note Pandocで |-V papersize=a4var| の指定を可能にするため。 +\item |custompaper|\Means + 実際には何もしない用紙サイズ指定オプション。 + \Note Pandocを使う際に「用紙サイズは |classoption=paper=...| + で指定するから |papersize| は不要だが何か指定しないといけない」 + という場合に |-V papersize=custom| を指定する。 \item |mag=|\Meta{整数}\Means 版面拡大率(mag値)の直接設定。 既定は基底フォントサイズから算出する。 @@ -824,9 +833,6 @@ JSクラスには無くBXJSクラスで追加されたクラスオプション \end{itemize} \item それ以外のクラスでは、本オプションは無効である。 \end{itemize} -\item |strong-cmd=|\Meta{真偽値}\Means - \Pkg{fontspec}パッケージと互換の\,|\strong|命令と - |strongenv|環境を定義するか。 \end{itemize} \paragraph{jlreq文書クラスとの互換用のオプション}\mbox{} @@ -867,7 +873,7 @@ JSクラスには無くBXJSクラスで追加されたクラスオプション |simple-ja-setup=false| と同値。 \Note 以上の8個は1.9版より前で使われた。 \item |textwidth-limit=|\Meta{整数}\Means - |textwidth-limit=|\Meta{整数}|zw| と同値。 + |textwidth=|\Meta{整数}|zw| と同値。 \Note 1.8版より前で使われた。 \item |dvipdfmx-if-dvi|\Means |dvi=dvipdfmx| と同値。 @@ -1173,18 +1179,18 @@ minimalに配置している。}% 明朝・ゴシックのファミリとして用いられる物理フォントの 割当(マッピング)は以下のようになる: \begin{itemize} -\item \pLaTeX、\upLaTeX{}の場合\Means +\item \pLaTeX、\upLaTeX{}\Means クラスでは何もマッピングを設定しない。 従って、DVIウェアでの設定が適用される。 -\item \pdfLaTeX{}の場合\Means +\item \pdfLaTeX\Means \Pkg{bxcjkjatype}パッケージの既定設定となり、 従って、Type1形式のIPAexフォント(\Pkg{ipaex-type1}で提供される) が使用される。 -\item \XeLaTeX{}の場合\Means +\item \XeLaTeX\Means 「原ノ味フォント」が使用される。 \Pkg{zxjafont}パッケージの |haranoaji| プリセットの 単ウェイト使用と同等であるが、パッケージが読み込まれるわけではない。 -\item \LuaLaTeX{}の場合\Means +\item \LuaLaTeX\Means 「原ノ味フォント」が使用される。 \Pkg{luatexja-preset}パッケージの |haranoaji| プリセットの 単ウェイト使用と同等であるが、パッケージが読み込まれるわけではない。 @@ -1206,15 +1212,15 @@ minimalに配置している。}% 和文フォントプリセット(|jafont|)を指定した場合、 具体的には以下のように処理される: \begin{itemize} -\item \pLaTeX、\upLaTeX{}の場合\Means +\item \pLaTeX、\upLaTeX\Means \Pkg{pxchfon}パッケージが「|jafont| の値」をオプション に指定した形で読み込まれる。 -\item \pdfLaTeX{}の場合\Means +\item \pdfLaTeX\Means \Pkg{bxcjkjatype}のオプションに「|jafont| の値」が指定される。 -\item \XeLaTeX{}の場合\Means +\item \XeLaTeX\Means \Pkg{zxjafont}パッケージが「|jafont| の値」をオプション に指定した形で読み込まれる。 -\item \LuaLaTeX{}の場合\Means +\item \LuaLaTeX\Means \Pkg{luatexja-preset}パッケージが「|jafont| の値」をオプション に指定した形で読み込まれる。 \end{itemize} @@ -1281,6 +1287,31 @@ minimal和文ドライバには有効な和文ドライバパラメタは存在 \item |font={|\Meta{文字列}|}|\Means standard和文ドライバが利用する和文フォントパッケージについて 追加のオプションを指定する。 +\item |strong-cmd=|\Meta{真偽値}\Means + \Pkg{fontspec}パッケージと互換の\,|\strong|命令と + |strongenv|環境を定義するか。 + 既定値は真。 +\end{itemize} + +%------------------- +\subsection{pandoc和文ドライバの場合} + +standard用のものに加えて、以下の和文ドライバパラメタが存在する。 + +\begin{itemize} +\item |strong=|\Meta{値}\Means + |\strong| 命令・|strongenv| 環境で実際に適用される書体 + (フォント変更命令)を選択する。 + \begin{itemize} + \item |bold|(既定)\Means + 太字(|\bfseries|)。 + \item |sans|\Means + サンセリフ(|\sffamily|)。 + \item |boldsans|\Means + 太字サンセリフ(|\sffamily\bfseries|)。 + \end{itemize} + \Note PandocモードではPandocの重要(Strong)要素は |\strong| 命令 + で実現されるので、このパラメタの設定に追随する。 \end{itemize} %=========================================================== @@ -1405,17 +1436,6 @@ vscale=0.944, vmarginratio=1:1 和暦表示(|\和暦|)が有効な時の |\today| のテキスト中の年号 (「年」より前の部分、例えば「平成28」) の部分を表すマクロ。 - -\item |\strong{|\Meta{テキスト}|}|\Means - 引数のテキストに、重要性を表す装飾を施す。 - 具体的には\,|\bfseries|(太字)が適用される。 -\item |strongenv|環境\Means - |\strong|の環境版。 - \Note 以上の2つの機能は\Pkg{fontspec}パッケージとの互換を - 目的としたものである。 - |strong-cmd=false| 指定時はこれらの機能は無効になる。 - ただし、\Pkg{fontspec}が読み込まれている場合は、 - 常にそちらの定義が維持される。 \end{itemize} |label-section=modern| の場合に限り、以下の命令が利用できる。 @@ -1446,6 +1466,21 @@ vscale=0.944, vmarginratio=1:1 未定義の場合は |\thesub(sub)section| で代用される。 \end{itemize} +\subsubsection{standard和文ドライバで追加される命令} + +\begin{itemize} +\item |\strong{|\Meta{テキスト}|}|\Means + 引数のテキストに、重要性を表す装飾を施す。 + 具体的には\,|\bfseries|(太字)が適用される。 +\item |strongenv|環境\Means + |\strong|の環境版。 + \Note 以上の2つの機能は\Pkg{fontspec}パッケージとの互換を + 目的としたものである。 + |strong-cmd=false| 指定時はこれらの機能は無効になる。 + ただし、\Pkg{fontspec}が読み込まれている場合は、 + 常にそちらの定義が維持される。 +\end{itemize} + %------------------- \subsection{和文用設定関連} \label{ssec:ja-settings} @@ -1720,7 +1755,7 @@ Class bxjsarticle Warning: Some old font commands were used in text: \end{itemize} また、以下の命令により、文書中で一時的に警告の設定を変えられる。 -\footnote{これらの命令の効果はグルーピングの影響を受ける。} +%\footnote{これらの命令の効果はグルーピングの影響を受ける。} \begin{itemize} \item |\allowoldfontcommands|\Means diff --git a/language/japanese/BX/bxjscls/bxjscls.dtx b/language/japanese/BX/bxjscls/bxjscls.dtx index 6c76dbe6ee..2b949d2c92 100644 --- a/language/japanese/BX/bxjscls/bxjscls.dtx +++ b/language/japanese/BX/bxjscls/bxjscls.dtx @@ -56,7 +56,8 @@ %<*driver> \ProvidesFile{bxjscls.dtx} % - [2020/05/28 v2.1 BXJS document classes] + [2020/09/04 v2.2 BXJS document classes] +% [2020/05/28 v2.1 BXJS document classes] % [2020/04/04 v2.0a BXJS document classes] % [2020/03/25 v2.0 BXJS document classes] % [2020/02/15 v1.9k BXJS document classes] @@ -782,23 +783,52 @@ \DeclareOption{a4paper}{\bxjs@setpaper{a4paper}} \DeclareOption{a5paper}{\bxjs@setpaper{a5paper}} \DeclareOption{a6paper}{\bxjs@setpaper{a6paper}} -\DeclareOption{b4paper}{\bxjs@setpaper{{257truemm}{364truemm}}} -\DeclareOption{b5paper}{\bxjs@setpaper{{182truemm}{257truemm}}} -\DeclareOption{b6paper}{\bxjs@setpaper{{128truemm}{182truemm}}} +\DeclareOption{b4paper}{\bxjs@setpaper{b4j}} +\DeclareOption{b5paper}{\bxjs@setpaper{b5j}} +\DeclareOption{b6paper}{\bxjs@setpaper{b6j}} \DeclareOption{a4j}{\bxjs@setpaper{a4paper}} \DeclareOption{a5j}{\bxjs@setpaper{a5paper}} -\DeclareOption{b4j}{\bxjs@setpaper{{257truemm}{364truemm}}} -\DeclareOption{b5j}{\bxjs@setpaper{{182truemm}{257truemm}}} +\DeclareOption{b4j}{\bxjs@setpaper{b4j}} +\DeclareOption{b5j}{\bxjs@setpaper{b5j}} \DeclareOption{a4var}{\bxjs@setpaper{{210truemm}{283truemm}}} \DeclareOption{b5var}{\bxjs@setpaper{{182truemm}{230truemm}}} +\DeclareOption{letterpaper}{\bxjs@setpaper{letterpaper}} +\DeclareOption{legalpaper}{\bxjs@setpaper{legalpaper}} +\DeclareOption{executivepaper}{\bxjs@setpaper{executivepaper}} +% \end{macrocode} +% |geometry| の用紙サイズのオプション名を全てサポートする。 +% \begin{macrocode} +\def\bxjs@tmpb#1#2{\DeclareOption{#1}{\bxjs@setpaper{#2}}} +\@for\bxjs@tmpa:={% + a0,a1,a2,c0,c1,c2,c3,c4,c5,c6,ansia,ansib,ansic,ansid,ansie% +}\do{\edef\bxjs@next{% + \noexpand\bxjs@tmpb{\bxjs@tmpa paper}{\bxjs@tmpa paper}% +}\bxjs@next} +\bxjs@tmpb{screen}{screen} +% \end{macrocode} +% ただし |b?paper| はJISのB列に従う。 +% \begin{macrocode} +\@for\bxjs@tmpa:={0,1,2,3}\do{\edef\bxjs@next{% + \noexpand\bxjs@tmpb{b\bxjs@tmpa paper}{b\bxjs@tmpa j}% +}\bxjs@next} % \end{macrocode} -% \Note |...var| をPandocで使えるように後ろに |paper| をつけた形を用意する。 +% |B?paper| でISOのB列を指定できるようにする。 +% \begin{macrocode} +\@for\bxjs@tmpa:={0,1,2,3,4,5,6}\do{\edef\bxjs@next{% + \noexpand\bxjs@tmpb{A\bxjs@tmpa paper}{a\bxjs@tmpa paper}% + \noexpand\bxjs@tmpb{B\bxjs@tmpa paper}{b\bxjs@tmpa paper}% +}\bxjs@next} +% \end{macrocode} +% Pandocでは用紙サイズ指定について「後ろに |paper| を付けた名前 +% のオプション」を指定する。 +% これに対処するため、後ろに |paper| をつけた形を用意する。 +% さらに、「用紙サイズを |custom| とすると何も設定しない」ように +% するため |custompaper| というオプションを用意する。 % \begin{macrocode} \DeclareOption{a4varpaper}{\bxjs@setpaper{{210truemm}{283truemm}}} \DeclareOption{b5varpaper}{\bxjs@setpaper{{182truemm}{230truemm}}} -\DeclareOption{letterpaper}{\bxjs@setpaper{letterpaper}} -\DeclareOption{legalpaper}{\bxjs@setpaper{legalpaper}} -\DeclareOption{executivepaper}{\bxjs@setpaper{executivepaper}} +\DeclareOption{screenpaper}{\bxjs@setpaper{screen}} +\DeclareOption{custompaper}{} % \end{macrocode} % \end{ZRnote} % @@ -1977,16 +2007,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\ifbxjs@strong@cmd} -% 〔スイッチ〕 |strong-cmd| の指定値。 -% \begin{macrocode} -\newif\ifbxjs@strong@cmd \bxjs@strong@cmdtrue -\let\bxjs@kv@strongcmd@true\bxjs@strong@cmdtrue -\let\bxjs@kv@strongcmd@false\bxjs@strong@cmdfalse -\define@key{bxjs}{strong-cmd}[true]{\bxjs@set@keyval{strongcmd}{#1}{}} -% \end{macrocode} -% \end{macro} -% % \end{ZRnote} % % \paragraph{オプションの実行} @@ -2679,35 +2699,6 @@ % \end{macrocode} % \end{macro} % -% \begin{ZRnote} -% \begin{macro}{\strong} -% \begin{environment}{strongenv} -% |fontspec| で提供される |\strong| 命令と |strongenv| 環境を -% 全てのエンジンで使えるようにする。 -% \Note -% \begin{macrocode} -\ifbxjs@strong@cmd\jsAtEndOfClass{% - \ifx\strong\@undefined\ifx\strongenv\@undefined - \DeclareRobustCommand{\strongenv}{\bxjs@strong@font}% - \DeclareTextFontCommand{\strong}{\strongenv}% -% \end{macrocode} -% |fontspec| と互換の |\strongfontdeclare| 命令も提供する。 -% ただし、BXJSでの |\strong| は多段階には対応しないので、 -% 引数のコンマ区切りリストのうちの先頭の項目だけが意味をもつ。 -% 既定の設定は |\bfseries|(太字)である。 -% \Note |\strongfontdeclare| は試験的機能とする。 -% \begin{macrocode} - \@ifdefinable{\strongfontdeclare}{\bxjs@protected\def\strongfontdeclare#1{% - \bxjs@strong@font@declare@a#1,\@nil}}% - \def\bxjs@strong@font@declare@a#1,#2\@nil{\def\bxjs@strong@font{#1}}% - \def\bxjs@strong@font{\bfseries}% - \fi\fi -}\fi -% \end{macrocode} -% \end{environment} -% \end{macro} -% \end{ZRnote} -% % \section{フォントサイズ} % % フォントサイズを変える命令(|\normalsize|,|\small| など) @@ -8945,15 +8936,8 @@ % % \paragraph{和文フォント指定の扱い} % -% |standard| 和文ドライバでは |\jsJaFont| の値を和文フォントの -% “プリセット”の指定として用いる。 -% プリセットの値は、{\TeX} Liveの |kanji-config-updmap| コマンドで -% 使う“ファミリ”と同じにすることを想定する。 -% 特別な値として、|auto| は |kanji-config-updmap| で現在指定 -% されているファミリを表す。 -% %^^A---------------- -% \subsection{共通処理(1)} +% \subsection{準備} % % まず minimal ドライバを読み込む。 % \begin{macrocode} @@ -8967,7 +8951,8 @@ \bxjs@simplejasetupfalse % \end{macrocode} % -% \paragraph{japaramオプションの処理} +%^^A---------------- +% \subsection{和文ドライバパラメタ} % % |japaram| の値をkey-valueリストとして解釈する。 % keyvalのファミリは |bxjsStd| とする。 @@ -9016,12 +9001,29 @@ \edef\bxjs@jp@font{#1}} % \end{macrocode} % +% \begin{macro}{\ifbxjs@jp@strong@cmd} +% |\strong| 命令を補填するか。 +% \begin{macrocode} +\newif\ifbxjs@jp@strong@cmd \bxjs@jp@strong@cmdtrue +% \end{macrocode} +% +% |strong-cmd| オプションの処理。 +% \begin{macrocode} +\let\bxjs@kv@strongcmd@true\bxjs@jp@strong@cmdtrue +\let\bxjs@kv@strongcmd@false\bxjs@jp@strong@cmdfalse +\define@key{bxjs}{strong-cmd}[true]{\bxjs@set@keyval{strongcmd}{#1}{}} +% \end{macrocode} +% \end{macro} +% % 実際の |japaram| の値を適用する。 % \begin{macrocode} \def\bxjs@next#1{\bxjs@safe@setkeys{bxjsStd}{#1}} \expandafter\bxjs@next\expandafter{\jsJaParam} % \end{macrocode} % +%^^A---------------- +% \subsection{共通処理(1)} +% % \paragraph{jis2004パラメタ} % % |jis2004| パラメタが有効の場合は、グローバルオプションに |jis2004| @@ -9091,6 +9093,35 @@ % \end{macrocode} % \end{macro} % +% \paragraph{\textbackslash strong命令の補填} +% +% \begin{macro}{\strong} +% \begin{environment}{strongenv} +% |fontspec| で提供される |\strong| 命令と |strongenv| 環境を +% 全てのエンジンで使えるようにする。 +% \Note +% \begin{macrocode} +\ifbxjs@jp@strong@cmd\jsAtEndOfClass{% + \ifx\strong\@undefined\ifx\strongenv\@undefined + \DeclareRobustCommand{\strongenv}{\bxjs@strong@font}% + \DeclareTextFontCommand{\strong}{\strongenv}% +% \end{macrocode} +% |fontspec| と互換の |\strongfontdeclare| 命令も提供する。 +% ただし、BXJSでの |\strong| は多段階には対応しないので、 +% 引数のコンマ区切りリストのうちの先頭の項目だけが意味をもつ。 +% 既定の設定は |\bfseries|(太字)である。 +% \Note |\strongfontdeclare| は試験的機能とする。 +% \begin{macrocode} + \@ifdefinable{\strongfontdeclare}{\bxjs@protected\def\strongfontdeclare#1{% + \bxjs@strong@font@declare@a#1,\@nil}}% + \def\bxjs@strong@font@declare@a#1,#2\@nil{\def\bxjs@strong@font{#1}}% + \def\bxjs@strong@font{\bfseries}% + \fi\fi +}\fi +% \end{macrocode} +% \end{environment} +% \end{macro} +% % \paragraph{共通命令の実装} % % |\jQ| 等の「単位」系の共通命令を実装する。 @@ -9281,6 +9312,13 @@ % % \paragraph{和文フォント指定の扱い} % +% |standard| 和文ドライバでは |\jsJaFont| の値を和文フォントの +% “プリセット”の指定として用いる。 +% プリセットの値は、{\TeX} Liveの |kanji-config-updmap| コマンドで +% 使う“ファミリ”と同じにすることを想定する。 +% 特別な値として、|auto| は |kanji-config-updmap| で現在指定 +% されているファミリを表す。 +% % \begin{macro}{\bxjs@adjust@jafont} % |\jsJaFont| に入っている和文フォント設定の値を“調整”して、 % その結果を |\bxjs@tmpa| に返す。 @@ -9369,6 +9407,29 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\bxjs@resolve@jafont@paren} +% |jafont|パラメタ値内の|()|を解決する。 +% |\bxjs@resolve@jafont@paren\CS| で、|\CS| の内容中の |(...)| +% を |\bxjs@jafont@paren{...}| に置き換える。 +% \begin{macrocode} +\@onlypreamble\bxjs@resolve@jafont@paren +\def\bxjs@resolve@jafont@paren#1{% + \def\bxjs@tmpb{\let#1}% + \expandafter\bxjs@resolve@jafont@paren@a#1\@nil()\@nil\relax} +\@onlypreamble\bxjs@resolve@jafont@paren@a +\def\bxjs@resolve@jafont@paren@a#1(#2)#3\@nil#4\relax{% + \ifx\relax#4\relax \bxjs@tmpb\jsJaFont + \else + \edef\bxjs@tmpa{#1\bxjs@jafont@paren{#2}#3}% + \bxjs@tmpb\bxjs@tmpa + \fi} +% \end{macrocode} +% \end{macro} +% +% \paragraph{和文として出力} +% +% 「欧文扱い」となっている文字を和文として出力するための機能。 +% % \begin{macro}{\jachar} % |\jachar{|\meta{文字}|}|\Means % 和文文字として出力する。 @@ -9478,25 +9539,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\bxjs@resolve@jafont@paren} -% |jafont|パラメタ値内の|()|を解決する。 -% |\bxjs@resolve@jafont@paren\CS| で、|\CS| の内容中の |(...)| -% を |\bxjs@jafont@paren{...}| に置き換える。 -% \begin{macrocode} -\@onlypreamble\bxjs@resolve@jafont@paren -\def\bxjs@resolve@jafont@paren#1{% - \def\bxjs@tmpb{\let#1}% - \expandafter\bxjs@resolve@jafont@paren@a#1\@nil()\@nil\relax} -\@onlypreamble\bxjs@resolve@jafont@paren@a -\def\bxjs@resolve@jafont@paren@a#1(#2)#3\@nil#4\relax{% - \ifx\relax#4\relax \bxjs@tmpb\jsJaFont - \else - \edef\bxjs@tmpa{#1\bxjs@jafont@paren{#2}#3}% - \bxjs@tmpb\bxjs@tmpa - \fi} -% \end{macrocode} -% \end{macro} -% %^^A---------------- % \subsection{{\pTeX}用設定} % @@ -10275,7 +10317,7 @@ % \end{macrocode} % %^^A---------------- -%\subsection{フォント設定} +% \subsection{フォント設定} % % T1エンコーディングに変更する。 % \Note 以下のコードは |\usepackage[T1]{fontenc}| と同等。 @@ -10340,7 +10382,13 @@ %^^A======================================================== % \section{和文ドライバ:pandoc \ZRX} % -% Pandoc用の何か。 +% 「Pandocモード」で使用される和文ドライバ。 +% standardドライバの機能を継承するが、 +% 「Pandocの既定のlatexテンプレート」が使われることを前提として、 +% それとBXJSの設定を整合させるための措置を加えている。 +% +%^^A---------------- +% \subsection{準備} % % standardドライバの設定を引き継ぐ。 % \begin{macrocode} @@ -10368,7 +10416,64 @@ % \end{macro} % %^^A---------------- -%\subsection{duploadシステム} +% \subsection{和文ドライバパラメタ} +% +% keyvalのファミリは |bxjsPan| とする。 +% +% \begin{macro}{\ifbxjs@jp@fix@strong} +% 重要要素を補正するか。 +% \begin{macrocode} +\newif\ifbxjs@jp@fix@strong \bxjs@jp@fix@strongtrue +% \end{macrocode} +% \end{macro} +% +% |fix-strong| オプションの処理。 +% \begin{macrocode} +\let\bxjs@kv@fixstrong@true\bxjs@jp@fix@strongtrue +\let\bxjs@kv@fixstrong@false\bxjs@jp@fix@strongfalse +\define@key{bxjsPan}{fix-strong}[true]{% + \bxjs@set@keyval{fixstrong}{#1}{}} +% \end{macrocode} +% +% \begin{macro}{\ifbxjs@jp@fix@code} +% インラインコード要素を補正するか。 +% \begin{macrocode} +\newif\ifbxjs@jp@fix@code \bxjs@jp@fix@codetrue +% \end{macrocode} +% \end{macro} +% +% |fix-code| オプションの処理。 +% \begin{macrocode} +\let\bxjs@kv@fixcode@true\bxjs@jp@fix@codetrue +\let\bxjs@kv@fixcode@false\bxjs@jp@fix@codefalse +\define@key{bxjsPan}{fix-code}[true]{% + \bxjs@set@keyval{fixcode}{#1}{}} +% \end{macrocode} +% +% \begin{macro}{\bxjs@jp@strong} +% 重要要素に適用される書体変更の種類。 +% \begin{macrocode} +\chardef\bxjs@jp@strong=0 +% \end{macrocode} +% \end{macro} +% +% |strong| オプションの処理。 +% \begin{macrocode} +\def\bxjs@kv@strong@bold{\chardef\bxjs@jp@strong=0 } +\def\bxjs@kv@strong@sans{\chardef\bxjs@jp@strong=1 } +\def\bxjs@kv@strong@boldsans{\chardef\bxjs@jp@strong=2 } +\define@key{bxjsPan}{strong}{% + \bxjs@set@keyval{strong}{#1}{}} +% \end{macrocode} +% +% 実際の |japaram| の値を適用する。 +% \begin{macrocode} +\def\bxjs@next#1{\bxjs@safe@setkeys{bxjsPan}{#1}} +\expandafter\bxjs@next\expandafter{\jsJaParam} +% \end{macrocode} +% +%^^A---------------- +% \subsection{duploadシステム} % % パッケージが重複して読み込まれたときに“option clash”の % 検査をスキップする。 @@ -10424,7 +10529,7 @@ % \end{macro} % %^^A---------------- -%\subsection{lang変数} +% \subsection{lang変数} % |lang=ja| という言語指定が行われると、 % Pandocはこれに対応していないため % 不完全なBabelやPolyglossiaの設定を出力してしまう。 @@ -10607,7 +10712,7 @@ % \end{macrocode} % %^^A---------------- -%\subsection{geometry変数} +% \subsection{geometry変数} % |geometry| を“再度読み込んだ”場合に、 % そのパラメタで |\setpagelayout*| が呼ばれるようにする。 % @@ -10617,7 +10722,7 @@ % \end{macrocode} % %^^A---------------- -%\subsection{CJKmainfont変数} +% \subsection{CJKmainfont変数} % Lua{\TeX}(+ Lua{TeX}-ja)の場合に CJKmainfont 変数が % 指定された場合は |\setmainjfont| の指定にまわす。 % \begin{macrocode} @@ -10626,7 +10731,14 @@ \providecommand*{\setCJKmainfont}{\setmainjfont} \fi % \end{macrocode} -% ムニャムニャムニャ。 +% +%^^A---------------- +% \subsection{Option clash対策} +% +% |xeCJK| パッケージについて。 +% \Note |xeCJK| はクラス内で既に読み込まれているので、 +% |space| は(意図通りに)無効になる。 +% \Note v2.8~v2.9.2の間。 % \begin{macrocode} \if x\jsEngine \expandafter\g@addto@macro\csname opt@xeCJK.sty\endcsname{% @@ -10635,7 +10747,7 @@ % \end{macrocode} % %^^A---------------- -%\subsection{paragraphのマーク} +% \subsection{paragraphのマーク} % % BXJSクラスでは |\paragraph| の見出しの前に |\jsParagraphMark| % で指定したマークが付加され、既定ではこれは“■”である。 @@ -10675,7 +10787,7 @@ % \end{macrocode} % %^^A---------------- -%\subsection{全角空白文字} +% \subsection{全角空白文字} % % \begin{macrocode} \ifnum0\if x\jsEngine1\fi\if l\jsEngine1\fi>\z@ @@ -10690,7 +10802,7 @@ % \end{macrocode} % %^^A---------------- -% \paragraph{hyperref対策} +% \subsection{hyperref対策} % % |hyperref| の |unicode| オプションの固定を行う。 % \begin{macrocode} @@ -10702,6 +10814,74 @@ % \end{macrocode} % %^^A---------------- +% \subsection{Pandoc要素に対する和文用の補正} +% +% \paragraph{重要要素} +% 重要(Strong)要素に対する{\LaTeX}出力は |\textbf| となるが、 +% 代わりに |\strong| を使いたいため、 +% |\textbf| を書き換えてしまう(うわぁ)。 +% \begin{macrocode} +\ifbxjs@jp@fix@strong\ifbxjs@jp@strong@cmd + \let\orgtextbf\textbf + \DeclareRobustCommand\bxjstextbf[1]{% + \begingroup + \let\textbf\orgtextbf + \strong{#1}% + \endgroup}% + \g@addto@macro\bxjs@begin@document@hook{% + \let\textbf\bxjstextbf} +\fi\fi +% \end{macrocode} +% +% |\strong| の書体を設定する。 +% \begin{macrocode} +\jsAtEndOfClass{% + \ifx\strongfontdeclare\@undefined\else + \ifcase\bxjs@jp@strong + \or \strongfontdeclare{\sffamily}% + \or \strongfontdeclare{\sffamily\bfseries}% + \fi + \fi} +% \end{macrocode} +% +% \paragraph{インラインコード要素} +% +% インラインコード(Code)要素に対する{\LaTeX}出力は |\texttt| となる。 +% |\texttt| の両端に欧文ゴーストが入るようにする。 +% \begin{macrocode} +\ifbxjs@jp@fix@code + \chardef\bxjs@eghost@c=23 + \ifx j\jsEngine \xspcode\bxjs@eghost@c=3 + \else\ifx l\jsEngine \ltjsetparameter{alxspmode={\bxjs@eghost@c,3}} + \else\ifx x\jsEngine %no-op + \else \let\bxjs@eghost@c\@undefined + \fi\fi\fi + \ifx\bxjs@eghost@c\@undefined\else + \font\bxjs@eghost@f=ec-lmr10 at 1.23456pt + \def\bxjs@pan@eghost{\bxjs@eghost@f\bxjs@eghost@c} + \let\orgtexttt\texttt + \DeclareRobustCommand\bxjstexttt[1]{% + \ifmmode \nfss@text{\ttfamily #1}% + \else + \ifvmode \leavevmode \fi + \bxjs@pan@eghost\null + \begingroup \ttfamily #1\endgroup + \null\bxjs@pan@eghost + \fi} + \g@addto@macro\bxjs@begin@document@hook{% + \let\texttt\bxjstexttt} +% \end{macrocode} +% さらに |\verb| の外側にも欧文ゴーストが入るようにする。 +% \Note |bxjaghost| の実装を参考にした。 +% \begin{macrocode} + \expandafter\def\expandafter\verb\expandafter{% + \expandafter\bxjs@pan@eghost\verb} + \g@addto@macro\verb@egroup{\bxjs@pan@eghost} + \fi +\fi +% \end{macrocode} +% +%^^A---------------- % \subsection{完了} % おしまい。 % \begin{macrocode} diff --git a/language/japanese/BX/bxjscls/bxjscls.pdf b/language/japanese/BX/bxjscls/bxjscls.pdf index 6e6e090132..5c979592ae 100644 Binary files a/language/japanese/BX/bxjscls/bxjscls.pdf and b/language/japanese/BX/bxjscls/bxjscls.pdf differ -- cgit v1.2.3