From 88322af1eaddaf72660c710e23fd3c6754d12f58 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 22 Apr 2016 11:05:12 +0900 Subject: [PATCH] #2465: latex builder fails in case no caption option is provided to toctree directive --- CHANGES | 1 + sphinx/builders/latex.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e45957afc..29bf3ab2a 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 f3e64bcb1..ac26e33c9 100644 --- a/sphinx/builders/latex.py +++ b/sphinx/builders/latex.py @@ -137,7 +137,7 @@ class LaTeXBuilder(Builder): 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