From d2acdcf3b1bbd4d3079cf6c4ff5de6ba6716fd06 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 11 Oct 2014 12:16:05 +0200 Subject: Empty entry in \tableofcontents in case e.g. section without description. In case a section, subsection etc just has a tag and not a description in the \tableofcontents there is nothing mentioned. With this patch the tag is used as description when no description is present, as is done on other places as well (consistency and no empty items in the \tableofcontents). --- src/definition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definition.cpp b/src/definition.cpp index d2e3e01..3c11916 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -1618,7 +1618,7 @@ void Definition::writeToc(OutputList &ol) } cs[0]='0'+nextLevel; if (inLi[nextLevel]) ol.writeString("\n"); - ol.writeString("
  • label+"\">"+si->title+""); + ol.writeString("
  • label+"\">"+(si->title.isEmpty()?si->label:si->title)+""); inLi[nextLevel]=TRUE; level = nextLevel; } -- cgit v0.12