texlive[42292] Master/texmf-dist: bxcjkjatype (17oct16)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 17 23:23:41 CEST 2016


Revision: 42292
          http://tug.org/svn/texlive?view=revision&revision=42292
Author:   karl
Date:     2016-10-17 23:23:41 +0200 (Mon, 17 Oct 2016)
Log Message:
-----------
bxcjkjatype (17oct16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE
    trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README-ja.md
    trunk/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README.md

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README

Modified: trunk/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE	2016-10-17 01:16:12 UTC (rev 42291)
+++ trunk/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE	2016-10-17 21:23:41 UTC (rev 42292)
@@ -1,12 +1,6 @@
-$BK\%=%U%H%&%'%"$O(B MIT $B%i%$%;%s%9$N2<$GG[I[$5$l$^$9!#(B
-$BCx:n8"$O:n<T$G$"$k!VH,EP(B $B?rG7!JJLL>(B ZR$B!K!W$KB0$7$^$9!#(B
-$B$^$?K\%=%U%H%&%'%"$OL5J]>Z$G$9!#(B
-
-This software is distributed under the MIT License.
-
 The MIT License
 
-Copyright (c) 2013 Takayuki YATO (aka. "ZR")
+Copyright (c) 2016 Takayuki YATO (aka. "ZR")
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Deleted: trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README	2016-10-17 01:16:12 UTC (rev 42291)
+++ trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README	2016-10-17 21:23:41 UTC (rev 42292)
@@ -1,258 +0,0 @@
-BXcjkjatype Package
-===================
-
-LaTeX: Support for Japanese typesetting with pdfLaTeX and CJK package
-
-This package provides working configuration of the CJK package suitable
-for Japanese typesetting of moderate quality. Moreover, it facilitates
-use of the CJK package for pLaTeX users, by providing commands that
-are similar to those used by the pLaTeX kernel and some other packages
-used with it.
-
-Note that while the CJK package supports many input encodings, this
-package supports only UTF-8.
-
-### System requirement
-
-  * TeX format: LaTeX.
-  * TeX engine: pdfTeX (DVI or PDF mode).
-  * DVI driver: Anything. 
-      - Non-default font settings require dvipdfmx or pdfTeX.
-  * Dependent packages:
-      - CJK, CJKutf8, CJKspace, CJKpunct, etoolbox; 
-      - ipaex-type1 (when using default font mapping); 
-      - zhmetrics (when using non-default font mapping).
-
-### Installation
-
-  - `*.sty` → $TEXMF/tex/latex/BXcjkjatype
-
-The bxcjkjatype Package
------------------------
-
-### Package Loading
-
-    \usepackage[<option>,...]{bxcjkjatype}
-
-The available options are described hereafter.
-
-#### Options for auto-wrapping
-
-These options enable one to wrap the document body with a `CJK(*)`
-environemnt automatically and safely. They are suitable when a document
-contains much amount of CJK text, or some “moving arguemnts” hold
-CJK text.
-
-  * `whole`, `wholeCJK*`: Wraps the whole document body with a `CJK*`
-    environment (precisely speaking, with
-    `\begin{uCJK*}` ... `\end{uCJK*}` ).
-  * `wholeCJK`: Wraps the whole document body with a `CJK` environment
-    (precisely speaking, with
-    `\begin{uCJK}` ... `\end{uCJK}` ).
-  * `nowhole` (default): Negation of `wholeCJK*` or `wholeCJK`.
-
-#### Options for “auto-tilde”
-
-The option `autotilde` triggers automatic invocation of `\CJKtilde`,
-which makes a tilde character (`~`) insert “shibuaki”  (a thin space
-between alphabetic and ideographic letters) rather than a no-break
-space (standard). No-break spaces can still be inserted by the command
-`\nbs`, and `\standardtilde` cancels the effect of `\CJKtilde`. (The
-commands mentioned here belong to CJK package.)
-
-  * `autotilde`: Makes `\CJKtilde` invoked at the beginning of every
-    `CJK(*)` environemnt.
-  * `noautotilde` (default): Negation of `autotilde`.
-
-#### Options for font-mapping
-
-One can use preset font mappings in the same way as in the [pxchfon
-package]. Please refer to the manual of that package for detailed
-explanation of this feature.
-
-  * `oneweight`, `nooneweight`: The same as in pxchfon.
-  * One can use font preset options (such as `ms`) which are available
-    in pxchfon (except obsolete ones).
-  * `ipaex-type1`: Disables the font management of this package and
-    directly uses the families provided by the ipaex-type1 package,
-    namely `ipxm` and `ipxg`. In this setting the value of `\mcdefault`
-    is `ipxm` and the value of `\gtdefault` and `\mgdefault` is `ipxg`,
-    so that the higher level commands (such as `\sffamily` and
-    `\gtfamily`) can work correctly.
-
-[pxchfon package]: http://www.ctan.org/pkg/pxchfon
-
-#### Options for CJK font scaling
-
-  * `scale=<real>`: Sets the scaling factor for CJK fonts.
-
-Note: One cannot employ the scaling when using the font setting of the
-`ipaex-type1` option.
-
-#### Other options
-
-  * `everypage`: Outputs the font mapping information on every page of
-    the resulted DVI document. Available only with `dvipdfmx` driver.
-  * `noeverypage` (default): Negation of `everypage`.
-  * driver options:
-    `pdftex`, `dvipdfmx`, `dvips` and `none` are available. The driver
-    setting is relevant only when using font mappings other than the
-    default one (ipaex-type1 fonts), so one need not care of drivers
-    in using default fonts. Moreover, non-default font mappings are
-    supported only by `pdftex` and `dvipdfmx`, and these two values are
-    auto-detected (`pdftex` is default in PDF mode and `dvipdfmx` in
-    DVI mode). Thus one will never need to specify the driver.
-
-### Usage
-
-#### Selecting CJK fonts
-
-The present package provides three “generic” CJK families in the same
-way as pLaTeX plus the [japanese-otf package]: Mincho family
-(`\mcfamily`), Gothic family (`\gtfamily`), and Maru-gothic family
-(`\mgfamily`). In default setting, the font set from the ipaex-type1
-package are allocated; Mincho family uses IPAex Mincho font, and Gothic
-and Maru-gothic families use IPAex Gothic font. This allocation can be
-altered by users.
-
-  * `\mcfamily`: Changes the CJK family to Mincho family. Equivalent
-    to `\CJKfamily{\mcdefault}`.
-  * `\gtfamily`: Changes the CJK family to Gothic family. Equivalent
-    to `\CJKfamily{\gtdefault}`.
-  * `\mgfamily`: Changes the CJK family to Maru-gothic family.
-    Equivalent to `\CJKfamily{\mgdefault}`.
-
-More advanced commands:
-
-  * `\mcdefault`/`\gtdefault`/`\mgdefault`: The names of CJK families
-    corresponding to the three generic families. In the standard
-    allocation their values are `mc`/`gt`/`mg` respectively and the
-    allocation is used as default.
-
-  * `\setCJKfamilydefault{<CJK-family>}`: Declares the default CJK
-    family. This default value is used when family names are missing
-    in some commands, such as `\CJKfamily{}` and `\begin{CJK}{UTF8}{}`.
-    The (redefined) `\normalfont` also switches the CJK family to the
-    family specified by this command.
-
-    The default value of this default family is the “counterpart” of
-    the alphabetic font family which is in effect at the beginning of
-    the document body. (See the next subsection.)
-
-[japanese-otf package]: http://www.ctan.org/pkg/japanese-otf
-
-#### Synchronization of CJK and non-CJK families
-
-The CJK package (and pTeX engine) manages separate “current families”
-for CJK and alphabetic (non-CJK) families. While this treatment has its
-merit, synchronization of the two “current families” is convenient in
-many cases. Accordingly, tHe present package redefines some of the
-LaTeX commands that switches current alphabetic font families so that
-the CJK family will be switched to the counterpart of the current
-alphabetic family, where the “counterpart” is defined as follows:
-
-  * `\rmfamily` (Serif) → `\mcfamily` (Mincho)
-  * `\sffamily` (Sans-serif) → `\gtfamily` (Gothic)
-  * `\ttfamily` (Monospace) → `\gtfamily` (Gothic)
-  * The counterpart of the other families is `\mcfamily`.
-
-Redefined commands:
-
-  * `\rmfamily`/`\sffamily`/`\ttfamily`: Changes the CJK family to
-    the counterpart of the alphabetic font family after executing the
-    original function.
-  * `\normalfont`: Changes the CJK family to the default CJK family
-    specified by `\setCJKfamilydefault` command.
-
-There are shorthand forms of `CJK`/`CJK*` environemnts:
-
-  * `\begin{uCJK*}...\end{uCJK*}`: Equivalent to:
-
-        \begin{CJK*}{UTF8}{counterpart}...\end{CJK*}
-
-    where `counterpart` means the counterpart of the current alphabetic
-    font family.
-
-    Note that this is *not* equivalent to
-
-        \begin{CJK*}{UTF8}{}...\end{CJK*}
-
-    structure, which uses the default CJK family.
-
-  * `\begin{uCJK}...\end{uCJK}`: Equivalent to:
-
-        \begin{CJK}{UTF8}{counterpart}...\end{CJK}
-
-#### Font mapping
-
-The usage of these commands are the same as in the pxchfon package.
-Please refer to the manual of that package for detail.
-
-  * `\setminchofont[<id>]{<font-file>}`
-  * `\setgothicfont[<id>]{<font-file>}`
-  * `\setmarugothicfont[<id>]{<font-file>}`
-  * `\setmediumminchofont[<id>]{<font-file>}`
-  * `\setboldminchofont[<id>]{<font-file>}`
-  * `\setmediumgothicfont[<id>]{<font-file>}`
-  * `\setboldgothicfont[<id>]{<font-file>}`
-  * `\setxboldgothicfont[<id>]{<font-file>}`
-
-However there is a major limitation as to the use of font mapping with
-the pdfTeX engine. One can use only TrueType fonts and moreover
-TTC format is not allowed. (One can use any flavor of OpenType fonts
-when using dvipdfmx.)
-
-Note: The present package does not support the light-weight Mincho font,
-and thus `\setlightminchofont` does nothing useful.
-
-#### Other commands
-
-  * `\UTF{<hexadecimal-number>}`: Inputs a CJK character through Unicode
-    codepoint value. `\UTF{5B57}` is equivalent to `\Unicode{"5B}{"57}`.
-
-  * `\CJKforce{<character>...}`: Afterwards Treats the characters given
-    in the argument as CJK characters (printed using CJK fonts).
-
-  * `\CJKunforce{<character>...}`: Cancels the effect of the `\CJKforce`
-    command.
-
-  * `\@<character>`: Treats the next character (only that occurrence)
-    as a CJK character, when the character is outside ASCII; othersize
-    the normal meaning of `\@` is retained.
-
-  * `\CJKecglue`: Insers a “shibuaki” space. This will be invoked by
-    `~` when `\CJKtilde` is in effect. This command can be redefined by
-    users to adjust the value of shibuaki space, just as `\CJKglue` can
-    be redefined to adjust inter-ideographic space.
-
-    For example:
-
-        \renewcommand{\CJKecglue}{\hspace{0.125em minus 0.125em}}
-
-### Remarks
-
-  * The standard font families provided by this package does *not*
-    support vertical writing, even when using default ipaex-type1 font
-    set. However, the families provided by ipaex-type1 (`ipxm` and
-    `ipxg`) do support vertical writing, and one can utilize these
-    families directly by specifying `ipaex-type1` option.
-
-Revision History
-----------------
-
-  * Version 0.2c <2013/10/18>
-      - Added support of CJK font scaling.
-      - Added `\CJKforce`, `\CJKunforce`, `\@`.
-
-  * Version 0.2b <2013/09/28>
-      - Added `\UTF`, `\CJKecglue`.
-
-  * Version 0.2a <2013/08/08>
-      - Added `autotilde` option.
-
-  * Version 0.2 <2013/08/08>
-      - The first public version.
-
---------------------
-Takayuki YATO (aka. "ZR")  
-http://zrbabbler.sp.land.to/

Modified: trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README-ja.md	2016-10-17 01:16:12 UTC (rev 42291)
+++ trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README-ja.md	2016-10-17 21:23:41 UTC (rev 42292)
@@ -66,6 +66,8 @@
   * `oneweight`、`nooneweight`: pxchfon と同様。
   * pxchfon で利用可能なプリセットオプション(`ms` 等)が利用できる。
     (旧式のものを除く。)
+  * `ttfname=<パターン>`: TTC 代替(後述)を行う場合の TTF フォント名の
+    パターンを指定する。
   * `ipaex-type1`: 本パッケージのフォント管理を無効にし、ipaex-type1
     パッケージのファミリ(`ipxm` と `ipxg`)を直接用いる。この設定では
     `\mcdefault` の値は `ipxm` に、`\gtdefault` の値は `ipxg` になる。
@@ -76,7 +78,8 @@
 
   * `scale=<実数>`: CJK フォントに対するスケール値を設定する。
 
-注意: `ipaex-type1` 指定時は CJK フォントスケールは使用不可。
+※0.3 版より、`ipaex-type1` 指定時も CJK フォントスケールが利用できるよう
+になった。
 
 #### その他のオプション
 
@@ -90,7 +93,43 @@
     されまたこの 2 つの値は常に自動判定可能(PDF モードでは `pdftex`、
     DVI モードでは `dvipdfmx` が既定)なので、実際にはドライバを指定する
     必要はない。
+  * `substmingoth`: CJK パッケージの日本語用総称ファミリとして慣習的に
+    使われているファミリの `min`/`goth`/`maru` について、LaTeX レベル
+    で、本パッケージにおける標準ファミリである `mc`/`gt`/`mg` への代替
+    を設定する。これにより、`min` 等のファミリの使用を前提とした日本語湯
+    テンプレート等を使う場合においても、論理フォントレベルでの代替設定を
+    行う必要がなくなる。
+  * `nosubstmingoth`(既定): `substmingoth` の否定。
+  * `boldbyembolden`(既定): CJK パッケージの“擬似太字”(`\CJKbold`)
+    の処理方法を“重ね打ち”から“合成太字”に変更する。
+  * `noboldbyembolden`: `boldbyembolden` の否定。
 
+#### TTC 代替
+
+pdfTeX エンジンは TTC 形式のフォントをサポートしていない(サポートして
+いる OpenType の形式は単体の TTF グリフのものだけである)。従って、
+`\setminchofont` 命令などで TTC フォントを使おうと望むなら、適当なツール
+を使って TTC フォントファイルを個々の TTF フォントファイルに分解する処理
+を行うことが必須になる。
+
+これはエンジン側の制限仕様のため仕方がないだろう。しかし本パッケージを
+用いる場合には他に問題がある。変換後の TTF フォントはファイル名が元のもの
+と異なるため、プリセット設定(`mobo-moga` 等のオプション)が使えないので
+ある。これを解決するために、0.3 版で `ttfname` オプションが新設された。
+
+例えば、パッケージ読込時に `ttfname=*_1` が指定されたとする。この状態で
+本パッケージの処理において「mogam.ttc の最初(0 番)」が要求された場合、
+代わりに「mogam_1.ttf」というファイルが使われる。同様に、「mogam.ttc の
+1 番、2 番、……」については「mogam_2.ttf」「mogam_3.ttf」……での代替が
+行われる。
+
+`ttfname` で指定するファイル名のパターンには「`*_1`」「`TEMP-*-00.TTF`」
+のように「`*` を 1 つ含み、数字列を含む文字列」が指定できる。この `*` の
+部分は要求の TTC ファイルのベース名(`mogam` 等)で置き換えられ、かつ、
+拡張子がない場合は `.ttf` が補われる。その結果の文字列が TTC の最初(0
+番)のフォントに対する代替ファイル名となる。後続(1 番、2 番、……)の
+代替ファイル名は数字部分をインクリメントしたものになる。
+
 ### 機能
 
 #### CJK フォントの選択
@@ -219,17 +258,25 @@
 更新履歴
 --------
 
-  * Version 0.2c <2013/10/18>
+  * Version 0.3  ‹2016/10/15›
+      - CJKvert パッケージによる縦組と共存を可能にした。
+      - hyperref での PDF 文字列の文字化けを防止し。
+      - `ipaex-type1` 指定時もフォントスケールを可能にした。
+      - `boldbyembolden` 機能を実装。
+      - `ttfname` オプションを追加。
+      - `substmingoth` オプションを追加。
+
+  * Version 0.2c ‹2013/10/18›
       - CJK フォントスケールをサポートした。
       - `\CJKforce`、`\CJKunforce`、`\@` を追加。
 
-  * Version 0.2b <2013/09/28>
+  * Version 0.2b ‹2013/09/28›
       - `\UTF`、`\CJKecglue` を追加。
 
-  * Version 0.2a <2013/08/08>
+  * Version 0.2a ‹2013/08/08›
       - `autotilde` オプションを追加。
 
-  * Version 0.2 <2013/08/08>
+  * Version 0.2  ‹2013/08/08›
       - 最初の公開版。
 
 --------------------

Added: trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README.md	2016-10-17 21:23:41 UTC (rev 42292)
@@ -0,0 +1,282 @@
+BXcjkjatype Package
+===================
+
+LaTeX: Support for Japanese typesetting with pdfLaTeX and CJK package
+
+This package provides working configuration of the CJK package suitable
+for Japanese typesetting of moderate quality. Moreover, it facilitates
+use of the CJK package for pLaTeX users, by providing commands that
+are similar to those used by the pLaTeX kernel and some other packages
+used with it.
+
+Note that while the CJK package supports many input encodings, this
+package supports only UTF-8.
+
+### System requirement
+
+  * TeX format: LaTeX.
+  * TeX engine: pdfTeX (DVI or PDF mode).
+  * DVI driver: Anything. 
+      - Non-default font settings require dvipdfmx or pdfTeX.
+  * Dependent packages:
+      - CJK, CJKutf8, CJKspace, CJKpunct, etoolbox; 
+      - ipaex-type1 (when using default font mapping); 
+      - zhmetrics (when using non-default font mapping).
+
+### Installation
+
+  - `*.sty` → $TEXMF/tex/latex/BXcjkjatype
+
+### License
+
+This package is distributed under the MIT License.
+
+The bxcjkjatype Package
+-----------------------
+
+### Package Loading
+
+    \usepackage[<option>,...]{bxcjkjatype}
+
+The available options are described hereafter.
+
+#### Options for auto-wrapping
+
+These options enable one to wrap the document body with a `CJK(*)`
+environemnt automatically and safely. They are suitable when a document
+contains much amount of CJK text, or some “moving arguemnts” hold
+CJK text.
+
+  * `whole`, `wholeCJK*`: Wraps the whole document body with a `CJK*`
+    environment (precisely speaking, with
+    `\begin{uCJK*}` ... `\end{uCJK*}` ).
+  * `wholeCJK`: Wraps the whole document body with a `CJK` environment
+    (precisely speaking, with
+    `\begin{uCJK}` ... `\end{uCJK}` ).
+  * `nowhole` (default): Negation of `wholeCJK*` or `wholeCJK`.
+
+#### Options for “auto-tilde”
+
+The option `autotilde` triggers automatic invocation of `\CJKtilde`,
+which makes a tilde character (`~`) insert “shibuaki”  (a thin space
+between alphabetic and ideographic letters) rather than a no-break
+space (standard). No-break spaces can still be inserted by the command
+`\nbs`, and `\standardtilde` cancels the effect of `\CJKtilde`. (The
+commands mentioned here belong to CJK package.)
+
+  * `autotilde`: Makes `\CJKtilde` invoked at the beginning of every
+    `CJK(*)` environemnt.
+  * `noautotilde` (default): Negation of `autotilde`.
+
+#### Options for font-mapping
+
+One can use preset font mappings in the same way as in the [pxchfon
+package]. Please refer to the manual of that package for detailed
+explanation of this feature.
+
+  * `oneweight`, `nooneweight`: The same as in pxchfon.
+  * One can use font preset options (such as `ms`) which are available
+    in pxchfon (except obsolete ones).
+  * `ttfname=<pattern>`: Specifies the pattern of the TTF font names
+    which are used when TTC substitution is employed. For example,
+    when `ttfname=*_1` is given, the font “index 0 of mogam.ttc” will
+    map to “mogam_1.ttf”, and similarly, “index 1” to “mogam_2.ttf”
+    and so on.
+  * `ipaex-type1`: Disables the font management of this package and
+    directly uses the families provided by the ipaex-type1 package,
+    namely `ipxm` and `ipxg`. In this setting the value of `\mcdefault`
+    is `ipxm` and the value of `\gtdefault` and `\mgdefault` is `ipxg`,
+    so that the higher level commands (such as `\sffamily` and
+    `\gtfamily`) can work correctly.
+
+[pxchfon package]: http://www.ctan.org/pkg/pxchfon
+
+#### Options for CJK font scaling
+
+  * `scale=<real>`: Sets the scaling factor for CJK fonts.
+
+(With version 0.3 or later, one can employ the scaling even with the
+`ipaex-type1` option.)
+
+#### Other options
+
+  * `everypage`: Outputs the font mapping information on every page of
+    the resulted DVI document. Available only with `dvipdfmx` driver.
+  * `noeverypage` (default): Negation of `everypage`.
+  * driver options:
+    `pdftex`, `dvipdfmx`, `dvips` and `none` are available. The driver
+    setting is relevant only when using font mappings other than the
+    default one (ipaex-type1 fonts), so one need not care of drivers
+    in using default fonts. Moreover, non-default font mappings are
+    supported only by `pdftex` and `dvipdfmx`, and these two values are
+    auto-detected (`pdftex` is default in PDF mode and `dvipdfmx` in
+    DVI mode). Thus one will never need to specify the driver.
+  * `substmingoth`: Applies the substituion of families `min`, `goth`
+    and `maru` (used conventionally for Japanese) with families `mc`,
+    `gt` and `mg` (standard in this package).
+  * `nosubstmingoth` (default): Negation of `substmingoth`.
+  * `boldbyembolden` (default): Changes the implemention of `\CJKbold`
+    (pseudo-bold) from “overstriking” to “synthetic emboldening”.
+  * `noboldbyembolden`: Negation of `boldbyembolden`.
+
+### Usage
+
+#### Selecting CJK fonts
+
+The present package provides three “generic” CJK families in the same
+way as pLaTeX plus the [japanese-otf package]: Mincho family
+(`\mcfamily`), Gothic family (`\gtfamily`), and Maru-gothic family
+(`\mgfamily`). In default setting, the font set from the ipaex-type1
+package are allocated; Mincho family uses IPAex Mincho font, and Gothic
+and Maru-gothic families use IPAex Gothic font. This allocation can be
+altered by users.
+
+  * `\mcfamily`: Changes the CJK family to Mincho family. Equivalent
+    to `\CJKfamily{\mcdefault}`.
+  * `\gtfamily`: Changes the CJK family to Gothic family. Equivalent
+    to `\CJKfamily{\gtdefault}`.
+  * `\mgfamily`: Changes the CJK family to Maru-gothic family.
+    Equivalent to `\CJKfamily{\mgdefault}`.
+
+More advanced commands:
+
+  * `\mcdefault`/`\gtdefault`/`\mgdefault`: The names of CJK families
+    corresponding to the three generic families. In the standard
+    allocation their values are `mc`/`gt`/`mg` respectively and the
+    allocation is used as default.
+
+  * `\setCJKfamilydefault{<CJK-family>}`: Declares the default CJK
+    family. This default value is used when family names are missing
+    in some commands, such as `\CJKfamily{}` and `\begin{CJK}{UTF8}{}`.
+    The (redefined) `\normalfont` also switches the CJK family to the
+    family specified by this command.
+
+    The default value of this default family is the “counterpart” of
+    the alphabetic font family which is in effect at the beginning of
+    the document body. (See the next subsection.)
+
+[japanese-otf package]: http://www.ctan.org/pkg/japanese-otf
+
+#### Synchronization of CJK and non-CJK families
+
+The CJK package (and pTeX engine) manages separate “current families”
+for CJK and alphabetic (non-CJK) families. While this treatment has its
+merit, synchronization of the two “current families” is convenient in
+many cases. Accordingly, tHe present package redefines some of the
+LaTeX commands that switches current alphabetic font families so that
+the CJK family will be switched to the counterpart of the current
+alphabetic family, where the “counterpart” is defined as follows:
+
+  * `\rmfamily` (Serif) → `\mcfamily` (Mincho)
+  * `\sffamily` (Sans-serif) → `\gtfamily` (Gothic)
+  * `\ttfamily` (Monospace) → `\gtfamily` (Gothic)
+  * The counterpart of the other families is `\mcfamily`.
+
+Redefined commands:
+
+  * `\rmfamily`/`\sffamily`/`\ttfamily`: Changes the CJK family to
+    the counterpart of the alphabetic font family after executing the
+    original function.
+  * `\normalfont`: Changes the CJK family to the default CJK family
+    specified by `\setCJKfamilydefault` command.
+
+There are shorthand forms of `CJK`/`CJK*` environemnts:
+
+  * `\begin{uCJK*}...\end{uCJK*}`: Equivalent to:
+
+        \begin{CJK*}{UTF8}{counterpart}...\end{CJK*}
+
+    where `counterpart` means the counterpart of the current alphabetic
+    font family.
+
+    Note that this is *not* equivalent to
+
+        \begin{CJK*}{UTF8}{}...\end{CJK*}
+
+    structure, which uses the default CJK family.
+
+  * `\begin{uCJK}...\end{uCJK}`: Equivalent to:
+
+        \begin{CJK}{UTF8}{counterpart}...\end{CJK}
+
+#### Font mapping
+
+The usage of these commands are the same as in the pxchfon package.
+Please refer to the manual of that package for detail.
+
+  * `\setminchofont[<id>]{<font-file>}`
+  * `\setgothicfont[<id>]{<font-file>}`
+  * `\setmarugothicfont[<id>]{<font-file>}`
+  * `\setmediumminchofont[<id>]{<font-file>}`
+  * `\setboldminchofont[<id>]{<font-file>}`
+  * `\setmediumgothicfont[<id>]{<font-file>}`
+  * `\setboldgothicfont[<id>]{<font-file>}`
+  * `\setxboldgothicfont[<id>]{<font-file>}`
+
+However there is a major limitation as to the use of font mapping with
+the pdfTeX engine. One can use only TrueType fonts and moreover
+TTC format is not allowed. (One can use any flavor of OpenType fonts
+when using dvipdfmx.)
+
+Note: The present package does not support the light-weight Mincho font,
+and thus `\setlightminchofont` does nothing useful.
+
+#### Other commands
+
+  * `\UTF{<hexadecimal-number>}`: Inputs a CJK character through Unicode
+    codepoint value. `\UTF{5B57}` is equivalent to `\Unicode{"5B}{"57}`.
+
+  * `\CJKforce{<character>...}`: Afterwards Treats the characters given
+    in the argument as CJK characters (printed using CJK fonts).
+
+  * `\CJKunforce{<character>...}`: Cancels the effect of the `\CJKforce`
+    command.
+
+  * `\@<character>`: Treats the next character (only that occurrence)
+    as a CJK character, when the character is outside ASCII; othersize
+    the normal meaning of `\@` is retained.
+
+  * `\CJKecglue`: Insers a “shibuaki” space. This will be invoked by
+    `~` when `\CJKtilde` is in effect. This command can be redefined by
+    users to adjust the value of shibuaki space, just as `\CJKglue` can
+    be redefined to adjust inter-ideographic space.
+
+    For example:
+
+        \renewcommand{\CJKecglue}{\hspace{0.125em minus 0.125em}}
+
+### Remarks
+
+  * The standard font families provided by this package does *not*
+    support vertical writing, even when using default ipaex-type1 font
+    set. However, the families provided by ipaex-type1 (`ipxm` and
+    `ipxg`) do support vertical writing, and one can utilize these
+    families directly by specifying `ipaex-type1` option.
+
+Revision History
+----------------
+
+  * Version 0.3  ‹2016/10/15›
+      - Made the vertical writing work well (with CJKvert).
+      - Avoided garbling of PDF strings created by hyperref.
+      - Allowed font scaling even when `ipaex-type1` is set.
+      - Added `boldbyembolden` feature.
+      - Added `ttfname` option.
+      - Added `substmingoth` option.
+
+  * Version 0.2c ‹2013/10/18›
+      - Added support of CJK font scaling.
+      - Added `\CJKforce`, `\CJKunforce`, `\@`.
+
+  * Version 0.2b ‹2013/09/28›
+      - Added `\UTF`, `\CJKecglue`.
+
+  * Version 0.2a ‹2013/08/08›
+      - Added `autotilde` option.
+
+  * Version 0.2  ‹2013/08/08›
+      - The first public version.
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+http://zrbabbler.sp.land.to/


Property changes on: trunk/Master/texmf-dist/doc/latex/bxcjkjatype/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty	2016-10-17 01:16:12 UTC (rev 42291)
+++ trunk/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty	2016-10-17 21:23:41 UTC (rev 42292)
@@ -1,10 +1,16 @@
-%
-% bxcjkjatype.sty
-%
+%%
+%% This is file 'bxcjkjatype.sty'.
+%% 
+%% Copyright (c) 2016 Takayuki YATO (aka. "ZR")
+%%   GitHub:   https://github.com/zr-tex8r
+%%   Twitter:  @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxcjkjatype}[2013/10/18 v0.2c]
+\ProvidesPackage{bxcjkjatype}[2016/10/15 v0.3]
 \def\bxjy at pkgname{bxcjkjatype}
 
 %% definitions
@@ -14,8 +20,10 @@
 
 %--------------------------------------- helpers
 
-%% variables
+%% switches
 \newif\ifbxjy at ok
+\newif\ifbxjy at default@set
+\newif\ifbxjy at byembolden
 
 %% unique tokens
 \def\bxjy at mark{\bxjy at mark@}
@@ -71,8 +79,9 @@
 \newif\ifbxjy at everypage
 \DeclareOption{everypage}{\bxjy at everypagetrue}
 \DeclareOption{noeverypage}{\bxjy at everypagefalse}
+\newif\ifbxjy at ipaex
 \let\bxjy at oneweight=f
-\DeclareOption{ipaex-type1}{\let\bxjy at oneweight=i}
+\DeclareOption{ipaex-type1}{\bxjy at ipaextrue}
 \DeclareOption{oneweight}{\let\bxjy at oneweight=t}
 \DeclareOption{nooneweight}{\let\bxjy at oneweight=f}
 \newif\ifbxjy at autotilde
@@ -84,6 +93,12 @@
 \newif\ifbxjy at CJKspace \bxjy at CJKspacetrue
 \DeclareOption{CJKspace}{\bxjy at CJKspacetrue}
 \DeclareOption{noCJKspace}{\bxjy at CJKspacefalse}
+\newif\ifbxjy at boldbyembolden \bxjy at boldbyemboldentrue
+\DeclareOption{boldbyembolden}{\bxjy at boldbyemboldentrue}
+\DeclareOption{noboldbyembolden}{\bxjy at boldbyemboldenfalse}
+\newif\ifbxjy at substmin
+\DeclareOption{substmingoth}{\bxjy at substmintrue}
+\DeclareOption{nosubstmingoth}{\bxjy at substminfalse}
 % preset spec options
 \def\bxjy at all@main at preset{%
   %(uniweight)
@@ -100,9 +115,18 @@
 \DeclareOption*{%
   \expandafter\bxjy at setkey@a\expandafter{\CurrentOption}}
 \def\bxjy at setkey@a{\setkeys{bxjy}}
+% 'scale=<real>'
 \let\bxjy at scale\relax
 \define at key{bxjy}{scale}{%
   \def\bxjy at scale{#1}}
+% 'verrtical=<val>'
+\let\bxjy at vertical\@empty
+\define at key{bxjy}{vertical}[true]{%
+  \def\bxjy at vertical{#1}}
+% 'ttfname=<val>'
+\let\bxjy at ttfname\@empty
+\define at key{bxjy}{ttfname}{%
+  \def\bxjy at ttfname{#1}}
 %% Dispatch options
 \ProcessOptions*
 
@@ -130,7 +154,7 @@
 \fi
 
 %% Consistency check
-\ifx i\bxjy at oneweight \unless\ifx\bxjy at main@preset\relax
+\ifbxjy at ipaex \unless\ifx\bxjy at main@preset\relax
   \bxjy at error{Preset options cannot go with 'ipaex-type1'}\@ehc
   \let\bxjy at main@preset\relax
 \fi\fi
@@ -138,10 +162,9 @@
   \bxjy at error{Preset options require a valid driver}\@ehc
   \let\bxjy at main@preset\relax
 \fi\fi
-\ifx i\bxjy at oneweight \unless\ifx\bxjy at scale\relax
-  \bxjy at error{Scaling cannot go with 'ipaex-type1'}\@ehc
-  \let\bxjy at main@preset\relax
-\fi\fi
+\ifx \bxjy at driver\bxjy at none
+  \bxjy at boldbyemboldenfalse
+\fi
 
 %% default scale value
 \ifx\bxjy at scale\relax
@@ -153,9 +176,6 @@
   \else \let\bxjy at scale\Cjascale
   \fi
 \fi
-\ifx i\bxjy at oneweight
-  \def\bxjy at scale{1}%
-\fi
 
 %--------------------------------------- preparations
 
@@ -193,6 +213,39 @@
 \newcommand*\EveryCJKUse{%
   \gappto\bxjy at every@cjk at use@hook}
 
+%--------------------------------------- vertical
+
+%% constants
+\chardef\bxjy at vert@none=0
+\chardef\bxjy at vert@false=0
+\chardef\bxjy at vert@=0
+\chardef\bxjy at vert@sub=1
+\chardef\bxjy at vert@main=2
+\chardef\bxjy at vert@true=2
+
+%% \bxjy at vert
+\let\bxjy at vert\bxjy at vert@none
+\ifcsdef{bxjy at vert@\bxjy at vertical}{%
+  \letcs\bxjy at vert{bxjy at vert@\bxjy at vertical}
+}{%else
+  \bxjy at error{Invalid value of 'vertical': \bxjy at vertical}\@ehc
+}
+\ifcase\bxjy at vert %none
+  \AfterEndPreamble{\csuse{CJKhorz}}
+\or %sub
+  \RequirePackage{CJKvert}[]%
+  \AfterEndPreamble{\CJKhorz}
+\or %main
+  \RequirePackage{CJKvert}[]%
+  \AfterEndPreamble{\CJKvert}
+\fi
+\AtBeginDocument{%
+  \@ifpackageloaded{CJKvert}{%
+    \bxjy at patch@CJKsymbol at CJKvert
+    \patchcmd{\CJKvert}{\normalfont}{\bxjy at normalafont}{}{}%
+    \patchcmd{\CJKhorz}{\normalfont}{\bxjy at normalafont}{}{}%
+  }{}}
+
 %--------------------------------------- user interface
 
 %%%%<*> \setminchofont/\setgothicfont/etc.
@@ -214,11 +267,8 @@
   \else
     \@for\bxjy at x:={#1}\do{%
       \ifx @#2@\@namedef{bxjy at FS/\bxjy at x}{#3}%
-      \else\ifx\bxjy at driver\bxjy at dvipdfmx
-        \@namedef{bxjy at FS/\bxjy at x}{:#2:#3}%
-      \else % ttc is unavailable in pdfTeX
-        \bxjy at error{pdfTeX does not support TTC}\@eha
-      \fi\fi}%
+      \else \@namedef{bxjy at FS/\bxjy at x}{:#2:#3}%
+      \fi}%
   \fi}
 \@for\bxjy at x:={%
   mnr,mnb,gtr,gtb,gtx,gtu,mgr%
@@ -240,7 +290,7 @@
 }
 
 %%<*> \setCJKfamilydefault{<fam>}
-\newbool{bxjy at default@set}
+%\newif\ifbxjy at default@set
 \newrobustcmd*\setCJKfamilydefault[1]{%
   \bxjy at default@settrue
   \CJKencfamily{UTF8}{#1}}
@@ -388,6 +438,113 @@
   }#1%
 }
 
+%--------------------------------------- ttfname
+
+%% variables
+\let\bxjy at ttfname@ptn\relax
+\let\bxjy at ttc@info
+
+%% constants
+\begingroup \let\\\@backslashchar
+% The set of allowed characters, all ASCII but the followings:
+% [special in Windwos path name]  \ / ? : * " > < |
+% [special in LaTeX] # % ^ { } ~
+\edef\x{[]!$&'()+,.0-9;=@A-Z_`a-z-]}
+\xdef\bxjy at Rx@tp at a{^(\x*)\\*(\x*)$}
+\xdef\bxjy at Rx@tp at b{^.*\\.[Tt][Tt][Ff]$}
+\xdef\bxjy at Rx@tp at c{^(|.*[^0-9])([0-9]{1,5})([^0-9]*)$}
+\xdef\bxjy at Rx@fn at a{^(.*)\\.\\w+$}
+\xdef\bxjy at Rx@fn at b{^.*\\.[Tt][Tt][Cc]$}
+\endgroup
+
+%% \bxjy at set@match\CS{<number>}
+\@onlypreamble\bxjy at set@match
+\def\bxjy at set@match#1#2{%
+  \expandafter\bxjy at set@match at a\pdflastmatch#2\relax#1}
+\@onlypreamble\bxjy at set@match at a
+\def\bxjy at set@match at a#1>#2\relax#3{\def#3{#2}}
+
+%% \bxjy at set@ttfname at ptn
+% Sets \bxjy at ttfname@ptn.
+\@onlypreamble\bxjy at set@ttfname at ptn
+\def\bxjy at set@ttfname at ptn{%
+  \begingroup
+    \let\bxjy at ttfname@ptn\relax
+    \ifnum\pdfmatch{\bxjy at Rx@tp at a}{\bxjy at ttfname}>\z@
+      \bxjy at set@match\bxjy at ptnA{1}\bxjy at set@match\bxjy at ptnBC{2}%
+      \ifnum\pdfmatch{\bxjy at Rx@tp at b}{\bxjy at ptnBC}=\z@
+        \edef\bxjy at ptnBC{\bxjy at ptnBC.ttf}%
+      \fi
+      \ifnum\pdfmatch{\bxjy at Rx@tp at c}{\bxjy at ptnBC}>\z@
+        \bxjy at set@match\bxjy at ptnB{1}\bxjy at set@match\bxjy at ptnC{3}%
+        \bxjy at set@match\bxjy at ptnN{2}%
+        \xdef\bxjy at ttfname@ptn{%
+          {\bxjy at ptnA}{\bxjy at ptnB}{\bxjy at ptnC}{\bxjy at ptnN}}%
+      \fi
+    \fi
+    \ifx\bxjy at ttfname@ptn\relax
+      \@latex at warning@no at line
+       {Option 'ttfname' has an invalid value:\MessageBreak
+        "\bxjy at ttfname"}%
+    \fi
+  \endgroup}
+
+%% \bxjy at make@ttfname\CS{<ttc-name>}{<number>}
+\@onlypreamble\bxjy at make@ttfname
+\def\bxjy at make@ttfname{%
+  \expandafter\bxjy at make@ttfname at a\bxjy at ttfname@ptn}
+\@onlypreamble\bxjy at make@ttfname at a
+\def\bxjy at make@ttfname at a#1#2#3#4#5#6#7{%
+  \numdef\bxjy at tmpa{#4+#7}\numdef\bxjy at tmpb{1#4-#4}%
+  \ifnum\bxjy at tmpa<\bxjy at tmpb
+    \numdef\bxjy at tmpa{\bxjy at tmpa+\bxjy at tmpb}%
+    \edef\bxjy at tmpa{\expandafter\@gobble\bxjy at tmpa}%
+  \fi
+  \edef\bxjy at tmpb{\detokenize{#6}}%
+  \ifnum\pdfmatch{\bxjy at Rx@fn at a}{\bxjy at tmpb}>\z@
+    \bxjy at set@match\bxjy at tmpb{1}%
+  \fi
+  \edef#5{#1\bxjy at tmpb#2\bxjy at tmpa#3}}
+
+%% set the pattern
+\unless\ifx\bxjy at ttfname\@empty
+  \ifdefined\pdfmatch
+    \bxjy at set@ttfname at ptn
+  \else
+    \bxjy at error
+     {Option 'ttfname' cannot be used because your\MessageBreak
+      pdfTeX engine is too old}\@ehc
+  \fi
+\fi
+
+%% \bxjy at modify@fontname
+\@onlypreamble\bxjy at modify@fontname
+\def\bxjy at modify@fontname{%
+  \bxly at check@ttc\FONT
+  \unless\ifx\bxjy at ttc@info\relax
+    \ifx\bxjy at ttfname@ptn\relax
+      \bxjy at error{pdfTeX does not support TTC}\@eha
+    \else
+      \edef\bxjy at tmpa{\noexpand\FONT\bxjy at ttc@info}%
+      \expandafter\bxjy at make@ttfname\bxjy at tmpa
+    \fi
+  \fi}
+
+%% \bxly at check@ttc{<name>}
+\@onlypreamble\bxly at check@ttc
+\ifdefined\pdfmatch
+\def\bxly at check@ttc#1{%
+  \ifnum\pdfmatch{^:([0-9]+):(.*)}{#1}>\z@
+    \bxjy at set@match\bxjy at tmpa{1}\bxjy at set@match\bxjy at tmpb{2}%
+    \edef\bxjy at ttc@info{{\bxjy at tmpb}{\bxjy at tmpa}}%
+  \else\ifnum\pdfmatch{\bxjy at Rx@fn at b}{#1}>\z@
+    \edef\bxjy at ttc@info{{#1}{0}}%
+  \else\let\bxjy at ttc@info\relax
+  \fi\fi}
+\else
+\def\bxjy at check@ttc#1{\let\bxjy at ttc@info\relax}
+\fi
+
 %--------------------------------------- fontmap internals
 
 %% \bxjy at noembed
@@ -430,7 +587,8 @@
   \let\bxjy at spec\@empty
 \else\ifx\bxjy at driver\bxjy at pdftex
   \def\bxjy at entry@sub#1{%<tfm-spec>
-    \pdfmapline{=#1 <\FONT}}
+    \bxjy at modify@fontname
+    \unless\ifx\FONT\relax \pdfmapline{=#1 <\FONT}\fi}
 \else % invalid in dvips
 \fi\fi
 
@@ -474,6 +632,9 @@
   \not at math@alphabet\mcfamily\relax
   \CJKfamily{\mgdefault}}
 
+%% \bxjy at normalafont
+\letcs\bxjy at normalafont{normalfont }
+
 %% Add patches to \rmfamily, etc.
 \csappto{rmfamily }{%
   \CJKfamily{\mcdefault}}
@@ -491,8 +652,8 @@
     \fontseries\ebdefault\selectfont}
   \providecommand{\ebdefault}{eb}
 \fi
-\let\bxjy at CJKnormal\CJKnormal
-\protected\def\CJKnormal{\bxjy at CJKnormal}
+\protected\def\CJKbold{\CJK at bold@true}
+\protected\def\CJKnormal{\CJK at bold@false}
 
 %% \bxjy at decl@series
 \@onlypreamble\bxjy at decl@series
@@ -520,11 +681,7 @@
 \bxjy at decl@family{mc}{\bxjy at sc unisong}{CJKssub*gt/m/n}{CJKssub*gt/m/n}
 \bxjy at decl@family{gt}{\bxjy at sc unihei}{CJKssub*gt/m/n}{CJKssub*gt/m/n}
 \bxjy at decl@family{mg}{\bxjy at sc unikai}{CJKssub*mg/m/n}{CJKssub*mg/m/n}
-\else\ifx i\bxjy at oneweight
-\renewcommand{\mcdefault}{ipxm}
-\renewcommand{\gtdefault}{ipxg}
-\renewcommand{\mgdefault}{ipxg}
-\fi\fi\fi
+\fi\fi
 
 %% Set default CJK family
 \setCJKfamilydefault{\mcdefault}
@@ -553,6 +710,171 @@
 \fi
 }
 
+%% \bxjy at force@load at font@fam
+\@onlypreamble\bxjy at force@load at font@fam
+\def\bxjy at force@load at font@fam#1{%
+  \begingroup
+    \def\f at encoding{C70}\let\CJK at enc\f at encoding
+    \edef\f at family{#1}\let\CJK at family\f at family
+    \def\f at series{m}\def\f at shape{n}%
+    \xdef\font at name{\csname\curr at fontshape/\f at size\endcsname}%
+    \let\extract at font\relax \pickup at font
+  \endgroup}
+
+%--------------------------------------- ipaex-type1
+\ifbxjy at ipaex
+
+%% default changed
+\renewcommand{\mcdefault}{ipxm}
+\renewcommand{\gtdefault}{ipxg}
+\renewcommand{\mgdefault}{ipxg}
+
+%% scale applied
+\unless\ifdim\bxjy at scale\p@=\p@
+  \def\bxjy at tmpa#1#2#3{%
+    \bxjy at force@load at font@fam{#1}%
+    \expandafter\ifx\csname C70+#1\endcsname\@empty\else
+      \def\bxjy at tmpb{\DeclareFontShape{C70}{#1}}%
+      \bxjy at tmpb{m}{n}{<->sCJK*[\bxjy at scale]#3-r-u}{}%
+      \ifx t#2%
+        \bxjy at tmpb{m}{sl}{<->sCJK*[\bxjy at scale]#3-ro-u}{}%
+        \bxjy at tmpb{bx}{n}{<->sCJKb*[\bxjy at scale]#3-r-u}{\CJKbold}%
+        \bxjy at tmpb{bx}{sl}{<->sCJKb*[\bxjy at scale]#3-ro-u}{\CJKbold}%
+      \fi
+    \fi}
+  \bxjy at tmpa{ipxm}f{ipxm}%
+  \bxjy at tmpa{ipxg}f{ipxg}%
+  \bxjy at tmpa{ipxma}t{ipxm}%
+  \bxjy at tmpa{ipxga}t{ipxg}%
+\fi
+
+\fi
+%--------------------------------------- subst-mingoth
+\ifbxjy at substmin
+
+%% apply
+\def\bxjy at tmpa#1#2{%
+  \bxjy at force@load at font@fam{#1}%
+  \expandafter\ifx\csname C70+#1\endcsname\@empty\else
+    \def\bxjy at tmpb{\DeclareFontShape{C70}{#1}}%
+    \bxjy at tmpb{l}{n}{<->CJKssub*#2/m/n}{}%
+    \bxjy at tmpb{m}{n}{<->CJKssub*#2/m/n}{}%
+    \bxjy at tmpb{bx}{n}{<->CJKssub*#2/bx/n}{\CJKbold}%
+  \fi}
+\bxjy at tmpa{min}{mc}%
+\bxjy at tmpa{goth}{gt}%
+\bxjy at tmpa{maru}{mg}%
+
+\fi
+%--------------------------------------- bold-by-embolden
+\ifbxjy at boldbyembolden %<*boldbyembolden>
+
+%<*>\CJKboldbyembolden/\CJKnoboldbyembolden
+%\newif\ifbxjy at byembolden
+\newcommand*{\CJKboldbyembolden}{\bxjy at byemboldentrue}
+\newcommand*{\CJKnoboldbyembolden}{\bxjy at byemboldenfalse}
+\CJKboldbyembolden % initial value
+
+%% \bxjy at pdfliteraldirect{<pdf-text>}
+\ifx\bxjy at driver\bxjy at pdftex
+  \def\bxjy at pdfliteraldirect#1{\pdfliteral page {#1}}
+\else\ifx\bxjy at driver\bxjy at dvipdfmx
+  \def\bxjy at pdfliteraldirect#1{\special{pdf:literal direct #1}}
+\else
+  \bxjy at error{INTERNAL_ERROR(1)}
+\fi\fi
+
+%% \bxjy at embolden
+\def\bxjy at bsfactor{1.68}
+\def\bxjy at bswd;{\strip at pt\dimexpr\bxjy at bsfactor
+  \dimexpr\CJKboldshift\relax\relax}
+\def\bxjy at embolden{%
+  \bxjy at pdfliteraldirect{q 2 Tr \bxjy at bswd; w}}
+\def\bxjy at embolden@alt{%
+  \bxjy at pdfliteraldirect{2 Tr \bxjy at bswd; w}}
+%% \bxjy at noembolden
+\def\bxjy at noembolden{%
+  \bxjy at pdfliteraldirect{Q}}
+\def\bxjy at noembolden@alt{%
+  \bxjy at pdfliteraldirect{0 Tr}}
+
+%% \bxjy at patch@CJKsymbol at CJKvert
+% Patches to CJKvert version of \CJKsymbol.
+\@onlypreamble\bxjy at patch@CJKsymbol at CJKvert
+\def\bxjy at patch@CJKsymbol at CJKvert{%
+  \global\let\bxjy at patch@CJKsymbol at CJKvert\relax
+  \bxjy at oktrue
+  \expandafter\patchcmd\csname CJKsymbol \endcsname{%from
+    \ifCJK at bold@ \CJK at temp
+      \hbox to \z@{\hss \raise\CJKboldshift\hbox{\CJK at temp}}%
+      \hbox to \z@{\hss \raise-\CJKboldshift\hbox{\CJK at temp}}%
+    \else \CJK at temp
+    \fi
+  }{%to
+    \ifCJK at bold@\ifbxjy at byembolden
+      \bxjy at embolden@alt
+    \fi\fi
+    \CJK at temp
+    \ifCJK at bold@
+      \ifbxjy at byembolden
+        \bxjy at noembolden@alt
+      \else
+        \hbox to \z@{\hss \raise\CJKboldshift\hbox{\CJK at temp}}%
+        \hbox to \z@{\hss \raise-\CJKboldshift\hbox{\CJK at temp}}%
+      \fi
+    \fi
+  }{}{\bxjy at okfalse}%
+  \expandafter\patchcmd\csname CJKsymbol \endcsname{%from
+    \ifCJK at bold@ \CJK at temp
+      \hbox to \CJKboldshift{\hss\CJK at temp}%
+      \hbox to \CJKboldshift{\hss\CJK at temp}%
+    \else \CJK at temp
+    \fi
+  }{%to
+    \ifCJK at bold@\ifbxjy at byembolden
+      \bxjy at embolden@alt
+    \fi\fi
+    \CJK at temp
+    \ifCJK at bold@
+      \ifbxjy at byembolden
+        \bxjy at noembolden@alt
+      \else
+        \kern-\CJKboldshift\hb at xt@\z@{\hss\CJK at temp}%
+        \kern2\dimexpr\CJKboldshift\relax
+        \hb at xt@\z@{\hss\CJK at temp}\kern-\CJKboldshift\relax
+      \fi
+    \fi
+  }{}{\bxjy at okfalse}%
+  \unless\ifbxjy at ok
+    \bxjy at error{Failure in patching to CJKvert}\@ehc
+  \fi
+}
+%% redefine \CJKsymbol
+\@ifpackageloaded{CJKvert}{%
+  % CJKvert version
+  \bxjy at patch@CJKsymbol at CJKvert
+}{% non-CJKvert version
+  \@namedef{CJKsymbol }#1{%
+    \ifCJK at bold@\ifbxjy at byembolden
+      \bxjy at embolden
+    \fi\fi
+    \symbol{#1}%
+    \ifCJK at bold@
+      \ifbxjy at byembolden
+        \bxjy at noembolden
+      \else
+        \kern-\CJKboldshift\hb at xt@\z@{\hss\symbol{#1}}%
+        \kern2\dimexpr\CJKboldshift\relax
+        \hb at xt@\z@{\hss\symbol{#1}}\kern-\CJKboldshift\relax
+      \fi
+    \fi}%
+}
+
+\else                  %<*!boldbyembolden>
+% makes \CJK[no]boldbyembolden no-op
+\newcommand*{\CJKboldbyembolden}{}
+\newcommand*{\CJKnoboldbyembolden}{}
+\fi                    %</boldbyembolden>
 %--------------------------------------- begin-document hook
 
 \ifx\bxjy at driver\bxjy at dvipdfmx  %<*dvipdfmx>
@@ -596,6 +918,34 @@
 %% Invokes first-CJK hook at begin-document
 \AtBeginDocument{\bxjy at first@cjk at use@hook}
 
+%--------------------------------------- PDF-string hack
+
+%%<+> \bxcjkjatypeHyperrefPatchDone
+%% Informs that the patch is applied.
+\let\bxcjkjatypeHyperrefPatchDone=t
+
+%% prepare
+\begingroup
+  \CJK at input{UTF8.bdg}% emerge CJK at UTF8Binding
+\endgroup
+%% register to \pdfstringdefPreHook
+\g at addto@macro\pdfstringdefPreHook{%
+  \@nameuse{CJK at UTF8Binding}% enable UTF8 decoder
+  \ifx~\bxjy@@CJKtilde % \CJKtilde is effective
+    \let\bxjy at org@LetUnexpandableSpace\HyPsd at LetUnexpandableSpace
+    \let\HyPsd at LetUnexpandableSpace\bxjy at LetUnexpandableSpace
+    \let~\@empty
+  \fi
+}
+\def\bxjy@@CJKtilde{\CJKecglue\ignorespaces}
+%% patch to \HyPsd at LetUnexpandableSpace
+\def\bxjy@@tildecmd{~}
+\def\bxjy at LetUnexpandableSpace#1{%
+  \def\bxjy at tmpa{#1}\ifx\bxjy at tmpa\bxjy@@tildecmd\else
+    \bxjy at org@LetUnexpandableSpace#1%
+  \fi
+}
+
 %--------------------------------------- preset font mappings
 
 %% \bxjy at declare@preset{<name>}{<text>}



More information about the tex-live-commits mailing list