mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #7948 by not hardcoding XHTML info for captions but instead
using InsetLayout.
This commit is contained in:
parent
7821022ca0
commit
f623ded109
@ -632,6 +632,7 @@ InsetLayout Caption:FigCaption
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-figcaption'"
|
||||
End
|
||||
|
||||
|
||||
|
@ -215,6 +215,7 @@ InsetLayout Caption:Table
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-table'"
|
||||
End
|
||||
|
||||
|
||||
|
@ -263,6 +263,7 @@ InsetLayout Caption:Centered
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-centered'"
|
||||
End
|
||||
|
||||
|
||||
|
@ -363,6 +363,7 @@ InsetLayout Caption:Centered
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-centered'"
|
||||
End
|
||||
|
||||
|
||||
|
@ -61,4 +61,5 @@ InsetLayout Caption:Bicaption
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-bicaption'"
|
||||
End
|
||||
|
@ -279,6 +279,7 @@ InsetLayout Caption:Above
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-above'"
|
||||
End
|
||||
|
||||
|
||||
@ -298,6 +299,7 @@ InsetLayout Caption:Below
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-below'"
|
||||
End
|
||||
|
||||
|
||||
|
@ -486,6 +486,7 @@ InsetLayout Caption:Standard
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
HTMLAttr "class='float-caption float-caption-standard'"
|
||||
End
|
||||
|
||||
|
||||
|
@ -305,13 +305,18 @@ docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
|
||||
{
|
||||
if (rp.html_disable_captions)
|
||||
return docstring();
|
||||
string attr = "class='float-caption";
|
||||
if (!floattype_.empty())
|
||||
attr += " float-caption-" + floattype_;
|
||||
attr += "'";
|
||||
xs << html::StartTag("div", attr);
|
||||
InsetLayout const & il = getLayout();
|
||||
string const tag = il.htmltag();
|
||||
string attr = il.htmlattr();
|
||||
if (!type_.empty()) {
|
||||
string const our_class = "float-caption-" + type_;
|
||||
size_t const loc = attr.find("class='");
|
||||
if (loc != string::npos)
|
||||
attr.insert(loc + 1, our_class);
|
||||
}
|
||||
xs << html::StartTag(tag, attr);
|
||||
docstring def = getCaptionAsHTML(xs, rp);
|
||||
xs << html::EndTag("div");
|
||||
xs << html::EndTag(tag);
|
||||
return def;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user