問題タブ [docutils]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - reStructuredText: how to use continuation lines in tables?
I have the following neat little table in reStructuredText:
As per the Docutils documentation on simple tables I would expect the resulting HTML table that Spinx generates to be as layed out in the text, so "yy" and "yyyy" would be on different lines, as would be "M", "MM" and so on. However the result is this:
I have tried some alternatives like using pipes (|) at the beginning of the last column, empty lines, indentation. The closest I came was using an indent before "yyyy". Then the "yyyy" is on the next line, but it is indented. Of course I want it to be on the same indentation level as "yy".
python - Sphinx を使用して、解析されたドキュメントにプログラムでアクセスできますか?
reStructuredText 形式の docstring を解析するために使用できますdocutils
が、Python ドメインに属するディレクティブ自体は解析しません。たとえば、次のよう:type path: unicode
に解析されます。
Sphinx を使用して、プログラムからより多くの意味を得ることができますか? つまり、パラメータ名など?
python - Sphinx: ページのローカル conf?
conf 変数 (通常は にあります) のページローカル値を取得できますconf.py
か?
たとえば、私は
でconf.py
。もらってもいい
sphinx ドキュメントの特定の ReST ページに対して?
python-sphinx - reStructured Text にカスタムの演習環境ブロックを追加する
フォーマット演習の環境はありますか?何かのようなもの
つまり、これは、読者が資料を読み進めるように促す説明文書用です。
python - 子セクションではなく兄弟セクションを作成する docutils/sphinx カスタム ディレクティブ
このスケルトンを持つ reStructuredText ドキュメントを考えてみましょう:
このmy-import-from
ディレクティブは、ドキュメント固有の Sphinx 拡張によって提供されます。これは、引数として提供されたファイルを読み取り、それに埋め込まれた reST を解析し、結果を現在の入力ファイルのセクションとして挿入することになっています。(autodoc に似ていますが、ファイル形式が異なります。) 現在、私が持っているコードは次のようになります。
これは機能しますが、新しいセクションが兄弟ではなく、現在のセクションの子として挿入されることを除きます。つまり、上記のサンプル ドキュメントは、次のような TOC ツリーを生成します。
- メインタイトル
- サブセクション
- ファイル1
- ファイル2
希望の代わりに
- メインタイトル
- サブセクション
- ファイル1
- ファイル2
これを修正するにはどうすればよいですか? Docutils のドキュメントは ... 特にセクションの深さの制御に関して不十分です。私が試した明らかなことの1つは、doc_section.children
の代わりに戻ることです[doc_section]
。TOC ツリーから完全に削除File1
さFile2
れます (ただし、ドキュメントの本文のセクション ヘッダーが適切なネスト レベルにあるように見えます)。
python - 崇高なテキストで RstPreview パーサーを実行できません
崇高なテキストについては、RstPreview をインストールし、ダウンロードして、コマンド プロンプトdocutils-0.11
で実行C:\Anaconda\python setup.py install
してインストールしました (Windows 7 64 ビットを使用しています)。
ファイルをCtrl+Shift+R
解析するために押すと、次のようになります。.rst
ビルド システムはC:\Anaconda\python
docutils が正常にインポートする場所に設定されていますが、docutils
ライブラリのインストール方法がわからない内部の Python システムから一見崇高なテキストをインポートしようとしています。
前もって感謝します!