: InsetCollapsible(buf), name_(name), labelstring_(docstring()),
font_(inherit_font), labelfont_(inherit_font), decoration_(string()),
pass_thru_context_(false), pass_thru_local_(false), pass_thru_(false),
- pass_thru_chars_(docstring())
+ pass_thru_chars_(docstring()), is_toc_caption_(false)
{}
decoration_ = (*lait).second.decoration;
pass_thru_chars_ = (*lait).second.pass_thru_chars;
pass_thru_local_ = false;
- if (lait->second.is_toc_caption)
+ if (lait->second.is_toc_caption) {
+ is_toc_caption_ = true;
// empty if AddToToc is not set
caption_of_toc_ = insetlayout
? it.inset().getLayout().tocType()
: it.paragraph().layout().tocType();
+ }
switch ((*lait).second.passthru) {
case PT_INHERITED:
runparams.pass_thru = isPassThru();
InsetText::latex(ots, runparams);
TexString ts = ots.release();
- bool const add_braces = ldelim != "{" && support::contains(ts.str, rdelim);
+ bool const add_braces = !ldelim.empty() && ldelim != "{"
+ && support::contains(ts.str, rdelim);
os << ldelim;
if (add_braces)
os << '{';