From b1d5e33899eca8b41437feebbac6b42f82706090 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 7 Oct 2011 11:39:19 +0200 Subject: [PATCH] Offer mathjax instead of jsmath in quickstart. --- sphinx/apidoc.py | 13 ++++++------- sphinx/quickstart.py | 10 +++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index 6006943d9..f988957e8 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -231,7 +231,7 @@ def main(argv=sys.argv): usage: %prog [options] -o [exclude_paths, ...] Look recursively in for Python modules and packages and create -a reST file with automodule directives per package in the . +one reST file with automodule directives per package in the . Note: By default this script will not overwrite already created files.""") @@ -241,13 +241,13 @@ Note: By default this script will not overwrite already created files.""") help='Maximum depth of submodules to show in the TOC ' '(default: 4)', type='int', default=4) parser.add_option('-f', '--force', action='store_true', dest='force', - help='Overwrite all the files') + help='Overwrite all files') parser.add_option('-n', '--dry-run', action='store_true', dest='dryrun', - help='Run the script without creating the files') + help='Run the script without creating files') parser.add_option('-T', '--no-toc', action='store_true', dest='notoc', - help='Don\'t create the table of contents file') + help='Don\'t create a table of contents file') parser.add_option('-H', '--doc-header', action='store', dest='header', - help='Documentation Header (default: Project)', + help='Documentation header (default: Project)', default='Project') parser.add_option('-s', '--suffix', action='store', dest='suffix', help='file suffix (default: rst)', default='rst') @@ -263,7 +263,6 @@ Note: By default this script will not overwrite already created files.""") print >>sys.stderr, '%s is not a directory.' % rootpath sys.exit(1) if not path.isdir(opts.destdir): - print '%s is not a valid output directory.' % opts.destdir - sys.exit(1) + os.makedirs(opts.destdir) excludes = normalize_excludes(rootpath, excludes) recurse_tree(rootpath, excludes, opts) diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index c7b3aaf84..1cdb46f8d 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -897,10 +897,10 @@ Please indicate if you want to use one of the following Sphinx extensions:''' 'coverage (y/N)', 'n', boolean) do_prompt(d, 'ext_pngmath', 'pngmath: include math, rendered ' 'as PNG images (y/N)', 'n', boolean) - do_prompt(d, 'ext_jsmath', 'jsmath: include math, rendered in the ' - 'browser by JSMath (y/N)', 'n', boolean) - if d['ext_pngmath'] and d['ext_jsmath']: - print '''Note: pngmath and jsmath cannot be enabled at the same time. + do_prompt(d, 'ext_mathjax', 'mathjax: include math, rendered in the ' + 'browser by MathJax (y/N)', 'n', boolean) + if d['ext_pngmath'] and d['ext_mathjax']: + print '''Note: pngmath and mathjax cannot be enabled at the same time. pngmath has been deselected.''' do_prompt(d, 'ext_ifconfig', 'ifconfig: conditional inclusion of ' 'content based on config values (y/N)', 'n', boolean) @@ -921,7 +921,7 @@ directly.''' d['extensions'] = ', '.join( repr('sphinx.ext.' + name) for name in ('autodoc', 'doctest', 'intersphinx', 'todo', 'coverage', - 'pngmath', 'jsmath', 'ifconfig', 'viewcode') + 'pngmath', 'mathjax', 'ifconfig', 'viewcode') if d['ext_' + name]) d['copyright'] = time.strftime('%Y') + ', ' + d['author'] d['author_texescaped'] = unicode(d['author']).\