From: Richard Heck Date: Sat, 6 Jun 2009 04:09:14 +0000 (+0000) Subject: Now we can restore the old (and better) behavior of descriptions. X-Git-Tag: 2.0.0~6372 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9577dae301866e69016c26300826114a611ea779;p=features.git Now we can restore the old (and better) behavior of descriptions. The CSS for lists isn't quite right, but I'm not sure what to do. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29984 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/layouts/stdlists.inc b/lib/layouts/stdlists.inc index cfa828252f..1cbf2cb94d 100644 --- a/lib/layouts/stdlists.inc +++ b/lib/layouts/stdlists.inc @@ -71,10 +71,14 @@ Style Description LabelFont Series Bold EndFont - HTMLTag ol - HTMLItem li - HTMLLabel span - HTMLLabelAttr class='desc' + HTMLTag dl + HTMLAttr class='description' + HTMLItem dd + HTMLLabel dt + HTMLLabelFirst 1 + HTMLStyle + dl.description dt { font-weight: bold; } + EndHTMLStyle End diff --git a/src/Layout.cpp b/src/Layout.cpp index 85af8a73fd..32f565297e 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -139,6 +139,7 @@ Layout::Layout() pass_thru = false; toclevel = NOT_IN_TOC; commanddepth = 0; + htmllabelfirst_ = false; } diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index ea63964479..618c551a03 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -881,7 +881,6 @@ int InsetCollapsable::xhtml(odocstream & os, OutputParams const & runparams) con bool const opened = html::openTag(os, il.htmltag(), il.htmlattr()); if (!il.counter().empty()) { // FIXME Master buffer? - LYXERR0(il.counter()); Counters & cntrs = buffer().params().documentClass().counters(); cntrs.step(il.counter()); if (!il.htmllabel().empty()) diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 3e212ae945..5021d4bac0 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -252,7 +252,10 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, closeItemTag(os, *lastlay); lastlay = 0; } - bool const item_tag_opened = openItemTag(os, cstyle); + bool const labelfirst = cstyle.htmllabelfirst(); + bool item_tag_opened; + if (!labelfirst) + item_tag_opened = openItemTag(os, cstyle); if (cstyle.labeltype == LABEL_MANUAL) { bool const label_tag_opened = openLabelTag(os, cstyle); sep = par->firstWordLyXHTML(os, runparams); @@ -269,9 +272,14 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, closeLabelTag(os, cstyle); os << '\n'; } - + if (labelfirst) + item_tag_opened = openItemTag(os, cstyle); + else + os << ""; par->simpleLyXHTMLOnePar(buf, os, runparams, outerFont(distance(paragraphs.begin(), par), paragraphs), sep); + if (!labelfirst) + os << ""; ++par; if (item_tag_opened) { // We may not want to close the tag yet, in particular, @@ -361,7 +369,6 @@ void xhtmlParagraphs(ParagraphList const & paragraphs, ParagraphList::const_iterator pend = paragraphs.end(); while (par != pend) { - LYXERR0(par->id()); Layout const & style = par->layout(); ParagraphList::const_iterator lastpar = par; ParagraphList::const_iterator send;