According to http://www.vision.ime.usp.br%2F~jmena%2Fmisc%2Flatex%2Ftables_with_latex.pdf&ei=uN0MS5KSMo2w4QapmryJBA&usg=AFQjCNG7QBiFgnzX_X0k0IkEt3918EdWbw, a long table constructed with tabular and tabularx is broken down automatically. However, it doesn't happen when I use it with my document settings. Is the automatic break-down done automatically or should I do some thing additional? see below for an example.
thanks
----------------------
\documentclass[12pt,a4paper,openright]{book}
\usepackage[includeheadfoot,margin=3cm]{geometry}
\usepackage{booktabs,caption, float,tabularx}
\begin{document}
\pagestyle{headings}
\begin{table}[!ht]
\begin{tabularx}{\linewidth}{p{1.5cm}p{12cm}}
1stcol&2ndcol\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
name & this is a very long first row this is a very long first row this is a very long first row. this is a very long first row this is a very long first row this is a very long first row\\\addlinespace
\bottomrule
\end{tabularx}
\caption{my caption.}
\end{table}
\end{document}
Graphics, Figures & Tables ⇒ breaks in tabularx
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
breaks in tabularx
The link is invalid. It is demandable that you use the code environment to tag code as such.
I'm not sure if you mean a page break inside a table. This could be done with ltablex.
Best regards
Thorsten
I'm not sure if you mean a page break inside a table. This could be done with ltablex.
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: breaks in tabularx
Sorry, here is the right link
http://www.vision.ime.usp.br/~jmena/mis ... _latex.pdf
yes, when the table is long to be fitted in one page, I want that it be splitted automatically over different pages.
I added ltablex but didn't change any thing. how to use any specific feature since no documentation is available?
http://www.vision.ime.usp.br/~jmena/mis ... _latex.pdf
yes, when the table is long to be fitted in one page, I want that it be splitted automatically over different pages.
I added ltablex but didn't change any thing. how to use any specific feature since no documentation is available?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
breaks in tabularx
Read Section 3.4 of this paper and try the suggested packages. Read their manuals to get things work. You have access to the manuals on your local machine via command prompt (assumed that the concerned package is installed).
Code: Select all
texdoc longtable
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: breaks in tabularx
I don't see from the documentation how to set the font size to for ex small or scriptsize. It's not possible to set font size within longtable as we do in the other table environments
\begin{longtable}
{\small
....
}
\end{longtable}
doesn't work
\begin{longtable}
{\small
....
}
\end{longtable}
doesn't work
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
breaks in tabularx
For the documentation of ltablex you have to take a look at the *.sty file itself. Since this package is a combination of longtable and tabularx, you have to refer to the manuals of these two packages to get more information. For a general change of font sizes try the appropriate switches around the concerned environment.
Code: Select all
\small
\begin{longtable}
% table contents
\end{longtable}
\normalsize
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10