From e8a223a2ccc6c5292c98ee6ae9b8bb4e02ca8d71 Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Sat, 25 May 2013 17:43:43 -0500 Subject: [PATCH 1/9] doc: Use theme and extensions from JuliaDoc --- doc/_themes/julia/layout.html | 64 ------ doc/_themes/julia/localtoc.html | 15 -- doc/_themes/julia/searchbox.html | 22 -- doc/_themes/julia/static/julia.css_t | 300 -------------------------- doc/_themes/julia/static/pygments.css | 59 ----- doc/_themes/julia/static/sidebar.js | 196 ----------------- doc/_themes/julia/theme.conf | 58 ----- doc/conf.py | 14 +- doc/requirements.txt | 1 + doc/sphinx/.gitignore | 1 - doc/sphinx/jlhelp.py | 118 ---------- doc/sphinx/julia.py | 24 --- 12 files changed, 6 insertions(+), 866 deletions(-) delete mode 100644 doc/_themes/julia/layout.html delete mode 100644 doc/_themes/julia/localtoc.html delete mode 100644 doc/_themes/julia/searchbox.html delete mode 100644 doc/_themes/julia/static/julia.css_t delete mode 100644 doc/_themes/julia/static/pygments.css delete mode 100644 doc/_themes/julia/static/sidebar.js delete mode 100644 doc/_themes/julia/theme.conf create mode 100644 doc/requirements.txt delete mode 100644 doc/sphinx/.gitignore delete mode 100755 doc/sphinx/jlhelp.py delete mode 100644 doc/sphinx/julia.py diff --git a/doc/_themes/julia/layout.html b/doc/_themes/julia/layout.html deleted file mode 100644 index 50e92fcce0eb9..0000000000000 --- a/doc/_themes/julia/layout.html +++ /dev/null @@ -1,64 +0,0 @@ -{% extends "basic/layout.html" %} - -{# Silence the relbar's #} -{% block relbar1 %}{% endblock %} -{% block relbar2 %}{% endblock %} - -{% set script_files = script_files + ['_static/sidebar.js'] %} -{%- block sidebar2 %} - {%- if render_sidebar %} -
-
-
-
-
- « -
-
-
-
- {#- new style sidebar: explicitly include/exclude templates #} - {%- for sidebartemplate in sidebars %} - {%- include sidebartemplate %} - {%- endfor %} -
-
-
-
-
- {%- endif %} -{% endblock %} - -{% block header %} -
-
Julia Logo
- -
-{% endblock %} - -{% block footer %} -
- -
-{% endblock %} diff --git a/doc/_themes/julia/localtoc.html b/doc/_themes/julia/localtoc.html deleted file mode 100644 index 2a499ea138bf3..0000000000000 --- a/doc/_themes/julia/localtoc.html +++ /dev/null @@ -1,15 +0,0 @@ -{# - basic/localtoc.html - ~~~~~~~~~~~~~~~~~~~ - - Sphinx sidebar template: local table of contents. - - :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -{%- if display_toc %} -

{{ _('Table Of Contents') }}

- {{ toc }} -{%- else %} -

{{ _('Main page') }}

-{%- endif %} diff --git a/doc/_themes/julia/searchbox.html b/doc/_themes/julia/searchbox.html deleted file mode 100644 index 97306406582d0..0000000000000 --- a/doc/_themes/julia/searchbox.html +++ /dev/null @@ -1,22 +0,0 @@ -{# - basic/searchbox.html - ~~~~~~~~~~~~~~~~~~~~ - - Sphinx sidebar template: quick search box. - - :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} -{%- if pagename != "search" %} - - -{%- endif %} diff --git a/doc/_themes/julia/static/julia.css_t b/doc/_themes/julia/static/julia.css_t deleted file mode 100644 index 3fb847d9a1683..0000000000000 --- a/doc/_themes/julia/static/julia.css_t +++ /dev/null @@ -1,300 +0,0 @@ - -@import url("basic.css"); - -/* general site formatting */ - - -* { - margin: 0; - padding: 0; -} - -html, body { - height: 100%; -} - -body { - background-color: {{ theme_bgcolor }}; - font: 11.5pt Georgia, 'DejaVu Serif', serif; - width: 100%; - text-align: left; - line-height: 1.5; -} - -div.document { - background-color: {{ theme_bgcolor }}; -} - -div.documentwrapper { - float: left; - width: 100%; - background-color: {{ theme_bgcolor }}; -} - -div.bodywrapper { - margin: 0 {{ theme_sidebarmargwidth|toint }}px 0 {{ theme_sidebarmargwidth|toint }}px; - background-color: {{ theme_bgcolor }}; -} - -div.body { - background-color: {{ theme_bgcolor }}; - max-width: {{ theme_bodywidth|toint }}em; - text-align: left; - line-height: 1.5; - margin: 0 auto auto auto; - /*margin: auto auto auto auto;*/ -} - -div.header { - max-width: {{ theme_bodywidth|toint }}em; - margin: auto auto auto auto -} - div.header .title { - font-weight: bold; - margin-top: 2.5em; - } - div.header .links { - text-align: center; - margin: 0 - } - div.header .links a { - text-decoration: none; - color: {{ theme_hlinkcolor }}; - } - -.title, h1, h2, h3, h4, h5, h6 { - font-family: Helvetica, Arial, Clean, sans-serif; - font-size: 105%; -} - -.title { - text-align: center; - font-size: 130%; -} - -h1 { - font-size: 110%; - padding-top: 1ex; - margin: 1em 0; -} - -h2 { - padding-top: 1ex; - margin: 1em 0; -} - -p { - margin: 1em 0; -} - -a { - text-decoration: none; - color: {{ theme_linkcolor }}; -} - a:visited { color: {{ theme_linkvcolor }}; } - a:hover { color: {{ theme_linkhcolor }}; } - -ol,ul { - margin-left: 2.2em; -} - -ul { - list-style-type: circle; -} - -li { - margin-top: 0.25em; -} - -tt.descname { - font-size: 100%; - font-weight: normal; -} - -dl dt big, span.optional { - font-size: 100%; -} - -.figure { - text-align: center; -} - .figure p.note { font-size: 75%; } - -div.footerwrapper { - margin: 2em {{ theme_sidebarmargwidth|toint }}px 2em {{ theme_sidebarmargwidth|toint }}px; -} - -div.footer { - max-width: {{ theme_bodywidth|toint }}em; - margin: auto auto auto auto; -} - -/* code blocks, tables, and blockquotes */ - -code,tt,pre { - font: 80% Menlo, Consolas, Monaco, 'Source Code Pro', 'DejaVu Sans Mono', 'Courier New', Courier, monospace; -} - -blockquote,table { - /* same as pre, but scaled by 80% */ - margin: 0.8em 1.6em 0.8em 1.2em; -} - -pre { - border: 1px solid #ddd; - line-height: 1.5; - margin: 1em 2em 1em 1.5em; - padding: .75em 1.25em; -} - -table.docutils { - border: 1px solid #ddd; -} - -table.docutils td, table.docutils th { - border-bottom: 1px solid #ddd; - padding: 0.4em 1.4em 0.4em 1em; -} - -.chaplink { - font-family: Helvetica, Arial, Clean, sans-serif; - font-size: 90%; -} -.prevlink { - float: left; -} -.nextlink { - float: right; -} - -div.sphinxsidebar { - background-color: {{ theme_bgcolor }}; - position: fixed; - top: 0px; - bottom: 0; - margin: 0; - padding: 0; - padding-top: 15px; - padding-bottom: 15px; - height: auto; -} - -div.sphinxsidebarview { - border-radius: 5px; - height: 100%; -} - -div.sphinxsidebarview::-webkit-scrollbar { - -webkit-appearance: none; - width: 0px; -} - -div.sphinxsidebarwrapper { - border-radius: 5px; - margin: 0; - padding: 0; - margin-left: {{ theme_sidebarlmarg|toint }}px; - height: 100%; -} - -div.sphinxsidebarcontentwrapper { - border-radius: 5px 0 0 5px; - height: 100%; - overflow: auto; - -} - -div.sphinxsidebarcontent { - background-color: {{ theme_sidebarbgcolor }}; - padding: 10px 5px 10px 10px; - vertical-align: middle; -} - -div.sphinxsidebarbutton { - background-color: {{ theme_sidebttbgcolor }}; - border-radius: 0 5px 5px 0; - color: {{ theme_sidebttcolor }}; - font-size: 1.2em; - cursor: pointer; - width: 12px; - height: 100%; - margin: auto; - float: right; -} - -div.sphinxsidebarbutton:hover { - background-color: {{ theme_sidebtthvbgcolor }}; -} - -#sidebarbutton { - display: block; - float: right; -} - -div.sphinxsidebar h3 { - font-family: Helvetica, Arial, Clean, sans-serif; - color: {{ theme_sidebarcolor }}; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: {{ theme_sidebartoccolor }}; -} - -div.sphinxsidebar h4 { - font-family: Helvetica, Arial, sans-serif; - color: {{ theme_sidebarcolor}}; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: {{ theme_sidebarcolor }}; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: {{ theme_sidebarcolor }}; -} - -div.sphinxsidebar a { - color: {{ theme_sidebarlinkcolor }}; -} -div.sphinxsidebar a:hover { color: {{ theme_sidebarlinkhcolor }}; } - -div.sphinxsidebar #searchbox table { - border: 1px solid {{ theme_sidebttbgcolor }}; - border-radius: 3px; - border-spacing: 0; - font-family: sans-serif; - font-size: 1em; - padding: 0; - margin: 0 5px 0 0; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: {{ theme_sidesearchboxwidth|toint }}px; - border-radius: 3px 0 0 3px; - border: 0; - padding: 1px 1px 1px 4px; - background-color: white; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; - border-radius: 0 3px 3px 0; - border: 0; - padding: 1px; - background-color: {{ theme_sidebarsearchbuttoncolor }}; -} - diff --git a/doc/_themes/julia/static/pygments.css b/doc/_themes/julia/static/pygments.css deleted file mode 100644 index 851ba3c1ae2eb..0000000000000 --- a/doc/_themes/julia/static/pygments.css +++ /dev/null @@ -1,59 +0,0 @@ -.highlight .hll { background-color: #ffffcc } -.highlight .c { color: #999988; font-style: italic } /* Comment */ -.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -.highlight .k { font-weight: bold } /* Keyword */ -.highlight .o { font-weight: bold } /* Operator */ -.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ -.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #aa0000 } /* Generic.Error */ -.highlight .gh { color: #999999 } /* Generic.Heading */ -.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #555555 } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ -.highlight .gt { color: #aa0000 } /* Generic.Traceback */ -.highlight .kc { font-weight: bold } /* Keyword.Constant */ -.highlight .kd { font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ -.highlight .m { color: #009999 } /* Literal.Number */ -.highlight .s { color: #bb8844 } /* Literal.String */ -.highlight .na { color: #008080 } /* Name.Attribute */ -.highlight .nb { color: #999999 } /* Name.Builtin */ -.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ -.highlight .no { color: #008080 } /* Name.Constant */ -.highlight .ni { color: #800080 } /* Name.Entity */ -.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ -.highlight .nn { color: #555555 } /* Name.Namespace */ -.highlight .nt { color: #000080 } /* Name.Tag */ -.highlight .nv { color: #008080 } /* Name.Variable */ -.highlight .ow { font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #009999 } /* Literal.Number.Float */ -.highlight .mh { color: #009999 } /* Literal.Number.Hex */ -.highlight .mi { color: #009999 } /* Literal.Number.Integer */ -.highlight .mo { color: #009999 } /* Literal.Number.Oct */ -.highlight .sb { color: #bb8844 } /* Literal.String.Backtick */ -.highlight .sc { color: #bb8844 } /* Literal.String.Char */ -.highlight .sd { color: #bb8844 } /* Literal.String.Doc */ -.highlight .s2 { color: #bb8844 } /* Literal.String.Double */ -.highlight .se { color: #bb8844 } /* Literal.String.Escape */ -.highlight .sh { color: #bb8844 } /* Literal.String.Heredoc */ -.highlight .si { color: #bb8844 } /* Literal.String.Interpol */ -.highlight .sx { color: #bb8844 } /* Literal.String.Other */ -.highlight .sr { color: #808000 } /* Literal.String.Regex */ -.highlight .s1 { color: #bb8844 } /* Literal.String.Single */ -.highlight .ss { color: #bb8844 } /* Literal.String.Symbol */ -.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #008080 } /* Name.Variable.Class */ -.highlight .vg { color: #008080 } /* Name.Variable.Global */ -.highlight .vi { color: #008080 } /* Name.Variable.Instance */ -.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ diff --git a/doc/_themes/julia/static/sidebar.js b/doc/_themes/julia/static/sidebar.js deleted file mode 100644 index 74a4c7f367e0e..0000000000000 --- a/doc/_themes/julia/static/sidebar.js +++ /dev/null @@ -1,196 +0,0 @@ -/* - * sidebar.js - * ~~~~~~~~~~ - * - * This script manages the Sphinx sidebar position, scrolling and collapsing - * for the Julia theme. - * - * Based on the sidebar script for the default sphinx theme. - * - * default sphinx theme: - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - * julia theme: - * :copyright: Copyright 2012 by the Julia authors, see AUTHORS. - * :license: MIT, see LICENSE for details. - * - */ - -$(function() { - // global elements used by the functions. - var body= $('div.body'); - var bodywrapper = $('.bodywrapper'); - var footerwrapper = $('.footerwrapper'); - var sidebar = $('.sphinxsidebar'); - var sidebarview = $('.sphinxsidebarview'); - var sidebarcontent = $('.sphinxsidebarcontent'); - var sidebarbuttondiv = $('.sphinxsidebarbutton'); - var sidebarbutton = $('#sidebarbutton'); - var searchq = $('.search [name=q]'); - - var uncollapsed_height = 0; - - // if for some reason the document has no sidebar, do not run into errors - if (!sidebar.length) return; - - // original margin-left of the bodywrapper and width of the sidebar - // with the sidebar expanded - var bw_margin_expanded = bodywrapper.css('margin-left'); - var ssb_width_expanded = sidebar.width(); - - // margin-left of the bodywrapper and width of the sidebar - // with the sidebar collapsed - var bw_margin_collapsed = '40px'; - var ssb_width_collapsed = '30px'; - - // sidebar paddings - var barpadtop = parseFloat(sidebar.css('padding-top')); - var barpadbottom = parseFloat(sidebar.css('padding-bottom')); - var barpad = barpadtop + barpadbottom; - - var barscroll = 0; - - function viewOffsetTop(elem) { - // NOTE: jQuery's offset() doesn't work (evaluates nodes - // as being disconnected and returns 0); plus we need - // the offset relative to the viewport, so this approach - // is more direct - return elem[0].getBoundingClientRect().top; - } - - function sidebar_is_collapsed() { - return sidebarcontent.is(':not(:visible)'); - } - - function toggle_sidebar() { - if (sidebar_is_collapsed()) - expand_sidebar(); - else - collapse_sidebar(); - } - - function compute_uncollapsed_height() { - var isc = sidebar_is_collapsed(); - if (isc) - expand_sidebar(); - uncollapsed_height = Math.min( - sidebarcontent.outerHeight(), - sidebarcontent.parent().height() ); - if (isc) - collapse_sidebar(); - } - - function get_collapsed_height() { - var bartop = viewOffsetTop(sidebar); - return Math.min(uncollapsed_height, $(window).height() - barpad - bartop); - } - - function set_button_margin() { - var bartop = viewOffsetTop(sidebar); - var barheight = sidebarbuttondiv.height(); - var buttonheight = sidebarbutton.height(); - var buttonscroll = sidebarview.scrollTop(); - var newmargin = (Math.min(barheight, $(window).height() - barpad - bartop) - buttonheight) / 2 + buttonscroll; - sidebarbutton.css('margin-top', newmargin); - searchq.css('width', sidebarcontent.width() - 50); - } - - function collapse_sidebar() { - barscroll = sidebarview.scrollTop(); - sidebarview.scrollTop(0); - - var newheight = get_collapsed_height(); - - sidebarcontent.hide(); - sidebar.css('width', ssb_width_collapsed); - var newmargins = { - 'margin-left': bw_margin_collapsed, - 'margin-right': bw_margin_collapsed, - }; - bodywrapper.css(newmargins); - footerwrapper.css(newmargins); - sidebarbuttondiv.css({ - 'height': newheight, - 'border-radius': '5px', - 'float': '', - }); - sidebarbutton.find('span').text('»'); - sidebarbuttondiv.attr('title', _('Expand sidebar')); - set_button_margin(); - document.cookie = 'sidebar=collapsed'; - } - - function expand_sidebar() { - var newmargins = { - 'margin-left': bw_margin_expanded, - 'margin-right': bw_margin_expanded, - }; - bodywrapper.css(newmargins); - footerwrapper.css(newmargins); - sidebar.css('width', ''); - sidebarcontent.show(); - compute_uncollapsed_height(); - sidebarbuttondiv.css({ - 'height': uncollapsed_height, - 'border-radius': '0 5px 5px 0', - 'float': 'right', - }); - sidebarbutton.find('span').text('«'); - sidebarbuttondiv.attr('title', _('Collapse sidebar')); - set_button_margin(); - sidebarview.scrollTop(barscroll); - document.cookie = 'sidebar=expanded'; - } - - function prepare_sidebar_button() { - sidebarbuttondiv.click(toggle_sidebar); - sidebarbuttondiv.attr('title', _('Collapse sidebar')); - } - - function set_state_from_cookie() { - if (!document.cookie) - return; - var items = document.cookie.split(';'); - for(var k=0; k v documentation". @@ -135,11 +135,7 @@ #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = { - '**': ['localtoc.html', 'relations.html', 'searchbox.html'], - 'index': [], - 'search': [], -} +html_sidebars = juliadoc.default_sidebars() # Additional templates that should be rendered to pages, maps page names to # template names. diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000000000..0cfb48ae2a869 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1 @@ +-e git+https://github.com/JuliaLang/JuliaDoc.git#egg=JuliaDoc diff --git a/doc/sphinx/.gitignore b/doc/sphinx/.gitignore deleted file mode 100644 index 0d20b6487c61e..0000000000000 --- a/doc/sphinx/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc diff --git a/doc/sphinx/jlhelp.py b/doc/sphinx/jlhelp.py deleted file mode 100755 index 5690809925d28..0000000000000 --- a/doc/sphinx/jlhelp.py +++ /dev/null @@ -1,118 +0,0 @@ -import codecs -from os import path - -from docutils import nodes -from sphinx.builders.text import TextBuilder -from sphinx.writers.text import TextTranslator -from sphinx.writers.text import TextWriter - -from sphinx.util.osutil import ensuredir -from sphinx.util.console import bold, purple, darkgreen, term_width_line - -def jl_escape(text): - # XXX: crude & fragile - return text.replace('\\',r'\\').replace('$',"\\$").replace('"',"\\\"") - -class JuliaHelpTranslator(TextTranslator): - - def __init__(self, document, builder): - TextTranslator.__init__(self, document, builder) - self.in_desc = False - - def add_text(self, text, escape=True, force=False): - if self.in_desc or force: - etext = jl_escape(text) if escape else text - self.states[-1].append((-1, etext)) - - def visit_title(self, node): - if self.sectionlevel == 1: - self._current_title = node.astext() - raise nodes.SkipNode - - def visit_desc(self, node): - if node.attributes['objtype'] == 'attribute': - return - self.in_desc = True - self.new_state(0) - - def visit_desc_signature(self, node): - self._current_module = node.attributes.get('module', None) - self._current_class = node.attributes.get('class', None) - TextTranslator.visit_desc_signature(self, node) - - def visit_desc_name(self, node): - self._desc_name = node.astext() - TextTranslator.visit_desc_name(self, node) - - def depart_desc(self, node): - if node.attributes['objtype'] == 'attribute': - return - self.add_text('"),\n', escape=False) - category = self._current_title.split('---')[0].strip() - if self._current_module is not None: - module = self._current_module - if module != 'Base': - category = module - else: - module = '' - name = self._desc_name - if self._current_class: - name = self._current_class - self.end_state(first='("%s","%s","%s","' % ( \ - jl_escape(category), \ - jl_escape(module), \ - jl_escape(name))) - self.in_desc = False - -class JuliaHelpWriter(TextWriter): - - def translate(self): - visitor = JuliaHelpTranslator(self.document, self.builder) - self.document.walkabout(visitor) - self.output = visitor.body - -class JuliaHelpBuilder(TextBuilder): - name = "jlhelp" - out_suffix = ".jl" - - def write(self, *ignored): - # build_all - docnames = set([doc for doc in self.env.found_docs if doc.startswith("stdlib")]) - - self.info(bold('preparing documents... '), nonl=True) - self.prepare_writing(docnames) - self.info('done') - - # write target files - warnings = [] - self.env.set_warnfunc(lambda *args: warnings.append(args)) - - outfilename = path.join(self.outdir, self.name + self.out_suffix) - ensuredir(path.dirname(outfilename)) - try: - f = codecs.open(outfilename, 'w', 'utf-8') - try: - f.write('# automatically generated -- do not edit\n\n' + - '{\n\n') - - for docname in self.status_iterator( - sorted(docnames), 'processing... ', darkgreen, len(docnames)): - doctree = self.env.get_and_resolve_doctree(docname, self) - self.writer.write(doctree, f) - f.write("\n") - - f.write('\n}\n') - finally: - f.close() - except (IOError, OSError) as err: - self.warn("error writing file %s: %s" % (outfilename, err)) - - for warning in warnings: - self.warn(*warning) - self.env.set_warnfunc(self.warn) - - def prepare_writing(self, docnames): - self.writer = JuliaHelpWriter(self) - -def setup(app): - app.add_builder(JuliaHelpBuilder) diff --git a/doc/sphinx/julia.py b/doc/sphinx/julia.py deleted file mode 100644 index 55b8ed3fc8473..0000000000000 --- a/doc/sphinx/julia.py +++ /dev/null @@ -1,24 +0,0 @@ -# Julia domain for Sphinx -# http://sphinx.pocoo.org/domains.html - -import re -import sphinx.domains.python - -sphinx.domains.python.py_sig_re = re.compile( - r'''^ ([\w.]+\.)? # class name(s) - ([^\s(]+) \s* # thing name - (?: \((.*)\) # optional: arguments - (?:\s* -> \s* (.*))? # return annotation - )? $ # and nothing more - ''', re.VERBOSE | re.UNICODE) - -class JuliaDomain(sphinx.domains.python.PythonDomain): - """Julia language domain.""" - name = 'jl' - label = 'Julia' - -JuliaDomain.directives['type'] = JuliaDomain.directives['class'] - -def setup(app): - app.add_domain(JuliaDomain) - From 5636a7c93a30fe267dddbfd0d4c70180c8955682 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Mon, 12 Nov 2012 15:05:30 -0500 Subject: [PATCH 2/9] improve html doc layout on mobile devices --- doc/.gitignore | 1 - doc/Makefile | 32 ++++++++------------------------ doc/conf.py | 9 +++------ doc/index.rst | 9 ++------- doc/manual/index.rst | 3 --- doc/stdlib/index.rst | 5 ----- 6 files changed, 13 insertions(+), 46 deletions(-) diff --git a/doc/.gitignore b/doc/.gitignore index 2cb24fa1c408c..69fa449dd96e2 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,2 +1 @@ _build/ -_themes/julia/static/jquery.js diff --git a/doc/Makefile b/doc/Makefile index 3c82ec36ea381..08c12c522de0a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -15,12 +15,8 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -JQUERYDEST = _themes/julia/static/jquery.js -JQUERYURL = http://code.jquery.com/jquery-latest.js -WGET = $(abspath ../deps)/jldownload - -.PHONY: help clean clean-jquery cleanall get-jquery html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \ - epub latex latexpdf text man changes linkcheck doctest gettext listpkg +.PHONY: help clean cleanall html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \ + epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @@ -44,33 +40,21 @@ help: @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " listpkg to recreate the list of available packages" clean: -rm -rf $(BUILDDIR)/* - -rm -f sphinx/*.pyc - -clean-jquery: - -rm -f $(JQUERYDEST) - -cleanall: clean clean-jquery - -get-jquery: $(JQUERYDEST) - -$(JQUERYDEST): - $(WGET) $@ $(JQUERYURL) -html: get-jquery +html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -dirhtml: get-jquery +dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." -singlehtml: get-jquery +singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." @@ -85,13 +69,13 @@ json: @echo @echo "Build finished; now you can process the JSON files." -htmlhelp: get-jquery +htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." -qthelp: get-jquery +qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -171,7 +155,7 @@ doctest: @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." -helpdb.jl: stdlib/*.rst sphinx/jlhelp.py sphinx/julia.py +helpdb.jl: stdlib/*.rst $(SPHINXBUILD) -b jlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/jlhelp mv $(BUILDDIR)/jlhelp/jlhelp.jl helpdb.jl diff --git a/doc/conf.py b/doc/conf.py index 6968c9ef6942f..99e7a635ee17c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -142,7 +142,7 @@ #html_additional_pages = {} # If false, no module index is generated. -html_domain_indices = False +#html_domain_indices = True # If false, no index is generated. #html_use_index = True @@ -188,16 +188,13 @@ \DeclareUnicodeCharacter{2203}{\ensuremath{\exists}} \DeclareUnicodeCharacter{2200}{\ensuremath{\forall}} \DeclareUnicodeCharacter{27FA}{\ensuremath{\Longleftrightarrow}} - \usepackage{amsfonts} - \DeclareUnicodeCharacter{2713}{\checkmark} - \usepackage{CJKutf8} ''', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('latex', 'JuliaLanguage.tex', u'Julia Language Documentation', + ('index', 'JuliaLanguage.tex', u'Julia Language Documentation', AUTHORS, 'manual'), ] @@ -219,7 +216,7 @@ #latex_appendices = [] # If false, no module index is generated. -latex_domain_indices = False +#latex_domain_indices = True # -- Options for manual page output -------------------------------------------- diff --git a/doc/index.rst b/doc/index.rst index 1a3e84b6c9176..a0efd89f0417c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,20 +1,15 @@ + %%%%%%%%%%%%%%%%%%%%% Julia Documentation %%%%%%%%%%%%%%%%%%%%% .. toctree:: - :maxdepth: 1 + :maxdepth: 2 manual/index stdlib/index packages/packagelist -Index and search -================ - -* :ref:`genindex` -* :ref:`search` - Translations ============ diff --git a/doc/manual/index.rst b/doc/manual/index.rst index b8ec5ef04b11d..e6b262c185d54 100644 --- a/doc/manual/index.rst +++ b/doc/manual/index.rst @@ -5,9 +5,6 @@ The Julia Manual ################## -:Release: |version| -:Date: |today| - .. toctree:: :maxdepth: 1 diff --git a/doc/stdlib/index.rst b/doc/stdlib/index.rst index 309711d09fef4..49a31a9646bf3 100644 --- a/doc/stdlib/index.rst +++ b/doc/stdlib/index.rst @@ -5,9 +5,6 @@ The Julia Standard Library ############################ -:Release: |version| -:Date: |today| - ********* Built-ins ********* @@ -32,5 +29,3 @@ Built-in Modules collections sort test - - From 548dd827a46bc0fbea65e17ad99b8fd33d6bbd51 Mon Sep 17 00:00:00 2001 From: Mike Nolta Date: Fri, 25 Jan 2013 17:41:56 -0500 Subject: [PATCH 3/9] doc/pdf: remove python module index --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 99e7a635ee17c..b5481ec89cdd0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -216,7 +216,7 @@ #latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +latex_domain_indices = False # -- Options for manual page output -------------------------------------------- From 6717f1c7617e8620260e6f497b772743511ee241 Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Mon, 27 May 2013 17:58:21 -0500 Subject: [PATCH 4/9] doc: fix templating and restore listpkg --- doc/Makefile | 3 ++- doc/conf.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 08c12c522de0a..c3cd4e39b534a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -16,7 +16,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean cleanall html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \ - epub latex latexpdf text man changes linkcheck doctest gettext + epub latex latexpdf text man changes linkcheck doctest gettext listpkg help: @echo "Please use \`make ' where is one of" @@ -40,6 +40,7 @@ help: @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " listpkg to recreate the list of available packages" clean: -rm -rf $(BUILDDIR)/* diff --git a/doc/conf.py b/doc/conf.py index b5481ec89cdd0..c55956c276699 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -28,7 +28,7 @@ extensions = ['sphinx.ext.mathjax', 'juliadoc.julia', 'juliadoc.jlhelp'] # Add any paths that contain templates here, relative to this directory. -templates_path = [juliadoc.get_templates_dir()] +#templates_path = [] # The suffix of source filenames. source_suffix = '.rst' From efbfc64655b654b95fff805c7a934e182e02d4f0 Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Mon, 27 May 2013 19:02:38 -0500 Subject: [PATCH 5/9] doc: put sidebarintro back The links are specific to the main doc, so this really does belong here. Also move the translation links here. --- doc/_templates/sidebarintro.html | 17 +++++++++++++++++ doc/conf.py | 3 ++- doc/index.rst | 7 ------- 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 doc/_templates/sidebarintro.html diff --git a/doc/_templates/sidebarintro.html b/doc/_templates/sidebarintro.html new file mode 100644 index 0000000000000..6f49697afb725 --- /dev/null +++ b/doc/_templates/sidebarintro.html @@ -0,0 +1,17 @@ + + +

Other formats

+ + +

Translations

+ diff --git a/doc/conf.py b/doc/conf.py index c55956c276699..8654f3f649d3c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -28,7 +28,7 @@ extensions = ['sphinx.ext.mathjax', 'juliadoc.julia', 'juliadoc.jlhelp'] # Add any paths that contain templates here, relative to this directory. -#templates_path = [] +templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -136,6 +136,7 @@ # Custom sidebar templates, maps document names to template names. html_sidebars = juliadoc.default_sidebars() +html_sidebars['index'].insert(0, 'sidebarintro.html') # Additional templates that should be rendered to pages, maps page names to # template names. diff --git a/doc/index.rst b/doc/index.rst index a0efd89f0417c..1c477bde682ce 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -9,10 +9,3 @@ manual/index stdlib/index packages/packagelist - -Translations -============ - -* `简体中文 `_ -* `Português brasileiro `_ -* `Español latino `_ From d87371b6e3cf6eae135db7912a17cec70d260e10 Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Mon, 27 May 2013 19:12:40 -0500 Subject: [PATCH 6/9] doc: put TOC depth back to 1 --- doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index 1c477bde682ce..0f6e238b18678 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -4,7 +4,7 @@ %%%%%%%%%%%%%%%%%%%%% .. toctree:: - :maxdepth: 2 + :maxdepth: 1 manual/index stdlib/index From 3aa7804a7e2617e4df3712a1c5f8992c59b7067a Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Mon, 27 May 2013 20:25:28 -0500 Subject: [PATCH 7/9] doc: flip some generation settings off --- doc/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 8654f3f649d3c..38d052593c879 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -143,7 +143,7 @@ #html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +html_domain_indices = False # If false, no index is generated. #html_use_index = True @@ -155,10 +155,10 @@ #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +html_show_sphinx = False # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +html_show_copyright = False # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the From ee461cc2829b9dab3e25dd574c9057d5e998b28b Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Mon, 27 May 2013 20:32:16 -0500 Subject: [PATCH 8/9] doc: clear up some warnings from Sphinx --- doc/conf.py | 2 +- doc/manual/control-flow.rst | 58 ++++++++++++++++++++++------------- doc/manual/linear-algebra.rst | 14 ++++----- doc/stdlib/base.rst | 4 +-- 4 files changed, 47 insertions(+), 31 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 38d052593c879..cb99bd93b785b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -124,7 +124,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/doc/manual/control-flow.rst b/doc/manual/control-flow.rst index 56be30368808a..7e122bfe6a72e 100644 --- a/doc/manual/control-flow.rst +++ b/doc/manual/control-flow.rst @@ -444,27 +444,43 @@ Built-in ``Exception``\ s ``Exception``\ s are thrown when an unexpected condition has occurred. The built-in ``Exception``\ s listed below all interrupt the normal flow of control. -====================== -``Exception`` ----------------------- -``ArgumentError`` -``BoundsError`` -``DivideError`` -``DomainError`` -``EOFError`` -``ErrorException`` -``InexactError`` -``InterruptException`` -``KeyError`` -``LoadError`` -``MemoryError`` -``MethodError`` -``OverflowError`` -``ParseError`` -``SystemError`` -``TypeError`` -``UndefRefError`` -====================== ++------------------------+ +| ``Exception`` | ++========================+ +| ``ArgumentError`` | ++------------------------+ +| ``BoundsError`` | ++------------------------+ +| ``DivideError`` | ++------------------------+ +| ``DomainError`` | ++------------------------+ +| ``EOFError`` | ++------------------------+ +| ``ErrorException`` | ++------------------------+ +| ``InexactError`` | ++------------------------+ +| ``InterruptException`` | ++------------------------+ +| ``KeyError`` | ++------------------------+ +| ``LoadError`` | ++------------------------+ +| ``MemoryError`` | ++------------------------+ +| ``MethodError`` | ++------------------------+ +| ``OverflowError`` | ++------------------------+ +| ``ParseError`` | ++------------------------+ +| ``SystemError`` | ++------------------------+ +| ``TypeError`` | ++------------------------+ +| ``UndefRefError`` | ++------------------------+ For example, the ``sqrt`` function throws a ``DomainError()`` if applied to a negative real value:: diff --git a/doc/manual/linear-algebra.rst b/doc/manual/linear-algebra.rst index 31a8f2d35e18f..8edec7ac38139 100644 --- a/doc/manual/linear-algebra.rst +++ b/doc/manual/linear-algebra.rst @@ -92,19 +92,19 @@ Matrix factorizations | Matrix type | LAPACK | Eigensystems | Singular values and vectors | | | Name +---------+-------------+-------------+---------+-------------------+ | | | ``eig`` | ``eigvals`` | ``eigvecs`` | ``svd`` | ``svdvals`` | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ | ``Hermitian`` | HE | | ABC | | | | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ | ``Triangular`` | TR | | | | | | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ | ``SymTridiagonal`` | ST | A | ABC | AD | | | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ | ``Tridiagonal`` | GT | | | | | | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ | ``Bidiagonal`` | BD | | | | A | A | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ | ``Diagonal`` | DI | | A | | | | -+--------------------+--------+-------------------------------------+-----------------------------+ ++--------------------+--------+---------+-------------+-------------+---------+-------------------+ Legend: diff --git a/doc/stdlib/base.rst b/doc/stdlib/base.rst index f6b5b87ee3201..89465f8a27a11 100644 --- a/doc/stdlib/base.rst +++ b/doc/stdlib/base.rst @@ -312,7 +312,7 @@ Iterable Collections .. function:: unique(itr) Returns an array containing only the unique elements of the iterable ``itr``, in -the order that the first of each set of equivalent elements originally appears. + the order that the first of each set of equivalent elements originally appears. .. function:: reduce(op, v0, itr) @@ -2819,7 +2819,7 @@ FFT functions in Julia are largely implemented by calling functions from `FFTW < Compute the cross-correlation of two vectors. Numerical Integration ------------------ +--------------------- Although several external packages are available for numeric integration and solution of ordinary differential equations, we also provide From 8af675974039ccb758ae6a98e7d5c80843025fb0 Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Mon, 27 May 2013 22:04:15 -0500 Subject: [PATCH 9/9] doc: update Makefile and README --- doc/Makefile | 43 +++++++++++++++++++++++-------------------- doc/README.md | 8 +++++--- doc/helpdb.jl | 18 ++++++++++-------- 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index c3cd4e39b534a..dfb0151f0c2cd 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -45,38 +45,41 @@ help: clean: -rm -rf $(BUILDDIR)/* -html: +juliadoc-pkg: + pip install --user --upgrade -r requirements.txt + +html: juliadoc-pkg $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -dirhtml: +dirhtml: juliadoc-pkg $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." -singlehtml: +singlehtml: juliadoc-pkg $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." -pickle: +pickle: juliadoc-pkg $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." -json: +json: juliadoc-pkg $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." -htmlhelp: +htmlhelp: juliadoc-pkg $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." -qthelp: +qthelp: juliadoc-pkg $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -85,7 +88,7 @@ qthelp: @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/JuliaLanguage.qhc" -devhelp: +devhelp: juliadoc-pkg $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @@ -94,69 +97,69 @@ devhelp: @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/JuliaLanguage" @echo "# devhelp" -epub: +epub: juliadoc-pkg $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." -latex: +latex: juliadoc-pkg $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." -latexpdf: +latexpdf: juliadoc-pkg $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." -text: +text: juliadoc-pkg $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." -man: +man: juliadoc-pkg $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." -texinfo: +texinfo: juliadoc-pkg $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." -info: +info: juliadoc-pkg $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." -gettext: +gettext: juliadoc-pkg $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." -changes: +changes: juliadoc-pkg $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." -linkcheck: +linkcheck: juliadoc-pkg $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." -doctest: +doctest: juliadoc-pkg $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." -helpdb.jl: stdlib/*.rst +helpdb.jl: stdlib/*.rst juliadoc-pkg $(SPHINXBUILD) -b jlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/jlhelp mv $(BUILDDIR)/jlhelp/jlhelp.jl helpdb.jl diff --git a/doc/README.md b/doc/README.md index 9b2b9bafc5634..731e13dcff526 100644 --- a/doc/README.md +++ b/doc/README.md @@ -28,8 +28,10 @@ File layout conf.py Sphinx configuration helpdb.jl REPL help database - sphinx/ Sphinx extensions and plugins - sphinx/jlhelp.py Sphinx plugin to build helpdb.jl stdlib/ Julia standard library documentation - _themes/ Sphinx html themes +Sphinx extensions and theme +--------------------------- +The extensions to Sphinx and the theme are in the +https://github.com/JuliaLang/JuliaDoc repository, and can also be used to style +package documentation. diff --git a/doc/helpdb.jl b/doc/helpdb.jl index 9269abfc8cfcf..01daa41dbba40 100644 --- a/doc/helpdb.jl +++ b/doc/helpdb.jl @@ -490,7 +490,8 @@ ("Iterable Collections","Base","unique","unique(itr) Returns an array containing only the unique elements of the - iterable \"itr\". + iterable \"itr\", in the order that the first of each set of + equivalent elements originally appears. "), @@ -547,6 +548,13 @@ "), +("Iterable Collections","Base","sum","sum(f, itr) + + Sum the results of calling function \"f\" on each element of + \"itr\". + +"), + ("Iterable Collections","Base","prod","prod(itr) Returns the product of all elements of a collection @@ -565,13 +573,7 @@ "), -("Iterable Collections","Base","count","count(itr) -> Integer - - Count the number of boolean elements in \"itr\" which are true. - -"), - -("Iterable Collections","Base","countp","countp(p, itr) -> Integer +("Iterable Collections","Base","count","count(p, itr) -> Integer Count the number of elements in \"itr\" for which predicate \"p\" is true.