mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Fix bug #13066
Patch from Lorenzo
(cherry picked from commit 0c70f340c0
)
This commit is contained in:
parent
160084af3c
commit
63b23ce288
@ -375,20 +375,7 @@ InsetLayout Listings
|
|||||||
NeedCProtect true
|
NeedCProtect true
|
||||||
RefPrefix lst
|
RefPrefix lst
|
||||||
EditExternal true
|
EditExternal true
|
||||||
HTMLTag pre
|
HTMLTag code
|
||||||
HTMLStyle
|
|
||||||
div.float-listings {
|
|
||||||
border: 2px solid black;
|
|
||||||
padding: 1ex;
|
|
||||||
margin: 1ex;
|
|
||||||
}
|
|
||||||
div.listings-caption {
|
|
||||||
text-align: center;
|
|
||||||
border: 2px solid black;
|
|
||||||
padding: 1ex;
|
|
||||||
margin: 1ex;
|
|
||||||
}
|
|
||||||
EndHTMLStyle
|
|
||||||
DocBookTag programlisting
|
DocBookTag programlisting
|
||||||
End
|
End
|
||||||
|
|
||||||
|
@ -440,9 +440,7 @@ void InsetListings::latex(otexstream & os, OutputParams const & runparams) const
|
|||||||
docstring InsetListings::xhtml(XMLStream & os, OutputParams const & rp) const
|
docstring InsetListings::xhtml(XMLStream & os, OutputParams const & rp) const
|
||||||
{
|
{
|
||||||
bool const isInline = params().isInline();
|
bool const isInline = params().isInline();
|
||||||
if (isInline)
|
if (!isInline) {
|
||||||
os << xml::CompTag("br");
|
|
||||||
else {
|
|
||||||
os << xml::StartTag("div", "class='float-listings'");
|
os << xml::StartTag("div", "class='float-listings'");
|
||||||
docstring caption = getCaptionHTML(rp);
|
docstring caption = getCaptionHTML(rp);
|
||||||
if (!caption.empty())
|
if (!caption.empty())
|
||||||
@ -466,9 +464,7 @@ docstring InsetListings::xhtml(XMLStream & os, OutputParams const & rp) const
|
|||||||
docstring def = InsetText::insetAsXHTML(os, newrp, InsetText::JustText);
|
docstring def = InsetText::insetAsXHTML(os, newrp, InsetText::JustText);
|
||||||
os << xml::EndTag(tag);
|
os << xml::EndTag(tag);
|
||||||
|
|
||||||
if (isInline) {
|
if (!isInline) {
|
||||||
os << xml::CompTag("br");
|
|
||||||
} else {
|
|
||||||
if (!def.empty()) {
|
if (!def.empty()) {
|
||||||
os << '\n' << def;
|
os << '\n' << def;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user