OdtParser allows to include odt(libreoffice) files in sphinx-doc.
See pandoc for details of supported markup.
- Install pandoc.
See: https://pandoc.org/
- Install sphinx-doc
See: bin/initdev.cmd
- Copy src/sphinx_odtparser in a directory which is included in PYTHONPATH
Add following in the config.py:
from sphinx_odtparser.OdtParser import OdtParser
def setup(app):
app.add_source_parser(OdtParser)
app.add_source_suffix(".bodt","bodt")
see: testdoc/source/conf.py
- Save some file in the source directory.
- Create the build marker in the same directory
It is the file with the same name and "bodt" extension
- Add build marker to toc
See: source/test_cases/index.rst
See: bin/autobuild.cmd
OdtParser allows to include codeblocks in odt files.
- Create paragraph with text "```"
It opens the codeblock
- Paste some code
- Create paragraph with text "```"
It closes the codeblock
- Set "source code" character style for the codeblock