Fix #2338: Define `\titlereference macro to redefine the style of title-reference` roles.

This commit is contained in:
Takeshi KOMIYA 2016-02-23 13:23:59 +09:00
parent 9ff2847886
commit e8cbd5a750
3 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Features added
* #2245: Add ``latex_elements["passoptionstopackages"]`` option to call PassOptionsToPackages
in early stage of preambles.
* PR #2340: Math extension: support alignment of multiple equations for MathJAX.
* #2338: Define ``\titlereference`` macro to redefine the style of `title-reference` roles.
Bugs fixed
----------

View File

@ -146,6 +146,7 @@
\newcommand{\bfcode}[1]{\code{\bfseries#1}}
\newcommand{\email}[1]{\textsf{#1}}
\newcommand{\tablecontinued}[1]{\textsf{#1}}
\newcommand{\titlereference}[1]{\emph{#1}}
% Redefine the Verbatim environment to allow border and background colors.
% The original environment is still used for verbatims within tables.

View File

@ -1699,7 +1699,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
return self.depart_literal_emphasis(node)
def visit_title_reference(self, node):
self.body.append(r'\emph{')
self.body.append(r'\titlereference{')
def depart_title_reference(self, node):
self.body.append('}')