summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-29 05:09:56 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-29 05:09:56 +0000
commit27477816ba22b1f1edead0c4ec6efe5459b33e94 (patch)
treec7429964ae08090b0e93a6ac5e32de596e1e3e59 /docs/conf.py
parente6f681fdca19490f9f7bb6274a38d0784ce3daac (diff)
downloadpyramid-27477816ba22b1f1edead0c4ec6efe5459b33e94.tar.gz
pyramid-27477816ba22b1f1edead0c4ec6efe5459b33e94.tar.bz2
pyramid-27477816ba22b1f1edead0c4ec6efe5459b33e94.zip
Overlong lines.
Fix table.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py19
1 files changed, 16 insertions, 3 deletions
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