I am looking for a way to exclude tables from compilation when I am in draft mode (technically I want to create a boolean such as drafttables
that would exclude tables when active). Usually I have tables in a separate file at the end of the document and just exclude it from compilation while working on the document. But now I need to put many many tables inside the document as floats, and because the tables are rather complicated, compilation takes a long time.
Is it possible to create a macro that just puts a placeholder instead of the table, similar to the option of the graphicx
package? A bonus would be if the placeholder would have similar dimensions as the table, so that the layout stays the same.
Best Answer
I've borrowed some work from Draft mode for pgfplots in the solution below.
If you use
then all the
tables
will not appear. If you usethen they'll appear as usual.
I've used the
verbatim
package just for thecomment
environment.Measuring the dimensions of the table would be tricky- perhaps this will help someone go in that direction.
Alternative
Or else you might prefer to load
tikz
orpgf
and then use the following in the\ifdraft
checkwhich gives