sphinx-nekochan smile

A Sphinx extension for adding the Nekochan(cat) emoji to documents.

Hint

See Description in Japanese . 日本語の説明は Description in Japanese を参照してください。

Hint

Sample slide with Nekochan emoji (using sphinx-revealjs).

Get Started think-nya

1. Installation ok-nya

You can install sphinx-nekochan with pip:

pip install sphinx-nekochan

2. Enable extension good-nya

In your conf.py configuration file, add sphinx_nekochan to your extensions list:

extensions = [
    ...
    "sphinx_nekochan",
    ...
]

3. Use nekochan role or directive clap-nya

When you use the nekochan roll or directive, you will see any Nekochan emoji.

Welcome to Nekochan emoji {nekochan}`banzai` world!!

* Enjoy Nekochan emoji {nekochan}`ok`
* I love {nekochan}`beer`

```{nekochan} melty
```
Welcome to Nekochan emoji :nekochan:`banzai` world!!

* Enjoy Nekochan emoji :nekochan:`ok`
* I love :nekochan:`beer`

.. nekochan:: melty

Welcome to Nekochan emoji banzai world!!

  • Enjoy Nekochan emoji ok

  • I love beer

melty

4. Customize emoji height and alt text memo-nya

You can specify height and alt text with a semicolon(;) after the name of the nekochan role.

* Big bear nekochan {nekochan}`kuma-nya;2em`
* Huge hot-sprint nekochan {nekochan}`hot-spring;128px`
* Customize alt text for emoji {nekochan}`gohan-taberu;3em;Nekochan eating rice ball`

```{nekochan} lgtm
:alt: Looks Good To Me
:height: 3em
```
* Big bear nekochan :nekochan:`kuma-nya;2em`
* Huge hot-sprint nekochan :nekochan:`hot-spring;128px`
* Customize alt text for emoji :nekochan:`gohan-taberu;3em;Nekochan eating rice ball`

.. nekochan:: lgtm
   :alt: Looks Good To Me
   :height: 3em
  • Big bear nekochan kuma-nya

  • Huge hot-sprint nekochan hot-spring

  • Customize alt text for emoji Nekochan eating rice ball

Looks Good To Me

5. Transform emoji mou-dounidemo-nare

Also, you can specify transform option with a semicolon(;) after the alt text of the nekochan role.

* Skip {nekochan}`skip-nya;2em` rotated 90 degrees clockwise {nekochan}`skip-nya;2em;;rotate-90`
* Flip the left and right side of the {nekochan}`yoshi;2em` Yoshi emoji {nekochan}`yoshi;2em;;flip-horizontal`

```{nekochan} snake
:transform: flip-vertical
:height: 2em
```
* Skip :nekochan:`skip-nya;2em` rotated 90 degrees clockwise :nekochan:`skip-nya;2em;;rotate-90`
* Flip the left and right side of the :nekochan:`yoshi;2em` Yoshi emoji :nekochan:`yoshi;2em;;flip-horizontal`

.. nekochan:: snake
   :transform: flip-vertical
   :height: 2em
  • Skip skip-nya rotated 90 degrees clockwise skip-nya

  • Flip the left and right side of the yoshi Yoshi emoji yoshi

snake
List of transform option

Option

Details

Result

Original emoji

mou-dounidemo-nare

rotate-90

Rotates an emoji 90°

mou-dounidemo-nare

rotate-180

Rotates an emoji 180°

mou-dounidemo-nare

rotate-270

Rotates an emoji 270°

mou-dounidemo-nare

flip-horizontal

Mirrors an emoji horizontally

mou-dounidemo-nare

flip-vertical

Mirrors an emoji vertically

mou-dounidemo-nare

flip-both

Mirrors an emoji both vertically and horizontally

mou-dounidemo-nare

License ok2

Enjoy!! choo-choo-train

Table of Contents tunda