On 14/05/2010 9:39 AM, Edwin Leuven wrote:
On Fri, May 14, 2010 at 6:15 AM, Julien Rioux wrote:
Are you sure? I was able to have decimal alignment using the latex package
dcolumn without altering LyX source code. I would suggest you have a look
here:
i am aware of dcolumn, but for now think that it's better to split the
column on the decimal in the latex output basically for two reasons
1. we would need to pass the max nr of decimals to dcolumn
2. we need to correctly draw the aligned column in lyx
1 is not obvious/easy when the cell/column contains more than a single digit
dcolumn does not help with 2
and both 1 and 2 requires splitting the inset anyway
so i do not really see what we would gain by using dcolumn, in fact it
seems more complicated and we also introduce and extra package
dependency
ed.
Fair enough, but I think it should be done the latex way whenever
possible. Adding tabstops between a number and its decimal doesn't seem
like it.
By the way you can use "D{.}{.}{-1}" for the column format descriptor,
then you don't have to specify the number of decimal places.
Also your original post does not address the display in LyX, so point 2
does not discredit dcolumn any more than your other approach.
There is a problem in either case when it comes to formatting the header
row (or any row which is not a number). Using a multicolumn for that
particular row fixes it in both cases.
--
Julien