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 "$@" Introduction to the -adics +
  • Introduction to the -adics
  • """ 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') - '...
    \n \n

    A test

    \n\n\n
    ' + '
    \n \n

    A test

    \n\n\n
    ' sage: sphinxify('**Testing**\n`monospace`') - '...
    Testing\n\n\n\n
    ' + '
    Testing\n\n \n

    x=y

    \n\n\n
    ' + '
    \n \n

    x=y

    \n\n\n
    ' 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