I would like to create a pdf file that containes only the table captions, but not the content of the table. So I tried to redefine the tabular environment in the preamble of my document (it is probably not the best solution but I don't mind quick and dirty - I need to use it only temporarily):
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\renewenvironment{tabular}{\iffalse\oldtabular}{\endoldtabular\fi}
or
\usepackage{etoolbox}
\preto\tabular{\iffalse}
\appto\tabular{\fi}
Unfortunatelly, it seems to have no effect on my document. If I manually frame the tabular environment it works:
\begin{table}[htbp]
\centering
\caption{my captiontext}
\iffalse
\begin{tabular}
Content I don't want to see
\end{tabular}
\fi
\label{myTableLabel}
\end{table}
Thanks in advance for any input!


awkscript answering http://tex.stackexchange.com/questions/91188/shell-script-which-parses-tex-files-for-figures/91203#91203 might do. Modify it to print everything but thetabulars and compile the output TeX file. – Ethan Bolker Jul 31 '14 at 12:42displaymathand equationin that answer withtabularandtabularx`, say. – Mico Jul 31 '14 at 13:11\tabular...\endtabularinstead of\proof..\endproof. – yo' Jul 31 '14 at 13:35