Series Bold
Size Huge
EndFont
- TocLevel 1
+ TocLevel 1
End
Series Bold
Size Larger
EndFont
- TocLevel 2
+ TocLevel 2
End
Series Bold
Size Large
EndFont
- TocLevel 3
+ TocLevel 3
End
Series Bold
Size Normal
EndFont
- TocLevel 4
+ TocLevel 4
End
Size Normal
Shape Italic
EndFont
- TocLevel 5
+ TocLevel 5
End
LabelString "Short Title|S"
Tooltip "The part as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
NeedProtect 1
NextNoIndent 1
LabelString "Short Title|S"
Tooltip "The section as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Family Roman
LabelString "Short Title|S"
Tooltip "The subsection as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Family Roman
LabelString "Short Title|S"
Tooltip "The subsubsection as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Family Roman
Size largest
EndFont
AutoInsert 1
+ IsTocCaption 1
EndArgument
End
Argument 1
LabelString "Short Title|S"
Tooltip "The title as it appears in the header"
- InsertCotext 1
+ InsertCotext 1
+ IsTocCaption 1
EndArgument
ParSkip 0.4
TopSep 1.3
Series Bold
Size Normal
EndFont
- TocLevel 1
+ TocLevel 1
End
# Subsection style definition
Series Bold
Size Normal
EndFont
- TocLevel 2
+ TocLevel 2
End
# Subsubsection style definition
Series Bold
Size Normal
EndFont
- TocLevel 3
+ TocLevel 3
End
# Section* style definition
Family Sans
Series Bold
EndFont
- TocLevel 1
+ TocLevel 1
Argument 1
LabelString "Short Title|S"
Tooltip "The section as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
End
LabelString "Short Title|S"
Tooltip "The part as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Series Bold
LabelString "Short Title|S"
Tooltip "The chapter as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Series Bold
LabelString "Short Title|S"
Tooltip "The section as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Series Bold
Mandatory 1
LabelString "Part Title"
Tooltip "Title of this part"
+ IsTocCaption 1
EndArgument
Preamble
\newenvironment{svmultpartbacktext}[1]{\begin{partbacktext}
RefPrefix chap
Argument 1
LabelString "Short Title|S"
- Tooltip "The chapter as it appears in the table of contents/running headers"
+ Tooltip "The chapter as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Series Bold
RefPrefix sec
Argument 1
LabelString "Short Title|S"
- Tooltip "The section as it appears in the table of contents/running headers"
+ Tooltip "The section as it appears in the table of contents/running headers"
InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Series Bold
Argument 1
LabelString "Short Title|S"
Tooltip "The part as it appears in the table of contents/running headers"
- InsertCotext 1
+ InsertCotext 1
+ IsTocCaption 1
EndArgument
Font
Series Bold
: 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:
///
bool isPassThru() const { return pass_thru_; }
///
+ bool isTocCaption() const { return is_toc_caption_; }
+ ///
bool resetFontEdit() const { return false; }
//@}
/// \name Public functions inherited from InsetCollapsible class
bool pass_thru_;
///
docstring pass_thru_chars_;
+ /// Does this argument provide content for the TOC?
+ bool is_toc_caption_;
/// The type of Toc this is the caption of, empty otherwise.
std::string caption_of_toc_;
addtotoc_stack.push({pit, end});
}
- // if we find an optarg, we'll save it for use later.
+ // If we find an InsetArgument that is supposed to provide the TOC caption,
+ // we'll save it for use later.
InsetArgument const * arginset = nullptr;
for (auto const & table : par.insetList()) {
dit.pos() = table.pos;
table.inset->addToToc(dit, doing_output, utype, backend);
if (InsetArgument const * x = table.inset->asInsetArgument())
- arginset = x;
+ if (x->isTocCaption())
+ arginset = x;
}
// End custom AddToToc in paragraph layouts