From 793425accac28fd0bea3e406404b9b351556fddb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Dec 2009 17:21:27 +0000 Subject: Better note/warning distinctions. --- docs/conf.py | 33 +++++++++++++++++++++++++++++++++ docs/conventions.rst | 8 ++++++++ docs/narr/project.rst | 8 ++++---- 3 files changed, 45 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index 98452669f..58b985869 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -242,6 +242,39 @@ _PREAMBLE = r""" } \makeatother +% Redefine these colors to your liking in the preamble. +\definecolor{TitleColor}{rgb}{0,0,0} +\definecolor{InnerLinkColor}{rgb}{0.208,0.374,0.486} +\definecolor{OuterLinkColor}{rgb}{0.216,0.439,0.388} +% Redefine these colors to something not white if you want to have colored +% background and border for code examples. +\definecolor{VerbatimColor}{rgb}{1,1,1} +\definecolor{VerbatimBorderColor}{rgb}{1,1,1} + +\makeatletter +% Notices / Admonitions +% +\newcommand{\py@veryheavybox}{ + \setlength{\fboxrule}{2pt} + \setlength{\fboxsep}{7pt} + \setlength{\py@noticelength}{\linewidth} + \addtolength{\py@noticelength}{-2\fboxsep} + \addtolength{\py@noticelength}{-2\fboxrule} + \setlength{\shadowsize}{3pt} + \Sbox + \minipage{\py@noticelength} +} +\newcommand{\py@endveryheavybox}{ + \endminipage + \endSbox + \fbox{\TheSbox} +} +\renewcommand{\py@noticestart@warning}{\py@veryheavybox} +\renewcommand{\py@noticeend@warning}{\py@endveryheavybox} +\renewcommand{\py@noticestart@note}{\py@heavybox} +\renewcommand{\py@noticeend@note}{\py@endheavybox} +\makeatother + \sloppy """ diff --git a/docs/conventions.rst b/docs/conventions.rst index 0bfe5e21e..020ed6dac 100644 --- a/docs/conventions.rst +++ b/docs/conventions.rst @@ -68,6 +68,13 @@ printed line should actually be part of the command: c:\bigfntut\tutorial> ..\Scripts\nosetests --cover-package=tutorial \ --cover-erase --with-coverage +A sidebar, which presents a concept tangentially related to content +discussed on a page, is rendered like so: + +.. sidebar:: This is a sidebar + + Sidebar information. + 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 @@ -83,3 +90,4 @@ Instead a contracted version will be rendered: .. code-block:: text configuration.Configurator.add_view (pp. XXX) + diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 1c1dde131..c76223401 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -259,6 +259,10 @@ Once the project is installed for development, you can run the application it represents using the ``paster serve`` command against the generated ``MyProject.ini`` configuration file: +.. code-block:: text + + $ ../bin/paster serve MyProject.ini + .. sidebar:: Using ``mod_wsgi`` You can also use :term:`mod_wsgi` to serve your :mod:`repoze.bfg` @@ -269,10 +273,6 @@ the generated ``MyProject.ini`` configuration file: webserver, as exception and debugging output will be sent to the console. -.. code-block:: text - - $ ../bin/paster serve MyProject.ini - Here's sample output from a run: .. code-block:: text -- cgit v1.2.3