On Sat, May 12, 2001 at 10:35:01PM -0400, Kevin Gross wrote:
> Hi all,
> 
> I've got a set of tabular data. A considerable amount of the numbers are 
> negative. I can easily create a table of the appropriate dimensions in lyx 
> and paste in my data from an editor. However, in the final output, the 
> negative numbers are preceded by a dash instead of the more appropriate and 
> visually pleasing minus sign. Of course, this can be remedied by typing in 
> the negative numbers in math mode. But is there an easier way to tell LyX 
> that the numbers in the table are to be in math mode? Perhaps a script that 
> would place $'s around the numbers would work?

It is probably easy to write a script that converts a tab separated table
into a latex table, which can then be included into LyX (using the input
inset) or reLyXed and then inserted into lyx.

Another solution is to use the following LaTeX code:
Put the following in the preamble:

\usepackage{array}
\newcolumntype{C}{>{$}c<{$}}
\newcolumntype{R}{>{$}r<{$}}
\newcolumntype{L}{>{$}l<{$}}

and then for each column in the table, set the alignment (in the special
column area) to C (or R or L).
This tell latex to typeset all cell in math mode (so you need to put \mbox
in cells which you don't want in math mode).

Reply via email to