Skip to main content

KanaText class extends the functionality of Text class, for someone who use index/glossary directives.

Project description

extends the functionality of the Text class. any person, who use index/glossary directives with Japanse Kanji, is to be so happy.

https://i.gyazo.com/4cbf3408c162fb2bfcc493661d35a42b.png

conf.py

First of all, add sphinxcontrib-kana_text to sphinx extension list in conf.py

extensions = ['sphinxcontrib.kana_text']
#html_kana_text_on_genindex = False
#html_kana_text_use_own_indexer = 'large'

rst file

then use index directive, glossary directive, index role and kana role.

You can specify the follwings:

.. index:: ようご|用語^21
.. glossary::

   ようごいち|用語壱^212
     用語1の説明。

And you can also use index/kana role.

夜空に浮かぶ\ :index:`あまた|数多^21`\ の星々が\ :kana:`きらめいて|煌めいて^2c`\ いる。

build

finally, build your sphinx project:

$ make kana

take a look at genindex.html.

genindex.html

$ sphinx-kana-genindex
$ mv genindex.html.sample path_to_sphinx_project/_templates/genindex.html

CHANGES

  • 2021-10-04 0.21 refactoring: KanaText, KanaValue.

  • 2021-09-30 0.20 refactoring: unittest.

  • 2021-09-30 0.19 handle homonymous functions by each name.

  • 2021-09-28 0.18 command ‘sphinx-kana-genindex’

  • 2021-09-27 0.17 released on pypi.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinxcontrib.kana_text-0.21.1.tar.gz (18.5 kB view details)

Uploaded Source

File details

Details for the file sphinxcontrib.kana_text-0.21.1.tar.gz.

File metadata

  • Download URL: sphinxcontrib.kana_text-0.21.1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for sphinxcontrib.kana_text-0.21.1.tar.gz
Algorithm Hash digest
SHA256 b5a871f8e384c3fb23d7d550071e0b74085cd3fa3a581ae5bfa24764a1c7bb92
MD5 61f544bd94a4c8104d749814ee7f4509
BLAKE2b-256 e37201019eb66af7652e3a04d2cc3c64ed9d07fe227cedb1dc24e0b2e17710df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page