Giter Site home page Giter Site logo

catkin-sphinx's Introduction

Catkin-Sphinx

Sphinx plugins for Catkin projects. Currently provides the ROS theme, better shell prompt highlighting and a sphinx domain for cmake.

Using the ROS theme

To use this plugin, add the following to the conf.py in your project (which it should have as one of the files used by Sphinx to generate documentation):

# Below the definition of html_theme_path:
import catkin_sphinx
html_theme_path = [catkin_sphinx.get_theme_path()]

# Use ROS theme
html_theme = 'ros-theme'

Using an improved shell prompt highlighting

Add the following to the conf.py in your project below the definition of the extensions list::

extensions = extensions + ['catkin_sphinx.ShLexer']

This will slightly improve documentation highlighting for examples like::

# this will make all following snippets be of type prompt
.. highlight:: catkin-sh

# this will create a single code block of type prompt (examples)
.. code-block:: catkin-sh

  >>> python setup.py install
  # comment
  $ bash prompt

Using the cmake sphinx domain

Add the following to the conf.py in your project below the definition of the extensions list::

extensions = extensions + ['catkin_sphinx.cmake']

Then cmake modules and macros can be documented using the following syntax::

* :cmake:mod:`foo` Module

.. cmake:macro:: bar(bam)

  :param bam: foo docstring
  :type bam: string
  :returns: list

Blank lines and indentation are important. No autodoc extention for cmake files yet.

catkin-sphinx's People

Contributors

dirk-thomas avatar mikaelarguedas avatar nuclearsandwich avatar tfoote avatar wjwwood avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.