From 998e63660bb6ca5441a646b7b1da19a072c2e408 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 8 Jul 2013 22:40:56 +0200 Subject: [PATCH 1/2] DOC: increased width of text area --- doc/source/themes/nature_with_gtoc/static/nature.css_t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/themes/nature_with_gtoc/static/nature.css_t b/doc/source/themes/nature_with_gtoc/static/nature.css_t index ebfeb6e5a8b08..2e0bed922c1e6 100644 --- a/doc/source/themes/nature_with_gtoc/static/nature.css_t +++ b/doc/source/themes/nature_with_gtoc/static/nature.css_t @@ -30,7 +30,8 @@ div.documentwrapper { div.bodywrapper { /* ugly hack, probably not attractive with other font size for re*/ margin: 0 0 0 {{ theme_sidebarwidth|toint}}px; - max-width: 600px; + min-width: 540px; + max-width: 720px; } From 8d834fd9bb5703e3b72cd7141bda3fba5eccb767 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 9 Jul 2013 22:11:06 +0200 Subject: [PATCH 2/2] DOC: update ipython_directive with changes from ipython to restart prompt number at 1 each page --- doc/sphinxext/ipython_directive.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/sphinxext/ipython_directive.py b/doc/sphinxext/ipython_directive.py index b237341e81125..0c28e397a0005 100644 --- a/doc/sphinxext/ipython_directive.py +++ b/doc/sphinxext/ipython_directive.py @@ -621,6 +621,8 @@ class IpythonDirective(Directive): shell = EmbeddedSphinxShell() + seen_docs = set() + def get_config_options(self): # contains sphinx configuration variables config = self.state.document.settings.env.config @@ -644,6 +646,12 @@ def get_config_options(self): return savefig_dir, source_dir, rgxin, rgxout, promptin, promptout def setup(self): + + if not self.state.document.current_source in self.seen_docs: + self.shell.IP.history_manager.reset() + self.shell.IP.execution_count = 1 + self.seen_docs.add(self.state.document.current_source) + # get config values (savefig_dir, source_dir, rgxin, rgxout, promptin, promptout) = self.get_config_options()