> I think that first improving LyX length reading and then fixing the
> bug is the way to go.

In general having such a feature would be nice, it's now bug
http://bugzilla.lyx.org/show_bug.cgi?id=4490
but only implementing this for this special case is not needed in my opion, 
because:

Due to what I said in this post:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134383.html

> We forgot the following in our discussion: The width is only changed when the 
user has chosen
> exactly "1\columnwidth" or "1\linewidth", in all other cases nothing will be 
changed. And with
> the fix you now really get _exactly_ 1\columnwidth.
>
> So I'll commit the patch soon.

I put it in. Maybe you don't like this, but due to the reason above it _is_ safe. Of course I'll not touch branch.

> But, more than that, this shows that we should be very careful before
> introducing features in LyX where the output is hardcoded to some
> peculiar preference of the patch author. We should definitely not need
> out output hardcoded lengths to latex like we do.

But we don't do this. In this case, the width reduction is necessary. But this has to be done in general in LaTeX. When you want to have a box with exactly 1\columnwidth, you have to subtract the box frame width because the frame is outside a box. That this is not automatically is a design bug in LaTeX's box scheme and not ours. Whoever wrote this code in InsetBox.cpp did it correctly, besides the bug with "1.0" instead of "1".

> Also, I think that advocating using ERT very freely in many parts of
> the manuals is something we are eventually going to regret.

In the docs only the EmbeddedObjects and Extended manual refers to ERT when a feature is not available with normal LyX methods. As they are extended detailed manuals this is acceptable. We shouldn't hide special solutions from the users when LyX doesn't suport it without ERT. The concept of the EmbeddedObjects manual is to explain everything that has been asked on the lyx-users list, if possible. But in this case the patch saves a lot of ERT as you can now use the box dialog and don't have to create the whole box as ERT.

regards Uwe

Reply via email to