# Richard Kimberly Heck <rikiheck@lyx.org>, Martin Vermeer <martin.vermeer@hut.fi> and probably others.
-Format 95
+Format 96
#
# GLOBAL SETTINGS
PassThru 1
EndArgument
LaTeXParam *
+ HTMLInToc 0
End
Style Subsection
PassThru 1
EndArgument
LaTeXParam *
+ HTMLInToc 0
End
Style Subsubsection
PassThru 1
EndArgument
LaTeXParam *
+ HTMLInToc 0
End
# Converted article -> egs Martin Vermeer
-Format 95
+Format 96
Columns 2
Sides 1
PageStyle Plain
Series Bold
# Size Larger
EndFont
+ HTMLInToc 0
End
Align Block
AlignPossible Block, Left, Right, Center
LabelType No_Label
+ HTMLInToc 0
End
# modifying the style of the regular sectioning layouts.
-Format 95
+Format 96
Style Part*
CopyStyle Part
Category Unnumbered
DocBookAttr "renderas='other' otherrenderas='part'"
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
DocBookAttr "renderas='other' otherrenderas='chapter'"
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
DocBookAttr renderas='sect1'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
DocBookAttr renderas='sect2'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
DocBookAttr renderas='sect3'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
DocBookAttr renderas='sect4'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
DocBookAttr renderas='sect5'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
+ HTMLInToc 0
End
# This script will update a .layout file to current format
# The latest layout format is also defined in src/TextClass.cpp
-currentFormat = 95
+currentFormat = 96
# Incremented to format 4, 6 April 2007, lasgouttes
# Incremented to format 95, 27 September 2021 by tcuvelier
# Add DocBookRenderAsImage
+# Incremented to format 96, 4 December 2022 by rikiheck
+# Add HTMLInToc
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
LT_TOGGLE_INDENT,
LT_ADDTOTOC,
LT_ISTOCCAPTION,
+ LT_HTMLINTOC,
LT_INTITLE // keep this last!
};
htmllabelfirst_ = false;
htmlforcecss_ = false;
htmltitle_ = false;
+ htmlintoc_ = true;
docbookabstract_ = false;
docbookwrappermergewithprevious_ = false;
docbooksection_ = false;
{ "freespacing", LT_FREE_SPACING },
{ "htmlattr", LT_HTMLATTR },
{ "htmlforcecss", LT_HTMLFORCECSS },
+ { "htmlintoc", LT_HTMLINTOC },
{ "htmlitem", LT_HTMLITEM },
{ "htmlitemattr", LT_HTMLITEMATTR },
{ "htmllabel", LT_HTMLLABEL },
break;
}
+ case LT_HTMLINTOC:
+ lex >> htmlintoc_;
+ break;
+
case LT_HTMLTAG:
lex >> htmltag_;
break;
///
std::string const & htmllabelattr() const;
///
+ bool htmlintoc() const { return htmlintoc_; }
+ ///
std::string defaultCSSClass() const;
///
bool htmllabelfirst() const { return htmllabelfirst_; }
/// <item><label>...</label>...</item>
/// The latter is the default.
bool htmllabelfirst_;
+ /// Is this to be output with the toc?
+ bool htmlintoc_;
/// CSS information needed by this layout.
docstring htmlstyle_;
/// DocBook tag corresponding to this layout.
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 95; // tcuvelier: DocBookRenderAsImage
+int const LAYOUT_FORMAT = 96; // rikiheck: HTMLInToc
// Layout format for the current lyx file format. Controls which format is
if (!tocitem.isOutput())
continue;
+ if (!tocitem.dit().paragraph().layout().htmlintoc())
+ continue;
+
// First, we need to manage increases and decreases of depth
// If there's no depth to deal with, we artificially set it to 1.
int const depth = tocitem.depth();
if (!tocitem.isOutput())
continue;
+ if (!tocitem.dit().paragraph().layout().htmlintoc())
+ continue;
+
xs << xml::StartTag("div", "class='lyxtoc-flat'") << xml::CR();
Paragraph const & par = tocitem.dit().innerParagraph();