Jean-Marc Lasgouttes wrote:

> Le 20/10/2015 23:46, Uwe Stöhr a écrit :
>> Georg, attached are 2 documents, one created with LyX 2.1. where I used
>> the paragraph settings to center, one created with LyX 2.2. You see the
>> difference: The Paragraph-alignment added a paragraph of course leading
>> to whitespace one doesn't want in boxes.

Thanks, this was the kind of information I was missing.

>> That's why I implemented the alignment in LyX 2.2. as non-paragraph via
>> \raggedleft etc because a parbox or minibox is already its own paragraph.
> 
> Note that we already do something like that for tabular cells and floats
> (see corrected_end and noTrivlistCentering in Paragraph.cpp). It would
> be trivial to do that for boxes too (although I'd like to be sure that
> it is needed in all cases).
> 
> So solutions would be :
> 
> 1/ trivial: add BOX_CODE to noTrivlistCentering
> 
> 2/ configurable and semi-trivial: add a tag to insetlayout indicating
> the kind of alignment that is preferred for a given inset.
> 
> 3/ more configurable: take the above value as a default, but allow to
> change it from the paragraph layout dialog.

As far as I understand the different boxes, it is possible to determine the 
wanted behaviour automatically, so 3/ would be overkill IMHO. However, I am 
pretty sure that the setting would depend on the box parameters, so some 
research work is still needed.

Such a change would be a file format change (since it would change the 
amount of whitespace of existing documents), however a different one than 
489 which we were discussing before. Since nobody indicated interest in 
working on this so far, and Uwe is abroad again, I think we should postpone 
this. Unless somebody comes up with new information, or I get a veto by 
Scott, I will implement solution 2) of my previous message tomorrow, i.e. 
reverting the alignment handling in InsetBox.cpp (+ the corresponding 
changes in the enable/disable GUI logic, which I forgot to mention in the 
previous message).


Georg

Reply via email to