fix latex inline literals where `< > -` gobbled a space

This commit is contained in:
jfbu
2016-11-06 13:58:14 +01:00
parent c689994cf8
commit 7505557384
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -34,6 +34,7 @@ Bugs fixed
* #777: LaTeX output "too deeply nested" (ref #3096)
* Let LaTeX image inclusion obey ``scale`` before textwidth fit (ref #2865, #3059)
* #3019: LaTeX fails on description of C function with arguments (ref #3083)
* fix latex inline literals where ``< > -`` gobbled a space
Release 1.5 alpha2 (released Oct 17, 2016)
==========================================
+8 -1
View File
@@ -245,12 +245,19 @@
\long\protected\def\sphinxcode#1{{\def\@tempa{alltt}%
\ifx\@tempa\@currenvir\else
\ifspx@opt@inlineliteralwraps
\def\verbatim@nolig@list {\do\`\do\<\do\>\do\'\do\-}%
\sphinxbreaksviaactive\let\sphinxafterbreak\empty
% do not overwrite the comma set-up
\let\verbatim@nolig@list\sphinx@literal@nolig@list
\fi
% fix a space-gobbling issue due to LaTeX's original \do@noligs
\let\do@noligs\sphinx@do@noligs
\@noligs\endlinechar\m@ne\everyeof{\noexpand}%
\expandafter\scantokens
\fi {\texttt{#1}}}}
\def\sphinx@do@noligs #1{\catcode`#1\active\begingroup\lccode`\~`#1\relax
\lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1 }}}
\def\sphinx@literal@nolig@list {\do\`\do\<\do\>\do\'\do\-}%
\long\protected\def\sphinxbfcode#1{\sphinxcode{\bfseries#1}}
\long\protected\def\sphinxemail#1{\textsf{#1}}
\long\protected\def\sphinxtablecontinued#1{\textsf{#1}}