mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
This commit is contained in:
commit
d1a427c51e
2
CHANGES
2
CHANGES
@ -121,6 +121,8 @@ Bugs fixed
|
||||
* #2718: Sphinx crashes if the document file is not readable
|
||||
* #2699: hyperlinks in help HTMLs are broken if `html_file_suffix` is set
|
||||
* #2723: extra spaces in latex pdf output from multirow cell
|
||||
* #2735: latexpdf ``Underfull \hbox (badness 10000)`` warnings from title page
|
||||
* #2667: latex crashes if resized images appeared in section title
|
||||
|
||||
|
||||
Release 1.4.4 (released Jun 12, 2016)
|
||||
|
@ -35,19 +35,19 @@
|
||||
% Change the title page to look a bit better, and fit in with the fncychap
|
||||
% ``Bjarne'' style a bit better.
|
||||
%
|
||||
\renewcommand{\maketitle}{
|
||||
\rule{\textwidth}{1pt}
|
||||
\renewcommand{\maketitle}{%
|
||||
\noindent\rule{\textwidth}{1pt}\ifsphinxpdfoutput\newline\null\fi\par
|
||||
\ifsphinxpdfoutput
|
||||
\begingroup
|
||||
% These \defs are required to deal with multi-line authors; it
|
||||
% changes \\ to ', ' (comma-space), making it pass muster for
|
||||
% generating document info in the PDF file.
|
||||
\def\\{, }
|
||||
\def\and{and }
|
||||
\def\\{, }%
|
||||
\def\and{and }%
|
||||
\pdfinfo{
|
||||
/Author (\@author)
|
||||
/Title (\@title)
|
||||
}
|
||||
}%
|
||||
\endgroup
|
||||
\fi
|
||||
\begin{flushright}
|
||||
|
@ -43,18 +43,18 @@
|
||||
\begin{titlepage}%
|
||||
\let\footnotesize\small
|
||||
\let\footnoterule\relax
|
||||
\rule{\textwidth}{1pt}%
|
||||
\noindent\rule{\textwidth}{1pt}\ifsphinxpdfoutput\newline\null\fi\par
|
||||
\ifsphinxpdfoutput
|
||||
\begingroup
|
||||
% These \defs are required to deal with multi-line authors; it
|
||||
% changes \\ to ', ' (comma-space), making it pass muster for
|
||||
% generating document info in the PDF file.
|
||||
\def\\{, }
|
||||
\def\and{and }
|
||||
\def\\{, }%
|
||||
\def\and{and }%
|
||||
\pdfinfo{
|
||||
/Author (\@author)
|
||||
/Title (\@title)
|
||||
}
|
||||
}%
|
||||
\endgroup
|
||||
\fi
|
||||
\begin{flushright}%
|
||||
|
@ -1391,7 +1391,14 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
if include_graphics_options:
|
||||
options = '[%s]' % ','.join(include_graphics_options)
|
||||
base, ext = path.splitext(uri)
|
||||
self.body.append('\\sphinxincludegraphics%s{{%s}%s}' % (options, base, ext))
|
||||
if self.in_title and base:
|
||||
# Lowercase tokens forcely because some fncychap themes capitalize
|
||||
# the options of \sphinxincludegraphics unexpectly (ex. WIDTH=...).
|
||||
self.body.append('\\lowercase{\\sphinxincludegraphics%s}{{%s}%s}' %
|
||||
(options, base, ext))
|
||||
else:
|
||||
self.body.append('\\sphinxincludegraphics%s{{%s}%s}' %
|
||||
(options, base, ext))
|
||||
self.body.extend(post)
|
||||
|
||||
def depart_image(self, node):
|
||||
|
@ -577,11 +577,12 @@ def test_image_in_section(app, status, warning):
|
||||
print(result)
|
||||
print(status.getvalue())
|
||||
print(warning.getvalue())
|
||||
assert ('\\chapter[Test section]'
|
||||
'{\\sphinxincludegraphics[width=15bp,height=15bp]{{pic}.png} Test section}'
|
||||
assert ('\\chapter[Test section]{\\lowercase{\\sphinxincludegraphics'
|
||||
'[width=15bp,height=15bp]}{{pic}.png} Test section}'
|
||||
in result)
|
||||
assert ('\\chapter[Other {[}blah{]} section]{Other {[}blah{]} '
|
||||
'\\sphinxincludegraphics[width=15bp,height=15bp]{{pic}.png} section}' in result)
|
||||
'\\lowercase{\\sphinxincludegraphics[width=15bp,height=15bp]}'
|
||||
'{{pic}.png} section}' in result)
|
||||
assert ('\\chapter{Another section}' in result)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user