From: Richard Heck Date: Fri, 5 Aug 2016 02:43:17 +0000 (-0400) Subject: Fix XHTML export of German Additional Features manual. X-Git-Tag: 2.2.2~64 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=50162ebb1ea00fa77665aec8316f8fcfea810175;p=features.git Fix XHTML export of German Additional Features manual. There was an oddity in the manual that exposed a problem with the test for the "special case" of an inset all by itself in a pargraph. If a font change is applied to that inset, we still need to open the paragraph. (cherry picked from commit 3be23d18b64d1409d14e0c1c95f4192e9a23e543) --- diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 6e4343cbd7..d324fb5440 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -842,12 +842,28 @@ ParagraphList::const_iterator makeParagraphs(Buffer const & buf, // (i) the current layout permits multiple paragraphs // (ii) we are either not already inside a paragraph (HTMLIsBlock) OR // we are, but this is not the first paragraph - // But we do not want to open the paragraph tag if this paragraph contains + // + // But there is also a special case, and we first see whether we are in it. + // We do not want to open the paragraph tag if this paragraph contains // only one item, and that item is "inline", i.e., not HTMLIsBlock (such - // as a branch). That is the "special case" we handle first. + // as a branch). On the other hand, if that single item has a font change + // applied to it, then we still do need to open the paragraph. + // + // Obviously, this is very fragile. The main reason we need to do this is + // because of branches, e.g., a branch that contains an entire new section. + // We do not really want to wrap that whole thing in a
...
. + bool special_case = false; Inset const * specinset = par->size() == 1 ? par->getInset(0) : 0; - bool const special_case = - specinset && !specinset->getLayout().htmlisblock(); + if (specinset && !specinset->getLayout().htmlisblock()) { + Layout const & style = par->layout(); + FontInfo const first_font = style.labeltype == LABEL_MANUAL ? + style.labelfont : style.font; + FontInfo const our_font = + par->getFont(buf.masterBuffer()->params(), 0, + text.outerFont(distance(begin, par))).fontInfo(); + if (first_font == our_font) + special_case = true; + } bool const opened = runparams.html_make_pars && (!runparams.html_in_par || par != pbegin) diff --git a/status.22x b/status.22x index 0bb71442e1..3440869d73 100644 --- a/status.22x +++ b/status.22x @@ -109,6 +109,8 @@ What's new - Fix display of cases and matrices (bugs 8753, 8755). +- Fixed output of logos to the TOC. + * TEX2LYX