This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+tools/sphinx
2017-02-03 11:53:28 -05:00
..
img sphinx: add sphinx logo to README 2017-02-02 15:34:44 -05:00
local/rst-sphinx sphinx: add new conventional command under , c and add , g c 2017-02-03 11:40:19 -05:00
layers.el reST: Extract sphinx specific config to a stand alone sphinx layer 2017-02-02 14:55:18 -05:00
packages.el sphinx: add new conventional command under , c and add , g c 2017-02-03 11:40:19 -05:00
README.org sphinx: add missing key bindings to README 2017-02-03 11:53:28 -05:00

Sphinx layer

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

Description

The layer adds Sphinx support to Spacemacs. It will automatically also install the restructuredtext layer.

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