Japanese Demo (日本語デモ) for sphinxcontrib.cjkspacer

Homepage

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

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

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

Demo

  1. スペースなし

    (without spaces)

  2. sphinxcontrib.trimblanksphinxcontrib.cjkspacer拡張による調整

    (with sphinxcontrib.trimblank and sphinxcontrib.cjkspacer)

  3. 半角スペースあり

    (with half-width spaces)

Raw Text

あいうえおabcdいろはにほへと01234数字:あAいB,
  1. あいうえおabcdいろはにほへと01234数字:あAいB

  2. あいうえおabcdいろはにほへと01234数字:AB

  3. あいうえお abcd いろはにほへと 01234 数字: あ A い B

Emphasis

あいうえお *abcd* いろ *はに* ほへと *01234数**:あAいB*
  1. あいうえおabcdいろはにほへと01234数:あAいB

  2. あいうえおabcdいろはにほへと01234:AB

  3. あいうえお abcd いろはにほへと 01234 数: あ A い B

Strong

あいうえお **abcd** いろ **はに** ほへと **01234数****:あAいB**
  1. あいうえおabcdいろはにほへと01234数:あAいB

  2. あいうえおabcdいろはにほへと01234:AB

  3. あいうえお abcd いろはにほへと 01234 数: あ A い B

Code

あいうえお ``abcd`` いろ ``はに`` ほへと ``01234数````:あAいB``
  1. あいうえおabcdいろはにほへと01234数:あAいB

  2. あいうえおabcdいろはにほへと01234数:あAいB

  3. あいうえお abcd いろはにほへと 01234 数 : あ A い B

Parentheses & Punctuation

括弧(Parenthesies):Parenthesis(括弧),コンマ,ピリオド.読点、句点。 スペース Space.
  1. 括弧(Parentheses):Parentheses(括弧),コンマ,ピリオド.読点、句点。 スペース Space.

  2. 括弧(Parentheses):Parentheses(括弧),コンマ,ピリオド.読点、句点。 スペース Space.

  3. 括弧 (Parentheses) : Parentheses (括弧) , コンマ , ピリオド. 読点、句点。スペース Space.

CJK Symbols & Punctuation

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

A1 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

Note that Ideographicl Space ( ) is trimmed by sphinxcontrib.trimblank.