mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3294: `add_latex_package()
` make crashes non-LaTeX builders
This commit is contained in:
parent
cb5c457b89
commit
54cac94cdf
2
CHANGES
2
CHANGES
@ -18,6 +18,8 @@ Bugs fixed
|
||||
attributes of Enum class correctly.
|
||||
* #3261: ``latex_use_parts`` makes sphinx crash
|
||||
* The warning type ``misc.highlighting_failure`` does not work
|
||||
* #3294: ``add_latex_package()`` make crashes non-LaTeX builders
|
||||
|
||||
|
||||
Release 1.5.1 (released Dec 13, 2016)
|
||||
=====================================
|
||||
|
@ -806,6 +806,7 @@ class Sphinx(object):
|
||||
|
||||
def add_latex_package(self, packagename, options=None):
|
||||
self.debug('[app] adding latex package: %r', packagename)
|
||||
if hasattr(self.builder, 'usepackages'): # only for LaTeX builder
|
||||
self.builder.usepackages.append((packagename, options))
|
||||
|
||||
def add_lexer(self, alias, lexer):
|
||||
|
Loading…
Reference in New Issue
Block a user