docs→rtfd

This commit is contained in:
Marc Beninca 2021-12-11 15:32:21 +01:00
parent 7bc781ed11
commit c7ec1dc5d1
131 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,32 @@
Build documentation
===================
HTML
----
.. code:: python3
import sphinx.cmd.build
sphinx.cmd.build.build_main([
'-E',
'-j', '2',
'-b', 'html',
'-D', 'project=Project',
'-c', conf_directory,
input_directory,
output_directory,
])
LaTeX
-----
.. code:: python3
'-b', 'latex',
.. todo:: turn make command into xelatex command
.. code:: shell
make PDFLATEX=xelatex -C build/latex all-pdf

View file

@ -0,0 +1,76 @@
Configure documentation
=======================
* conf.py
Sphinx
------
.. code:: python3
author = 'Author'
copyright = ''
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.imgmath',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
]
keep_warnings = False
language = 'en'
master_doc = 'index'
project = 'Project'
pygments_style = 'sphinx'
release = ''
show_authors = False
smartquotes = False
source_suffix = [
'.rst',
]
todo_include_todos = True
version = ''
HTML
----
.. code:: python3
html_show_copyright = False
html_show_sourcelink = True
html_show_sphinx = False
html_theme = 'sphinx_rtd_theme'
html_title = 'Title'
MarkDown
--------
.. code:: python3
source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
}
source_suffix = ['.rst', '.md']
LaTeX
-----
.. code:: python3
latex_elements = {
'fontenc': r'\usepackage{fontspec}',
'fontpkg': r'''
\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
''',
'papersize': 'a4paper',
'pointsize': '12pt',
}
latex_documents = [
(master_doc, 'FileName.tex', 'Title',
'Author', 'howto/manual'),
]
latex_use_parts = False
latex_keep_old_macro_names = False

View file

@ -0,0 +1,6 @@
Create documentation
====================
.. code:: shell
sphinx-quickstart

View file

@ -0,0 +1,9 @@
sphinx
======
.. toctree::
install
configure
create
build

View file

@ -0,0 +1,13 @@
Install
=======
.. code:: shell
apt install python3-sphinx
apt install python3-sphinx-rtd-theme
* if markdown documents
.. code:: shell
apt install python3-recommonmark