LaTeX: use Bjarne option of fncychap also if language is set to 'en' (#5776)

Closes: #5772
This commit is contained in:
Jean-François B 2018-12-15 11:37:56 +01:00 committed by GitHub
parent a5dcca53f8
commit 661fb1de59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -26,11 +26,14 @@ Incompatible changes
* LaTeX: Move message resources to ``sphinxmessage.sty``
* LaTeX: Stop using ``\captions<lang>`` macro for some labels
* LaTeX: for ``'xelatex'`` and ``'lualatex'``, use the ``FreeFont`` OpenType
fonts as default choice (refs #5645)
fonts as default choice (refs: #5645)
* LaTeX: Greek letters in text are not escaped to math mode mark-up, and they
will use the text font not the math font. The ``LGR`` font encoding must be
added to the ``'fontenc'`` key of :confval:`latex_elements` for this to work
(only if it is needed by the document, of course).
* LaTeX: setting the :confval:`language` to ``'en'`` triggered ``Sonny`` option
of ``fncychap``, now it is ``Bjarne`` to match case of no language specified.
(refs: #5772)
Deprecated
----------
@ -101,6 +104,8 @@ Bugs fixed
language and ``'xelatex'`` or ``'lualatex'`` as :confval:`latex_engine`
(refs: #5251)
* #5248: LaTeX: Greek letters in section titles disappear from PDF bookmarks
* #5772: LaTeX: should the Bjarne style of fncychap be used for English also
if passed as language option?
Testing
--------

View File

@ -2094,6 +2094,8 @@ information.
"fncychap" styles you can try are "Lenny", "Glenn", "Conny", "Rejne" and
"Bjornstrup". You can also set this to ``''`` to disable fncychap.
The default is ``''`` for Japanese documents.
``'preamble'``
Additional preamble content, default empty. See :doc:`/latex`.

View File

@ -592,9 +592,9 @@ class LaTeXTranslator(SphinxTranslator):
self.elements['logo'] = '\\sphinxincludegraphics{%s}\\par' % \
path.basename(self.config.latex_logo)
if (self.config.language and self.config.language != 'ja' and
if (self.config.language not in {None, 'en', 'ja'} and
'fncychap' not in self.config.latex_elements):
# use Sonny style if any language specified
# use Sonny style if any language specified (except English)
self.elements['fncychap'] = ('\\usepackage[Sonny]{fncychap}\n'
'\\ChNameVar{\\Large\\normalfont'
'\\sffamily}\n\\ChTitleVar{\\Large'