Graphics, Figures & Tablesltxtable | Not so simple Example

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

ltxtable | Not so simple Example

Post by mirou »

Well I see that some people are viewing this thread for an answer to their tables problem, but no contribution till now...Hoping to see some contributions :)
-------------------------------------
Dear LaTex Community Friends,

For the sake of knowing how to "exactly" use the ltxtable package, I'm initiating this post. I have searched the forums and the index for an "ample" example of codes used for the ltxtable but had a very hard time, so here is a begining that doesn't work. Hoping that some Latex gurus will contribute keeping this thread for those who are struggling with longtable (tables that span across multiple pages) and tabularx (variable width columns). The example is of two columns (a small one with a title) and the second (much longer containing a full description of the concept). Pls excuse me for not sticking to the minimal example here as those didn't help me much.!!!
For those who still don't know it, you have to create the table in a seprate .tex file using something like the following code:

Code: Select all

%!TEX encoding = IsoLatin
\documentclass[parskip=half]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{array}
\usepackage{booktabs,tabularx}
\usepackage{ltxtable}
\begin{document}
\begin{table}
\caption{Your caption}
\label{tab:table} 
\centering
\begin{tabularx}{\linewidth}{|>{\hsize=.8\hsize}X|>{\hsize=1.2\hsize}X|}
\toprule
Concept 1 & blablabla \\
\hline
Concept 2 & blablabla \\
\hline
Concept 3 & blablabla \\
\hline
Concept 4 & blablabla \\
\hline 
\bottomline
\end{tabularx}
\end{table}
\end{document}
As far as I know there is also a code for long table that looks like this (is it on the same file?/Is it correct???)

Code: Select all

\newcolumntype{Y}{>{\small\raggedright\arraybackslash}X}
\renewcommand{\arraystretch}{1.5}
\noindent 
\begin{longtable}{|>{\setlength\hsize{.8\hsize}}X|>{\setlength\hsize{1.2\hsize}}X|}
:
But that didn't work for me...Pls tell me why

And finally on the main file and where you should include your long table a code like this should appear:

Code: Select all

\LTXtable{linewidth}{table.tex}
Where the table.tex file is the file where you created your table.
I call upon those of you who can tell us how to manage all this to start posting their replies here...
Thanks to all Latex users/developpers/sufferers.....
Well I kind of enjoy playing with it by now...... :?

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

anitsirc
Posts: 1
Joined: Mon Jun 20, 2011 11:38 pm

ltxtable | Not so simple Example

Post by anitsirc »

Hi, I found this example and it works.

Tables in LaTeX | eitch’s blog

Hope it helps
Post Reply