spacemacs/layers/+tools/sphinx
syl20bnr 41e546f040 Move all use-package hook declaration to pre-init functions
Had to create dummy init functions at some places since the owner of a package
is the last layer that defines the init function of a package. And a package
can be installed only if it has an owner.
2018-01-10 23:57:18 -05:00
..
img
local/rst-sphinx
README.org
layers.el Happy New Year 2018! 2018-01-04 02:00:25 -05:00
packages.el Move all use-package hook declaration to pre-init functions 2018-01-10 23:57:18 -05:00

README.org

Sphinx layer

/TakeV/spacemacs/media/commit/aabe2817df5a54914247c29a0b41ab11b7f6fa89/layers/+tools/sphinx/img/sphinx.png

Description

The layer adds support for the documentation generation system Sphinx to the restructuredtext layer.

Features:

  • Support for Sphinx project compilation
  • Support for opening Sphinx project target
  • Support for opening Sphinx config file

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add sphinx to the existing dotspacemacs-configuration-layers list in this file.

Configuration

Sphinx target

To use the layer's Sphinx feature, the following variables should be set.

A parent directory is needed for all Sphinx projects' builds.

    (setq rst-sphinx-target-parent "/your/path/of/build/")

Set a directory in the parent directory for each Sphinx project.

    (setq rst-sphinx-target-projects
          '(("project1" . (latex "folder/in/target/parent" t))
            ("project2" . (html  "folder/in/target/parent" nil))
            ))

Web browser

Set the browser for viewing the HTML page of current rst file. This one is optional. If not set, the default browser will be used.

    (setq rst-slides-program "chromium")

Key bindings

Key Binding Description
<SPC> m c c compile projects
<SPC> m c C clean projects
<SPC> m c r rebuild projects
<SPC> m g c open conf.py of current project
<SPC> m o open compiled HTML page of current page