.. _builddocs:

Building Documentation
======================

The main documentation and Python documentation is written in
`reStructuredText <http://www.sphinx-doc.org/en/stable/rest.html>`_ and
generated by `sphinx <http://www.sphinx-doc.org/>`_. The C++ API documentation
is generated by `Doxygen <http://www.doxygen.nl/>`_.


Prerequisites
-------------

1. Build Open3D from source
```````````````````````````

Clone and build Open3D from source. Visit :ref:`compilation` for details.

2. Install Sphinx
`````````````````

.. code-block:: bash

    # For pip
    pip install sphinx sphinx-autobuild

    # Or, for Conda
    conda install sphinx sphinx-autobuild


3. Install Doxygen
``````````````````

**Ubuntu**

.. code-block:: bash

    sudo apt-get -y install doxygen

**macOS**

.. code-block:: bash

    brew install doxygen

**Windows**

Visit `Doxygen downloads <http://www.doxygen.nl/download.html>`_ page to
checkout the source or
`binaries <https://sourceforge.net/projects/doxygen/files/snapshots/>`_.


Build
-----

.. code-block:: bash

    cd docs

    # You may optionally select the --sphinx --doxygen flag
    python make_docs.py --sphinx --doxygen

The docs html will be saved in ``docs/_out`` folder.
