On 02/10/2011 05:32 PM, Richard Heck wrote:
On 02/10/2011 06:03 AM, Jean-Marc Lasgouttes wrote:
Le 28/01/11 20:48, rgh...@lyx.org a écrit :
Author: rgheck
Date: Fri Jan 28 20:48:03 2011
New Revision: 37353
URL: http://www.lyx.org/trac/changeset/37353

Log:
Fix lyx2lyx problem with sweave files and ParBreakIsNewline.

Richard,

I was about to revert the workaround in sweave.lyx example file and I find that it does not work after all. Did you try the file

http://www.lyx.org/trac/export/37219/lyx-devel/trunk/lib/examples/sweave.lyx
?

I find that the R chunks do not get centered at all...

This is weird. Try this. Open the file in LyX. Now center things manually and save. Close and reopen. Not centered!! So it's not a lyx2lyx problem (you can look in the converted file and see all the centering stuff) but something that's happening somewhere else. Is it because this is within a figure?

The params are being read correctly. The problem is here:

void InsetText::fixParagraphsFont()
{
  Font font(inherit_font, buffer().params().language);
  font.setLanguage(latex_language);
  ParagraphList::iterator par = paragraphs().begin();
  ParagraphList::iterator const end = paragraphs().end();
  while (par != end) {
    if (par->isPassThru()) {
      par->resetFonts(font);
      par->params().clear();
    }
    ++par;
  }
}

This gets called at the end of InsetText::read(), and because we are PassThru, all the params get reset to their defaults. Hence, no centering.

Richard

Reply via email to