1

I have a long table in the appendix, and I would like the numbering of the caption to start with A, B, C instead of 1, 2, 3. So, "Table A: Parameters" instead of "Table 1: Prameters"

\documentclass{aa}  % Astronomy & Astrophysics
\usepackage[titletoc,title]{appendix}


\begin{document}

\begin{appendices}
\setcounter{table}{0}
\renewcommand{\thetable}{\Alph{section}\arabic{table}}
\section{Observed lines}
\longtab{
\begin{longtable}{lccccc}
\caption{Parameters}\\
\multicolumn{1}{l}{Line} &  &  &  &  &  \\
\end{longtable}
}
\end{appendices}

\end{document}

1 Answer 1

3

Is this the result you are seeking (Table A, etc.)? I suspect it isn't, and so a longer answer follows below.

    \documentclass{aa}  % Astronomy & Astrophysics
    \usepackage[titletoc,title]{appendix}

    \begin{document}

    \renewcommand\thetable{\Alph{table}}
    \begin{appendices}
    \setcounter{table}{0}
    \section{Observed lines}
    \longtab{
    \begin{longtable}{lccccc}
    \caption{Parameters}\\
    \multicolumn{1}{l}{Line} &  &  &  &  &  \\
    \end{longtable}
    }
    \end{appendices}

    \end{document}

enter image description here

Do you want Table A.1, etc.? This latter form is more consistent with the aa.cls, I think.

For the latter, it's useful to look at what the \longtab command does: it moves long tables to the back of the document, with an \AtEndDocument command. If you are not using the \appendix environment, these long tables are numbered consecutively with those in the paper, so if you had three ordinary tables and then a fourth long table, Table 4 would simply appear at the very end. All the tables would be numbered as Table 1, Table 2,... etc.

The problem that you may be encountering is that \longtab doesn't behave as expected if your long tables are in an Appendix. Specifically, `\longtab' has an optional argument that carries the table number, and which needs to be used in the Appendix environment. I have no idea why this is case. (The class documentation does not describe this argument.)

One brute force way to deal with this is to manually set the table numbers for long tables in appendices. Since most appendices don't have many tables, this is probably not very burdensome. The following example illustrates.

\documentclass{aa}  % Astronomy & Astrophysics

\begin{document}

\begin{table}[h]
\caption{The first table}
\end{table}

\appendix 

\section{Observed lines}

\begin{table}[h]
\caption{The first appendix table}
\end{table}

\begin{table}[h]
\caption{A second appendix table}
\end{table}

Next is a long table.

\bigskip % just to make a space here

%% using the optional argument to make this table #3 in the appendix.
\longtab[3]{
\begin{longtable}{lccccc}
\caption{Parameters One}\\
\multicolumn{1}{l}{Line} & x & x & x & x &  \\
\end{longtable}
}

The long table gets moved to the end of the document.

\begin{table}[h]
\caption{A fourth appendix table}
\end{table}

\section{More observed lines}

\begin{table}[h]
\caption{Still another table}
\end{table}

Next is a long table.

\bigskip % just to make a space here

%% using the optional argument to make this table #2 in the appendix.
\longtab[2]{
\begin{longtable}{lccccc}
\caption{Parameters Two}\\
\multicolumn{1}{l}{Line} &  &  &  &  &  \\
\end{longtable}
}

The long table gets moved to the end of the document.

\end{document}

Here is what the pages of the appendices look like enter image description here

And here is the first long table at the end. enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .