diff --git a/CHANGES b/CHANGES index d450e9737..af45a64f5 100644 --- a/CHANGES +++ b/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. diff --git a/doc/concepts.rst b/doc/concepts.rst index e6d5fa026..8d108b98e 100644 --- a/doc/concepts.rst +++ b/doc/concepts.rst @@ -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 ------------ diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index f600e8bd2..79b2fcc55 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -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('\u00B6' % - _('Permalink to this headline')) + if close_tag.startswith('\u00B6' % + _('Permalink to this headline')) + elif close_tag.startswith('\u00B6' % + _('Permalink to this headline')) + BaseTranslator.depart_title(self, node) def unknown_visit(self, node): diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 8b54d4915..086a918a7 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -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):