Sphinx Documentation Release

eagle

Dec 14, 2017

Contents:

1 Installation 1 1.1 Prerequisites:...... 1

2 New Project 3

3 Editor 5

4 Restructured Text 7 4.1 Create a new page:...... 7 4.2 Text Decorations:...... 8 4.3 Lists:...... 8

5 Indices and tables 11

i ii CHAPTER 1

Installation

1.1 Prerequisites:

1. python: download latest version of python and check the box to add python to environment path link 2. sphinx: after installing python install sphinx using the following command:

pip install sphinx

3. read the docs theme: in the same manner install rtd theme

pip install sphinx_rtd_theme

1 Sphinx Documentation, Release

2 Chapter 1. Installation CHAPTER 2

New Project

In Command prompt run the following commands:

//create a folder for the project: mkdir coding cd coding //start sphinx sphinx-quickstart //building the project make html //if using Visual Code integrated terminal ./make html

3 Sphinx Documentation, Release

4 Chapter 2. New Project CHAPTER 3

Editor

• Install Visual Studio Code: Download • Right click on the project folder and choose to open with Code • Open conf.py and change the htm_theme to equal ‘sphinx_rtd_theme’ • Use the following code to build the project:

./make html

• In Visual Code market place install reStructuredText • After reloading Code you can preview the pages by clicking the preview button at the top or by clicking Crt+k->r

5 Sphinx Documentation, Release

6 Chapter 3. Editor CHAPTER 4

Restructured Text

4.1 Create a new page:

• To create a new Restructured page right click in project folder within visual code and choose to create a new file <file name>.rst • Add a reference to tha page in index.rst by adding the <file name> after :caption: Contents: by pressing enter twice and make sure you have three spaces from the beginning of the line.

Note: Tap will not work because it will create four spaces

7 Sphinx Documentation, Release

4.2 Text Decorations:

• To use italic use asterisk symbol between the required text, for bold user double asterisk and for code use two back `` ticks

4.3 Lists:

• use * to make bulleted list • Use #. to make numbered list • To create sub list press tap at the beginning of a new line Cheat Sheet caution, danger, tip, note

8 Chapter 4. Restructured Text Sphinx Documentation, Release

Supported languages Pygments supports an ever-growing range of languages. Watch this space... Programming lan- guages ActionScript Ada ANTLR AppleScript Assembly (various) Asymptote Awk Befunge Boo BrainFuck C, C++ C# Clojure CoffeeScript ColdFusion Common Lisp Coq Cryptol (incl. Literate Cryptol) Crystal Cython D Dart Delphi Dylan Elm Erlang Ezhil Ezhil - A Tamil Factor Fancy Fortran F# GAP Gherkin (Cu- cumber) GL shaders Groovy Haskell (incl. Literate Haskell) IDL Io Java JavaScript Lasso LLVM Logtalk Lua Mat- lab MiniD Modelica Modula-2 MuPad Nemerle Nimrod Objective-C Objective-J Octave OCaml PHP PovRay PostScript PowerShell Prolog Python 2.x and 3.x (incl. console sessions and tracebacks) REBOL Red Redcode Ruby (incl. irb sessions) Rust S, S-Plus, R Scala Scheme Scilab Smalltalk SNOBOL Tcl Vala Verilog VHDL Visual Ba- sic.NET Visual FoxPro XQuery Zephir Template languages Cheetah templates Django / Jinja templates ERB (Ruby templating) Genshi (the Trac template language) JSP (Java Server Pages) Myghty (the HTML::Mason based frame- work) Mako (the Myghty successor) Smarty templates (PHP templating) Tea Other markup Apache config files Bash shell scripts BBCode CMake CSS Debian control files Diff files DTD Gettext catalogs Gnuplot script Groff markup HTML HTTP sessions INI-style config files IRC logs (irssi style) Lighttpd config files Makefiles MoinMoin/Trac Wiki markup MySQL Nginx config files POV-Ray scenes Ragel Redcode ReST Robot Framework RPM spec files SQL, also MySQL, SQLite Squid configuration TeX tcsh Vim Script Windows batch files XML XSLT YAML pygments.org/languages/

4.3. Lists: 9 Sphinx Documentation, Release

10 Chapter 4. Restructured Text CHAPTER 5

Indices and tables

• genindex • modindex • search

11