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

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