mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with 0.5
This commit is contained in:
commit
02f7601dc0
@ -728,3 +728,15 @@
|
||||
linkcolor=InnerLinkColor,filecolor=OuterLinkColor,
|
||||
menucolor=OuterLinkColor,pagecolor=OuterLinkColor,
|
||||
urlcolor=OuterLinkColor]{hyperref}
|
||||
|
||||
% From docutils.writers.latex2e
|
||||
\providecommand{\DUspan}[2]{%
|
||||
{% group ("span") to limit the scope of styling commands
|
||||
\@for\node@class@name:=#1\do{%
|
||||
\ifcsname docutilsrole\node@class@name\endcsname%
|
||||
\csname docutilsrole\node@class@name\endcsname%
|
||||
\fi%
|
||||
}%
|
||||
{#2}% node content
|
||||
}% close "span"
|
||||
}
|
||||
|
@ -1243,6 +1243,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
def visit_substitution_reference(self, node):
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_inline(self, node):
|
||||
classes = node.get('classes', [])
|
||||
self.body.append(r'\DUspan{%s}{' %','.join(classes))
|
||||
def depart_inline(self, node):
|
||||
self.body.append('}')
|
||||
|
||||
def visit_generated(self, node):
|
||||
pass
|
||||
def depart_generated(self, node):
|
||||
|
@ -684,6 +684,16 @@ class TextTranslator(nodes.NodeVisitor):
|
||||
def depart_Text(self, node):
|
||||
pass
|
||||
|
||||
def visit_generated(self, node):
|
||||
pass
|
||||
def depart_generated(self, node):
|
||||
pass
|
||||
|
||||
def visit_inline(self, node):
|
||||
pass
|
||||
def depart_inline(self, node):
|
||||
pass
|
||||
|
||||
def visit_problematic(self, node):
|
||||
self.add_text('>>')
|
||||
def depart_problematic(self, node):
|
||||
|
Loading…
Reference in New Issue
Block a user