Skip to content
The Sphinx Thesis Resource
Python TeX CSS
Find file
Latest commit b191db4 Feb 18, 2015 @jterrace Merge pull request #32 from Jellby/master
Replace only text within reference nodes
Failed to load latest commit information.
ch-figs Add example of CSV Table and List table. Jun 6, 2013
ch-intro more verbose requirements in docs Sep 27, 2013
ch-math Add inline math example. Closes #5. Oct 5, 2012
ch-refs First checkin Oct 3, 2012
ch-typography Add code block with highlighting example. Sep 30, 2013
extensions Replace only text within reference nodes Feb 18, 2015
img First checkin Oct 3, 2012
static First checkin Oct 3, 2012
templates First checkin Oct 3, 2012
tex Update preamble._tex Oct 2, 2013
.gitignore .gitignore: add pyc Sep 27, 2013
.travis.yml Forgot building PDF, ccicons isn't working, just generate latex to ma… Oct 3, 2012
Makefile Makefile: add all target Sep 27, 2013
abstract.rst First checkin Oct 3, 2012
acknowledgements.rst First checkin Oct 3, 2012
bibliography.rst remove the terror of whitespace Sep 27, 2013 decode epilog Oct 21, 2013
dedication.rst First checkin Oct 3, 2012
index.rst First checkin Oct 3, 2012
index_tex.rst First checkin Oct 3, 2012
refs.bib First checkin Oct 3, 2012
requirements.txt First checkin Oct 3, 2012
toc.txt First checkin Oct 3, 2012



Creating a PhD thesis is typically done using LaTeX. This works really well for producing a PDF, but a giant PDF file is not a great way to put documents on the web. There are solutions that exist to turn latex source files into HTML, but in my experience, they tend to produce poor HTML output.

The Sphinx project is a wonderful tool for creating portable documents, allowing for output to many different formats. Unfortunately, it has many shortcomings when trying to typeset something so advanced as a PhD thesis. The aim of this project is to modify Sphinx to support all of the needs of a thesis writer. Many of the patches are not appropriate for contributing directly to the upstream Sphinx repository, so this is instead a separate project.

This sphinxtr output is available in several formats at:

The source code for sphinxtr can be found at:


If you are running the apt packet manager you can install the requirements with the following command:

sudo apt-get install python-setuptools python-virtualenv texlive-full

Otherwise you can maybe find other ways to install the following packages:

Now create a virtualenv. This will help you to separate the requirements from this project from other Python projects you might have:

virtualenv venv
source ./venv/bin/activate


You can get out of the virtualenv by either closing the terminal or by calling deactivate.

Then install the required Python packages:

pip install -r requirements.txt


You need make. The following targets are supported:

Builds HTML format, separated into sections
Builds HTML format on a single page
Builds text files, separated into sections
Builds a single text file
Builds into latex source files and then compiles into a PDF. Requires latex.


The following changes and additions have been made from vanilla Sphinx:

  • A cross-format bibtex bibliography based on sphinx-natbib
  • Tables that can go inside figures
  • Changed table formatting to look pretty, like booktabs
  • Improved alignment in table environment
  • Added support for short captions that show up in the "list of figures" section
  • Changed equation reference formatting from "(1)" to "1"
  • Full customization of latex preamble and style file
  • Numbered figures
  • Numbered section references
  • A singletext output that builds into a single text file, similar to singlehtml
  • A subfigure environment

Documents Using sphinxtr

Something went wrong with that request. Please try again.