Using Sphinx to produce the documentation

The Sphinx tool produces very good-looking documentation in a variety of formats. It can easily combine documentation from source code as well as external files with additional design notes, requirements, or background.

The Sphinx tool can be found at http://sphinx-doc.org. The download can become complex because Sphinx depends on several other projects. The Sphinx tutorial is outstanding.

Most projects will start by using sphinx-quickstart to create the initial set of files. Once the files are available, details can be added. To finalize the documentation, the sphinx-build program will be used.

Often, running sphinx-build is handled via the make program, which slightly simplifies the command-line use of Sphinx. In some cases, make may not be available.

  • macOS users won't have make available by default. It's part of the XCode package of developer tools from Apple. While the download is very large, the XCode tools are easy to install and use. Instead of XCode, some people like to use Homebrew to install make. Visit https://brew.sh for information on the Homebrew tool. The brew install make command will create a useful make utility for macOS. 
  • For Window users, sphinx-quickstart will create a make.bat script that behaves like the make utility.

The make utility is not required, but it's convenient. We can always use sphinx-build directly.

Let's learn how to use Sphinx quickstart in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset