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
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

В руководстве подробно описан процесс генерации документации с помощью связки reStructuredText, Python Sphinx, GitHub и сервиса Read the Docs.

Руководство находится на https://sphinx-ru.readthedocs.org
Руководство находится на https://sphinx-ru.readthedocs.io/ru/latest/


Авторские права
Expand Down
3 changes: 3 additions & 0 deletions docs/agreements.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _agreement-label:

Соглашения
Expand Down
4 changes: 3 additions & 1 deletion docs/community.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

Русскоязычное сообщество LibreOffice
====================================

Expand All @@ -6,7 +9,6 @@
Новости
-------

* Сообщество в Google Plus: https://plus.google.com/communities/114023476906934509704
* Группа ВКонтакте: http://vk.com/libreoffice
* Твиттер: http://twitter.com/LibreOffice_ru
* Facebook: https://www.facebook.com/ru.libreoffice.org
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.pngmath',
'sphinx.ext.imgmath',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -194,7 +194,7 @@
'preamble': '\\usepackage[utf8]{inputenc}',
'babel': '\\usepackage[russian]{babel}',
'cmappkg': '\\usepackage{cmap}',
'fontenc': '\usepackage[T1,T2A]{fontenc}',
'fontenc': '\\usepackage[T1,T2A]{fontenc}',
'utf8extra':'\\DeclareUnicodeCharacter{00A0}{\\nobreakspace}',
}

Expand Down
3 changes: 3 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _faq-chapter:

Часто задаваемые вопросы
Expand Down
2 changes: 2 additions & 0 deletions docs/git.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _git-chapter:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
faq
agreements
win-sphinx

community

* :ref:`genindex`
2 changes: 2 additions & 0 deletions docs/knownissues.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _knownissues-chapter:

Expand Down
3 changes: 3 additions & 0 deletions docs/preface.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. Список автозамен:
.. |ло| replace:: LibreOffice
.. |lo| replace:: LibreOffice
Expand Down
3 changes: 3 additions & 0 deletions docs/rst-markup.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. Список автозамен:
.. |rest| replace:: reStructuredText

Expand Down
2 changes: 2 additions & 0 deletions docs/rtd-gh.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _rtd-gh-chapter:

Expand Down
2 changes: 2 additions & 0 deletions docs/sphinx-markup.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _sphinx-markup:

Expand Down
65 changes: 10 additions & 55 deletions docs/sphinx.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _sphinx-chapter:

===============================
Expand Down Expand Up @@ -53,69 +56,21 @@ Sphinx доступен для всех основных операционны
Программа задаст ряд вопросов. Все настройки можно будет позже изменить в файле ``conf.py``.

.. code-block:: python

> Корневой каталог документации. По умолчанию текущий каталог.
> Root path for the documentation [.]:


> Сделать ли раздельные папки исходников и готовых страниц - Да
> Separate source and build directories (y/N) [n]: y

> Префикс для директорий с шаблонами и статическими файлами.
> Name prefix for templates and static dir [_]:

> Название проекта. Для начала лучше вводить на латинице.
> Project name:

> Имя автора/авторов. Для начала лучше вводить на латинице.
> Author name(s):

> Версия проекта
> Project version:

> Номер релиза проекта
> Project release [1]:

> Расширение исходного файла. По умолчанию .rst.
> Source file suffix [.rst]:

> Имя мастер-документа. По умолчанию index.rst.
> Name of your master document (without suffix) [index]:

> Генерировать ePub версию документации?
> Do you want to use the epub builder (y/n) [n]:

> Автоматически вставлять docstrings из модулей
> autodoc: automatically insert docstrings from modules (y/n) [n]:
> Project release []:

>
> doctest: automatically test code snippets in doctest blocks (y/n) [n]:

>
> intersphinx: link between Sphinx documentation of different projects (y/n) [n]:

>
> todo: write "todo" entries that can be shown or hidden on build (y/n) [n]:

>
> coverage: checks for documentation coverage (y/n) [n]:

> Использовать модуль pngmath для вставки формул в формате png
> pngmath: include math, rendered as PNG images (y/n) [n]:

> Использовать модуль mathjax для вставки формул в формате MathJax
> mathjax: include math, rendered in the browser by MathJax (y/n) [n]: y

>
> ifconfig: conditional inclusion of content based on config values (y/n) [n]:

>
> viewcode: include links to the source code of documented Python objects (y/n) [n]:

> Создать Makefile - да
> Create Makefile? (y/n) [y]:

> Сделать ли файл .bat, - нет, если у вас Linux
> Create Windows command file? (Y/n) [y]: n ()
> Язык проекта
> Project language [en]: ru

После ответа на вопросы будут созданы файлы ``index.rst``, ``conf.py``, ``Makefile``, ``_build``, ``_static``, ``_templates``.
::
Expand Down Expand Up @@ -373,9 +328,9 @@ ______
Режим отображения формул
~~~~~~~~~~~~~~~~~~~~~~~~

Формулы в Sphinx могут отображаться с помощью одного из двух расширений: ``sphinx.ext.pngmath`` или ``sphinx.ext.mathjax``. Первое расширение отображает формулы как изображения в png формате. Другое расширение использует JavaScript библиотеку ``mathjax`` для отображения формул.
Формулы в Sphinx могут отображаться с помощью одного из двух расширений: ``sphinx.ext.imgmath`` или ``sphinx.ext.mathjax``. Первое расширение отображает формулы как изображения в png формате. Другое расширение использует JavaScript библиотеку ``mathjax`` для отображения формул.

Я предпочитаю использовать ``sphinx.ext.mathjax``, так как оно позволяет масштабировать формулы без потери качества отображения. Но для сервиса Read The Docs нужно использовать ``sphinx.ext.pngmath``.
Я предпочитаю использовать ``sphinx.ext.mathjax``, так как оно позволяет масштабировать формулы без потери качества отображения. Но для сервиса Read The Docs нужно использовать ``sphinx.ext.imgmath``.

Указать Sphinx какое расширение использовать можно в конфигурационном файле ``conf.py``, в строке ``extensions``.

Expand All @@ -388,7 +343,7 @@ ______
или

extensions = [
'sphinx.ext.pngmath',
'sphinx.ext.imgmath',
]

.. warning:: Использовать одновременно оба расширения нельзя.
Expand Down
2 changes: 2 additions & 0 deletions docs/win-sphinx.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. meta::
:http-equiv=Content-Type: text/html; charset=utf-8

.. _win-sphinx:

Expand Down