Dekel Tsur wrote: > On Sat, Dec 08, 2001 at 03:12:27PM +0100, Lars Gullik Bjønnes wrote: > >>Ok it seems that this patch solves the whole problem (buffer.C): >>@@ -388,12 +391,14 @@ bool Buffer::readLyXformat2(LyXLex & lex >> void Buffer::insertErtContents(Paragraph * par, int & pos, >>- LyXFont const & font, bool set_inactive) >>+ LyXFont const & f, bool set_inactive) >> { >> if (!ert_comp.contents.empty()) { >>- lyxerr[Debug::INSETS] << "ERT contents:\n" >>- << ert_comp.contents << endl; >>+ lyxerr[Debug::INSETS] << "ERT contents:\n'" >>+ << ert_comp.contents << "'" << endl; >> Inset * inset = new InsetERT(ert_comp.contents, true); >>+ LyXFont font; >>+ font.setLanguage(f.language()); >> par->insertInset(pos++, inset, font); >> ert_comp.contents.erase(); >> > > I think that this patch is wrong: The old code of insertErtContents is > correct, but the problem is that the wrong font is passed to it when the > method is called. > Consider the attached lyx file. The latex output should be abc in bold. > With the new code, the b is not bold (it was OK in the old code). It's a question of philosophy if the output is wrong or right! From my point of view it's okay, because ERT should be independent from lyx formatting. on the other hand, I have no problem to get all bold with the new code. The question is how you marked the characters as bold. Herbert -- http://www.lyx.org/help/
#LyX 1.2 created this file. For more info see http://www.lyx.org/ \lyxformat 220 \textclass article \language english \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize Default \paperpackage a4 \use_geometry 0 \use_amsmath 0 \use_natbib 0 \use_numerical_citations 0 \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 1 \paperpagestyle default \layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset ERT status Collapsed \layout Standard \backslash def \backslash foo#1{#1} \end_inset \layout Standard \series bold a \series default \begin_inset ERT status Collapsed \layout Standard \backslash foo{b} \end_inset \series bold c \layout Standard and now my version: \layout Standard \series bold a \begin_inset ERT status Collapsed \layout Standard \backslash foo{b} \end_inset c \the_end