mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Fix display of code listings in XHTML.
Fixes bug #8362.
(cherry picked from commit ab3a49973f
)
This commit is contained in:
parent
1bcede451a
commit
5fa071ec1e
@ -313,6 +313,19 @@ InsetLayout Listings
|
||||
ForceLTR true
|
||||
RefPrefix lst
|
||||
HTMLTag pre
|
||||
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
|
||||
End
|
||||
|
||||
InsetLayout Branch
|
||||
|
@ -272,10 +272,10 @@ docstring InsetListings::xhtml(XHTMLStream & os, OutputParams const & rp) const
|
||||
if (isInline)
|
||||
out << html::CompTag("br");
|
||||
else {
|
||||
out << html::StartTag("div", "class='float float-listings'");
|
||||
out << html::StartTag("div", "class='float-listings'");
|
||||
docstring caption = getCaptionHTML(rp);
|
||||
if (!caption.empty())
|
||||
out << html::StartTag("div", "class='float-caption'")
|
||||
out << html::StartTag("div", "class='listings-caption'")
|
||||
<< XHTMLStream::ESCAPE_NONE
|
||||
<< caption << html::EndTag("div");
|
||||
}
|
||||
@ -371,6 +371,7 @@ docstring const InsetListings::buttonLabel(BufferView const & bv) const
|
||||
void InsetListings::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
features.require("listings");
|
||||
features.useInsetLayout(getLayout());
|
||||
string param_string = params().params();
|
||||
if (param_string.find("\\color") != string::npos)
|
||||
features.require("color");
|
||||
|
@ -93,6 +93,8 @@ What's new
|
||||
|
||||
- Use scaling factor for export of images (bug 8742).
|
||||
|
||||
- Fix display of listings (bug 8362).
|
||||
|
||||
|
||||
* TEX2LYX
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user