/sphinx-strat-doc-base

Base files for Sphinx LaTeX strategy documents

Primary LanguageTeXApache License 2.0Apache-2.0

Sphinx LaTeX Strat Doc Base

I regularly use a small set of customized LaTeX styles with Sphinx to generate clean, professional strategy documents. Nothing spectacular, but I hand them off to others and duplicate them myself often enough that it's worth extracting them to a small repo.

Starting a New Doc

If you don't have Sphinx installed, get that first:

$ apt-get install python-sphinx

In a new directory, tell Sphinx to create a new document shell:

$ sphinx-quickstart

The quickstart tool will prompt you with a number of options. The only option that really matters is to select "y" for separate source and build directories.

Copy the simplified source/conf.py from this repo over to the new document shell. Update values like the project title and author name.

Copy source/strat.sty from this repo over to the new document shell. If you have a simple document (only a few pages long) and don't need a table of contents, copy source/strat_notoc.sty instead, renaming it to strat.sty.

Editing the Doc

In the new document shell, source/index.rst is the base RST example source file. Replace this with your own content. Any RST content will work, it doesn't have to follow the format of the example. I tend to use subdirectories for major sections in longer documents, just so the document is easier to maintain.

Building the Doc

Generate a PDF with:

$ make latexpdf

The result will be located in build/latex/output_file.pdf. (You can configure a different output filename in source/conf.py.)

NOTE

I've completely stripped out the configuration options for HTML or Manpage output. If you want those, you should keep the source/conf.py generated by Sphinx, and only copy the LaTeX options from my simplified source/conf.py.