if (nextraw_) {
os_ << c;
nextraw_ = false;
- } else
- os_ << html::escapeChar(c);
+ } else {
+ string const d = html::escapeChar(c);
+ os_ << from_ascii(d);
+ }
return *this;
}
}
-void openTag(XHTMLStream & xs, Layout const & lay, ParagraphParameters const & params)
+void openTag(XHTMLStream & xs, Layout const & lay,
+ ParagraphParameters const & params)
{
// FIXME Are there other things we should handle here?
string const align = alignmentToCSS(params.align());
}
+void openItemTag(XHTMLStream & xs, Layout const & lay,
+ ParagraphParameters const & params)
+{
+ // FIXME Are there other things we should handle here?
+ string const align = alignmentToCSS(params.align());
+ if (align.empty()) {
+ openItemTag(xs, lay);
+ return;
+ }
+ string attrs = lay.htmlattr() + " style='text-align: " + align + ";'";
+ xs << html::StartTag(lay.htmlitemtag(), attrs);
+}
+
+
inline void closeItemTag(XHTMLStream & xs, Layout const & lay)
{
xs << html::EndTag(lay.htmlitemtag());
bool const labelfirst = style.htmllabelfirst();
if (!labelfirst)
- openItemTag(xs, style);
+ openItemTag(xs, style, par->params());
// label output
if (style.labeltype != LABEL_NO_LABEL &&
} // end label output
if (labelfirst)
- openItemTag(xs, style);
+ openItemTag(xs, style, par->params());
par->simpleLyXHTMLOnePar(buf, xs, runparams,
text.outerFont(distance(begin, par)), sep);
if (!style.counter.empty())
buf.params().documentClass().counters().step(style.counter, OutputUpdate);
- openTag(xs, style);
+ openTag(xs, style, pbegin->params());
// Label around sectioning number:
// FIXME Probably need to account for LABEL_MANUAL