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

\begin{document}
\setcounter{page}{3}
% 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 \\
1979  & 47    & 0,6 \\
1980  & 69    & 0,8 \\
1981  & 183   & 2,2 \\
1982  & 80    & 1,0 \\
1983  & 524   & 6,4 \\
1984  & 219   & 2,7 \\
1985  & 258   & 3,1 \\
1986  & 523   & 6,3 \\
1987  & 383   & 4,6 \\
1988  & 161   & 2,0 \\
1989  & 161   & 2,0 \\
1990  & 146   & 1,8 \\
1991  & 334   & 4,1 \\
1992  & 459   & 5,6 \\
1993  & 557   & 6,8 \\
1994  & 457   & 5,5 \\
1995  & 479   & 5,8 \\
1996  & 635   & 7,7 \\
1997  & 443   & 5,4 \\
1998  & 273   & 3,3 \\
1999  & 401   & 4,9 \\
2000  & 340   & 4,1 \\
2001  & 83    & 1,0 \\
2002  & 68    & 0,8 \\
2003  & 65    & 0,8 \\
2004  & 179   & 2,2 \\
2005  & 180   & 2,2 \\
2006  & 191   & 2,3 \\
2007  & 236   & 2,9 \\
2008  & 29    & 0,4 \\

Sum   & 8238  & 100,0 \\
N     & 34    &  \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%

\end{document}

How do you change the "Table 1" in the title to example "Table 2" or "Panel A" or something else?

I'm very new to producing LaTex tables, and I realize that the answer to my question is probably very simple.

3
  • 1
    Why do you want to have 'Table 2' when there is only one? ... \setcounter{table}{1} will do for the table number.
    – user31729
    Apr 23, 2014 at 12:45
  • I'm writing my thesis and so far I've created my tables separately. But i want them organized in a specific order.
    – user50270
    Apr 23, 2014 at 12:50
  • About the order... the ordering mechanism is not done by LaTeX actually, but the numbering. If you accidentally place a table at another position and manipulate the table number, this will most certainly lead to 'confusion'.
    – user31729
    Apr 23, 2014 at 12:53

2 Answers 2

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

\begin{document}
\setcounter{page}{3}
% Table generated by Excel2LaTeX from sheet 'nipo'
\setcounter{table}{1}
\renewcommand{\tablename}{Panel} % Set the tablename to Panel, instead of Table
\renewcommand{\thetable}{\Alph{table}} % Setting the table number output to letters 
\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 \\
1979  & 47    & 0,6 \\
1980  & 69    & 0,8 \\
1981  & 183   & 2,2 \\
1982  & 80    & 1,0 \\
1983  & 524   & 6,4 \\
1984  & 219   & 2,7 \\
1985  & 258   & 3,1 \\
1986  & 523   & 6,3 \\
1987  & 383   & 4,6 \\
1988  & 161   & 2,0 \\
1989  & 161   & 2,0 \\
1990  & 146   & 1,8 \\
1991  & 334   & 4,1 \\
1992  & 459   & 5,6 \\
1993  & 557   & 6,8 \\
1994  & 457   & 5,5 \\
1995  & 479   & 5,8 \\
1996  & 635   & 7,7 \\
1997  & 443   & 5,4 \\
1998  & 273   & 3,3 \\
1999  & 401   & 4,9 \\
2000  & 340   & 4,1 \\
2001  & 83    & 1,0 \\
2002  & 68    & 0,8 \\
2003  & 65    & 0,8 \\
2004  & 179   & 2,2 \\
2005  & 180   & 2,2 \\
2006  & 191   & 2,3 \\
2007  & 236   & 2,9 \\
2008  & 29    & 0,4 \\

Sum   & 8238  & 100,0 \\
N     & 34    &  \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%

\end{document}

Explanation

Each time \begin{table} is called, it advances the table number by 1, so if the first table should get the number 2 actually, the table number must be initially set to 1, this is done by \setcounter{table}{1}.

The screen shot contains only the upper part of the table.

enter image description here

0
\documentclass{article}

\begin{document}

\begin{table}[H] 
\renewcommand\thetable{A.1} 
   \centering
   \caption{test table}
\end{table}
\end{document}

Adding \renewcommand\thetable{4.5} before \caption{test table} is what worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.