diff --git a/CHANGES b/CHANGES index e755e6bcb..b2679148a 100644 --- a/CHANGES +++ b/CHANGES @@ -109,8 +109,17 @@ Features added - #766: Added Estonian locale. -Release 1.0.8 (in development) -============================== +Release 1.0.8 (Sep 23, 2011) +============================ + +* #696, #666: Fix C++ array definitions and template arguments + that are not type names. + +* #633: Allow footnotes in section headers in LaTeX output. + +* #616: Allow keywords to be linked via intersphinx. + +* #613: Allow Unicode characters in production list token names. * #720: Add dummy visitors for graphviz nodes for text and man. @@ -154,6 +163,8 @@ Release 1.0.8 (in development) * #647: Do not apply SmartyPants in parsed-literal blocks. +* C++ domain now supports array definitions. + Release 1.0.7 (Jan 15, 2011) ============================ diff --git a/EXAMPLES b/EXAMPLES index 8fe0ea98b..8c015c78f 100644 --- a/EXAMPLES +++ b/EXAMPLES @@ -19,10 +19,12 @@ Documentation using the default theme * CodePy: http://documen.tician.de/codepy/ * Cython: http://docs.cython.org/ * C\\C++ Python language binding project: http://language-binding.net/index.html +* Cormoran: http://cormoran.nhopkg.org/docs/ * Director: http://packages.python.org/director/ * Dirigible: http://www.projectdirigible.com/documentation/ * F2py: http://f2py.sourceforge.net/docs/ * GeoDjango: http://geodjango.org/docs/ +* Genomedata: http://noble.gs.washington.edu/proj/genomedata/doc/1.2.2/genomedata.html * gevent: http://www.gevent.org/ * Google Wave API: http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/index.html * GSL Shell: http://www.nongnu.org/gsl-shell/ @@ -51,6 +53,7 @@ Documentation using the default theme * PyUblas: http://documen.tician.de/pyublas/ * Quex: http://quex.sourceforge.net/doc/html/main.html * Scapy: http://www.secdev.org/projects/scapy/doc/ +* Segway: http://noble.gs.washington.edu/proj/segway/doc/1.1.0/segway.html * SimPy: http://simpy.sourceforge.net/SimPyDocs/index.html * SymPy: http://docs.sympy.org/ * WTForms: http://wtforms.simplecodes.com/docs/ @@ -114,14 +117,15 @@ Documentation using another builtin theme * C/C++ Development with Eclipse: http://eclipsebook.in/ (agogo) * Distribute: http://packages.python.org/distribute/ (nature) * Jinja: http://jinja.pocoo.org/ (scrolls) +* jsFiddle: http://doc.jsfiddle.net/ (nature) * pip: http://pip.openplans.org/ (nature) * Programmieren mit PyGTK und Glade (German): http://www.florian-diesch.de/doc/python-und-glade/online/ (agogo) -* pypol: http://pypol.altervista.org/ (nature) * Spring Python: http://springpython.webfactional.com/current/sphinx/index.html (nature) * sqlparse: http://python-sqlparse.googlecode.com/svn/docs/api/index.html (agogo) +* Sylli: http://sylli.sourceforge.net/ (nature) * libLAS: http://liblas.org/ (nature) @@ -132,8 +136,10 @@ Documentation using a custom theme/integrated in a site * Blinker: http://discorporate.us/projects/Blinker/docs/ * Classy: classy: http://classy.pocoo.org/ * Django: http://docs.djangoproject.com/ +* e-cidadania: http://e-cidadania.readthedocs.org/en/latest/ * Flask: http://flask.pocoo.org/docs/ * Flask-OpenID: http://packages.python.org/Flask-OpenID/ +* Gameduino: http://excamera.com/sphinx/gameduino/ * GeoServer: http://docs.geoserver.org/ * Glashammer: http://glashammer.org/ * MirrorBrain: http://mirrorbrain.org/docs/ @@ -145,6 +151,7 @@ Documentation using a custom theme/integrated in a site * German Plone 4.0 user manual: http://www.hasecke.com/plone-benutzerhandbuch/4.0/ * Pylons: http://pylonshq.com/docs/en/0.9.7/ * PyMOTW: http://www.doughellmann.com/PyMOTW/ +* pypol: http://pypol.altervista.org/ (celery) * qooxdoo: http://manual.qooxdoo.org/current * Roundup: http://www.roundup-tracker.org/ * Selenium: http://seleniumhq.org/docs/ @@ -164,6 +171,7 @@ Homepages and other non-documentation sites * A personal page: http://www.dehlia.in/ * Benoit Boissinot: http://bboissin.appspot.com/ * lunarsite: http://lunaryorn.de/ +* Red Hot Chili Python: http://redhotchilipython.com/ * The Wine Cellar Book: http://www.thewinecellarbook.com/doc/en/ * VOR: http://www.vor-cycling.be/ diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 4004599cb..d96e28c0f 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -638,9 +638,9 @@ class PythonDomain(Domain): else: # "fuzzy" searching mode searchname = '.' + name - matches = [(name, objects[name]) for name in objects - if name.endswith(searchname) - and objects[name][1] in objtypes] + matches = [(oname, objects[oname]) for oname in objects + if oname.endswith(searchname) + and objects[oname][1] in objtypes] else: # NOTE: searching for exact match, object type is not considered if name in objects: diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index 9d5b0b0f1..3af82e0cd 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -321,7 +321,7 @@ class Glossary(Directive): return messages + [node] -token_re = re.compile('`([a-z_][a-z0-9_]*)`') +token_re = re.compile('`(\w+)`', re.U) def token_xrefs(text): retnodes = [] @@ -392,7 +392,8 @@ class StandardDomain(Domain): object_types = { 'term': ObjType(l_('glossary term'), 'term', searchprio=-1), 'token': ObjType(l_('grammar token'), 'token', searchprio=-1), - 'label': ObjType(l_('reference label'), 'ref', searchprio=-1), + 'label': ObjType(l_('reference label'), 'ref', 'keyword', + searchprio=-1), 'envvar': ObjType(l_('environment variable'), 'envvar'), 'cmdoption': ObjType(l_('program option'), 'option'), } diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index af1b40266..5abbee097 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -228,7 +228,8 @@ class CoverageBuilder(Builder): op.write('\n') if undoc['classes']: op.write('Classes:\n') - for name, methods in sorted(undoc['classes'].iteritems()): + for name, methods in sorted( + undoc['classes'].iteritems()): if not methods: op.write(' * %s\n' % name) else: diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index 9bfd53fd5..d6d15314b 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -33,6 +33,7 @@ from os import path from docutils import nodes +from sphinx.locale import _ from sphinx.builders.html import INVENTORY_FILENAME from sphinx.util.pycompat import b @@ -214,11 +215,12 @@ def missing_reference(app, env, node, contnode): continue proj, version, uri, dispname = inventory[objtype][target] newnode = nodes.reference('', '', internal=False, refuri=uri, - reftitle='(in %s v%s)' % (proj, version)) + reftitle=_('(in %s v%s)') % (proj, version)) if node.get('refexplicit'): # use whatever title was given newnode.append(contnode) - elif dispname == '-': + elif dispname == '-' or \ + (domain == 'std' and node['reftype'] == 'keyword'): # use whatever title was given, but strip prefix title = contnode.astext() if in_set and title.startswith(in_set+':'): diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index ef7b891bc..84c1ca1e4 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -461,3 +461,21 @@ } {\endlist} }{} + + +% From footmisc.sty: allows footnotes in titles +\let\FN@sf@@footnote\footnote +\def\footnote{\ifx\protect\@typeset@protect + \expandafter\FN@sf@@footnote + \else + \expandafter\FN@sf@gobble@opt + \fi +} +\edef\FN@sf@gobble@opt{\noexpand\protect + \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname} +\expandafter\def\csname FN@sf@gobble@opt \endcsname{% + \@ifnextchar[%] + \FN@sf@gobble@twobracket + \@gobble +} +\def\FN@sf@gobble@twobracket[#1]#2{} diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index 5d9a1eb75..b069bd224 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -176,6 +176,10 @@ div.body { text-align: {{ theme_textalign }}; } +div.document h1 { + line-height: 120%; +} + div.document ul { margin: 1.5em; list-style-type: square; diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index e6585f273..9b6e2092f 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -279,7 +279,8 @@ class LaTeXTranslator(nodes.NodeVisitor): return '\\autopageref*{%s}' % self.idescape(id) def idescape(self, id): - return str(unicode(id).translate(tex_replace_map)) + return unicode(id).translate(tex_replace_map).\ + encode('ascii', 'backslashreplace').replace('\\', '_') def generate_indices(self): def generate(content, collapsed): @@ -637,7 +638,7 @@ class LaTeXTranslator(nodes.NodeVisitor): self.table.longtable = True self.body = self._body if not self.table.longtable and self.table.caption is not None: - self.body.append(u'\n\\begin{threeparttable}\n' + self.body.append(u'\n\n\\begin{threeparttable}\n' u'\\capstart\\caption{%s}\n' % self.table.caption) if self.table.longtable: self.body.append('\n\\begin{longtable}')