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
syl20bnr 584392bd92 [core] Fix layer dependencies based on layer variables
There was a edge case with the declaration of the `lsp` layer in `layers.el`
files.
The `hy` layer depends on the `python` layer which in turn depends on the `lsp`
layer if and only if the `python-backend` layer variable is set to `lsp`.
When the `hy` layer was declared first then it declares the `python` layer
without its layer variables, thus the `lsp` layer was not declared because the
`python-backend` variable was not set.

The fix is to gather all the layer dependencies and resolve them only after all
the used layers have been declared.

* new function `configuration-layer/declare-layer-dependencies`
* replace all calls to `configuration-layer/declare-layer` by the new function
  except for distribution layers (we declare layer dependencies right away in
  distribution layers)
2019-09-30 02:00:48 -04:00
..
img
local/rst-sphinx
layers.el [core] Fix layer dependencies based on layer variables 2019-09-30 02:00:48 -04:00
packages.el Move all use-package hook declaration to pre-init functions 2018-01-10 23:57:18 -05:00
README.org documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00

Sphinx layer

/TakeV/spacemacs/media/commit/51c7fb961bdaa39011762c7db111b7e88552e890/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