mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with 0.6
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -13,6 +13,8 @@ Release 0.7 (in development)
|
||||
Release 0.6.2 (in development)
|
||||
==============================
|
||||
|
||||
* #29: Don't generate visible "-{-}" in option lists in LaTeX.
|
||||
|
||||
* Fix cross-reference roles when put into substitutions.
|
||||
|
||||
* Don't put image "alt" text into table-of-contents entries.
|
||||
|
||||
@@ -19,6 +19,9 @@ such a document name.
|
||||
Examples for document names are ``index``, ``library/zipfile``, or
|
||||
``reference/datamodel/types``. Note that there is no leading slash.
|
||||
|
||||
--option Option.
|
||||
--very-long Opitomn.
|
||||
|
||||
|
||||
The TOC tree
|
||||
------------
|
||||
|
||||
@@ -463,15 +463,19 @@ class HTMLTranslator(BaseTranslator):
|
||||
|
||||
def depart_title(self, node):
|
||||
close_tag = self.context[-1]
|
||||
if self.add_permalinks and self.builder.add_permalinks and \
|
||||
(close_tag.startswith('</h') or
|
||||
close_tag.startswith('</a></h')) and \
|
||||
node.parent.hasattr('ids') and node.parent['ids']:
|
||||
if (self.add_permalinks and self.builder.add_permalinks and
|
||||
node.parent.hasattr('ids') and node.parent['ids']):
|
||||
aname = node.parent['ids'][0]
|
||||
# add permalink anchor
|
||||
self.body.append(u'<a class="headerlink" href="#%s" ' % aname +
|
||||
u'title="%s">\u00B6</a>' %
|
||||
_('Permalink to this headline'))
|
||||
if close_tag.startswith('</h'):
|
||||
self.body.append(u'<a class="headerlink" href="#%s" ' % aname +
|
||||
u'title="%s">\u00B6</a>' %
|
||||
_('Permalink to this headline'))
|
||||
elif close_tag.startswith('</a></h'):
|
||||
self.body.append(u'</a><a class="headerlink" href="#%s" ' % aname +
|
||||
u'title="%s">\u00B6' %
|
||||
_('Permalink to this headline'))
|
||||
|
||||
BaseTranslator.depart_title(self, node)
|
||||
|
||||
def unknown_visit(self, node):
|
||||
|
||||
@@ -1219,7 +1219,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
|
||||
def visit_option_string(self, node):
|
||||
ostring = node.astext()
|
||||
self.body.append(self.encode(ostring.replace('--', u'-{-}')))
|
||||
self.no_contractions += 1
|
||||
self.body.append(self.encode(ostring))
|
||||
self.no_contractions -= 1
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_description(self, node):
|
||||
|
||||
Reference in New Issue
Block a user