Graphics, Figures & TablesCopy of most tables in the appendix

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Batox
Posts: 2
Joined: Sun Nov 09, 2014 8:45 pm

Copy of most tables in the appendix

Post by Batox »

For reference purposes I want to copy nearly all tables in my document together into an appendix. How can I achieve that automagically?

One of my tables currently looks like:

Code: Select all

\begin {center}
\rowcolors{1}{white}{gray!20}
\begin{tabular}{|ll|}
	\hline
	\multicolumn{2}{|c|}{} \\
	\rowcolor{white} \multicolumn{2}{|c|}{Table of Stuff} \\
	\multicolumn{2}{|c|}{} \\
	\hline
	1 & first stuff \\
	\hline
	2 & second \\
	\hline
	3 & and so on \\
	\hline
\end{tabular}
\end {center}
Now in the appendix I'd like to write

Code: Select all

\appendix
\chapter{Tables Reference}
... ? (one line which effectively copies the above table, 
       or maybe even all tables which are marked or defined
       in a special way)

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Copy of most tables in the appendix

Post by Johannes_B »

Hi and welcome, put each table in an external tex file and input the files once in the document and a second time in the appendix.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Batox
Posts: 2
Joined: Sun Nov 09, 2014 8:45 pm

Re: Copy of most tables in the appendix

Post by Batox »

Thanks for the quick reply! I see - should have thought of that myself :)

As you probably guessed I'm only starting with LaTeX, but have a background as C++ developer. I was hoping for some smart macro/code functionality, because putting the tables in extra files results in a lot of files, so far I have only one (although I'm not sure wether that's really good in the long term).
Post Reply