2

Taking the MWE from this question, I am looking for a solution which will label my tables Table A.1 and Table A.2. Is there a short workaround for this?

\documentclass{article}
\usepackage{booktabs}
\usepackage{dcolumn}

\begin{document}
% Table generated by Excel2LaTeX from sheet 'nipo'
\begin{table}[htbp]
\centering
\caption{Statistics of Initial Public Offering}
\begin{tabular}{rrr}
\toprule
    Year  & Frequency & \% \\
\midrule
1975  & 10    & 0,1 \\
1976  & 27    & 0,3 \\
1977  & 17    & 0,2 \\
1978  & 21    & 0,3 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%

\begin{table}[htbp]
    \centering
    \caption{Statistics of Initial Public Offering (Version Two)}
    \begin{tabular}{rrr}
        \toprule
        Year  & Frequency & \% \\
        \midrule
        1975  & 10    & 0,1 \\
        1976  & 27    & 0,3 \\
        1977  & 17    & 0,2 \\
        1978  & 21    & 0,3 \\
        1979  & 47    & 0,6 \\
        \bottomrule
    \end{tabular}%
    \label{tab:second_addlabel}%
\end{table}%

\end{document}
2
  • So, all of your table numbers should have an A. prefix?
    – Werner
    Jan 11, 2018 at 20:06
  • yes exactly, its for online content for a publication
    – lukeg
    Jan 11, 2018 at 20:09

1 Answer 1

3

You can use \renewcommand{\thetable}{A.\arabic{table}} as shown in the following MWE to add an A to all of your tables' captions.

\documentclass{article}
\usepackage{booktabs}
\usepackage{dcolumn}
\renewcommand{\thetable}{A.\arabic{table}}

\begin{document}
% Table generated by Excel2LaTeX from sheet 'nipo'
\begin{table}[htbp]
\centering
\caption{Statistics of Initial Public Offering}
\begin{tabular}{rrr}
\toprule
    Year  & Frequency & \% \\
\midrule
1975  & 10    & 0,1 \\
1976  & 27    & 0,3 \\
1977  & 17    & 0,2 \\
1978  & 21    & 0,3 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%

\begin{table}[htbp]
    \centering
    \caption{Statistics of Initial Public Offering (Version Two)}
    \begin{tabular}{rrr}
        \toprule
        Year  & Frequency & \% \\
        \midrule
        1975  & 10    & 0,1 \\
        1976  & 27    & 0,3 \\
        1977  & 17    & 0,2 \\
        1978  & 21    & 0,3 \\
        1979  & 47    & 0,6 \\
        \bottomrule
    \end{tabular}%
    \label{tab:second_addlabel}%
\end{table}%

\end{document}

You must log in to answer this question.

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