ParagraphList::const_iterator const & pbegin,
ParagraphList::const_iterator const & pend)
{
+ LyXLayout_ptr const & defaultstyle = buf.params().getLyXTextClass().defaultLayout();
for(ParagraphList::const_iterator par = pbegin; par != pend; ++par) {
- sgml::openTag(buf, os, *par);
- par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs));
- sgml::closeTag(os, *par);
- os << '\n';
+ if (par->layout() == defaultstyle && par->emptyTag()) {
+ par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs));
+ } else {
+ sgml::openTag(buf, os, runparams, *par);
+ par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs));
+ sgml::closeTag(os, *par);
+ os << '\n';
+ }
}
return pend;
}
string item_tag;
// Opening outter tag
- sgml::openTag(buf, os, *pbegin);
+ sgml::openTag(buf, os, runparams, *pbegin);
os << '\n';
- if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->innertag() == "CDATA")
+ if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru)
os << "<![CDATA[";
while (par != pend) {
LyXLayout_ptr const & style = par->layout();
ParagraphList::const_iterator send;
- string id = par->getID();
+ string id = par->getID(buf, runparams);
string wrapper = "";
pos_type sep = 0;
// Opening inner tag
switch (bstyle->latextype) {
case LATEX_ENVIRONMENT:
- if (!bstyle->innertag().empty() and bstyle->innertag() != "CDATA") {
+ if (!bstyle->innertag().empty()) {
sgml::openTag(os, bstyle->innertag(), id);
}
break;
// Closing inner tag
switch (bstyle->latextype) {
case LATEX_ENVIRONMENT:
- if (!bstyle->innertag().empty() and bstyle->innertag() != "CDATA") {
+ if (!bstyle->innertag().empty()) {
sgml::closeTag(os, bstyle->innertag());
os << '\n';
}
}
}
- if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->innertag() == "CDATA")
+ if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru)
os << "]]>";
// Closing outter tag
LyXLayout_ptr const & bstyle = par->layout();
//Open outter tag
- sgml::openTag(buf, os, *pbegin);
+ sgml::openTag(buf, os, runparams, *pbegin);
os << '\n';
// Label around sectioning number: