mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fix latex, since 1.4.4 inline literal text is followed by spurious space
ref: a51681b
use of ``\scantokens`` has a quirk with adding a space in
some cases which we fix by inserting a ``\relax`` at the end of the
argument.
This commit is contained in:
parent
fab5911004
commit
b6daf6be56
1
CHANGES
1
CHANGES
@ -30,6 +30,7 @@ Bugs fixed
|
|||||||
* #2705: `toctree` generates empty bullet_list if ``:titlesonly:`` specified
|
* #2705: `toctree` generates empty bullet_list if ``:titlesonly:`` specified
|
||||||
* #2479: `sphinx.ext.viewcode` uses python2 highlighter by default
|
* #2479: `sphinx.ext.viewcode` uses python2 highlighter by default
|
||||||
* #2700: HtmlHelp builder has hard coded index.html
|
* #2700: HtmlHelp builder has hard coded index.html
|
||||||
|
* latex, since 1.4.4 inline literal text is followed by spurious space
|
||||||
|
|
||||||
|
|
||||||
Release 1.4.4 (released Jun 12, 2016)
|
Release 1.4.4 (released Jun 12, 2016)
|
||||||
|
@ -168,7 +168,7 @@
|
|||||||
% let \sphinxcode and \sphinxbfcode use straight quotes. \@noligs patched by upquote,
|
% let \sphinxcode and \sphinxbfcode use straight quotes. \@noligs patched by upquote,
|
||||||
% but needs protection in "moving arguments" such as for captions.
|
% but needs protection in "moving arguments" such as for captions.
|
||||||
% Use \scantokens to handle e.g. \item[{\sphinxcode{'fontenc'}}]
|
% Use \scantokens to handle e.g. \item[{\sphinxcode{'fontenc'}}]
|
||||||
\DeclareRobustCommand{\sphinxcode}[1]{{\@noligs\scantokens{\texttt{#1}}}}
|
\DeclareRobustCommand{\sphinxcode}[1]{{\@noligs\scantokens{\texttt{#1}\relax}}}
|
||||||
\newcommand{\sphinxbfcode}[1]{\sphinxcode{\bfseries#1}}
|
\newcommand{\sphinxbfcode}[1]{\sphinxcode{\bfseries#1}}
|
||||||
\newcommand{\sphinxemail}[1]{\textsf{#1}}
|
\newcommand{\sphinxemail}[1]{\textsf{#1}}
|
||||||
\newcommand{\sphinxtablecontinued}[1]{\textsf{#1}}
|
\newcommand{\sphinxtablecontinued}[1]{\textsf{#1}}
|
||||||
@ -909,6 +909,6 @@
|
|||||||
}
|
}
|
||||||
% robustified case needs special treatment
|
% robustified case needs special treatment
|
||||||
\newcommand\code{}\let\code\relax
|
\newcommand\code{}\let\code\relax
|
||||||
\DeclareRobustCommand{\code}[1]{{\@noligs\scantokens{\texttt{#1}}}}
|
\DeclareRobustCommand{\code}[1]{{\@noligs\scantokens{\texttt{#1}\relax}}}
|
||||||
\def\sphinxcode{\code}%
|
\def\sphinxcode{\code}%
|
||||||
\fi
|
\fi
|
||||||
|
Loading…
Reference in New Issue
Block a user