I am trying to use siunitx in an emulateapj document, however it reports a conflict of command:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "xparse/command-already-defined"
!
! Command '\tablenum' already defined!
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
generate by pdflatex of the following document:
\documentclass[apj]{emulateapj}
%\documentclass{aastex}
%\let\tablenum\relax
\usepackage{siunitx}
\begin{document}
\title{emulateapj with siunitx}
\author{Jerry Ma}
\begin{deluxetable}{rr}
\tabletypesize{\scriptsize}
\tablewidth{\the\columnwidth}
\tablecaption{\label{tab:test}
A dummy table}
\tablehead{\colhead{col1} &
\colhead{col2} \\
\colhead{\left(\si{\gram}\right)} &
\colhead{\left(\si{\milli\meter}\right)}
}
\startdata
80.76 & 50.4 \\
19.28 & 33.4 \\
\enddata
\tablecomments{siunitx doesn't work}
\end{deluxetable}
\end{document}
Naively I put the following just before I load siunitx:
\let\tablenum\relax
to solve the confliction. This time it compiles through (means I can see the output pdf file which contains a table as expected) but with errors like the following:
! Package array Error: Illegal pream-token (\lt@expand@linewidth@): `c' used.
See the array package documentation for explanation.
Type H <return> for immediate help.
...
l.13 \begin{deluxetable}{rr}
?
! Missing $ inserted.
<inserted text>
$
l.22 }
?
So, the question is, How could I make emulateapj to work with siunitx? Thank you in advance!
array
package (used bysiunitx
) you get the sameIllegal pream-token
error. Thearray
package is part of the core LaTeX tools set, so not working here is a big problem. Probably thedeluxtable
environment has its own internals that are distinct from the standardtabular
set up, which will break witharray
.deluxetable
environment tweakslongtable
in order to get tables as wide as the text column. Why would anybody do this is beyond my understanding.