Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\edit# breaks deluxetable #122

Open
joeharr4 opened this issue Dec 14, 2020 · 1 comment
Open

\edit# breaks deluxetable #122

joeharr4 opened this issue Dec 14, 2020 · 1 comment
Labels
bug bug; something to be fixed in AASTeX tables trackchanges

Comments

@joeharr4
Copy link

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
Copy link
Member

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:

AASTeX60/cls/aastex63.cls

Lines 5670 to 5737 in 3a75b16

%%%%%%%%%% Color Editing Macros %%%%%%%%%%
%% \turnoffedit or \turnoffedits
%% will prevent all \edit<number>{text}, all
%% \collaborationcomment<number>{text}, and all
%% \authorcomment<number>{text} from producing any text.
\newif\ifturnoffedit
\def\turnoffedit{\global\turnoffedittrue}
\def\turnoffedits{\global\turnoffedittrue}
\let\turnoffediting\turnoffedits
\newif\ifturnoffone
\newif\ifturnofftwo
\newif\ifturnoffthree
%% \turnoffeditone to only turn off only \edit1, \collaborationcomment1 and \authorcomment1 :
\def\turnoffeditone{\turnoffonetrue}
%% \turnoffedittwo to only turn off only \edit2, \collaborationcomment2 and \authorcomment2 :
\def\turnoffedittwo{\turnofftwotrue}
%% \turnoffeditthree to only turn off only \edit3, \collaborationcomment3 and \authorcomment3 :
\def\turnoffeditthree{\turnoffthreetrue}
%% Other choices can be made, but this should be
%% standardized, so didn't make an user interface
%% to change the colors easily.
\expandafter\def\csname editcolor1\endcsname{black}% was magenta
\expandafter\def\csname editcolor2\endcsname{black}% was blue
\expandafter\def\csname editcolor3\endcsname{black}% was violet
\newcount\colorcount
\def\edit#1#2{{\colorcount=#1\relax%
\ifturnoffedit\let\go\ignorespaces\else%
\let\go\relax\fi%
\ifturnoffedit
\color{black}#2%
\else
\color{\csname editcolor\the\colorcount\endcsname}%
\ifnum\colorcount=1{\ifturnoffone\color{black}#2\else\bf#2\fi}\else%
\ifnum\colorcount=2{\ifturnofftwo\color{black}#2\else\it#2\fi}\else%
\ifnum\colorcount=3{\ifturnoffthree\color{black}#2\else#2\fi}\fi\fi\fi\fi%
}\go}
\def\collaborationcomment#1#2{{\colorcount=#1
\ifturnoffedit\let\go\ignorespaces\else%
\let\go\relax%
\color{\csname editcolor\the\colorcount\endcsname}
\ifnum\colorcount=1{\ifturnoffone\else\bf (Collaboration~note: #2)\ \fi}\else
\ifnum\colorcount=2{\ifturnofftwo\else\it (Collaboration~note: #2)\ \fi}\else
\ifnum\colorcount=3{\ifturnoffthree\else (Collaboration~note: #2)\ \fi}\fi\fi\fi\fi%
\go}}
\def\authorcomment#1#2{{\colorcount=#1
\ifturnoffedit\let\go\ignorespaces\else%
\let\go\relax%
\color{\csname editcolor\the\colorcount\endcsname}
\ifnum\colorcount=1{\ifturnoffone\else\bf (Author~note: #2)\ \fi}\else
\ifnum\colorcount=2{\ifturnofftwo\else\it (Author~note: #2)\ \fi}\else
\ifnum\colorcount=3{\ifturnoffthree\else (Author~note: #2)\ \fi}\fi\fi\fi\fi%
\go}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@augustfly augustfly added bug bug; something to be fixed in AASTeX tables trackchanges labels Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug; something to be fixed in AASTeX tables trackchanges
Projects
None yet
Development

No branches or pull requests

2 participants