]> git.lyx.org Git - lyx.git/commitdiff
Use InsetLayout to get the tag type for TOC-like things.
authorRichard Heck <rgheck@lyx.org>
Wed, 27 Mar 2013 23:51:49 +0000 (19:51 -0400)
committerRichard Heck <rgheck@lyx.org>
Thu, 28 Mar 2013 00:03:32 +0000 (20:03 -0400)
lib/layouts/stdfloats.inc
lib/layouts/stdinsets.inc
src/insets/InsetFloatList.cpp
src/insets/InsetTOC.cpp

index bb6a1de870767929bee376323a6d5fbc71f3aa88..68847687e88d5ee4d7442ee6dce01229237355db 100644 (file)
@@ -51,6 +51,7 @@ End
 
 
 InsetLayout FloatList
+  HTMLTag h2
   HTMLStyle
     a.lyxtoc-floats { 
       text-decoration: none; 
index c247f13b77c55681fc48b3977b34a24f852b290f..8a248dfeac815e39c5d3d943f671c1e0ab697383 100644 (file)
@@ -181,6 +181,7 @@ InsetLayout IPADeco
 End
 
 InsetLayout TOC
+  HTMLTag h2
   HTMLStyle
     div.toc {
       margin: 2em 0em;
@@ -188,7 +189,7 @@ InsetLayout TOC
       border-width: 2px 0px;
       padding: 1em 0em;
     }
-    div.tochead { font-size: x-large; font-weight: bold; }
+    h2.tochead { font-size: x-large; font-weight: bold; }
     div.lyxtoc-0 {
       margin: 2em 0em 0em 0em;
       font-size: xx-large;
@@ -231,6 +232,7 @@ InsetLayout TOC:Listings
        LangPreamble
                \renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}
        EndLangPreamble
+  HTMLTag h2
   HTMLStyle
     div.lyxtoc-flat {
       margin: 0em 0em 0em 1em;
index f477c649dc648da1944241e9da9b514561405c72..981503f9df4931f9fac68f5f68fc522efbfd6799 100644 (file)
@@ -242,10 +242,12 @@ docstring InsetFloatList::xhtml(XHTMLStream &, OutputParams const & op) const {
        odocstringstream ods;
        XHTMLStream xs(ods);
 
+       InsetLayout const & il = getLayout();
+       string const & tag = il.htmltag();
        xs << html::StartTag("div", "class='toc toc-floats'");
-       xs << html::StartTag("div", tocattr) 
+       xs << html::StartTag(tag, tocattr)
                 << toclabel 
-                << html::EndTag("div");
+                << html::EndTag(tag);
        
        Toc::const_iterator it = toc.begin();
        Toc::const_iterator const en = toc.end();
index 331153b94c829f97e62712cd569f4b01e4cac1d6..07efc6509fc1fd45c8f378dd2502d223f9b5f87e 100644 (file)
@@ -249,13 +249,15 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
        xs << html::StartTag("div", "class='toc'");
 
        // Title of TOC
+       InsetLayout const & il = getLayout();
+       string const & tag = il.htmltag();
        docstring title = screenLabel();
        Layout const & lay = buffer().params().documentClass().htmlTOCLayout();
        string const & tocclass = lay.defaultCSSClass();
        string const tocattr = "class='tochead " + tocclass + "'";
-       xs << html::StartTag("div", tocattr)
+       xs << html::StartTag(tag, tocattr)
                 << title
-                << html::EndTag("div");
+                << html::EndTag(tag);
 
        // with lists of listings, at least, there is no depth
        // to worry about. so the code can be simpler.