views:

11

answers:

1

When I put numbers in tables I generally want them to be right justified and in a fixed width font. Otherwise the numbers become hard to compare.

Is there a way to right justify fields within a table?

Eg how do I get this to render with the numbers all right justified?

.. csv-table::    
   :header: x, x*x
   3,9
   4,16
   9,81    
   10,100
A: 

The best solution I have found so far is to use sphinx: http://sphinx.pocoo.org/

This supports the tabularcolumns directive, this does the right thing with latex output.

.. tabularcolumns:: |r|r|
.. csv-table::    
   :header: x, x*x
   3,9
   4,16
   9,81    
   10,100
John Gill