On Fri, 14 Sep 2007 15:36:10 +0200 Helge Hafting <[EMAIL PROTECTED]> wrote:
... > > Here is a further patch, that Helge asked for (I think). It now does > > also non-fraction units (but still support is only partial). > > > > I am not entirely happy with this patch. It works allright, but... > > > I tested this. Mostly fine, but a few small problems: > > Using "unit" gives two math boxes. One for the numer and one > for the unit itself. This typesets very nice as \unit[45]{m} for example. > > "\unitfrac" supports a similiar optional argument for the number, but > that capability is not used in lyx. So we can now write > $35\unitfrac{km}{h}$ > but not > $\unitfrac[35]{km}{h}$ > The latter looks better, with better spacing. One can insert > the missing space explicitly, and get $35\,\unitfrac{km}{h} > which looks the same in the dvi. Yes, I know about this. This would require the frac inset to be modified to take a variable number (3 instead of 2) of cells. It is doable (I had even some prototype code), but shouldn't we first think this through at a more fundamental level? > Finally, is the fraction toolbar menu the right place for "unit", or does > this thing fit better in the font menu beside it? Arguably yes. Another thing is that to move between cells, you must now use cursor up/down. Makes sense for a "real" or even a "nice" fraction, but not here. Also this is fixable, but doing it within fractions becomes a bit kludgy. > Helge Hafting André, any ideas? - Martin