Skip to content

Commit a2f323f

Browse files
committed
Merge pull request #4165 from jorisvandenbossche/doc-width
DOC: increased width of text area (#4159)
2 parents 52837c1 + 8d834fd commit a2f323f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

doc/source/themes/nature_with_gtoc/static/nature.css_t

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ div.documentwrapper {
3030
div.bodywrapper {
3131
/* ugly hack, probably not attractive with other font size for re*/
3232
margin: 0 0 0 {{ theme_sidebarwidth|toint}}px;
33-
max-width: 600px;
33+
min-width: 540px;
34+
max-width: 720px;
3435
}
3536

3637

doc/sphinxext/ipython_directive.py

+8
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ class IpythonDirective(Directive):
621621

622622
shell = EmbeddedSphinxShell()
623623

624+
seen_docs = set()
625+
624626
def get_config_options(self):
625627
# contains sphinx configuration variables
626628
config = self.state.document.settings.env.config
@@ -644,6 +646,12 @@ def get_config_options(self):
644646
return savefig_dir, source_dir, rgxin, rgxout, promptin, promptout
645647

646648
def setup(self):
649+
650+
if not self.state.document.current_source in self.seen_docs:
651+
self.shell.IP.history_manager.reset()
652+
self.shell.IP.execution_count = 1
653+
self.seen_docs.add(self.state.document.current_source)
654+
647655
# get config values
648656
(savefig_dir, source_dir, rgxin,
649657
rgxout, promptin, promptout) = self.get_config_options()

0 commit comments

Comments
 (0)