sphinx-nekochan
¶
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
¶
1. Installation
¶
You can install sphinx-nekochan
with pip
:
pip install sphinx-nekochan
2. Enable extension
¶
In your conf.py
configuration file, add sphinx_nekochan
to your extensions list:
extensions = [
...
"sphinx_nekochan",
...
]
3. Use nekochan
role or directive
¶
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 world!!
Enjoy Nekochan emoji
I love
4. Customize emoji height and alt text
¶
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
Huge hot-sprint nekochan
Customize alt text for emoji
5. Transform emoji
¶
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
rotated 90 degrees clockwise
Flip the left and right side of the
Yoshi emoji
Option |
Details |
Result |
---|---|---|
Original emoji |
||
rotate-90 |
Rotates an emoji 90° |
|
rotate-180 |
Rotates an emoji 180° |
|
rotate-270 |
Rotates an emoji 270° |
|
flip-horizontal |
Mirrors an emoji horizontally |
|
flip-vertical |
Mirrors an emoji vertically |
|
flip-both |
Mirrors an emoji both vertically and horizontally |
License
¶
sphinx-nekochan is licensed under the MIT License.
Please refer to the following guidelines for using Nekochan emojis.