Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/source/themes/nature_with_gtoc/static/nature.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down
8 changes: 8 additions & 0 deletions doc/sphinxext/ipython_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down