mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
XHTML for InsetWrap.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30080 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
67e70c6c02
commit
9fcd1a6c6a
@ -12,7 +12,7 @@ Known issues:
|
||||
These insets are basically done, though there are probably issues here and there,
|
||||
and there are even some FIXMEs:
|
||||
Bibitem, Branch, Collapsable, Footnote, Hyperlink, Info, Label, Line,
|
||||
Marginal, Note, Newline, Newpage, Quotes, Space, SpecialChar
|
||||
Marginal, Note, Newline, Newpage, Quotes, Space, SpecialChar, Wrap
|
||||
|
||||
These insets do nothing for XHTML:
|
||||
ERT, OptArg, Phantom
|
||||
@ -70,8 +70,6 @@ These do not yet work and need some attention:
|
||||
InsetTOC: We should just be able to use what we have in the TOC. To get links to
|
||||
work, though, we'll need to co-ordinate the writing of anchors in the sections,
|
||||
which won't actually happen until later.
|
||||
InsetWrap: This should be simple enough, probably a div and some CSS, but I'm not sure
|
||||
precisely what this is supposed to do.
|
||||
|
||||
MATH
|
||||
Regarding math, the view seems to be that we should in the first instance just use what
|
||||
|
@ -294,6 +294,15 @@ InsetLayout Wrap
|
||||
Size Small
|
||||
EndFont
|
||||
MultiPar true
|
||||
HTMLStyle
|
||||
span.wrap {
|
||||
float: right;
|
||||
width: 40%;
|
||||
border: 2px solid black;
|
||||
padding: 1ex;
|
||||
margin: 1ex;
|
||||
}
|
||||
EndHTMLStyle
|
||||
End
|
||||
|
||||
InsetLayout URL
|
||||
|
@ -222,6 +222,20 @@ int InsetWrap::docbook(odocstream & os, OutputParams const & runparams) const
|
||||
}
|
||||
|
||||
|
||||
docstring InsetWrap::xhtml(odocstream &, OutputParams const & rp) const
|
||||
{
|
||||
string const len = params_.width.asHTMLString();
|
||||
docstring retval = from_ascii("<div class='wrap'");
|
||||
if (!len.empty())
|
||||
retval += from_ascii(" style='width: " + len + ";");
|
||||
retval += from_ascii("'>");
|
||||
odocstringstream os;
|
||||
docstring const deferred = InsetText::xhtml(os, rp);
|
||||
retval += os.str() + from_ascii("</div>");
|
||||
retval += deferred;
|
||||
}
|
||||
|
||||
|
||||
bool InsetWrap::insetAllowed(InsetCode code) const
|
||||
{
|
||||
switch(code) {
|
||||
|
@ -71,6 +71,8 @@ private:
|
||||
///
|
||||
int docbook(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
docstring xhtml(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
docstring editMessage() const;
|
||||
///
|
||||
bool insetAllowed(InsetCode) const;
|
||||
|
Loading…
Reference in New Issue
Block a user