2
$\begingroup$

Form a table such as:

 data = Transpose[{Range[0, 5], RandomReal[{-5, 5}, 6]}];

Display it by wrapping with TableForm.

Is there some way to align the 2nd column on the decimal point and yet still be able to style the entries' font properties?

In other words, some way to combine the TableAlignments -> "." option of TableForm and apply Style or Text to the entries?

$\endgroup$
3
$\begingroup$

If it is enough to apply a uniform style to the whole table, then that can be achieved after applying TableForm:

data = Transpose[{Range[9, 14], RandomReal[{-5, 20}, 6]}];
Style[
 TableForm[data, TableAlignments -> "."],
 Red, FontFamily -> "Times New Roman", FontSize -> 23
]

Mathematica graphics

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Perfect! (And the one possibility I didn't think of.) I note that the same things works on an entire Grid, too (which is what I had originally wanted to use so as to better control the frame and dividers. $\endgroup$ – murray Jul 21 '15 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.