Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ html:
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

kana:
$(SPHINXBUILD) -b kana $(ALLSPHINXOPTS) $(BUILDDIR)/kana
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/kana."

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ sphinxcontrib-trimblank
pillow>=8.1.0 # not directly required, pinned by Snyk to avoid a vulnerability
pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability
sphinx>=3.0.4 # not directly required, pinned by Snyk to avoid a vulnerability
sphindexer>=0.10.2
sphinxcontrib.kana-text
sphinxext-opengraph
67 changes: 67 additions & 0 deletions source/_theme/sphinxjp/genindex.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{%- extends "layout.html" %}
{% set title = _('Index') %}

{% macro indexentries(firstname, links) %}
{%- if links -%}
<a href="{{ links[0][1] }}">
{%- if links[0][0] %}<strong>{% endif -%}
{{ firstname }}
{%- if links[0][0] %}</strong>{% endif -%}
</a>

{%- for ismain, link in links[1:] -%}
, <a href="{{ link }}">{% if ismain %}<strong>{% endif -%}
[{{ loop.index }}]
{%- if ismain %}</strong>{% endif -%}
</a>
{%- endfor %}
{%- else %}
{{ firstname }}
{%- endif %}
{% endmacro %}

{% block body %}

<h1 id="index">{{ _('Index') }}</h1>

<div class="genindex-jumpbox">
{% for key, dummy in genindexentries -%}
<a href="#{{ key }}"><strong>{{ key }}</strong></a>
{% if not loop.last %}| {% endif %}
{%- endfor %}
</div>

{%- for key, entries in genindexentries %}
<h2 id="{{ key }}">{{ key }}</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
{%- for column in entries|slice_index(2) if column %}
<td style="width: 33%; vertical-align: top;"><ul>
{%- for entryname, (links, subitems, _) in column %}
<li>{{ indexentries(entryname, links) }}
{%- if subitems %}
<ul>
{%- for subentryname, subentrylinks in subitems %}
<li>{{ indexentries(subentryname, subentrylinks) }}</li>
{%- endfor %}
</ul>
{%- endif -%}</li>
{%- endfor %}
</ul></td>
{%- endfor %}
</tr></table>
{% endfor %}

{% endblock %}

{% block sidebarrel %}
{% if split_index %}
<h4>{{ _('Index') }}</h4>
<p>{% for key, dummy in genindexentries -%}
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
{% if not loop.last %}| {% endif %}
{%- endfor %}</p>

<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p>
{% endif %}
{{ super() }}
{% endblock %}
8 changes: 8 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'sphinxcontrib.trimblank',
'sphinxext.opengraph',
'sphinxcontrib.gist',
'sphinxcontrib.kana_text',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -221,3 +222,10 @@

numfig = True
trimblank_keep_alnum_blank = ['html', 'singlehtml']

#kana_text_separator = r'\|'
#kana_text_option_marker = r'\^'
kana_text_indexer_mode = 'small'
kana_text_word_file = './word_list.txt'
kana_text_on_genindex = True
#kana_text_change_triple = True
2 changes: 2 additions & 0 deletions source/gettingstarted/directives.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. index:: ディレクティブ

.. _directives:

====================
Expand Down
8 changes: 8 additions & 0 deletions source/gettingstarted/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Sphinxをはじめよう

Sphinxを使って、かんたんな書籍紹介のドキュメントを作っていきます。

.. index:: インストール; Sphinxをインストールする

Sphinxのインストール
====================

Expand All @@ -17,6 +19,8 @@ SphinxはPythonで書かれているため、Sphinxのインストールにあ
install_windows
install_unix

.. index:: プロジェクト; プロジェクトを作成する

プロジェクトの作成
==================

Expand All @@ -29,6 +33,10 @@ Sphinxでドキュメントを作るには、まずはドキュメントのプ

make_project

.. index::
single: 表; 表、リストなどを追加する
single: リスト; 表、リストなどを追加する

表、リストなどを追加して完成させる
==================================

Expand Down
2 changes: 2 additions & 0 deletions source/gettingstarted/install_unix.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. index:: インストール; macOS と Linux(Ubuntu)へのインストール

======================================
macOS と Linux(Ubuntu)へのインストール
======================================
Expand Down
2 changes: 2 additions & 0 deletions source/gettingstarted/install_windows.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. index:: インストール; Windowsへのインストール

=======================
Windowsへのインストール
=======================
Expand Down
15 changes: 15 additions & 0 deletions source/gettingstarted/use_markup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Sphinxには様々なマークアップがあります。これを利用する
.. contents:: ここで紹介するマークアップ一覧
:local:

.. index:: インラインマークアップ

インラインマークアップ
======================

Expand All @@ -22,6 +24,8 @@ Sphinxには様々なマークアップがあります。これを利用する

`リンク付きテキスト <http://python.org>`_

.. index:: コードブロック

コードブロック
==============

Expand All @@ -42,6 +46,8 @@ Sphinxには様々なマークアップがあります。これを利用する

import this

.. index:: リスト

リスト
======

Expand All @@ -65,6 +71,7 @@ Sphinxには様々なマークアップがあります。これを利用する
焼きそば
知る人ぞ知る宇都宮の名物。専門店多数。なぜかビニール袋で持ち帰る。

.. index:: テーブル

テーブル
========
Expand Down Expand Up @@ -106,6 +113,8 @@ Sphinxには様々なマークアップがあります。これを利用する

これ以外にもディレクティブを使った方法がいくつかあります。詳細は :ref:`directives` を参照してください。

.. index:: ディレクティブ

ディレクティブ
==============

Expand All @@ -125,6 +134,8 @@ Sphinxが利用しているreStructuredTextのもっとも特徴的な機能が

ディレクティブの種類によって、オプションや引数、コンテンツが指定できるかが異なります。

.. index:: 画像

画像
----

Expand All @@ -139,6 +150,8 @@ Sphinxが利用しているreStructuredTextのもっとも特徴的な機能が

一行あけてここに書いたものがキャプションになります

.. index:: 索引

索引
----

Expand All @@ -164,6 +177,8 @@ Sphinxが利用しているreStructuredTextのもっとも特徴的な機能が

3つめのディレクティブは、「うさぎや→チャット,お菓子」「チャット→うさぎや,お菓子」「お菓子→チャット,お菓子」という3組のエントリーが作られます。

.. index:: 注釈

注釈
----

Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/epub/cover.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: conf.py;epub_cover
.. index:: 設定(conf.py); epub_cover

カバー画像を設定したい
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/html/japanese.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: japanesesupport, conf.py;japanesesupport, extensions;japanesesupport
.. index:: japanesesupport, 設定(conf.py); japanesesupport, 拡張機能; japanesesupport

.. _japanesesupport:

Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/html/meta.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: meta, directive;meta
.. index:: meta, ディレクティブ; meta

metaタグを指定したい
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/html/title.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: title, directive;title
.. index:: title, ディレクティブ; title


titleを指定したい
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/images/caption.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: figure, directive;figure
.. index:: figure, ディレクティブ;figure

図にキャプションをつけたい
--------------------------
Expand Down
4 changes: 4 additions & 0 deletions source/reverse-dict/images/inline.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. index::
single: 画像; 文章の途中に画像を埋め込む
single: 埋め込み; 文章の途中に画像を埋め込む

文章の途中に画像を埋め込みたい
----------------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions source/reverse-dict/images/numbering.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. index::
single: 図表; 図に番号を自動で振り、参照する
single: 参照; 図に番号を自動で振り、参照する

.. _images-numbering:

図に番号を自動で振り、参照したい
Expand Down
2 changes: 2 additions & 0 deletions source/reverse-dict/images/scale.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. index:: 画像; 画像の大きさを変える

画像の大きさを変えたい
----------------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions source/reverse-dict/images/target.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. index::
single: 画像; 画像からリンクを貼る
single: リンク; 画像からリンクを貼る

画像からリンクを貼りたい
----------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions source/reverse-dict/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. index:: 逆引き

逆引き辞典
====================================================

Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/pdf/font.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: conf.py;font_path
.. index:: 設定(conf.py;font_path

文字化けする
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/system/doctree.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: orphan, setting; orphan
.. index:: doctree, 中間ファイル;中間ファイルの内容を見る

中間ファイル `*.doctree` の内容をみてSphinxがどのようにreSTをparseしているか知りたい
--------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/system/excludepatterns.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: exclude_patterns, conf.py; exclude_patterns
.. index:: exclude_patterns, 設定(conf.py; exclude_patterns

あるディレクトリやファイルを読み込まないようにしたい
---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/system/lang.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: lang, conf.py; lang,
.. index:: lang, 設定(conf.py; lang,

言語を変えたい
------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/system/load-config-from-ini.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: conf.py, setting; conf.py
.. index:: conf.py, 設定(conf.py

conf.pyにiniファイルから設定を読み込む
-------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion source/reverse-dict/system/orphan.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.. index:: orphan, setting; orphan
.. index::
single: orphan
single: 参照; どこからも参照されていないファイル

document isn't included in any toctreeという警告が出る
--------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/system/smartpants.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: conf.py;smaprtypants
.. index:: 設定(conf.py;smaprtypants

クォートが開きと閉じで異なる文字になる
--------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/table/include.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: csv-table; file, csv-table; url
.. index:: csv-table, file; csv-table, url; csv-table

外部にあるcsvファイルからデータを読み込む
-----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/reverse-dict/table/tab.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. index:: csv-table; encoding, csv-table; delim
.. index:: csv-table, encoding; csv-table, delim; csv-table

csv-tableでタブや空白を区切り文字に使いたい
------------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion source/reverse-dict/writing/citation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.. index:: citation, role; citation
.. index::
single: citation
single: ロール(role); citation
single: 参考文献; 参考文献を書く

.. _writing-citation:

Expand Down
3 changes: 3 additions & 0 deletions source/reverse-dict/writing/comment.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. index::
single: コメント; コメントアウトする

コメントアウトする
---------------------

Expand Down
7 changes: 5 additions & 2 deletions source/reverse-dict/writing/contents.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.. index:: contents, directive; contents
.. index::
single: contents
single: ディレクティブ; contents
single: 目次; ページ内に目次を作る

ページ内の目次を作りたい
ページ内に目次を作りたい
------------------------

``contents`` を使います。
Expand Down
3 changes: 3 additions & 0 deletions source/reverse-dict/writing/emphasizelines.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. index::
single: 強調表示; コードブロック内で特性の行だけ強調表示する

コードブロック内で特定の行だけ強調表示したい
----------------------------------------------

Expand Down
3 changes: 3 additions & 0 deletions source/reverse-dict/writing/emptylines.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. index::
single: 空行; 空行を追加する

空行を追加したい
---------------------

Expand Down
5 changes: 4 additions & 1 deletion source/reverse-dict/writing/hlist.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.. index:: hlist, directive; hlist
.. index:: hlist, ディレクティブ; hlist

.. index::
single: リスト; リストを横に並べる

リストを横に並べたい
---------------------------
Expand Down
Loading