qulacs / qulacs-rtd

Qulacs documentation for readthedocs. Configured to support automatically generate C++/Python API, and internationalization.
MIT License
3 stars 3 forks source link

Markdown + Sphinxの検証をする #86

Closed Hiroya-W closed 1 year ago

Hiroya-W commented 1 year ago

今まではrecommonmarkを作っていたけど、今はdeprecatedになっているらしい https://github.com/readthedocs/recommonmark

その代わりに、mystがrecomendedになっているので、それを使ってMarkdown対応ができないか考えてみる https://github.com/executablebooks/MyST-Parser

Hiroya-W commented 1 year ago

scikit-qulacsも参考に、

# conf.py
extensions = [
    'myst_parser',
]

myst_enable_extensions = [
    "dollarmath",
]

を追記するだけで良さそう。reStructuredtextからMarkdownへの変換はpandocが使えると思うので、あらかた変換して調整してみる

Hiroya-W commented 1 year ago

Python APIを埋め込んでいるautodocに関しては、reStructuredtextの記法にしか対応しておらず、Markdownから触るにはラップする必要があるそう。 https://myst-parser.readthedocs.io/en/latest/faq/index.html#use-sphinx-ext-autodoc-in-markdown-files

pyRef/modules.rstが対応するのですが、このファイルに開発者が追記することはあまりなく、Markdownに変換すると余計にわかりにくくなりそうです。

forest1040 commented 1 year ago

ありがとうございます。 autodocは、reStructuredtext記法のままで良さそうですね。