Graphics, Figures & TablesTabularx: What is wrong? !!!

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mirou
Posts: 18
Joined: Thu Apr 29, 2010 4:36 am

Tabularx: What is wrong? !!!

Post by mirou »

Hi all,

Well insanity is very near my way, could anyone tell me what is wrong with the following tabularx code? I have spent exactly 2 full dats trying and retrying and frankly I am very bear insanity. I have to submit something tomorrow that I haven't even started just because I was eager to set the table correctly (2 full days)...
Have a look:

Code: Select all

\documentclass[parskip]{scrartcl}
\usepackage[frenchb] {babel}
\usepackage[latin1]{inputenc}
\selectlanguage{frenchb} 
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{multirow}
\usepackage{supertabular}
\usepackage{rotating}
\setlength{\parskip}{1.3ex plus 0.2ex minus 0.2ex}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{array}
\usepackage{tabularx}
\usepackage{ltxtable}
\begin{document}
\begin{table}
\centering
\begin{tabularx}{{\linewidth}{>{\hsize=.8\hsize}X>{\hsize=1.2\hsize}X}
\caption{%%%%%}
\hline
%%%% & \begin{itemize} \item %%%%. 
\item %%%%%%.
\item %%%%%
\end{itemize} \\
\hline
%%%% & \begin{itemize} \item %%%%%
\item %%%%%
\item %%%%% 
\end{itemize} \\
\hline
\end{ltabularx}
\label{%%%%%}
\end{table}
When compiling it gives me the following error:paragraph ended before \tabularx was completed...
I don't inderstand and the file won't compile anymore......Plsssssss help :roll:
Last edited by mirou on Sun Nov 28, 2010 7:10 pm, edited 1 time in total.

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

Tabularx: What is wrong? !!!

Post by localghost »

Please check your examples for completeness and minimal content. The sample as provided is not compilable.

You have and additional opening brace in the table declaration. The code below should work as expected (and contains some tweaks).

Code: Select all

\documentclass[%
  captions=tableabove,
  parskip=half
]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage{lmodern}
\usepackage{booktabs,tabularx}
\usepackage{blindtext}

\begin{document}
  \begin{table}
    \caption{Table caption}\label{tab:table}
    \centering
    \begin{tabularx}{\linewidth}{>{\hsize=.8\hsize}X>{\hsize=1.2\hsize}X} \toprule
      \blindtext & \blindtext \\ \midrule
      \blindtext & \blindtext \\ \bottomrule
    \end{tabularx}
  \end{table}
\end{document}

Thorsten
mirou
Posts: 18
Joined: Thu Apr 29, 2010 4:36 am

Re: Tabularx: What is wrong? !!!

Post by mirou »

Well thank you so much. That was helpful to a great extent. I am still facing 2 problems while comiling:
1) The table runs over the page's page number and the rest of it is not visible even on the next page
2) the centering affects all the paragraphs that belong to that section

Could you tell me how to possibly fix those 2 issues?
Thanks for your support and prompt help...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Tabularx: What is wrong? !!!

Post by localghost »

Try ltablex or ltxtable. You already used the latter one in your example. But since it wasn't clear that your table would go over multiple pages, I simply dropped it.
Post Reply