AASJournals / AASTeX60

Version 6 of the LaTeX style files and documentation for authoring AAS Journal (AJ/ApJ) articles.
https://journals.aas.org/aastex-package-for-manuscript-preparation/
LaTeX Project Public License v1.3c
46 stars 26 forks source link

Style `linenumbers` not compatible tabularx #150

Open Nicholaswogan opened 1 year ago

Nicholaswogan commented 1 year ago

The following code does not compile

\documentclass[linenumbers]{aastex63}
\usepackage{tabularx} 

\begin{document}

\begin{table}
\centering
\begin{tabularx}{0.8\textwidth} {p{0.3\linewidth} | p{0.1\linewidth} | p{0.3\linewidth}}
 \hline
 item 11 & item 12 & item 13 \\
 item 21  & item 22  & item 23  \\
\hline
\end{tabularx}
\end{table}

\end{document}

However, the code does compile if I use \documentclass[preprint]{aastex63}, or instead I use the default article style:

\documentclass{article}
\usepackage{tabularx} 
\usepackage{lineno}
\linenumbers

\begin{document}

\begin{table}
\centering
\begin{tabularx}{0.8\textwidth} {p{0.3\linewidth} | p{0.1\linewidth} | p{0.3\linewidth}}
 \hline
 item 11 & item 12 & item 13 \\
 item 21  & item 22  & item 23  \\
\hline
\end{tabularx}
\end{table}

\end{document}
augustfly commented 1 year ago

Right, but the problem is not the one you think it is. The conflict is not with tabularx.

The problem is related to #149 -- latex's new implementation of array.sty breaks when you use p{} styles and AASTeX (the conflict is actually with revtex4-1.

It is interesting (and very useful) that you've shown that the problem is related to the lineno package and not to some other issue. This means that when we don't need linenumbers we don't need the new array.sty inorder to use p{} column formats.

The solution is in #149 -- use the old version of array.sty.