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 2122 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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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