summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-28 23:17:55 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-28 23:17:55 +0000
commit016a1fcd164a7389c072b9ef5c247039355bc6ec (patch)
treed17f789549fde69a29677500302804bdf85ecdeb
parent44f1df7b7cec671fec92ead513804e52e63eb76d (diff)
downloadpyramid-016a1fcd164a7389c072b9ef5c247039355bc6ec.tar.gz
pyramid-016a1fcd164a7389c072b9ef5c247039355bc6ec.tar.bz2
pyramid-016a1fcd164a7389c072b9ef5c247039355bc6ec.zip
Fix margin overruns.
-rw-r--r--docs/conf.py23
-rw-r--r--docs/conventions.rst16
-rw-r--r--docs/narr/webob.rst9
-rw-r--r--docs/tutorials/bfgwiki/src/authorization/tutorial/templates/static/style.css2
-rw-r--r--docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt3
-rw-r--r--docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/static/style.css2
-rw-r--r--docs/tutorials/bfgwiki/src/views/tutorial/templates/static/style.css2
-rw-r--r--docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt3
-rw-r--r--docs/tutorials/bfgwiki2/src/authorization/tutorial/templates/static/style.css2
-rw-r--r--docs/tutorials/bfgwiki2/src/views/tutorial/templates/static/style.css2
10 files changed, 52 insertions, 12 deletions
diff --git a/docs/conf.py b/docs/conf.py
index e3f2b00b6..afc471fe6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -252,3 +252,26 @@ def setup(app):
app.add_directive('frontmatter', frontmatter, 1, (0, 0, 0))
app.add_directive('mainmatter', mainmatter, 1, (0, 0, 0))
app.add_directive('backmatter', backmatter, 1, (0, 0, 0))
+
+# ugh
+
+from sphinx.writers.latex import LaTeXTranslator
+
+def visit_literal(self, node):
+ self.no_contractions += 1
+ content = self.encode(node.astext().strip())
+ self.no_contractions -= 1
+ if self.in_title:
+ self.body.append(r'\texttt{%s}' % content)
+ elif node.has_key('role') and node['role'] == 'samp':
+ self.body.append(r'\samp{%s}' % content)
+ else:
+ # XXX special treatment of overlong ``repoze.bfg.foo``
+ # literals.
+ if 'repoze.bfg.' in content:
+ content = content.replace('repoze.bfg.', '')
+ self.body.append(r'\code{%s}' % content)
+ raise nodes.SkipNode
+
+LaTeXTranslator.visit_literal = visit_literal
+
diff --git a/docs/conventions.rst b/docs/conventions.rst
index d0376a195..0bfe5e21e 100644
--- a/docs/conventions.rst
+++ b/docs/conventions.rst
@@ -67,3 +67,19 @@ printed line should actually be part of the command:
c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \
--cover-erase --with-coverage
+
+In printed versions of this book, Python modules classes, methods,
+functions, and attributes that are part of the :mod:`repoze.bfg`
+module are referenced in paragraph text. These are contracted to omit
+the ``repoze.bfg`` prefix to reduce redundancy and increase
+readability. Therefore, where you might expect:
+
+ .. code-block:: text
+
+ repoze.bfg.configuration.Configurator.add_view (pp. XXX)
+
+Instead a contracted version will be rendered:
+
+ .. code-block:: text
+
+ configuration.Configurator.add_view (pp. XXX)
diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst
index be7abd3b9..6f2b9ff21 100644
--- a/docs/narr/webob.rst
+++ b/docs/narr/webob.rst
@@ -207,13 +207,12 @@ Here's the highlights:
This optional attribute can point to the request object associated
with this response object.
-``response.set_cookie(key, value, max_age=None, path='/',
- domain=None, secure=None, httponly=False,
- version=None, comment=None)``:
- Set a cookie. The keyword arguments control the various cookie
+``response.set_cookie(key, value, max_age=None, path='/', ...)``: Set
+ a cookie. The keyword arguments control the various cookie
parameters. The ``max_age`` argument is the length for the cookie
to live in seconds (you may also use a timedelta object). The
- `Expires`` key will also be set based on the value of ``max_age``.
+ ``Expires`` key will also be set based on the value of
+ ``max_age``.
``response.delete_cookie(key, path='/', domain=None)``:
Delete a cookie from the client. This sets ``max_age`` to 0 and
diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/static/style.css b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/static/style.css
index 0a4b5767e..cad87e0d4 100644
--- a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/static/style.css
+++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/static/style.css
@@ -1,7 +1,7 @@
html, body {
color: black;
background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+ font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
margin: 0;
padding: 0;
}
diff --git a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt
index b6105b96f..65d362ae7 100644
--- a/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt
+++ b/docs/tutorials/bfgwiki/src/authorization/tutorial/templates/view.pt
@@ -6,7 +6,8 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <title>${page.__name__} - bfg tutorial wiki (based on TurboGears 20-Minute Wiki)
+ <title>${page.__name__} - bfg tutorial wiki
+ (based on TurboGears 20-Minute Wiki)
</title>
<link rel="stylesheet" type="text/css"
href="${request.application_url}/static/style.css" />
diff --git a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/static/style.css b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/static/style.css
index 0a4b5767e..cad87e0d4 100644
--- a/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/static/style.css
+++ b/docs/tutorials/bfgwiki/src/viewdecorators/tutorial/templates/static/style.css
@@ -1,7 +1,7 @@
html, body {
color: black;
background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+ font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
margin: 0;
padding: 0;
}
diff --git a/docs/tutorials/bfgwiki/src/views/tutorial/templates/static/style.css b/docs/tutorials/bfgwiki/src/views/tutorial/templates/static/style.css
index 0a4b5767e..cad87e0d4 100644
--- a/docs/tutorials/bfgwiki/src/views/tutorial/templates/static/style.css
+++ b/docs/tutorials/bfgwiki/src/views/tutorial/templates/static/style.css
@@ -1,7 +1,7 @@
html, body {
color: black;
background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+ font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
margin: 0;
padding: 0;
}
diff --git a/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt b/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt
index 34d097b28..9035d6225 100644
--- a/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt
+++ b/docs/tutorials/bfgwiki/src/views/tutorial/templates/view.pt
@@ -6,7 +6,8 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
- <title>${page.__name__} - bfg tutorial wiki (based on TurboGears 20-Minute Wiki)
+ <title>${page.__name__} - bfg tutorial wiki
+ (based on TurboGears 20-Minute Wiki)
</title>
<link rel="stylesheet" type="text/css"
href="${request.application_url}/static/style.css" />
diff --git a/docs/tutorials/bfgwiki2/src/authorization/tutorial/templates/static/style.css b/docs/tutorials/bfgwiki2/src/authorization/tutorial/templates/static/style.css
index 0a4b5767e..cad87e0d4 100644
--- a/docs/tutorials/bfgwiki2/src/authorization/tutorial/templates/static/style.css
+++ b/docs/tutorials/bfgwiki2/src/authorization/tutorial/templates/static/style.css
@@ -1,7 +1,7 @@
html, body {
color: black;
background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+ font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
margin: 0;
padding: 0;
}
diff --git a/docs/tutorials/bfgwiki2/src/views/tutorial/templates/static/style.css b/docs/tutorials/bfgwiki2/src/views/tutorial/templates/static/style.css
index 0a4b5767e..cad87e0d4 100644
--- a/docs/tutorials/bfgwiki2/src/views/tutorial/templates/static/style.css
+++ b/docs/tutorials/bfgwiki2/src/views/tutorial/templates/static/style.css
@@ -1,7 +1,7 @@
html, body {
color: black;
background-color: #ddd;
- font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+ font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, sans-serif;
margin: 0;
padding: 0;
}