mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Update the XHTML output for InsetFloatList. We'll now use an
InsetLayout to style it.
This commit is contained in:
parent
1f6f5d2d53
commit
df1af5df47
@ -48,3 +48,19 @@ Float
|
||||
UsesFloatPkg true
|
||||
RefPrefix alg
|
||||
End
|
||||
|
||||
|
||||
InsetLayout FloatList
|
||||
HTMLStyle
|
||||
a.lyxtoc-floats {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
a.lyxtoc-floats:visited { color: black; }
|
||||
div.lyxtoc-floats {
|
||||
margin: 0em 0em 0.1em 1em;
|
||||
font-size: large;
|
||||
font-weight: normal;
|
||||
}
|
||||
EndHTMLStyle
|
||||
End
|
||||
|
@ -234,7 +234,7 @@ docstring InsetFloatList::xhtml(XHTMLStream &, OutputParams const & op) const {
|
||||
}
|
||||
|
||||
string const tocclass = lay ? " " + lay->defaultCSSClass(): "";
|
||||
string const tocattr = "class='tochead + toc-" + toctype + " " + tocclass + "'";
|
||||
string const tocattr = "class='tochead toc-" + toctype + tocclass + "'";
|
||||
|
||||
// we'll use our own stream, because we are going to defer everything.
|
||||
// that's how we deal with the fact that we're probably inside a standard
|
||||
@ -242,7 +242,7 @@ docstring InsetFloatList::xhtml(XHTMLStream &, OutputParams const & op) const {
|
||||
odocstringstream ods;
|
||||
XHTMLStream xs(ods);
|
||||
|
||||
xs << html::StartTag("div", "class='toc'");
|
||||
xs << html::StartTag("div", "class='toc toc-floats'");
|
||||
xs << html::StartTag("div", tocattr)
|
||||
<< toclabel
|
||||
<< html::EndTag("div");
|
||||
@ -251,15 +251,11 @@ docstring InsetFloatList::xhtml(XHTMLStream &, OutputParams const & op) const {
|
||||
Toc::const_iterator const en = toc.end();
|
||||
for (; it != en; ++it) {
|
||||
Paragraph const & par = it->dit().innerParagraph();
|
||||
string const attr = "class='lyxtoc-" + toctype + "'";
|
||||
Font const dummy;
|
||||
string const attr = "class='lyxtoc-floats lyxtoc-" + toctype + "'";
|
||||
xs << html::StartTag("div", attr);
|
||||
string const parattr = "href='#" + par.magicLabel() + "' class='tocarrow'";
|
||||
xs << it->str() << " "
|
||||
<< html::StartTag("a", parattr)
|
||||
// FIXME XHTML
|
||||
// There ought to be a simple way to customize this.
|
||||
<< XHTMLStream::ESCAPE_NONE << ">"
|
||||
string const parattr = "href='#" + par.magicLabel() + "' class='lyxtoc-floats'";
|
||||
xs << html::StartTag("a", parattr)
|
||||
<< it->str()
|
||||
<< html::EndTag("a");
|
||||
xs << html::EndTag("div");
|
||||
}
|
||||
@ -271,6 +267,13 @@ docstring InsetFloatList::xhtml(XHTMLStream &, OutputParams const & op) const {
|
||||
void InsetFloatList::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
features.useFloat(to_ascii(getParam("type")));
|
||||
features.useInsetLayout(getLayout());
|
||||
}
|
||||
|
||||
|
||||
docstring InsetFloatList::layoutName() const
|
||||
{
|
||||
return "FloatList:" + getParam("type");
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,6 +69,8 @@ private:
|
||||
//@{
|
||||
///
|
||||
Inset * clone() const { return new InsetFloatList(*this); }
|
||||
///
|
||||
docstring layoutName() const;
|
||||
//@}
|
||||
|
||||
/// \name Private functions inherited from InsetCommand class
|
||||
|
Loading…
Reference in New Issue
Block a user