Graphics, Figures & Tables ⇒ About numbering of tables
-
- Posts: 3
- Joined: Tue May 08, 2018 7:50 am
About numbering of tables
I have problem in table numbering. It shows odd numberings only in the place of all numberings. Please solve my problem.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
About numbering of tables
We would need a minimal working example in order to help you.
With the information given, I cannot even guess.
With the information given, I cannot even guess.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10312
- Joined: Mon Mar 10, 2008 9:44 pm
About numbering of tables
Hi,
welcome to the forum!
Without seeing your code, it hardly can be said what causes it. Under all normal circumstances the numbering is in sequential order. What do you think is different in your code? It's always good to provide code. Most of the times we can see the cause in the code.
Here is a guess: when one uses
This would be wrong:
In such cases just use
Stefan
welcome to the forum!
Without seeing your code, it hardly can be said what causes it. Under all normal circumstances the numbering is in sequential order. What do you think is different in your code? It's always good to provide code. Most of the times we can see the cause in the code.
Here is a guess: when one uses
longtable
within a table
environment, the counter increases by 2 each time since both do numbering.This would be wrong:
Code: Select all
\begin{table}
\begin{longtable}
...
\end{longtable}
\caption{...}
\end{table}
Code: Select all
\begin{longtable}
...
\end{longtable}
LaTeX.org admin
-
- Posts: 3
- Joined: Tue May 08, 2018 7:50 am
About numbering of tables
I have used these codes, in which I have problem in table numberings.
Code: Select all
\documentclass[a4paper,12pt]{report}
\usepackage{caption}
\usepackage{longtable}
\begin{document}
\listoftables
\newpage
\begin{center}
\captionof{table}{Year-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{2012} & \textbf{2014} & \textbf{2016} & \textbf{2018}\\
\hline
\end{longtable}
\end{center}
\newpage
\begin{center}
\captionof{table}{2012 Month-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{January} & \textbf{February} & \textbf{March} & \textbf{April}\\
\hline
\end{longtable}
\end{center}
\newpage
\begin{center}
\captionof{table}{January Day-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{Monday} & \textbf{Tuesday} & \textbf{Thursday}\\
\hline
\end{longtable}
\end{center}
\newpage
\begin{center}
\captionof{table}{2014 Month-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{January} & \textbf{February} & \textbf{March} & \textbf{April}\\
\hline
\end{longtable}
\end{center}
\newpage
\begin{center}
\captionof{table}{February Day-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{Monday} & \textbf{Tuesday} & \textbf{Thursday}\\
\hline
\end{longtable}
\end{center}
\newpage
\begin{center}
\captionof{table}{2016 Month-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{January} & \textbf{February} & \textbf{March} & \textbf{April}\\
\hline
\end{longtable}
\end{center}
\newpage
\begin{center}
\captionof{table}{March Day-wise Assessments}
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\hline
\textbf{Monday} & \textbf{Tuesday} & \textbf{Thursday}\\
\hline
\end{longtable}
\end{center}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
About numbering of tables
You have to give the caption inside the longtable environment.
You should also remove the center environment, as longtables are centered by default.
You should also remove the center environment, as longtables are centered by default.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 3
- Joined: Tue May 08, 2018 7:50 am
About numbering of tables
Johannes_B wrote:You have to give the caption inside the longtable environment.
You should also remove the center environment, as longtables are centered by default.
I have used the code \caption{XYZ.....} Just before the \end{longtable}, the caption goes to below the table.
But my requirement is caption must be above the table.
Please suggest me.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
About numbering of tables
Write caption after \begin{longtable} line.
On smartphone, cannot post an example, sorry.
On smartphone, cannot post an example, sorry.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
About numbering of tables
Code: Select all
\documentclass[a4paper,12pt]{report}
%\usepackage{caption}
\usepackage{longtable}
\begin{document}
\listoftables
\clearpage
\begin{longtable}{| p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} | p{.20\textwidth} |}
\caption{Year-wise Assessments}\\
\hline
\textbf{2012} & \textbf{2014} & \textbf{2016} & \textbf{2018}\\
\hline
\end{longtable}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.