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

\edit# breaks deluxetable #122

Open joeharr4 opened 3 years ago

joeharr4 commented 3 years ago

In deluxetables, the \edit1{} macro eats an alignment tab after it or else the newline and all alignment tabs on the next line. It behaves differently with and without longrotatetable. It behaves differently if font commands are used. The code below demonstrates a number of variations.

The code below compiles to produce this PDF:

edit1breakstables.pdf

There is some correct, non-compiling code after \end{document}. The docs place no restrictions on how to use \edit1{}.

Thanks,

--jh--

`\documentclass{aastex63}

\begin{document}

% This code should work. There are no documented restrictions to \edit1{}.

% With longrotatetable it compiles with no errors and produces wrong output. % Without longrotatetable it compiles with warnings, but text disappears altogether. \begin{longrotatetable} \begin{deluxetable}{llll} \tablehead{ \colhead{Col1} & \colhead{Col2} & \colhead{Col3}} \startdata Col1 & Col2 & Col3 \ \edit1{Col1} & Col2 & Col3 \ Col1 & \edit1{Col2} & Col3 \ Col1 & Col2 & \edit1{Col3} \ Col1 & \edit1{COl2} & Col3 \ \enddata \end{deluxetable} \end{longrotatetable}

% Add fonts and it's even worse. % Take out the longrotatetable and it won't compile. % Leave it in and it compiles wrong without errors. \begin{longrotatetable} \begin{deluxetable}{llll} \tablehead{ \colhead{Col1} & \colhead{Col2} & \colhead{Col3}} \startdata {\tt bar} & Col2 & Col3 \ \edit1{{\tt bar}} & Col2 & Col3 \ {\tt bar} & \edit1{foo {\tt bar} foo} & Col3 \ {\tt bar} & Col2 & \edit1{foo {\tt bar} foo} \ {\tt bar} & \edit1{foo {\tt bar} foo} & Col3 \ \enddata \end{deluxetable} \end{longrotatetable}

% It doesn't matter if you use \texttt{} or {\tt }. \begin{longrotatetable} \begin{deluxetable}{llll} \tablehead{ \colhead{Col1} & \colhead{Col2} & \colhead{Col3}} \startdata \texttt{bar} & Col2 & Col3 \ \edit1{\texttt{bar}} & Col2 & Col3 \ \texttt{bar} & \edit1{foo \texttt{bar} foo} & Col3 \ \texttt{bar} & Col2 & \edit1{foo \texttt{bar} foo} \ \texttt{bar} & \edit1{foo \texttt{bar} foo} & Col3 \ \enddata \end{deluxetable} \end{longrotatetable}

\end{document}

% this doesn't compile at all, even with longrotatetable \begin{longrotatetable} \begin{deluxetable}{llll} \tablehead{ \colhead{Col1} & \colhead{Col2} & \colhead{Col3}} \startdata \texttt{bar} & Col2 & Col3 \ \texttt{\edit1{bar}} & Col2 & Col3 \ \texttt{bar} & \edit1{foo} \texttt{\edit1{bar}} \edit1{foo} & Col3 \ \texttt{bar} & Col2 & \edit1{foo} \texttt{\edit1{bar}} \edit1{foo} \ \enddata \end{deluxetable} \end{longrotatetable} \end{document}`

augustfly commented 3 years ago

I find the \edit# code baffling, but I can confirm that the following MWE (with the correct number of alignment columns and focusing on only 1 possible parameter) produces an unpassable error:

\begin{deluxetable}{lll}
\tablehead{ \colhead{Col1} & \colhead{Col2} & \colhead{Col3}}
\startdata
data1 & data2 & data3 \\
data1 & \edit1{data2} & data3 \\
\enddata
\end{deluxetable}

! LaTeX Error: Not in outer par mode.

The code lines are here:

https://github.com/AASJournals/AASTeX60/blob/3a75b1687c0219d0279ff9d9a41ad9b43fa2e7db/cls/aastex63.cls#L5670-L5737