# Make table invisibles

I have a dissertation with lots of longtable and tabu environments.

longtable are on their own, while tabu are wrapped inside table environments.

I want something to put in the preamble of the document that makes the tables (both longtable and tabu) invisible. That suppresses them, like those environments were not there.

I have to do that because I have to give the dissertation to a person that needs to edit it, and I have to convert to Word

Surronding every table with the comment environment is not an option, because I have tons of tables.

I tried the solution here but it doesn't work. That solution is to put

\usepackage[figuresonly,nolists,nomarkers]{endfloat}
\renewcommand{\processdelayedfloats}{}


in the preamble. I tried with:

\renewenvironment{tabu}[1]{}{}


But the text of the table is still there unformatted. I assume because that command substitute \begin{tabu} with nothing and \end{tabu} with nothing, leaving the text inside

then I tried:

\renewenvironment{tabu}[1]{\comment}{\endcomment}


After loading the commentpackage, and the file does not compile

• After \usepackage{comment} do \excludecomment{longtabu} – egreg Nov 24 '17 at 18:28

# Package comment

The comment package offers \excludecomment. It can be (mis)used to disable an environment. However, it does not overwrite the \end{...} part, thus the following example clears the end code part of the environment explicitly:

\documentclass{article}
\usepackage{longtable}

\usepackage{comment}
\excludecomment{longtable}
\let\endlongtable\relax

\begin{document}
Text
\begin{longtable}{ll}
\end{longtable}
\end{document}


# Package version

Macro \excludeversion of package version also redefines the \end part of the environment:

\documentclass{article}
\usepackage{longtable}

\usepackage{version}
\excludeversion{longtable}

\begin{document}
Text
\begin{longtable}{ll}
\end{longtable}
\end{document}


However, the documentation of package version (inside version.sty) warns:

Very long sections of excluded text might cause a TeX capacity exceeded' error.

# Package versions

Package versions (with suffix s) claims to have solved some of the problems of version, including the memory issue:

· Large passages don't fill main memory when excluded. (s in versions means safe!)

\documentclass{article}
\usepackage{longtable}

\usepackage{versions}
\let\longtable\relax % Removes warning
\excludeversion{longtable}

\begin{document}
Text
\begin{longtable}{ll}

The package is more verbose (messages on the console). \longtable is disabled explicitly before \excludeversion` to avoid a warning, that environment table was previously defined.