Problem: When using the dcolumn package to decimal align a column in
tabular, if you try to put an equation in the first row of that column as a
header, LyX generates an error.

I searched the archives and Herbert's page for this issue but could not find
a solution. After much trial and error, here is the solution I found:

dcolumn automatically puts everything in math mode, so by putting in a LyX
equation it generates another begin math command or $ which causes the

Workaround 1: Use ERT to enter your equation but leave off the $, e.g.
ERT:x_5, instead of $x_5$.

Workaround 2: Use multicolumn in Layout...Tabular. Just select the single
cell. Then you can enter a LyX equation with Ctrl-M.

The second option produces better results since it will center the equation
in the cell. The first option will try to align with a decimal in the
equation..if you don't have one it will align the end of the equation with
the decimal.

Steve Buonopane

Reply via email to