summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage/patches/sphinx-1.7.patch
blob: c67b8942e28bb414b1832d932a0316ea6aacf0a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
diff --git a/src/bin/sage b/src/bin/sage
index 397f30cbed..3fc473c343 100755
--- a/src/bin/sage
+++ b/src/bin/sage
@@ -980,8 +980,11 @@ if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
 fi
 
 if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
+    # Redirect stdin from /dev/null. This helps with running TeX which
+    # tends to ask interactive questions if something goes wrong. These
+    # cause the build to hang. If stdin is /dev/null, TeX just aborts.
     shift
-    exec sage-python23 -m "sage_setup.docbuild" "$@"
+    exec sage-python23 -m sage_setup.docbuild "$@" </dev/null
 fi
 
 if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py
index 25f94f7b7d..3f07474d9b 100644
--- a/src/doc/common/conf.py
+++ b/src/doc/common/conf.py
@@ -627,7 +627,7 @@ def call_intersphinx(app, env, node, contnode):
         sage: for line in open(thematic_index).readlines():
         ....:     if "padics" in line:
         ....:         sys.stdout.write(line)
-        <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage Reference Manual: p-Adics ...)"><span>Introduction to the -adics</span></a></li>
+        <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage Reference Manual: p-Adics v...)"><span>Introduction to the -adics</span></a></li>
     """
     debug_inf(app, "???? Trying intersphinx for %s"%node['reftarget'])
     builder = app.builder
diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
index 4f76d4113a..8f426b5989 100644
--- a/src/sage/misc/sphinxify.py
+++ b/src/sage/misc/sphinxify.py
@@ -47,11 +47,11 @@ def sphinxify(docstring, format='html'):
 
         sage: from sage.misc.sphinxify import sphinxify
         sage: sphinxify('A test')
-        '...<div class="docstring">\n    \n  <p>A test</p>\n\n\n</div>'
+        '<div class="docstring">\n    \n  <p>A test</p>\n\n\n</div>'
         sage: sphinxify('**Testing**\n`monospace`')
-        '...<div class="docstring"...<strong>Testing</strong>\n<span class="math"...</p>\n\n\n</div>'
+        '<div class="docstring"...<strong>Testing</strong>\n<span class="math...</p>\n\n\n</div>'
         sage: sphinxify('`x=y`')
-        '...<div class="docstring">\n    \n  <p><span class="math">x=y</span></p>\n\n\n</div>'
+        '<div class="docstring">\n    \n  <p><span class="math notranslate nohighlight">x=y</span></p>\n\n\n</div>'
         sage: sphinxify('`x=y`', format='text')
         'x=y\n'
         sage: sphinxify(':math:`x=y`', format='text')
diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
index fda76a4174..d3413239dd 100644
--- a/src/sage_setup/docbuild/sphinxbuild.py
+++ b/src/sage_setup/docbuild/sphinxbuild.py
@@ -207,7 +207,7 @@ def runsphinx():
     try:
         sys.stdout = SageSphinxLogger(sys.stdout, os.path.basename(output_dir))
         sys.stderr = SageSphinxLogger(sys.stderr, os.path.basename(output_dir))
-        sphinx.cmdline.main(sys.argv)
+        sphinx.cmdline.main(sys.argv[1:])
     finally:
         sys.stdout = saved_stdout
         sys.stderr = saved_stderr