diff --git a/CHANGES b/CHANGES index e45957afcfe..29bf3ab2a0a 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ Bugs fixed * #2456: C++, fix crash related to document merging (e.g., singlehtml and Latex builders). * #2446: latex(pdf) sets local tables of contents (or more generally topic nodes) in unbreakable boxes, causes overflow at bottom * #2476: Omit MathJax markers if :nowrap: is given +* #2465: latex builder fails in case no caption option is provided to toctree directive Release 1.4.1 (released Apr 12, 2016) diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py index f3e64bcb1e4..ac26e33c9a5 100644 --- a/sphinx/builders/latex.py +++ b/sphinx/builders/latex.py @@ -137,7 +137,7 @@ def get_contentsname(self, indexfile): tree = self.env.get_doctree(indexfile) contentsname = None for toctree in tree.traverse(addnodes.toctree): - if toctree['caption']: + if 'caption' in toctree: contentsname = toctree['caption'] break