Offer mathjax instead of jsmath in quickstart.

This commit is contained in:
Georg Brandl 2011-10-07 11:39:19 +02:00
parent 83b5fa9485
commit b1d5e33899
2 changed files with 11 additions and 12 deletions

View File

@ -231,7 +231,7 @@ def main(argv=sys.argv):
usage: %prog [options] -o <output_path> <module_path> [exclude_paths, ...]
Look recursively in <module_path> for Python modules and packages and create
a reST file with automodule directives per package in the <output_path>.
one reST file with automodule directives per package in the <output_path>.
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)

View File

@ -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']).\