Ticket #6495: trac_6495-part2-everything-else-9774.patch

File trac_6495-part2-everything-else-9774.patch, 53.2 KB (added by jhpalmieri, 7 years ago)

apply second (if you've applied the patches at #9774)

  • .hgignore

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1311223150 25200
    # Node ID d1ac37ff4b867625a70f4e450aa5633bb9406225
    # Parent  87d6f2107539d4379ddf73faaf85d1df8d599a7e
    #6495: Break the reference manual into more manageable pieces.
    Part 2: all important changes to files.
    
    diff --git a/.hgignore b/.hgignore
    a b sage/modular/arithgroup/farey_symbol.h 
    5757doc/output/
    5858doc/en/reference/sage/
    5959doc/en/reference/sagenb/
     60doc/en/reference/.*/sage/
     61doc/en/reference/.*/sagenb/
  • MANIFEST.in

    diff --git a/MANIFEST.in b/MANIFEST.in
    a b include doc/fr/a_tour_of_sage/eigen_plot 
    3939include doc/fr/a_tour_of_sage/sin_plot.png
    4040include doc/tr/a_tour_of_sage/eigen_plot.png
    4141include doc/tr/a_tour_of_sage/sin_plot.png
    42 recursive-include doc/en/reference/media *
     42recursive-include doc/en/reference/*/media *
    4343recursive-include doc/en/thematic_tutorials/media *
    4444recursive-include doc/common/static *
    4545recursive-include doc/common/themes *
  • doc/common/builder.py

    diff --git a/doc/common/builder.py b/doc/common/builder.py
    a b def copytree(src, dst, symlinks=False, i 
    8282        raise shutil.Error, errors
    8383
    8484
     85##########################################
     86#      Parallel Building Ref Manual      #
     87##########################################
     88
     89def build_ref_doc(doc, lang, format, output_dir, *args, **kwds):
     90    # Build the reference manual for doc
     91    static_dir = os.path.join(output_dir, 'reference', '_static')
     92    bad_static = os.path.join(output_dir, doc, '_static')
     93    # We need to remove the link to "_static" before generating the
     94    # documentation, because the html doc builder writes to the
     95    # _static directory.
     96    if (os.path.isdir(static_dir) and os.path.isdir(bad_static)
     97        and os.path.islink(bad_static)):
     98        os.remove(bad_static)
     99    getattr(ReferenceSubBuilder(doc, lang), format)(*args, **kwds)
     100    # The standard Sphinx html build puts a copy of the "static"
     101    # directory in reference/doc/_static.  For the reference manual,
     102    # these are all identical to reference/_static, so delete the
     103    # directory reference/doc/_static and replace it with a link to
     104    # reference/_static.  This saves hundreds of megabytes of disk
     105    # space.
     106    if (os.path.isdir(static_dir) and os.path.isdir(bad_static)
     107        and not os.path.islink(bad_static)):
     108        shutil.rmtree(bad_static)
     109    if os.path.isdir(static_dir):
     110        os.symlink(static_dir, bad_static)
    85111
    86112##########################################
    87113#             Builders                   #
    class DocBuilder(object): 
    118144
    119145        - ``lang`` - (default "en") the language of the document.
    120146        """
    121         if '/' in name:
    122             lang, name = name.split(os.path.sep)
    123         self.name = name
     147        doc = name.split(os.path.sep)
     148
     149        if doc[0] in LANGUAGES:
     150            lang = doc[0]
     151            doc.pop(0)
     152
     153        self.name = os.path.join(*doc)
    124154        self.lang = lang
    125         self.dir = os.path.join(SAGE_DOC, lang, name)
     155        self.dir = os.path.join(SAGE_DOC, self.lang, self.name)
    126156
    127157        #Make sure the .static and .templates directories are there
    128158        mkdir(os.path.join(self.dir, "static"))
    class DocBuilder(object): 
    220250    changes = builder_helper('changes')
    221251    linkcheck = builder_helper('linkcheck')
    222252
     253
    223254class AllBuilder(object):
    224255    """
    225256    A class used to build all of the documentation.
    class AllBuilder(object): 
    239270        This is the function which goes through all of the documents
    240271        and does the actual building.
    241272        """
    242         for document in self.get_all_documents():
     273        docs = self.get_all_documents()
     274        refs = [x for x in docs if x.endswith('reference')]
     275        others = [x for x in docs if not x.endswith('reference')]
     276        for document in others:
     277            logger.warning("\nBuilding %s.\n" % document)
     278            getattr(get_builder(document), name)(*args, **kwds)
     279        # Build the reference manual twice to resolve references.
     280        # That is, build once to construct the intersphinx inventory
     281        # files, and then build the second time for real.  So the
     282        # first build should be as fast as possible; thus do an html
     283        # build first.
     284        logger.warning("\nBuilding reference manual, first pass.\n")
     285        global ALLSPHINXOPTS
     286        ALLSPHINXOPTS += ' -Q '
     287        for document in refs:
     288            getattr(get_builder(document), 'html')(*args, **kwds)
     289        logger.warning("Building reference manual, second pass.\n")
     290        ALLSPHINXOPTS = ALLSPHINXOPTS.replace('-Q', '-q') + ' '
     291        for document in refs:
    243292            getattr(get_builder(document), name)(*args, **kwds)
    244293
    245294    def get_all_documents(self):
    class AllBuilder(object): 
    271320
    272321        return documents
    273322
     323
    274324class WebsiteBuilder(DocBuilder):
    275325    def html(self):
    276326        """
    class WebsiteBuilder(DocBuilder): 
    302352
    303353        DocBuilder.clean(self)
    304354
    305 class ReferenceBuilder(DocBuilder):
     355
     356class ReferenceBuilder(AllBuilder):
    306357    """
    307     This the class used to build the reference manual.  It is
     358    This class builds the reference manual.  It uses DocBuilder to
     359    build the top-level page and ReferenceSubBuilder for each
     360    sub-component.
     361    """
     362    def __init__(self, name, lang='en'):
     363        """
     364        Records the reference manual's name, in case it's not
     365        identical to 'reference'.
     366        """
     367        AllBuilder.__init__(self)
     368        doc = name.split(os.path.sep)
     369
     370        if doc[0] in LANGUAGES:
     371            lang = doc[0]
     372            doc.pop(0)
     373
     374        self.name = doc[0]
     375        self.lang = lang
     376
     377    def _output_dir(self, type, lang='en'):
     378        """
     379        Returns the directory where the output of type type is stored.
     380        If the directory does not exist, then it will automatically be
     381        created.
     382
     383        EXAMPLES::
     384
     385            sage: import os, sys; sys.path.append(os.environ['SAGE_DOC']+'/common/'); import builder
     386            sage: b = builder.ReferenceBuilder('reference')
     387            sage: b._output_dir('html')
     388            '.../devel/sage/doc/output/html/en/reference'
     389        """
     390        return mkdir(os.path.join(SAGE_DOC, "output", type, lang, self.name))
     391
     392    def _wrapper(self, format, *args, **kwds):
     393        """
     394        Builds reference manuals.  For each language, it builds the
     395        top-level document and its components.
     396        """
     397        for lang in LANGUAGES:
     398            refdir = os.path.join(SAGE_DOC, lang, self.name)
     399            if not os.path.exists(refdir):
     400                continue
     401
     402            output_dir = self._output_dir(format, lang)
     403            getattr(DocBuilder(self.name, lang), format)(*args, **kwds)
     404
     405            from multiprocessing import Pool, cpu_count
     406            # Determine the number of threads from the environment variable
     407            # SAGE_NUM_THREADS.
     408            pool = Pool(int(os.environ.get('SAGE_NUM_THREADS', 1)))
     409            for doc in self.get_all_documents(refdir):
     410                pool.apply_async(build_ref_doc,
     411                                 (doc, lang, format,
     412                                  os.path.split(output_dir)[0]) + args, kwds)
     413            pool.close()
     414            pool.join()
     415            if format == 'html':
     416                # html build: combine the todo lists from the
     417                # different modules.
     418                todofile = os.path.join(output_dir, 'todolist', 'index.html')
     419                old = open(todofile).read()
     420                note = "The combined to do list is only available in the html version of the reference manual."
     421                preamble = old.find(note)
     422                postamble = preamble + len(note)
     423                if preamble != -1:
     424                    old_todofile = os.path.join(output_dir, 'todolist', 'index-old.html')
     425                    shutil.move(todofile, old_todofile)
     426                    new = open(todofile, 'w')
     427                    new.write(old[:preamble])
     428                    for f in os.listdir(output_dir):
     429                        index = os.path.join(output_dir, f, 'index.html')
     430                        if (f != 'todolist' and os.path.exists(index)):
     431                            html = open(index).read()
     432                            start = html.find('<div class="admonition-todo')
     433                            end = html.find('<div class="section" id="indices-and-tables">')
     434                            if start != -1:
     435                                html = html[start:end].replace('sage/%s' %f,
     436                                                               '../%s/sage/%s' % (f, f))
     437                                new.write(html)
     438                    new.write(old[postamble:])
     439                    new.close()
     440
     441                logger.warning('''
     442Build finished.  The Sage reference manual can be found in
     443
     444  %s
     445''' % (os.path.join(output_dir, 'index.html')))
     446            # PDF: we need to build master index file which lists all
     447            # of the PDF file.  So we create an html file, based on
     448            # the file index.html from the "website" target.
     449            if format == 'pdf':
     450                import re
     451                # First build the website page.  (This only takes a
     452                # few seconds.)
     453                getattr(get_builder('website'), 'html')()
     454                # Copy the relevant pieces of
     455                # output/html/en/website/_static to output_dir.
     456                # (Don't copy all of _static to save some space: we
     457                # don't need all of the MathJax stuff, and in
     458                # particular we don't need the fonts.)
     459                website_dir = os.path.join(SAGE_DOC, 'output', 'html',
     460                                           'en', 'website')
     461                static_files = ['COPYING.txt', 'basic.css', 'blank.gif',
     462                         'default.css', 'doctools.js', 'favicon.ico',
     463                         'file.png', 'jquery.js', 'minus.png',
     464                         'pdf.png', 'plus.png', 'pygments.css',
     465                         'sage.css', 'sageicon.png', 'sagelogo.png',
     466                         'searchtools.js', 'sidebar.js', 'underscore.js']
     467                try:
     468                    os.mkdir(os.path.join(output_dir, '_static'))
     469                except OSError:
     470                    pass
     471                for f in static_files:
     472                    shutil.copyfile(os.path.join(website_dir, '_static', f),
     473                                    os.path.join(output_dir, '_static', f))
     474                # Now modify website's index.html page and write it
     475                # to output_dir.
     476                f = open(os.path.join(website_dir, 'index.html'))
     477                html = f.read().replace('Documentation', 'Reference')
     478                f.close()
     479                html_output_dir = os.path.dirname(website_dir)
     480                html = html.replace('http://www.sagemath.org',
     481                                    os.path.join(html_output_dir, 'index.html'))
     482                # From index.html, we want the preamble and the tail.
     483                html_end_preamble = html.find('<h1>Sage Reference')
     484                html_bottom = html.rfind('</table>') + len('</table>')
     485                # For the content, we modify doc/en/reference/index.rst,
     486                # which has two parts: the body and the table of contents.
     487                f = open(os.path.join(SAGE_DOC, lang, 'reference', 'index.rst'))
     488                rst = f.read()
     489                f.close()
     490                # Replace rst links with html links.  There are two types:
     491                #
     492                # `blah`__
     493                # __ link
     494                #
     495                # `blah <module/index.html>`_
     496                #
     497                # For the second type, also change "module/index.html"
     498                # to "module/module.pdf".
     499                rst = re.sub('`([^`]*)`__\.\n\n__ (.*)',
     500                                  r'<a href="\2">\1</a>.', rst)
     501                rst = re.sub(r'`([^<]*?)\s+<(.*)/index\.html>`_',
     502                             r'<a href="\2/\2.pdf">\1 <img src="_static/pdf.png" /></a>',
     503                             rst)
     504                start = rst.find('=\n') + 1
     505                end = rst.find('Table of Contents')
     506                # Body: add paragraph <p> markup.
     507                rst_body = rst[start:end]
     508                rst_body = rst_body.replace('\n\n', '</p>\n<p>')
     509                start = rst.find('Table of Contents') + 2*len('Table of Contents') + 1
     510                end = rst.find('.. include:: footer.txt')
     511                # TOC: change * to <li>, change rst headers to html headers.
     512                rst_toc = rst[start:end]
     513                rst_toc = rst_toc.replace('*', '<li>')
     514                rst_toc = re.sub('\n([A-Z][a-zA-Z, ]*)\n-*\n',
     515                             '</ul>\n\n\n<h2>\\1</h2>\n\n<ul>\n', rst_toc)
     516                # Now write the file.
     517                new_index = open(os.path.join(output_dir, 'index.html'), 'w')
     518                new_index.write(html[:html_end_preamble])
     519                new_index.write('<h1>' + rst[:rst.find('\n')] +
     520                                ' (PDF version)'+ '</h1>')
     521                new_index.write(rst_body)
     522                new_index.write('<h2>Table of Contents</h2>\n\n<ul>')
     523                new_index.write(rst_toc)
     524                new_index.write('</ul>\n\n')
     525                new_index.write(html[html_bottom:])
     526                new_index.close()
     527                logger.warning('''
     528PDF documents have been created in subdirectories of
     529
     530  %s
     531
     532Alternatively, you can open
     533
     534  %s
     535
     536for a webpage listing all of the documents.''' % (output_dir,
     537                                                 os.path.join(output_dir,
     538                                                              'index.html')))
     539
     540    def get_all_documents(self, refdir):
     541        """
     542        Returns a list of all reference manual components to build.
     543        We add a component name if it's a subdirectory of the manual's
     544        directory and contains a file named 'index.rst'.
     545        """
     546        documents = []
     547
     548        for doc in os.listdir(refdir):
     549            if os.path.exists(os.path.join(refdir, doc, 'index.rst')):
     550                documents.append(os.path.join(self.name, doc))
     551       
     552        return documents
     553
     554
     555class ReferenceSubBuilder(DocBuilder):
     556    """
     557    This class builds sub-components of the reference manual.  It is
    308558    resposible for making sure the auto generated ReST files for the
    309559    Sage library are up to date.
    310560
    class ReferenceBuilder(DocBuilder): 
    715965
    716966def get_builder(name):
    717967    """
    718     Returns a either a AllBuilder or DocBuilder object depending
    719     on whether ``name`` is 'all' or not.  These are the objects
    720     which do all the real work in building the documentation.
     968    Returns an appropriate *Builder object for the document ``name``.
     969    DocBuilder and its subclasses do all the real work in building the
     970    documentation.
    721971    """
    722972    if name == 'all':
    723973        return AllBuilder()
    724974    elif name.endswith('reference'):
    725975        return ReferenceBuilder(name)
     976    elif 'reference' in name:
     977        return ReferenceSubBuilder(name)
    726978    elif name.endswith('website'):
    727979        return WebsiteBuilder(name)
    728980    elif name in get_documents() or name in AllBuilder().get_all_documents():
    def help_documents(s=u""): 
    8121064    shortcut 'all' for all documents, available to the Sage
    8131065    documentation builder.
    8141066    """
     1067    docs = get_documents()
    8151068    s += "DOCUMENTs:\n"
    816     s += format_columns(get_documents() + ['all  (!)'])
    817     s += "(!) Builds everything.\n"
     1069    s += format_columns(docs + ['all  (!)'])
     1070    s += "(!) Builds everything.\n\n"
     1071    if 'reference' in docs:
     1072        s+= "Other valid document names take the form 'reference/DIR', where\n"
     1073        s+= "DIR is a subdirectory of SAGE_ROOT/devel/sage/doc/en/reference/.\n"
     1074        s+= "This builds just the specified part of the reference manual.\n"
    8181075    return s
    8191076
    8201077def get_formats():
  • doc/common/themes/sage/layout.html

    diff --git a/doc/common/themes/sage/layout.html b/doc/common/themes/sage/layout.html
    a b  
    77    {% if pathto(master_doc).endswith('.html') %}
    88      <a href="{{ '../' + pathto(master_doc) }}"><img src="{{ pathto('_static/sagelogo.png', 1) }}" style="vertical-align: middle" title="Sage Logo"></a>
    99    {% else %}
    10       <a href="{{ '../' + pathto(master_doc) + 'index.html' }}"><img src="{{ pathto('_static/sagelogo.png', 1) }}" style="vertical-align: middle" title="Sage Logo"></a>
     10      <a href="{{ '../' + pathto(master_doc, 1) + '.html' }}"><img src="{{ pathto('_static/sagelogo.png', 1) }}" style="vertical-align: middle" title="Sage Logo"></a>
    1111    {% endif %}
    1212  {% endif %}
    1313  {{ super() }}
  • new file doc/common/themes/sageref/layout.html

    diff --git a/doc/common/themes/sageref/layout.html b/doc/common/themes/sageref/layout.html
    new file mode 100644
    - +  
     1{% extends "basic/layout.html" %}
     2
     3{% block rootrellink %}
     4  {% if docstitle.startswith('Sage Documentation') %}
     5    <a href="http://www.sagemath.org"><img src="{{ pathto('_static/sagelogo.png', 1) }}" style="vertical-align: middle" title="Sage Logo"></a>
     6  {% else %}
     7    {% if pathto(master_doc).endswith('.html') %}
     8      <a href="{{ '../../' + pathto(master_doc) }}"><img src="{{ pathto('_static/sagelogo.png', 1) }}" style="vertical-align: middle" title="Sage Logo"></a>
     9    {% else %}
     10      <a href="{{ '../../' + pathto(master_doc,1) + '.html' }}"><img src="{{ pathto('_static/sagelogo.png', 1) }}" style="vertical-align: middle" title="Sage Logo"></a>
     11      <a href="{{ '../' + 'index.html' }}"> Sage Reference Manual </a> &raquo;
     12    {% endif %}
     13  {% endif %}
     14  {{ super() }}
     15{% endblock %}
     16
     17{% block extrahead %}
     18    <link rel="icon" href="{{ pathto('_static/sageicon.png', 1) }}" type="image/x-icon" />
     19{% endblock %}
     20
     21{%- block footer %}
     22    {{ super() }}
     23    <script type="text/javascript">
     24/*global jQuery, window */
     25/* Sphinx sidebar toggle.  Putting this code at the end of the body
     26 * enables the toggle for the live, static, and offline docs.  Note:
     27 * sage.misc.html.math_parse() eats jQuery's dollar-sign shortcut. */
     28var jq = jQuery; 
     29jq(document).ready(function () {
     30    var bar, bod, bg, fg, key, tog, wid_old, wid_new, resize, get_state, set_state;
     31    bod = jq('div.bodywrapper');
     32    bar = jq('div.sphinxsidebar');
     33    tog = jq('<div class="sphinxsidebartoggle"></div>');
     34   
     35    /* Delayed resize helper.  Not perfect but good enough. */
     36    resize = function () {
     37        setTimeout(function () {
     38            tog.height(bod.height());
     39        }, 100);
     40    };
     41    jq(window).resize(function () {
     42        resize();
     43    });
     44   
     45    /* Setup and add the toggle. See Sphinx v0.5.1 default.css. */
     46    fg = jq('div.sphinxsidebar p a').css('color') || 'rgb(152, 219, 204)';
     47    bg = jq('div.document').css('background-color') || 'rgb(28, 78, 99)';
     48    wid_old = '230px';
     49    wid_new = '5px';
     50    tog.css('background-color', bg)
     51        .css('border-width', '0px')
     52        .css('border-right', wid_new + ' ridge ' + bg)
     53        .css('cursor', 'pointer')
     54        .css('position', 'absolute')
     55        .css('left', '-' + wid_new)
     56        .css('top', '0px')
     57        .css('width', wid_new);
     58    bod.css('position', 'relative');
     59    bod.prepend(tog);
     60    resize();
     61   
     62    /* Cookie helpers. */
     63    key = 'sphinxsidebar=';
     64    set_state = function (s) {
     65        var date = new Date();
     66        /* Expiry in 7 days. */
     67        date.setTime(date.getTime() + (7 * 24 * 3600 * 1000));
     68        document.cookie = key + encodeURIComponent(s) + '; expires=' +
     69            date.toUTCString() + '; path=/';
     70    };
     71    get_state = function () {
     72        var i, c, crumbs = document.cookie.split(';');
     73        for (i = 0; i < crumbs.length; i += 1) {
     74            c = crumbs[i].replace(/^\s+/, '');
     75            if (c.indexOf(key) === 0) {
     76                return decodeURIComponent(c.substring(key.length, c.length));
     77            }
     78        }
     79        return null;
     80    };
     81   
     82    /* Event handlers. */
     83    tog.mouseover(function (ev) {
     84        tog.css('border-right-color', fg);
     85    }).mouseout(function (ev) {
     86        tog.css('border-right-color', bg);
     87    }).click(function (ev) {
     88        if (bod.hasClass('wide')) {
     89            bod.removeClass('wide');
     90            bod.css('margin-left', wid_old);
     91            bar.css('width', wid_old);
     92            bar.show();
     93            set_state('visible');
     94        } else {
     95            set_state('hidden');
     96            bar.hide();
     97            bar.css('width', '0px');
     98            bod.css('margin-left', wid_new);
     99            bod.addClass('wide');
     100        }
     101        resize();
     102    });
     103   
     104    /* Hide the normally visible sidebar? */
     105    if (get_state() === 'hidden') {
     106        tog.trigger('click');
     107    } else {
     108        set_state('visible');
     109    }
     110});
     111    </script>
     112{%- endblock %}
     113
     114<!-- This macro block for the sidebar is heavily borrowed from the basic -->
     115<!-- theme of Sphinx 0.6.3. In particular, we borrowed from the file -->
     116<!-- themes/basic/layout.html distributed with Sphinx 0.6.3. -->
     117{%- macro sidebar() %}
     118      {%- if not embedded %}{% if not theme_nosidebar|tobool %}
     119      <div class="sphinxsidebar">
     120        <div class="sphinxsidebarwrapper">
     121          {%- block sidebarlogo %}
     122          {%- if logo %}
     123            <p class="logo"><a href="{{ pathto(master_doc) }}">
     124              <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
     125            </a></p>
     126          {%- endif %}
     127          {%- endblock %}
     128          {%- block sidebartoc %}
     129          {%- if display_toc %}
     130            <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
     131            {{ toc }}
     132          {%- endif %}
     133          {%- endblock %}
     134          {%- block sidebarrel %}
     135          {%- if prev %}
     136            <h4>{{ _('Previous topic') }}</h4>
     137            <p class="topless"><a href="{{ prev.link|e }}"
     138                                  title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
     139          {%- endif %}
     140          {%- if next %}
     141            <h4>{{ _('Next topic') }}</h4>
     142            <p class="topless"><a href="{{ next.link|e }}"
     143                                  title="{{ _('next chapter') }}">{{ next.title }}</a></p>
     144          {%- endif %}
     145          {%- endblock %}
     146          {%- block sidebarsourcelink %}
     147          {%- if show_source and has_source and sourcename %}
     148            <h3>{{ _('This Page') }}</h3>
     149            <ul class="this-page-menu">
     150              <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
     151                     rel="nofollow">{{ _('Show Source') }}</a></li>
     152            </ul>
     153          {%- endif %}
     154          {%- endblock %}
     155          {%- if customsidebar %}
     156          {% include customsidebar %}
     157          {%- endif %}
     158          {%- block sidebarsearch %}
     159          {%- if pagename != "search" %}
     160          <div id="searchbox" style="display: none">
     161            <h3>{{ _('Quick search') }}</h3>
     162              <form class="search" action="{{ pathto('search') }}" method="get">
     163                <input type="text" name="q" size="18" />
     164                <!-- The shading of the "Go" button should be consistent -->
     165                <!-- with the colour of the header and footer. See the file -->
     166                <!-- doc/common/themes/sage/theme.conf for colours used by -->
     167                <!-- the Sage theme. -->
     168                <input type="submit" style="background-color: #B8B9F6" value="{{ _('Go') }}" />
     169                <input type="hidden" name="check_keywords" value="yes" />
     170                <input type="hidden" name="area" value="default" />
     171              </form>
     172              <p class="searchtip" style="font-size: 90%">
     173              {{ _('Enter search terms or a module, class or function name.') }}
     174              </p>
     175          </div>
     176          <script type="text/javascript">$('#searchbox').show(0);</script>
     177          {%- endif %}
     178          {%- endblock %}
     179        </div>
     180      </div>
     181      {%- endif %}{% endif %}
     182{%- endmacro %}
  • new file doc/common/themes/sageref/static/favicon.ico

    diff --git a/doc/common/themes/sageref/static/favicon.ico b/doc/common/themes/sageref/static/favicon.ico
    new file mode 100644
    index 0000000000000000000000000000000000000000..51775bc542a5d8653935c5223b9ecd616cb1e085
    GIT binary patch
    literal 1150
    zc$}q^KT88a5XI-z_zxqeVh|AtA|eQ4DMCcCv$3+X(Mmr+K(M%gtyrWLECfYJC)n9o
    z2^L9_A}A@u;z;mAoNv5$FsyefxZxKzGy7&|XC@*ZKE5ybF3Mq_NI^sv0Zg#O_OAtB
    zD<6}rC<s1McmwC)IK%%FZEyfIb}twP^NdybMf(mm!6+C31yBduU=`%R7<kFhuY(c@
    zK^06pv2TH&@vdF41-j<^lyjy7YM^LruRLe92?LB{ZA~y^YH<lXzD>`sfF0)Ou?8KZ
    z*SC#>vU5*`xjcdku*4oHdG;Ux&%D26^mB}B^IT)x9^S9I1uzSSm|L4?m%)+Imd)F>
    zkN3vcWo{FuUUy)F`|Bv4n+AVtE%uE5lzMk=^bHTx){O6l_0s(l_ij%Vozs4B=Ga5V
    z)c?dJ>+5Pm*280*EA~0@YrS-4PExc9nw!q&KHsNz4KgR~VJ`YUUw=XG)ETR$`Q@MM
    E6WVp2FaQ7m
  • new file doc/common/themes/sageref/static/mathjax_sage.js_t

    diff --git a/doc/common/themes/sageref/static/mathjax_sage.js_t b/doc/common/themes/sageref/static/mathjax_sage.js_t
    new file mode 100644
    - +  
     1MathJax.Hub.Config({
     2  imageFont: null,
     3  tex2jax: {
     4    inlineMath: [['$','$'],['\\(','\\)']],
     5    processEscapes: true,
     6  },
     7  styles: {
     8    ".MathJax .mo, .MathJax .mi": {
     9      color: "inherit ! important"
     10    }
     11  },
     12  TeX: {
     13    Macros: {
     14     {{ theme_mathjax_macros|join(',\n') }}
     15    }
     16  }
     17});
     18
     19// This path is a little funny because we have to load our local
     20// config file as '../mathjax_sage' in the theme conf.py
     21MathJax.Ajax.loadComplete("[MathJax]/config/../mathjax_sage.js")
  • new file doc/common/themes/sageref/static/sage.css_t

    diff --git a/doc/common/themes/sageref/static/sage.css_t b/doc/common/themes/sageref/static/sage.css_t
    new file mode 100644
    - +  
     1/**
     2 * Sage stylesheet theme. This stylesheet is heavily borrowed from the
     3 * Sphinx stylesheet default theme distributed as the file
     4 * themes/default/static/default.css_t in Sphinx 0.6.3.
     5 */
     6
     7@import url("basic.css");
     8
     9/* -- page layout ----------------------------------------------------------- */
     10
     11body {
     12    font-family: {{ theme_bodyfont }};
     13    font-size: 100%;
     14    background-color: {{ theme_footerbgcolor }};
     15    color: #000;
     16    margin: 0;
     17    padding: 0;
     18}
     19
     20div.document {
     21    background-color: {{ theme_sidebarbgcolor }};
     22}
     23
     24div.documentwrapper {
     25    float: left;
     26    width: 100%;
     27}
     28
     29div.bodywrapper {
     30    margin: 0 0 0 230px;
     31}
     32
     33div.body {
     34    background-color: {{ theme_bgcolor }};
     35    color: {{ theme_textcolor }};
     36    padding: 0 20px 30px 20px;
     37}
     38
     39{%- if theme_rightsidebar|tobool %}
     40div.bodywrapper {
     41    margin: 0 230px 0 0;
     42}
     43{%- endif %}
     44
     45div.footer {
     46    color: {{ theme_footertextcolor }};
     47    width: 100%;
     48    padding: 9px 0 9px 0;
     49    text-align: center;
     50    font-size: 75%;
     51}
     52
     53div.footer a {
     54    color: {{ theme_footertextcolor }};
     55    text-decoration: underline;
     56}
     57
     58div.related {
     59    background-color: {{ theme_relbarbgcolor }};
     60    line-height: 30px;
     61    color: {{ theme_relbartextcolor }};
     62}
     63
     64div.related a {
     65    color: {{ theme_relbarlinkcolor }};
     66}
     67
     68div.sphinxsidebar {
     69    {%- if theme_stickysidebar|tobool %}
     70    top: 30px;
     71    margin: 0;
     72    position: fixed;
     73    overflow: auto;
     74    height: 100%;
     75    {%- endif %}
     76    {%- if theme_rightsidebar|tobool %}
     77    float: right;
     78    {%- if theme_stickysidebar|tobool %}
     79    right: 0;
     80    {%- endif %}
     81    {%- endif %}
     82}
     83
     84{%- if theme_stickysidebar|tobool %}
     85/* this is nice, but it it leads to hidden headings when jumping
     86   to an anchor */
     87/*
     88div.related {
     89    position: fixed;
     90}
     91
     92div.documentwrapper {
     93    margin-top: 30px;
     94}
     95*/
     96{%- endif %}
     97
     98div.sphinxsidebar h3 {
     99    font-family: {{ theme_headfont }};
     100    color: {{ theme_sidebartextcolor }};
     101    font-size: 1.4em;
     102    font-weight: normal;
     103    margin: 0;
     104    padding: 0;
     105}
     106
     107div.sphinxsidebar h3 a {
     108    color: {{ theme_sidebartextcolor }};
     109}
     110
     111div.sphinxsidebar h4 {
     112    font-family: {{ theme_headfont }};
     113    color: {{ theme_sidebartextcolor }};
     114    font-size: 1.3em;
     115    font-weight: normal;
     116    margin: 5px 0 0 0;
     117    padding: 0;
     118}
     119
     120div.sphinxsidebar p {
     121    color: {{ theme_sidebartextcolor }};
     122}
     123
     124div.sphinxsidebar p.topless {
     125    margin: 5px 10px 10px 10px;
     126}
     127
     128div.sphinxsidebar ul {
     129    margin: 10px;
     130    padding: 0;
     131    color: {{ theme_sidebartextcolor }};
     132}
     133
     134div.sphinxsidebar a {
     135    color: {{ theme_sidebarlinkcolor }};
     136}
     137
     138div.sphinxsidebar input {
     139    border: 1px solid {{ theme_sidebarlinkcolor }};
     140    font-family: sans-serif;
     141    font-size: 1em;
     142}
     143
     144/* -- body styles ----------------------------------------------------------- */
     145
     146a {
     147    color: {{ theme_linkcolor }};
     148    text-decoration: none;
     149}
     150
     151a:hover {
     152    text-decoration: underline;
     153}
     154
     155div.body p, div.body dd, div.body li {
     156    text-align: justify;
     157    line-height: 130%;
     158}
     159
     160div.body h1,
     161div.body h2,
     162div.body h3,
     163div.body h4,
     164div.body h5,
     165div.body h6 {
     166    font-family: {{ theme_headfont }};
     167    background-color: {{ theme_headbgcolor }};
     168    font-weight: normal;
     169    color: {{ theme_headtextcolor }};
     170    border-bottom: 1px solid #ccc;
     171    margin: 20px -20px 10px -20px;
     172    padding: 3px 0 3px 10px;
     173}
     174
     175div.body h1 { margin-top: 0; font-size: 200%; }
     176div.body h2 { font-size: 160%; }
     177div.body h3 { font-size: 140%; }
     178div.body h4 { font-size: 120%; }
     179div.body h5 { font-size: 110%; }
     180div.body h6 { font-size: 100%; }
     181
     182a.headerlink {
     183    color: {{ theme_headlinkcolor }};
     184    font-size: 0.8em;
     185    padding: 0 4px 0 4px;
     186    text-decoration: none;
     187}
     188
     189a.headerlink:hover {
     190    background-color: {{ theme_headlinkcolor }};
     191    color: white;
     192}
     193
     194div.body p, div.body dd, div.body li {
     195    text-align: justify;
     196    line-height: 130%;
     197}
     198
     199div.admonition p.admonition-title + p {
     200    display: inline;
     201}
     202
     203div.note {
     204    background-color: #eee;
     205    border: 1px solid #ccc;
     206}
     207
     208div.seealso {
     209    background-color: #ffc;
     210    border: 1px solid #ff6;
     211}
     212
     213div.topic {
     214    background-color: #eee;
     215}
     216
     217div.warning {
     218    background-color: #ffe4e4;
     219    border: 1px solid #f66;
     220}
     221
     222p.admonition-title {
     223    display: inline;
     224}
     225
     226p.admonition-title:after {
     227    content: ":";
     228}
     229
     230/**
     231 * Code block.
     232 * The border colour should be a darker shade of the background colour.
     233 * The hex code #E8D898 used below is a pale, light grayish amber.
     234 */
     235pre {
     236    padding: 5px;
     237    background-color: {{ theme_codebgcolor }};
     238    color: {{ theme_codetextcolor }};
     239    line-height: 120%;
     240    border: 1px solid #E8D898;
     241    border-left: none;
     242    border-right: none;
     243}
     244
     245/**
     246 * Commands or code within text. The hex code #EAEAF8 used below is a
     247 * pale, light grayish blue.
     248 */
     249tt {
     250    background-color: #EAEAF8;
     251    padding: 0 1px 0 1px;
     252    font-size: 0.95em;
     253}
  • new file doc/common/themes/sageref/theme.conf

    diff --git a/doc/common/themes/sageref/theme.conf b/doc/common/themes/sageref/theme.conf
    new file mode 100644
    - +  
     1[theme]
     2inherit = default
     3stylesheet = sage.css
     4pygments_style = sphinx
     5
     6[options]
     7# Custom Sage theme options
     8
     9# MathJax settings filled in by conf.py
     10mathjax_macros =
     11
     12# Sphinx default theme options
     13
     14#nosidebar = false
     15#rightsidebar = false
     16#stickysidebar = false
     17
     18# Background color for the footer line: pale, light grayish blue (CSS color):
     19footerbgcolor    = #B8B9F6
     20# Text color for the footer line: black (CSS color):
     21footertextcolor  = #000000
     22# Background color for the sidebar: light bluish gray (CSS color):
     23sidebarbgcolor   = #EAEAF8
     24# Text color for the sidebar: black (CSS color):
     25sidebartextcolor = #000000
     26# Link color for the sidebar: dark blue (CSS color):
     27sidebarlinkcolor = #090999
     28# Background color for the relation bar: pale, light grayish blue (CSS color):
     29relbarbgcolor    = #B8B9F6
     30# Text color for the relation bar: black (CSS color):
     31relbartextcolor  = #000000
     32# Link color for the relation bar: dark blue (CSS color):
     33relbarlinkcolor  = #090999
     34# Body background color (CSS color):
     35#bgcolor          = #ffffff
     36# Body text color: black (CSS color):
     37textcolor        = #000000
     38# Background color for headings: light bluish gray (CSS color):
     39headbgcolor      = #EAEAF8
     40# Text color for headings (CSS color):
     41#headtextcolor    = #20435c
     42# Link color for headings (CSS color):
     43#headlinkcolor    = #c60f0f
     44# Body link color: dark greenish blue (CSS color):
     45linkcolor        = #45529B
     46# Background color for code blocks: very pale yellow (CSS color):
     47codebgcolor      = #FFFFE5
     48# Default text color for code blocks, if not set differently by the highlighting style (CSS color):
     49#codetextcolor    = #333333
     50
     51# Font for normal text (CSS font-family):
     52#bodyfont = sans-serif
     53# Font for headings (CSS font-family):
     54#headfont = 'Trebuchet MS', sans-serif
  • doc/en/reference/arithgroup/index.rst

    diff --git a/doc/en/reference/arithgroup/index.rst b/doc/en/reference/arithgroup/index.rst
    a b  
    1 Arithmetic Subgroups of `{\rm SL}_2(\ZZ)`
    2 ================================================
     1Arithmetic Subgroups of `{\rm SL}_2({\bf Z})`
     2=============================================
    33
    44This chapter describes the basic functionality for finite index subgroups of
    55the modular group `{\rm SL}_2(\ZZ)`.
  • doc/en/reference/combinat/index.rst

    diff --git a/doc/en/reference/combinat/index.rst b/doc/en/reference/combinat/index.rst
    a b Combinatorics 
    44.. toctree::
    55   :maxdepth: 2
    66
    7    ../sage/combinat/combinat
    8    ../sage/combinat/sloane_functions
    9    ../sage/combinat/expnums
    10    ../sage/combinat/alternating_sign_matrix
    11    ../sage/combinat/cartesian_product
    12    ../sage/combinat/combination
    13    ../sage/combinat/composition_signed
    14    ../sage/combinat/composition
    15    ../sage/combinat/core
    16    ../sage/combinat/debruijn_sequence
    17    ../sage/combinat/degree_sequences
    18    ../sage/combinat/dlx
    19    ../sage/combinat/matrices/dlxcpp
    20    ../sage/combinat/dyck_word
    21    ../sage/combinat/e_one_star
    22    ../sage/combinat/finite_class
    23    ../sage/combinat/integer_list
    24    ../sage/combinat/integer_vector
    25    ../sage/combinat/integer_vector_weighted
    26    ../sage/combinat/integer_vectors_mod_permgroup
    27    ../sage/combinat/enumeration_mod_permgroup
    28    ../sage/combinat/restricted_growth
    29    ../sage/combinat/yamanouchi
    30    ../sage/combinat/graph_path
    31    ../sage/combinat/matrices/latin
    32    ../sage/combinat/lyndon_word
    33    ../sage/combinat/necklace
    34    ../sage/combinat/non_decreasing_parking_function
    35    ../sage/combinat/partition
    36    ../sage/combinat/permutation
    37    ../sage/combinat/perfect_matching
    38    ../sage/combinat/q_analogues
    39    ../sage/combinat/sidon_sets
    40    ../sage/combinat/set_partition_ordered
    41    ../sage/combinat/set_partition
    42    ../sage/combinat/skew_partition
    43    ../sage/combinat/subset
    44    ../sage/combinat/subsets_pairwise
    45    ../sage/combinat/subword
    46    ../sage/combinat/tiling
    47    ../sage/combinat/tuple
     7   sage/combinat/combinat
     8   sage/combinat/sloane_functions
     9   sage/combinat/expnums
     10   sage/combinat/alternating_sign_matrix
     11   sage/combinat/cartesian_product
     12   sage/combinat/combination
     13   sage/combinat/composition_signed
     14   sage/combinat/composition
     15   sage/combinat/core
     16   sage/combinat/debruijn_sequence
     17   sage/combinat/degree_sequences
     18   sage/combinat/dlx
     19   sage/combinat/matrices/dlxcpp
     20   sage/combinat/dyck_word
     21   sage/combinat/e_one_star
     22   sage/combinat/finite_class
     23   sage/combinat/integer_list
     24   sage/combinat/integer_vector
     25   sage/combinat/integer_vector_weighted
     26   sage/combinat/integer_vectors_mod_permgroup
     27   sage/combinat/enumeration_mod_permgroup
     28   sage/combinat/restricted_growth
     29   sage/combinat/yamanouchi
     30   sage/combinat/graph_path
     31   sage/combinat/matrices/latin
     32   sage/combinat/lyndon_word
     33   sage/combinat/necklace
     34   sage/combinat/non_decreasing_parking_function
     35   sage/combinat/partition
     36   sage/combinat/permutation
     37   sage/combinat/perfect_matching
     38   sage/combinat/q_analogues
     39   sage/combinat/sidon_sets
     40   sage/combinat/set_partition_ordered
     41   sage/combinat/set_partition
     42   sage/combinat/skew_partition
     43   sage/combinat/subset
     44   sage/combinat/subsets_pairwise
     45   sage/combinat/subword
     46   sage/combinat/tiling
     47   sage/combinat/tuple
    4848
    4949   algebra
    5050   tableaux
    5151   symmetric_functions
    5252   root_systems
    5353
    54    ../sage/combinat/kazhdan_lusztig
     54   sage/combinat/kazhdan_lusztig
    5555
    5656   crystals
    5757   posets
    Combinatorics 
    6161   words
    6262   iet
    6363
    64    ../sage/combinat/misc
     64   sage/combinat/misc
    6565
    6666.. include:: ../footer.txt
  • doc/en/reference/conf.py

    diff --git a/doc/en/reference/conf.py b/doc/en/reference/conf.py
    a b import sys, os 
    1515sys.path.append(os.environ['SAGE_DOC'])
    1616from common.conf import *
    1717
     18# settings for the intersphinx extension:
     19
     20ref_src = os.path.join(SAGE_DOC, 'en', 'reference')
     21ref_out = os.path.join(SAGE_DOC, 'output', 'html', 'en', 'reference')
     22intersphinx_mapping[ref_out] = None
     23
     24for doc in os.listdir(ref_src):
     25    if os.path.exists(os.path.join(ref_src, doc, 'index.rst')):
     26        intersphinx_mapping[os.path.join(ref_out, doc)] = None
     27
    1828# General information about the project.
    1929project = u"Sage Reference Manual"
    2030name = "reference"
    latex_elements['preamble'] += r''' 
    5060
    5161#Ignore all .rst in the _sage subdirectory
    5262exclude_trees = exclude_trees + ['_sage']
     63
     64# List of directories, relative to source directory, that shouldn't be
     65# searched for source files.
     66exclude_trees = exclude_trees + [
     67    'algebras',
     68    'arithgroup',
     69    'calculus',
     70    'categories',
     71    'cmd',
     72    'coding',
     73    'coercion',
     74    'combinat',
     75    'constants',
     76    'cryptography',
     77    'databases',
     78    'finance',
     79    'function_fields',
     80    'functions',
     81    'games',
     82    'geometry',
     83    'graphs',
     84    'groups',
     85    'hecke',
     86    'history_and_license',
     87    'homology',
     88    'interfaces',
     89    'lfunctions',
     90    'libs',
     91    'logic',
     92    'matrices',
     93    'misc',
     94    'modabvar',
     95    'modfrm',
     96    'modmisc',
     97    'modsym',
     98    'modules',
     99    'monoids',
     100    'notebook',
     101    'number_fields',
     102    'numerical',
     103    'options',
     104    'padics',
     105    'parallel',
     106    'plane_curves',
     107    'plot3d',
     108    'plotting',
     109    'polynomial_rings',
     110    'power_series',
     111    'probability',
     112    'quadratic_forms',
     113    'quat_algebras',
     114    'rings',
     115    'rings_numerical',
     116    'rings_standard',
     117    'sage',
     118    'sagenb',
     119    'schemes',
     120    'semirings',
     121    'stats',
     122    'structure',
     123    'tensor',
     124    'todolist'
     125    ]
  • new file doc/en/reference/conf_sub.py

    diff --git a/doc/en/reference/conf_sub.py b/doc/en/reference/conf_sub.py
    new file mode 100644
    - +  
     1# -*- coding: utf-8 -*-
     2#
     3# Sage documentation build configuration file, created by
     4# sphinx-quickstart on Thu Aug 21 20:15:55 2008.
     5#
     6# This file is execfile()d with the current directory set to its containing dir.
     7#
     8# The contents of this file are pickled, so don't put values in the namespace
     9# that aren't pickleable (module imports are okay, they're removed automatically).
     10#
     11# All configuration values have a default; values that are commented out
     12# serve to show the default.
     13
     14import sys, os
     15sys.path.append(os.environ['SAGE_DOC'])
     16from common.conf import *
     17
     18# settings for the intersphinx extension:
     19
     20ref_src = os.path.join(SAGE_DOC, 'en', 'reference')
     21ref_out = os.path.join(SAGE_DOC, 'output', 'html', 'en', 'reference')
     22intersphinx_mapping[ref_out] = None
     23
     24for doc in os.listdir(ref_src):
     25    if os.path.exists(os.path.join(ref_src, doc, 'index.rst')):
     26        intersphinx_mapping[os.path.join(ref_out, doc)] = None
     27
     28# We use the main document's title, if we can find it.
     29rst_file = open('index.rst', 'r')
     30rst_lines = rst_file.read().splitlines()
     31rst_file.close()
     32
     33title = u''
     34for i in xrange(len(rst_lines)):
     35    if rst_lines[i].startswith('==') and i > 0:
     36        title = rst_lines[i-1].strip()
     37        break
     38
     39# Otherwise, we use this directory's name.
     40name = os.path.basename(os.path.abspath('.'))
     41if not title:
     42    title = name.capitalize()
     43title = title.replace(u'`', u'$')
     44
     45# General information about the project.
     46project = u'Sage Reference Manual: ' + title
     47
     48# The name for this set of Sphinx documents.  If None, it defaults to
     49# "<project> v<release> documentation".
     50html_title = u'Sage Reference Manual v' + release + ': ' + title
     51
     52# A shorter title for the navigation bar.  Default is the same as html_title.
     53html_short_title = title
     54
     55# HTML theme (e.g., 'default', 'sphinxdoc').  The pages for the
     56# reference manual use a custom theme, a slight variant on the 'sage'
     57# theme, to set the links in the top line.
     58html_theme = 'sageref'
     59
     60# Output file base name for HTML help builder.
     61htmlhelp_basename = name
     62
     63# Grouping the document tree into LaTeX files. List of tuples (source
     64# start file, target name, title, author, document class
     65# [howto/manual]).
     66latex_documents = [
     67('index', name + '.tex', project, u'The Sage Development Team', 'manual')
     68]
     69
     70#Ignore all .rst in the _sage subdirectory
     71exclude_trees = exclude_trees + ['_sage']
  • new file doc/en/reference/footer.txt

    diff --git a/doc/en/reference/footer.txt b/doc/en/reference/footer.txt
    new file mode 100644
    - +  
     1
     2.. todolist::
     3
     4Indices and Tables
     5==================
     6
     7.. toctree::
     8   :maxdepth: 1
     9
     10* :ref:`genindex`
     11* :ref:`modindex`
     12* :ref:`search`
  • doc/en/reference/games/index.rst

    diff --git a/doc/en/reference/games/index.rst b/doc/en/reference/games/index.rst
    a b Games 
    22=====
    33
    44Sage includes a sophisticated Sudoku solver.  It also has a
    5 Rubik's cube solver (see :ref:`Rubik's Cube Group <sec-rubik>`).
     5Rubik's cube solver (see
     6`Rubik's Cube Group <../groups/sage/groups/perm_gps/cubegroup.html>`_).
    67
    78.. toctree::
    89   :maxdepth: 2
  • doc/en/reference/hecke/index.rst

    diff --git a/doc/en/reference/hecke/index.rst b/doc/en/reference/hecke/index.rst
    a b General Hecke Algebras and Hecke Modules 
    33
    44This chapter describes the basic functionality for modules over Hecke
    55algebras, including decompositions, degeneracy maps and so on. For specific
    6 examples of Hecke algebras that use this functionality see :ref:`ch:modsym` and
    7 :ref:`ch:modular`.
     6examples of Hecke algebras that use this functionality see `Modular
     7Symbols <../modsym/index.html>`_ and `Modular Forms
     8<../modfrm/index.html>`_.
    89
    910.. toctree::
    1011   :maxdepth: 2
  • doc/en/reference/index.rst

    diff --git a/doc/en/reference/index.rst b/doc/en/reference/index.rst
    a b  
    1 .. Sage Reference Manual documentation master file, created by sphinx-quickstart on Sun Sep 28 03:34:37 2008.
    2    You can adapt this file completely to your liking, but it should at least
    3    contain the root `toctree` directive.
    4 
    5 .. _ch:intro:
    6 
    71Welcome to Sage's Reference Manual!
    82=================================================
    93
    usage of Sage. The examples are all test 
    2014Sage, and should produce exactly the same output as in this manual,
    2115except for line breaks.
    2216
    23 The Sage command line is briefly described in :ref:`ch:cmdline`, which
    24 lists the command line options. For more details about the command
    25 line, see the Sage tutorial.
     17The Sage command line is briefly described in `The Sage Command Line
     18<cmd/index.html>`_, which lists the command line options. For more
     19details about the command line, see the Sage tutorial.
    2620
    27 The Sage graphical user interface is described in
    28 :ref:`ch:notebook`. This graphical user interface is unusual in that
    29 it operates via your web browser. It provides you with Sage worksheets
    30 that you can edit and evaluate, which contain scalable typeset
    31 mathematics and beautiful antialiased images.
     21The Sage graphical user interface is described in `The Sage Notebook
     22<notebook/index.html>`_. This graphical user interface is unusual in
     23that it operates via your web browser. It provides you with Sage
     24worksheets that you can edit and evaluate, which contain scalable
     25typeset mathematics and beautiful antialiased images.
    3226
    3327This work is licensed under a `Creative Commons Attribution-Share Alike
    34283.0 License`__.
    __ http://creativecommons.org/licenses/b 
    3731
    3832Enjoy Sage!
    3933
    40 .. toctree::
    41    :maxdepth: 2
     34Table of Contents
     35=================
    4236
    43    cmd
    44    notebook
    45    calculus
    46    plotting
    47    plot3d
    48    games
    49    graphs
    50    constants
    51    functions
    52    parallel
    53    structure
    54    coercion
    55    misc
    56    databases
    57    interfaces
    58    libs
    59    cryptography
    60    logic
    61    combinat/index
    62    numerical
    63    probability
    64    stats
    65    finance
    66    categories
    67    monoids
    68    groups
    69    rings
    70    rings_standard
    71    rings_numerical
    72    number_fields
    73    function_fields
    74    padics
    75    polynomial_rings
    76    power_series
    77    semirings
    78    algebras
    79    quadratic_forms
    80    quat_algebras
    81    matrices
    82    modules
    83    geometry
    84    homology
    85    lfunctions
    86    schemes
    87    plane_curves
    88    coding
    89    arithgroup
    90    hecke
    91    modsym
    92    modfrm
    93    modabvar
    94    modmisc
    95    tensor
     37   * `The Sage Command Line <cmd/index.html>`_
     38   * `The Sage Notebook <notebook/index.html>`_
     39 
     40Calculus, Plotting
     41------------------
     42 
     43   * `Symbolic Calculus <calculus/index.html>`_
     44   * `Constants <constants/index.html>`_
     45   * `Functions <functions/index.html>`_
     46   * `2D Graphics <plotting/index.html>`_
     47   * `3D Graphics <plot3d/index.html>`_
     48 
     49Combinatorics, Discrete Mathematics
     50-----------------------------------
     51 
     52   * `Combinatorics <combinat/index.html>`_
     53   * `Graph Theory <graphs/index.html>`_
     54 
     55Structures, Coercion, Categories
     56--------------------------------
    9657
    97    todolist
     58   * `Basic Structures <structure/index.html>`_
     59   * `Coercion <coercion/index.html>`_
     60   * `Category Theory and Categories <categories/index.html>`_
    9861
    99    history_and_license
     62Rings, Fields, Algebras
     63-----------------------
    10064
    101 Indices and tables
    102 ==================
     65   * `General Rings, Ideals, and Morphisms <rings/index.html>`_
     66   * `Standard Commutative Rings <rings_standard/index.html>`_
     67   * `Fixed and Arbitrary Precision Numerical Fields <rings_numerical/index.html>`_
     68   * `Algebraic Number Fields <number_fields/index.html>`_
     69   * `Function Fields <function_fields/index.html>`_
     70   * `p-Adics <padics/index.html>`_
     71   * `Polynomial Rings <polynomial_rings/index.html>`_
     72   * `Power Series Rings <power_series/index.html>`_
     73   * `Standard Semirings <semirings/index.html>`_
     74   * `Algebras <algebras/index.html>`_
     75   * `Quaternion Algebras <quat_algebras/index.html>`_
    10376
    104 * :ref:`genindex`
    105 * :ref:`modindex`
    106 * :ref:`search`
     77Groups, Monoids, Matrices, Modules
     78----------------------------------
    10779
     80   * `Groups <groups/index.html>`_
     81   * `Monoids <monoids/index.html>`_
     82   * `Matrices and Spaces of Matrices <matrices/index.html>`_
     83   * `Modules <modules/index.html>`_
     84
     85Geometry and Topology
     86---------------------
     87
     88   * `Combinatorial Geometry <geometry/index.html>`_
     89   * `Cell Complexes and their Homology <homology/index.html>`_
     90   * `Differential Forms <tensor/index.html>`_
     91
     92Number Theory, Algebraic Geometry
     93---------------------------------
     94
     95   * `Quadratic Forms <quadratic_forms/index.html>`_
     96   * `L-Functions <lfunctions/index.html>`_
     97   * `Schemes <schemes/index.html>`_
     98   * `Elliptic, Plane, and Hyperelliptic Curves <plane_curves/index.html>`_
     99   * `Arithmetic Subgroups of SL_2(Z) <arithgroup/index.html>`_
     100   * `General Hecke Algebras and Hecke Modules <hecke/index.html>`_
     101   * `Modular Symbols <modsym/index.html>`_
     102   * `Modular Forms <modfrm/index.html>`_
     103   * `Modular Abelian Varieties <modabvar/index.html>`_
     104   * `Miscellaneous Modular-Form-Related Modules <modmisc/index.html>`_
     105
     106Miscellaneous Mathematics
     107-------------------------
     108
     109   * `Games <games/index.html>`_
     110   * `Symbolic Logic <logic/index.html>`_
     111   * `Cryptography <cryptography/index.html>`_
     112   * `Numerical Optimization <numerical/index.html>`_
     113   * `Probability <probability/index.html>`_
     114   * `Statistics <stats/index.html>`_
     115   * `Quantitative Finance <finance/index.html>`_
     116   * `Coding Theory <coding/index.html>`_
     117
     118Interfaces, Databases, Miscellany
     119---------------------------------
     120
     121   * `Interpreter Interfaces <interfaces/index.html>`_
     122   * `C/C++ Library Interfaces <libs/index.html>`_
     123   * `Databases <databases/index.html>`_
     124   * `Parallel Computing <parallel/index.html>`_
     125   * `Miscellaneous <misc/index.html>`_
     126
     127Other
     128-----
     129
     130   * `Sage's To Do List <todolist/index.html>`_
     131   * `History and License <history_and_license/index.html>`_
     132
     133.. include:: footer.txt
  • doc/en/reference/interfaces/index.rst

    diff --git a/doc/en/reference/interfaces/index.rst b/doc/en/reference/interfaces/index.rst
    a b Interpreter Interfaces 
    33
    44Sage provides a unified interface to the best computational
    55software. This is accomplished using both C-libraries (see
    6 :ref:`ch:libraries`) and interpreter interfaces, which are
     6`C/C++ Library Interfaces <../libs/index.html>`_)
     7and interpreter interfaces, which are
    78implemented using pseudo-tty's, system files, etc. This chapter is
    89about these interpreter interfaces.
    910
    about these interpreter interfaces. 
    1819    There is overhead associated with each call to one of these
    1920    systems. For example, computing ``2+2`` thousands of times using
    2021    the GAP interface will be slower than doing it directly in
    21     Sage. In contrast, the C-library interfaces of :ref:`ch:libraries`
     22    Sage. In contrast, the C-library interfaces of
     23    `C/C++ Library Interfaces <../libs/index.html>`_
    2224    incur less overhead.
    2325
    2426
  • doc/en/reference/misc/index.rst

    diff --git a/doc/en/reference/misc/index.rst b/doc/en/reference/misc/index.rst
    a b Miscellaneous 
    3030   sage/misc/html
    3131   sage/misc/latex
    3232   sage/misc/latex_macros
    33    other/sagetex
     33   sagetex
    3434   sage/misc/lazy_attribute
    3535   sage/misc/lazy_format
    3636   sage/misc/lazy_import
  • doc/en/reference/todolist/index.rst

    diff --git a/doc/en/reference/todolist/index.rst b/doc/en/reference/todolist/index.rst
    a b There is still some work to do :-) : 
    1313        Rewrite the hand-written TODOs by using the correct ``.. todo::``
    1414        markup.
    1515
     16The combined to do list is only available in the html version of the reference manual.
     17
    1618.. todolist::
    17 
    18 .. include:: ../footer.txt
  • doc/en/website/templates/index.html

    diff --git a/doc/en/website/templates/index.html b/doc/en/website/templates/index.html
    a b  
    137137        <a class="biglink" href="reference/index.html">
    138138          Reference Manual
    139139        </a>
    140         <a title="Download PDF" class="pdf" href="../../pdf/en/reference/reference.pdf">
     140        <a title="Link to PDF" class="pdf" href="../../pdf/en/reference/index.html">
    141141          <img class="icon" src="_static/pdf.png"></img>
    142142        </a>
    143143        <br>
  • sage/homology/delta_complex.py

    diff --git a/sage/homology/delta_complex.py b/sage/homology/delta_complex.py
    a b class DeltaComplex(GenericCellComplex): 
    149149      first in the prescribed way.  The three edges each start and end
    150150      at the single vertex, ``Simplex(0)``.
    151151
    152       .. image:: ../../media/homology/torus_labelled.png
     152      .. image:: ../../media/torus_labelled.png
    153153
    154154    - ``data`` may be nested lists or tuples.  The nth entry in the
    155155      list is a list of the n-simplices in the complex, and each
    class DeltaComplex(GenericCellComplex): 
    178178      If one draws two triangles and identifies them according to this
    179179      description, the result is the real projective plane.
    180180
    181       .. image:: ../../media/homology/rp2.png
     181      .. image:: ../../media/rp2.png
    182182
    183183      ::
    184184
    class DeltaComplexExamples(): 
    14831483        A `\Delta`-complex representation of the torus, consisting of one
    14841484        vertex, three edges, and two triangles.
    14851485
    1486         .. image:: ../../media/homology/torus.png
     1486        .. image:: ../../media/torus.png
    14871487
    14881488        EXAMPLES::
    14891489
    class DeltaComplexExamples(): 
    14971497        A `\Delta`-complex representation of the real projective plane,
    14981498        consisting of two vertices, three edges, and two triangles.
    14991499
    1500         .. image:: ../../media/homology/rp2.png
     1500        .. image:: ../../media/rp2.png
    15011501
    15021502        EXAMPLES::
    15031503
    class DeltaComplexExamples(): 
    15181518        A `\Delta`-complex representation of the Klein bottle, consisting
    15191519        of one vertex, three edges, and two triangles.
    15201520
    1521         .. image:: ../../media/homology/klein.png
     1521        .. image:: ../../media/klein.png
    15221522
    15231523        EXAMPLES::
    15241524
  • sage/homology/simplicial_complex.py

    diff --git a/sage/homology/simplicial_complex.py b/sage/homology/simplicial_complex.py
    a b simplices of `K`. Frequently, one abuse 
    2727denote both the simplicial complex and the associated topological
    2828space.
    2929
    30 .. image:: ../../media/homology/simplices.png
     30.. image:: ../../media/simplices.png
    3131
    3232For any simplicial complex `K` and any commutative ring `R` there is
    3333an associated chain complex, with differential of degree `-1`.  The
  • sage/modular/arithgroup/farey_symbol.pyx

    diff --git a/sage/modular/arithgroup/farey_symbol.pyx b/sage/modular/arithgroup/farey_symbol.pyx
    a b cdef class Farey: 
    419419        Farey symbol of the arithmetic group. The sides of the
    420420        hyperbolic polygon are numbered 0, 1, ... from left to right.
    421421
    422         .. image:: ../../../media/modular/arithgroup/pairing.png
     422        .. image:: ../../../media/pairing.png
    423423
    424424        EXAMPLES::
    425425