Graphics, Figures & TablesWhy longtable inside table only creates even-numbered table?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Why longtable inside table only creates even-numbered table?

Post by yoyoimut »

Hi,

How can I configure longtable in table environment such that it creates tables with normal numbering rather than just even-numbered tables as shown below.
minimal code
minimal code
even.jpg (23.59 KiB) Viewed 2059 times
The code snippet I used is shown below.

Code: Select all

\documentclass{book}
\usepackage{longtable}
\usepackage{multido}

\begin{document}

\multido{\i=1+1}{10}{
\begin{table}
\begin{longtable}[\linewidth]{l}
x	 	
\end{longtable}
\caption{caption \i}
\end{table}
}


\end{document}

Thank you in advance.

Yuko

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Why longtable inside table only creates even-numbered table?

Post by localghost »

The longtable environment increases the table counter on its own. A wrapping table environment is not necessary.


Best regards
Thorsten
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Why longtable inside table only creates even-numbered table?

Post by yoyoimut »

localghost wrote:The longtable environment increases the table counter on its own. A wrapping table environment is not necessary.


Best regards
Thorsten

Thank you localghost.

It works now.


regards,

Yuko
Post Reply