============================================================ Japanese Demo (日本語デモ) for `sphinxcontrib.cjkspacer` ============================================================ `Homepage `_ .. raw:: html Click this to highlight the inserted spacers (チェックを入れて挿入されたspacerを強調表示) From `README.md `_ =================================================================================================== With `sphinxcontrib.trimblank` and `sphinxcontrib.cjkspacer` ------------------------------------------------------------ A `Sphinx `_ extension, which inserts spacer elements between the Chinese Japanese Korean (CJK) characters and the other characters. Some of the word processors, e.g., Microsoft® Word and TeX (at least in the case of pTeX), adjust the distances (spaces) between the CJK characters and the others automatically (c.f. `Requirements for Japanese Text Layout#spacing between characters `_). Unfortunately, however, HTML with CSS does not have this function as of CSS3 (See the `text-spacing` property discussed in some old versions of W3C® Working Draft, e.g., `1 September 2011 `_ and `19 January 2012 `_). This Sphinx extension provides an alternative function to adjust such distances. 異なる種類の文字種間の空き量(スペース)を調整する機能を持たないフォーマットに、日本語を含むCJK文字とその他の文字種の間での空き量調整機能を与えるSphinx拡張です。 この拡張と `sphinxcontrib-trimblank `_ などを併用することで、HTML出力において、数字/英語と日本語の間への手動での半角スペース挿入・除去を行うよりも自然な仕上がりを実現することを目指しています(`日本語によるデモ `_)。 ただし、現状では `組版処理の要件(日本語版) `_ に記載されているような高度な調整は行っておらず、2種の判断基準による1種類の空き量しか導入していません。 CSS3で延期された `text-spacing` が今後CSS4などで導入されればこの拡張は不要になることでしょう。 Without the extensions ------------------------------------------------------------ .. raw:: html

異なる種類の文字種間の空き量(スペース)を調整する機能を持たないフォーマットに、日本語を含むCJK文字とその他の文字種の間での空き量調整機能を与えるSphinx拡張です。この拡張とsphinxcontrib-trimblankなどを併用することで、HTML出力において、数字/英語と日本語の間への手動での半角スペース挿入・除去を行うよりも自然な仕上がりを実現することを目指しています(日本語によるデモ)。

ただし、現状では組版処理の要件(日本語版)に記載されているような高度な調整は行っておらず、2種の判断基準による1種類の空き量しか導入していません。CSS3で延期されたtext-spacingが今後CSS4などで導入されればこの拡張は不要になることでしょう。

Demo ============================================================ 1. スペースなし (without spaces) 2. `sphinxcontrib.trimblank` ・ `sphinxcontrib.cjkspacer` 拡張による調整 (with `sphinxcontrib.trimblank` and `sphinxcontrib.cjkspacer`) 3. 半角スペースあり (with half-width spaces) Raw Text ------------------------------------------------------------ .. code-block:: ReST あいうえおabcdいろはにほへと01234数字:あAいB, .. |main-without-space| raw:: html あいうえおabcdいろはにほへと01234数字:あAいB .. |main-with-space| raw:: html あいうえお abcd いろはにほへと 01234 数字: あ A い B .. raw:: html
1. |main-without-space| 2. あいうえおabcdいろはにほへと01234数字:あAいB 3. |main-with-space| .. raw:: html
Emphasis ------------------------------------------------------------ .. code-block:: ReST あいうえお *abcd* いろ *はに* ほへと *01234数* 字 *:あAいB* .. |em-without-space| raw:: html あいうえおabcdいろはにほへと01234数:あAいB .. |em-with-space| raw:: html あいうえお abcd いろはにほへと 01234 数: あ A い B .. raw:: html
1. |em-without-space| 2. あいうえお *abcd* いろ *はに* ほへと *01234数* 字 *:あAいB* 3. |em-with-space| .. raw:: html
Strong ------------------------------------------------------------ .. code-block:: ReST あいうえお **abcd** いろ **はに** ほへと **01234数** 字 **:あAいB** .. |strong-without-space| raw:: html あいうえおabcdいろはにほへと01234数:あAいB .. |strong-with-space| raw:: html あいうえお abcd いろはにほへと 01234 数: あ A い B .. raw:: html
1. |strong-without-space| 2. あいうえお **abcd** いろ **はに** ほへと **01234数** 字 **:あAいB** 3. |strong-with-space| .. raw:: html
Code ------------------------------------------------------------ .. code-block:: ReST あいうえお ``abcd`` いろ ``はに`` ほへと ``01234数`` 字 ``:あAいB`` .. |code-without-space| raw:: html あいうえおabcdいろはにほへと01234数:あAいB .. |code-with-space| raw:: html あいうえお abcd いろはにほへと 01234 数 : あ A い B .. raw:: html
1. |code-without-space| 2. あいうえお ``abcd`` いろ ``はに`` ほへと ``01234数`` 字 ``:あAいB`` 3. |code-with-space| .. raw:: html
Parentheses & Punctuation ------------------------------------------------------------ .. code-block:: ReST 括弧(Parenthesies):Parenthesis(括弧),コンマ,ピリオド.読点、句点。 スペース Space. .. |pp-without-space| raw:: html 括弧(Parentheses):Parentheses(括弧),コンマ,ピリオド.読点、句点。 スペース Space. .. |pp-with-space| raw:: html 括弧 (Parentheses) : Parentheses (括弧) , コンマ , ピリオド. 読点、句点。スペース Space. .. raw:: html
1. |pp-without-space| 2. 括弧(Parentheses):Parentheses(括弧),コンマ,ピリオド.読点、句点。 スペース Space. 3. |pp-with-space| .. raw:: html
CJK Symbols & Punctuation ------------------------------------------------------------ .. code-block:: ReST A あ 1 A、あ、1 A。あ。1 A〈あ〈1 A〉あ〉1 A《あ《1 A》あ》1 A「あ「1 A」あ」1 A『あ『1 A』あ』1 A【あ【1 A】あ】1 A〔あ〔1 A〕あ〕1 A〖あ〖1 A〗あ〗1 A〘あ〘1 A〙あ〙1 A〚あ〚1 A〛あ〛1 A・あ・1 A!あ!1 A"あ"1 A'あ'1 A(あ(1 A)あ)1 A,あ,1 A.あ.1 A/あ/1 A:あ:1 A;あ;1 A?あ?1 A[あ[1 A\あ\1 A]あ]1 A{あ{1 A|あ|1 A}あ}1 A⦅あ⦅1 A⦆あ⦆1 .. raw:: html
A あ 1 A、あ、1 A。あ。1 A〈あ〈1 A〉あ〉1 A《あ《1 A》あ》1 A「あ「1 A」あ」1 A『あ『1 A』あ』1 A【あ【1 A】あ】1 A〔あ〔1 A〕あ〕1 A〖あ〖1 A〗あ〗1 A〘あ〘1 A〙あ〙1 A〚あ〚1 A〛あ〛1 A・あ・1 A!あ!1 A"あ"1 A'あ'1 A(あ(1 A)あ)1 A,あ,1 A.あ.1 A/あ/1 A:あ:1 A;あ;1 A?あ?1 A[あ[1 A\あ\1 A]あ]1 A{あ{1 A|あ|1 A}あ}1 A⦅あ⦅1 A⦆あ⦆1 .. raw:: html
Note that Ideographicl Space ( ) is trimmed by `sphinxcontrib.trimblank`. .. raw:: html