1 #LyX 1.1 created this file. For more info see http://www.lyx.org/
6 \newcolumntype{d}[1]{D{.}{.}{#1}}
12 \paperfontsize default
18 \paperorientation portrait
21 \paragraph_separation indent
23 \quotes_language english
27 \paperpagestyle default
31 A Better Decimal-Alignment Solution
34 An alternative way to have decimal alignment in tables is through the dcolumn
36 Add the following to the LateX preamble:
46 newcolumntype{d}[1]{D{.}{.}{#1}}
49 To have a column decimally aligned, enter in the
51 Special Column Alignment
60 d{number of decimals of the data}
63 In the following table we entered
69 \added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
95 \begin_inset Formula \( \pi \)
103 \begin_inset Formula \( \pi ^{\pi } \)
111 \begin_inset Formula \( (\pi ^{\pi })^{\pi } \)
119 \begin_inset Formula \( \pi ^{\pi ^{\pi }} \)
127 To create extra column space just increase the number of decimals in
132 Setting the multicolumn attribute for a single cell makes it insensitive
133 to the decimal alignment which comes in handy as well.
134 A drawback of this method is that math mode is not allowed in a column
135 with decimal alignment except if the multicolumn attribute is set.
138 This method offers the same flexibility as the
143 One could, for example, change the alignment separator, and have different
144 alignment separators for different columns by defining multiple column
145 types in the preamble.
146 The syntax is as follows:
149 D{inputsep}{outputsep}{decimal places}
152 The interested reader is directed towards the
156 package documentation for more details.