Commits

Christoph Reller committed 1f6b538

Add tikz extension.

Comments (0)

Files changed (13)

 
 rawfiles:
    Takumi IINO <trot.thunder@gmail.com>
+
+tikz:
+   Christoph Reller <christoph.reller@gmail.com>
 - youtube: embed videos from YouTube_
 - zopeext: provide an ``autointerface`` directive for using `Zope interfaces`_.
 - clearquest: create tables from ClearQuest_ queries.
+- tikz: draw pictures with the `TikZ/PGF LaTeX package`_.
 
 .. _aafigure: https://launchpad.net/aafigure
 
 
 .. _slideshare: http://www.slideshare.net/
 
+.. _TikZ/PGF LaTeX package: http://sourceforge.net/projects/pgf/
+
 For contributors
 ================
 
+include README*
+include LICENSE
+
+==============================================
+Description of the Ti\ *k*\ Z Sphinx Extension
+==============================================
+
+This extension to `Sphinx <http://sphinx.pocoo.org/>`__ enables the use of the
+PGF/Ti\ *k*\ Z LaTeX package to draw nice pictures.  (See `CTAN
+<http://www.ctan.org/tex-archive/graphics/pgf/>`__ or `sourceforge
+<http://sourceforge.net/projects/pgf/>`__; the manual is, e.g., `here
+<http://www.ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf>`__.
+Also have a look at contributions such as `pgfplots
+<http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/>`__.)
+
+Use the extension at your own risk.  Anything might change in future versions
+without further notice.
+
+----
+
+:Version: 0.4.1
+:Author: Christoph Reller ``christoph.reller@gmail.com``
+:License: `BSD License <http://opensource.org/licenses/bsd-license.html>`__
+:Download: `tikz.py <http://people.ee.ethz.ch/~creller/web/_static/tikz.py>`__
+:Git Repository: https://bitbucket.org/philexander/tikz
+:PyPI Package: http://pypi.python.org/pypi/sphinxcontrib-tikz
+
+Prerequisites and Configuration
+===============================
+
+Prerequisites
+-------------
+
+On your computer the following must be installed:
+
+* ``latex`` with the ``tikz`` and the ``amsmath`` packages
+* ``pdftoppm`` (part of the Poppler pdf library)
+* either of the following:
+
+  - ``pnmcrop`` and ``pnmtopng`` (both part of the Netpbm package)
+  - ``convert`` (part of the ImageMagick package)
+
+(We cannot use ``dvipng`` as the ``pngmath`` Sphinx extension does because there
+is an issue with cropping the image if postscript specials are used.)
+
+For **Ubuntu Linux** you roughly have to have the following packages installed:
+
+* ``texlive`` and ``texlive-pictures`` (and maybe more LaTeX packages)
+* ``poppler-utils``
+* ``netpbm`` or ``imagemagick``
+
+For **Mac OS X** a possible way of getting this extension working is:
+
+* Install `homebrew <http://mxcl.github.com/homebrew/>`__ in the terminal by::
+
+    /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
+
+* Install ``poppler`` (``pdftoppm`` comes with it), by::
+    
+    brew install poppler
+
+Configuration
+-------------
+
+If you have installed the Ti\ *k*\ z Sphinx extension e.g. using `PyPI
+<http://pypi.python.org/pypi/sphinxcontrib-tikz>`__, then you have to load the
+extension in the Sphinx project configuration file ``conf.py`` by::
+ 
+    extensions = ['sphinxcontrib.tikz']
+
+The following configuration values are supported:
+
+* Choose the image processing ``‹suite›``, either ``'Netpbm'`` or
+  ``'ImageMagick'`` (``'Netpbm'`` by default)::
+
+    tikz_proc_suite = ‹suite›
+
+* Enable/disable transparent graphics (enabled by default)::
+
+    tikz_transparent = ‹True or False›
+
+* Add ``‹string›`` to the LaTeX preamble::
+
+    tikz_latex_preamble = ‹string›
+
+* Add ``\usetikzlibrary{‹string›}`` to the LaTeX preamble::
+
+    tikz_tikzlibraries = ‹string›
+
+  You might want to load the ``tikz`` package and add the ``tikzlibraries`` in
+  the ``latex_preamble``, e.g. as::
+
+    latex_preamble = '''
+    ‹...›
+    \usepackage{tikz}
+    \usetikzlibrary{''' + tikz_tikzlibraries + '''}
+    ‹...›
+    '''
+
+If you want to make use of the Ti\ *k*\ Z externalization library for the LaTeX
+build output, then you may want to change the line::
+
+  LATEXOPTS =
+
+in ``/usr/share/sphinx/texinputs/Makefile`` to::
+
+  LATEXOPTS = "-shell-escape"
+
+.. highlight:: rest
+
+Usage
+=====
+
+The extension adds a ``tikz``-directive and a ``tikz``-role.  The usage is very
+similar to the standard math Sphinx extensions.
+
+The **tikz-directive** can be used in two ways::
+
+  .. tikz:: ‹tikz code, potentially broken
+     across lines›
+     :libs: ‹tikz libraries›
+     :stringsubst:
+
+or::
+
+  .. tikz:: ‹caption, potentially broken
+     across lines›
+     :libs: ‹tikz libraries›
+     :stringsubst:
+
+     ‹tikz code, potentially broken
+     across lines›
+
+The ``‹caption›`` is optional, but if present it is printed as a picture caption
+below the picture.
+
+The ``:libs:`` option expects its argument ``‹tikz libraries›`` to be a comma
+separated list of tikz libraries to use.  If you want to build the LaTeX target
+then make sure that you add these libraries to ``latex_preamble`` in
+``conf.py``.
+
+The ``stringsubst`` option enables the following string substitution in the
+``‹tikz code›``.  Before processing the ``‹tikz code›`` the string ``%(wd)s`` is
+replaced by the project root directory.  This is convenient when referring to
+some source file in the LaTeX code.
+
+The ``‹tikz code›`` is code according to the tikz LaTeX package.  It behaves as
+if inside a ``tikzpicture`` environment.
+
+The **tikz-role** is used as follows::
+
+  :tikz:`‹tikz code›`
+
+The ``‹tikz code›`` is code according to the tikz LaTeX package.  It behaves as
+if inside a ``\tikz`` macro.  Ti\ *k*\ Z options can be given at the start of
+the ``‹tikz code›``.
+
+Examples
+========
+
+.. note:: These examples only render in a Sphinx project with a proper
+	  configuration of the Ti\ *k*\ z Sphinx extension.
+
+::
+
+  .. tikz:: [>=latex',dotted,thick] \draw[->] (0,0) -- (1,1) -- (1,0)
+     -- (2,0);
+     :libs: arrows
+
+
+.. tikz:: [>=latex',dotted,thick] \draw[->] (0,0) -- (1,1) -- (1,0)
+   -- (2,0);
+   :libs: arrows
+
+::
+
+  .. tikz:: An Example Directive with Caption
+
+     \draw[thick,rounded corners=8pt]
+     (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0);
+
+.. tikz:: An Example Directive with Caption
+
+   \draw[thick,rounded corners=8pt]
+   (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0);
+
+::
+
+  An example role :tikz:`[thick] \node[draw] (a) {A}; 
+  \node[draw,dotted,right of=a] {B} edge[<-] (a);`
+
+
+An example role :tikz:`[thick] \node[draw] (a) {A}; \node[draw,dotted,right
+of=a] {B} edge[<-] (a);`
+
+Caveats
+=======
+
+If you use the ``tikz`` directive inside of a table or a sidebar and you specify
+a caption then the LaTeX target built by the sphinx builder will not compile.
+This is because, as soon as you specify a caption, the ``tikzpicture``
+environment is set inside a ``figure`` environment and hence it is a float.
+
+If you enable ``:stringsubst:`` then the character ``%`` cannot be used anymore
+for commenting LaTeX code.

tikz/doc/Makefile

+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TikZSphinxExtension.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TikZSphinxExtension.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/TikZSphinxExtension"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TikZSphinxExtension"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
+# -*- coding: utf-8 -*-
+#
+# TikZ Sphinx Extension documentation build configuration file, created by
+# sphinx-quickstart on Sat Jan 12 11:42:04 2013.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# Import some information from the setup.py script.
+sys.path.insert(0, os.path.abspath('..'))
+import setup as setupfile
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinxcontrib.tikz']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'TikZ Sphinx Extension'
+copyright = '2010-2013, Christoph Reller'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = setupfile.VERSION
+# The full version, including alpha/beta/rc tags.
+release = setupfile.VERSION
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'TikZSphinxExtensiondoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+'preamble': '\\usepackage{tikz}',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'TikZSphinxExtension.tex', 'TikZ Sphinx Extension Documentation',
+   'Christoph Reller', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'tikzsphinxextension', 'TikZ Sphinx Extension Documentation',
+     ['Christoph Reller'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'TikZSphinxExtension', 'TikZ Sphinx Extension Documentation',
+   'Christoph Reller', 'TikZSphinxExtension', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'

tikz/doc/index.rst

+.. TikZ Sphinx Extension documentation master file, created by
+   sphinx-quickstart on Sat Jan 12 11:42:04 2013.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+.. toctree::
+   :maxdepth: 2
+
+.. include:: ../README.rst
+
+
+..
+   Indices and tables
+   ==================
+   * :ref:`genindex`
+   * :ref:`modindex`
+   * :ref:`search`
+

tikz/doc/make.bat

+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html       to make standalone HTML files
+	echo.  dirhtml    to make HTML files named index.html in directories
+	echo.  singlehtml to make a single large HTML file
+	echo.  pickle     to make pickle files
+	echo.  json       to make JSON files
+	echo.  htmlhelp   to make HTML files and a HTML help project
+	echo.  qthelp     to make HTML files and a qthelp project
+	echo.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\TikZSphinxExtension.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\TikZSphinxExtension.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "texinfo" (
+	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+	goto end
+)
+
+if "%1" == "gettext" (
+	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+:end
+[egg_info]
+tag_build = dev
+tag_date = true
+
+[aliases]
+release = egg_info -RDb ''
+# -*- coding: utf-8 -*-
+
+LONG_DESCRIPTION = \
+'''
+This package contains the tikz Sphinx extension, which enables the use
+of the PGF/TikZ LaTeX package to draw nice pictures.
+'''
+
+NAME         = 'sphinxcontrib-tikz'
+DESCRIPTION  = 'TikZ extension for Sphinx'
+VERSION      = '0.4.1'
+AUTHOR       = 'Christoph Reller'
+AUTHOR_EMAIL = 'christoph.reller@gmail.com'
+URL          = 'https://bitbucket.org/philexander/tikz'
+DOWNLOAD     = 'http://pypi.python.org/pypi/sphinxcontrib-tikz'
+LICENSE      = 'BSD'
+REQUIRES     = ['Sphinx']
+CLASSIFIERS  = [
+    'Development Status :: 4 - Beta',
+    'Environment :: Console',
+    'Environment :: Web Environment',
+    'Intended Audience :: Developers',
+    'License :: OSI Approved :: BSD License',
+    'Operating System :: OS Independent',
+    'Programming Language :: Python',
+    'Topic :: Documentation',
+    'Topic :: Utilities',
+    ]
+
+if __name__ == "__main__":
+
+    from setuptools import setup, find_packages
+    import sys
+
+    # Use 2to3 for Python 3 without warnings in Python 2
+    extra = {}
+    if sys.version_info >= (3,):
+        extra['use_2to3'] = True
+    
+    setup(
+        name=NAME,
+        version=VERSION,
+        url=URL,
+        download_url=DOWNLOAD,
+        license=LICENSE,
+        author=AUTHOR,
+        author_email=AUTHOR_EMAIL,
+        description=DESCRIPTION,
+        long_description=LONG_DESCRIPTION,
+        zip_safe=False,
+        classifiers=CLASSIFIERS,
+        platforms='any',
+        packages=find_packages(),
+        include_package_data=True,
+        install_requires=REQUIRES,
+        namespace_packages=['sphinxcontrib'],
+        **extra
+        )

tikz/sphinxcontrib/__init__.py

+# -*- coding: utf-8 -*-
+"""
+    sphinxcontrib
+    ~~~~~~~~~~~~~
+
+    This package is a namespace package that contains all extensions
+    distributed in the ``sphinx-contrib`` distribution.
+
+    :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+__import__('pkg_resources').declare_namespace(__name__)
+

tikz/sphinxcontrib/tikz.py

+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2012-2013 by Christoph Reller. All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+
+#    1. Redistributions of source code must retain the above copyright notice,
+#       this list of conditions and the following disclaimer.
+
+#    2. Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+
+# THIS SOFTWARE IS PROVIDED BY CHRISTOPH RELLER ''AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL CHRISTOPH RELLER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# The views and conclusions contained in the software and documentation are
+# those of the authors and should not be interpreted as representing official
+# policies, either expressed or implied, of Christoph Reller.
+
+"""
+    sphinxcontrib.tikz
+    ~~~~~~~~~~~~~~~~~~
+
+    Draw pictures with the `TikZ/PGF LaTeX package.
+
+    See README.rst file for details
+
+    Author: Christoph Reller <christoph.reller@gmail.com>
+    Version: 0.4.1
+"""    
+
+import tempfile
+import posixpath
+import shutil
+import sys
+from os import path, getcwd, chdir, mkdir, system
+from subprocess import Popen, PIPE, call
+try:
+    from hashlib import sha1 as sha
+except ImportError:
+    from sha import sha
+
+from docutils import nodes, utils
+from docutils.parsers.rst import directives
+
+from sphinx.errors import SphinxError
+try:
+    from sphinx.util.osutil import ensuredir, ENOENT, EPIPE
+except:
+    from sphinx.util import ensuredir, ENOENT, EPIPE
+    
+from sphinx.util.compat import Directive
+
+class TikzExtError(SphinxError):
+    category = 'Tikz extension error'
+
+class tikzinline(nodes.Inline, nodes.Element):
+    pass
+
+def tikz_role(role, rawtext, text, lineno, inliner, option={}, content=[]):
+    tikz = utils.unescape(text, restore_backslashes=True)
+    return [tikzinline(tikz=tikz)], []
+
+class tikz(nodes.Part, nodes.Element):
+    pass
+
+class TikzDirective(Directive):
+    has_content = True
+    required_arguments = 0
+    optional_arguments = 1
+    final_argument_whitespace = True
+    option_spec = {'libs':directives.unchanged,'stringsubst':directives.flag}
+
+    def run(self):
+        node = tikz()
+        if not self.content:
+            node['caption'] = ''
+            node['tikz'] = '\n'.join(self.arguments)
+        else:
+            node['tikz'] = '\n'.join(self.content)
+            node['caption'] = '\n'.join(self.arguments)
+        node['libs'] = self.options.get('libs', '')
+        if 'stringsubst' in self.options:
+            node['stringsubst'] = True
+        else:
+            node['stringsubst'] = False
+        return [node]
+
+DOC_HEAD = r'''
+\documentclass[12pt]{article}
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath}
+\usepackage{amsthm}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{bm}
+\usepackage{tikz}
+\usetikzlibrary{%s}
+\pagestyle{empty}
+'''
+
+DOC_BODY = r'''
+\begin{document}
+\begin{tikzpicture}
+%s
+\end{tikzpicture}
+\end{document}
+'''
+
+def render_tikz(self,tikz,libs='',stringsubst=False):
+    hashkey = tikz.encode('utf-8')
+    fname = 'tikz-%s.png' % (sha(hashkey).hexdigest())
+    relfn = posixpath.join(self.builder.imgpath, fname)
+    outfn = path.join(self.builder.outdir, '_images', fname)
+
+    if path.isfile(outfn):
+        return relfn
+
+    if hasattr(self.builder, '_tikz_warned'):
+        return None
+    
+    ensuredir(path.dirname(outfn))
+    curdir = getcwd()
+
+    latex = DOC_HEAD % libs
+    latex += self.builder.config.tikz_latex_preamble
+    if stringsubst:
+        tikz = tikz % {'wd': curdir}
+    latex += DOC_BODY % tikz
+    if isinstance(latex, unicode):
+        latex = latex.encode('utf-8')
+
+    if not hasattr(self.builder, '_tikz_tempdir'):
+        tempdir = self.builder._tikz_tempdir = tempfile.mkdtemp()
+    else:
+        tempdir = self.builder._tikz_tempdir
+
+    chdir(tempdir)
+
+    tf = open('tikz.tex', 'wb')
+    tf.write(latex)
+    tf.close()
+
+    try:
+        try:
+            p = Popen(['pdflatex', '--interaction=nonstopmode', 'tikz.tex'],
+                      stdout=PIPE, stderr=PIPE)
+        except OSError, err:
+            if err.errno != ENOENT:   # No such file or directory
+                raise
+            self.builder.warn('LaTeX command cannot be run')
+            self.builder._tikz_warned = True
+            return None
+    finally:
+        chdir(curdir)
+
+    stdout, stderr = p.communicate()
+    if p.returncode != 0:
+        raise TikzExtError('Error (tikz extension): latex exited with error:\n'
+                           '[stderr]\n%s\n[stdout]\n%s' % (stderr, stdout))
+
+    chdir(tempdir)
+
+    # the following does not work for pdf patterns
+    # p1 = Popen(['convert', '-density', '120', '-colorspace', 'rgb',
+    #             '-trim', 'tikz.pdf', outfn], stdout=PIPE, stderr=PIPE)
+    # stdout, stderr = p1.communicate()
+
+    try:
+        p = Popen(['pdftoppm', '-r', '120', 'tikz.pdf', 'tikz'],
+                  stdout=PIPE, stderr=PIPE)
+    except OSError, e:
+        if e.errno != ENOENT:   # No such file or directory
+            raise
+        self.builder.warn('pdftoppm command cannot be run')
+        self.builder.warn(err)
+        self.builder._tikz_warned = True
+        chdir(curdir)
+        return None
+    stdout, stderr = p.communicate()
+    if p.returncode != 0:
+        self.builder._tikz_warned = True
+        raise TikzExtError('Error (tikz extension): pdftoppm exited with error:'
+                           '\n[stderr]\n%s\n[stdout]\n%s' % (stderr, stdout))
+
+    if self.builder.config.tikz_proc_suite == 'ImageMagick':
+        convert_args = []
+        if self.builder.config.tikz_transparent:
+            convert_args = ['-fuzz', '2%', '-transparent', 'white']
+
+        try:
+            p1 = Popen(['convert', '-trim'] + convert_args +
+                       ['tikz-1.ppm', outfn],
+                       stdout=PIPE, stderr=PIPE)
+        except OSError, e:
+            if e.errno != ENOENT:   # No such file or directory
+                raise
+            self.builder.warn('convert command cannot be run')
+            self.builder.warn(err)
+            self.builder._tikz_warned = True
+            chdir(curdir)
+            return None
+        stdout, stderr = p1.communicate()
+        if p1.returncode != 0:
+            self.builder._tikz_warned = True
+            chdir(curdir)
+            raise TikzExtError('Error (tikz extension): convert exited with '
+                               'error:\n[stderr]\n%s\n[stdout]\n%s'
+                               % (stderr, stdout))
+
+    elif self.builder.config.tikz_proc_suite == 'Netpbm':
+        try:
+            p1 = Popen(['pnmcrop', 'tikz-1.ppm'], stdout=PIPE, stderr=PIPE)
+        except OSError, err:
+            if err.errno != ENOENT:   # No such file or directory
+                raise
+            self.builder.warn('pnmcrop command cannot be run:')
+            self.builder.warn(err)
+            self.builder._tikz_warned = True
+            chdir(curdir)
+            return None
+
+        pnm_args = []
+        if self.builder.config.tikz_transparent:
+            pnm_args = ['-transparent', 'white']
+    
+        try:
+            p2 = Popen(['pnmtopng'] + pnm_args, stdin=p1.stdout,
+                       stdout=PIPE, stderr=PIPE)
+        except OSError, err:
+            if err.errno != ENOENT:   # No such file or directory
+                raise
+            self.builder.warn('pnmtopng command cannot be run:')
+            self.builder.warn(err)
+            self.builder._tikz_warned = True
+            chdir(curdir)
+            return None
+    
+        pngdata, stderr2 = p2.communicate()
+        dummy, stderr1 = p1.communicate()
+        if p1.returncode != 0:
+            self.builder._tikz_warned = True
+            raise TikzExtError('Error (tikz extension): pnmcrop exited with '
+                               'error:\n[stderr]\n%s' % (stderr1))
+        if p2.returncode != 0:
+            self.builder._tikz_warned = True
+            raise TikzExtError('Error (tikz extension): pnmtopng exited with '
+                               'error:\n[stderr]\n%s' % (stderr2))
+        f = open(outfn,'wb')
+        f.write(pngdata)
+        f.close()
+
+    else:
+        self.builder._tikz_warned = True
+        chdir(curdir)
+        raise TikzExtError('Error (tikz extension): Invalid configuration '
+                           'value for tikz_proc_suite')
+
+    chdir(curdir)
+    return relfn
+
+def html_visit_tikzinline(self,node):
+    libs = self.builder.config.tikz_tikzlibraries
+    libs = libs.replace(' ', '').replace('\t', '').strip(', ')
+    try:
+        fname = render_tikz(self,node['tikz'],libs);
+    except TikzExtError, exc:
+        info = str(exc)[str(exc).find('!'):-1]
+        sm = nodes.system_message(info, type='WARNING', level=2,
+                                  backrefs=[], source=node['tikz'])
+        sm.walkabout(self)
+        self.builder.warn('display latex %r: \n' % node['tikz'] + str(exc))
+        raise nodes.SkipNode
+    if fname is None:
+        # something failed -- use text-only as a bad substitute
+        self.body.append('<span class="math">%s</span>' %
+                         self.encode(node['tikz']).strip())
+    else:
+        self.body.append('<img class="math" src="%s" alt="%s"/>' %
+                         (fname, self.encode(node['tikz']).strip()))
+        raise nodes.SkipNode
+
+def html_visit_tikz(self,node):
+    libs = self.builder.config.tikz_tikzlibraries + ',' + node['libs']
+    libs = libs.replace(' ', '').replace('\t', '').strip(', ')
+
+    try:
+        fname = render_tikz(self,node['tikz'],libs,node['stringsubst'])
+    except TikzExtError, exc:
+        info = str(exc)[str(exc).find('!'):-1]
+        sm = nodes.system_message(info, type='WARNING', level=2,
+                                  backrefs=[], source=node['tikz'])
+        sm.walkabout(self)
+        self.builder.warn('display latex %r: \n' % node['tikz'] + str(exc))
+        raise nodes.SkipNode
+    if fname is None:
+        # something failed -- use text-only as a bad substitute
+        self.body.append('<span class="math">%s</span>' %
+                         self.encode(node['tikz']).strip())
+    else:
+        self.body.append(self.starttag(node, 'div', CLASS='figure'))
+        self.body.append('<p>')
+        self.body.append('<img src="%s" alt="%s" /></p>\n' %
+                         (fname, self.encode(node['tikz']).strip()))
+        if node['caption']:
+            self.body.append('<p class="caption">%s</p>' %
+                             self.encode(node['caption']).strip())
+        self.body.append('</div>')
+        raise nodes.SkipNode
+
+def latex_visit_tikzinline(self, node):
+    tikz = node['tikz']
+    if tikz[0] == '[':
+        cnt,pos = 1,1
+        while cnt > 0 and cnt < len(tikz):
+            if tikz[pos] == '[':
+                cnt = cnt + 1
+            if tikz[pos] == ']':
+                cnt = cnt - 1
+            pos = pos + 1
+        tikz = tikz[:pos] + '{' + tikz[pos:]
+    else:
+        tikz = '{' + tikz
+    self.body.append('\\tikz' + tikz + '}')
+    raise nodes.SkipNode
+
+def latex_visit_tikz(self, node):
+    if node['caption']:
+        latex = '\\begin{figure}[htp]\\centering\\begin{tikzpicture}' + \
+                node['tikz'] + '\\end{tikzpicture}' + '\\caption{' + \
+                self.encode(node['caption']).strip() + '}\\end{figure}'
+    else:
+        latex = '\\begin{center}\\begin{tikzpicture}' + node['tikz'] + \
+            '\\end{tikzpicture}\\end{center}'
+    self.body.append(latex)
+
+def depart_tikz(self,node):
+    pass
+
+def cleanup_tempdir(app, exc):
+    if exc:
+        return
+    if not hasattr(app.builder, '_tikz_tempdir'):
+        return
+    try:
+        shutil.rmtree(app.builder._tikz_tempdir)
+    except Exception:
+        pass
+
+def setup(app):
+    app.add_node(tikz,
+                 html=(html_visit_tikz, depart_tikz),
+                 latex=(latex_visit_tikz, depart_tikz))
+    app.add_node(tikzinline,
+                 html=(html_visit_tikzinline, depart_tikz),
+                 latex=(latex_visit_tikzinline, depart_tikz))
+    app.add_role('tikz', tikz_role)
+    app.add_directive('tikz', TikzDirective)
+    app.add_config_value('tikz_latex_preamble', '', 'html')
+    app.add_config_value('tikz_tikzlibraries', '', 'html')
+    app.add_config_value('tikz_transparent', True, 'html')
+    app.add_config_value('tikz_proc_suite', 'Netpbm', 'html')
+    app.connect('build-finished', cleanup_tempdir)
+## configuration for tox <http://codespeak.net/tox/>
+
+## tox automates running certain tasks within virtualenvs.  The following
+## tox configuration outlines a basic setup for running unit tests and
+## building sphinx docs in separate virtual environments.  Give it a try!
+
+[tox]
+envlist=python,doc
+
+# test running
+[testenv:python]
+deps=
+    ## if you use nose for test running
+    # nose
+    ## if you use py.test for test running
+    # pytest
+commands=
+    ## run tests with py.test
+    # py.test []
+    ## run tests with nose
+    # nose
+
+[testenv:doc]
+deps=
+    sphinx
+    # add all Sphinx extensions and other dependencies required to build your docs
+commands=
+    ## test links
+    # sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees doc {envtmpdir}/linkcheck
+    ## test html output
+    # sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.