From 27477816ba22b1f1edead0c4ec6efe5459b33e94 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 29 Dec 2009 05:09:56 +0000 Subject: Overlong lines. Fix table. --- docs/conf.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index afc471fe6..43a91dfd5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,8 @@ import sys, os +book = os.environ.get('book') + # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. @@ -83,8 +85,7 @@ add_module_names = False #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - +pygments_style = book and 'bw' or 'sphinx' # Options for HTML output # ----------------------- @@ -206,6 +207,7 @@ _PREAMBLE = r""" filecolor=black, urlcolor=black } +\fvset{frame=single,xleftmargin=9pt,numbersep=4pt} \pagestyle{fancy} @@ -253,7 +255,7 @@ def setup(app): app.add_directive('mainmatter', mainmatter, 1, (0, 0, 0)) app.add_directive('backmatter', backmatter, 1, (0, 0, 0)) -# ugh +# strip "repoze.bfg." from all inline literals from sphinx.writers.latex import LaTeXTranslator @@ -275,3 +277,14 @@ def visit_literal(self, node): LaTeXTranslator.visit_literal = visit_literal +# turn off all line numbers in latex formatting + +## from pygments.formatters import LatexFormatter +## from sphinx.highlighting import PygmentsBridge + +## class NoLinenosLatexFormatter(LatexFormatter): +## def __init__(self, **options): +## LatexFormatter.__init__(self, **options) +## self.linenos = False + +## PygmentsBridge.latex_formatter = NoLinenosLatexFormatter -- cgit v1.2.3