How do I create my own new environment of a selfscaling tabularx table, as well as a caption added to it and maybe colored rows? The caption should not be added using the odd flowing captionof
command, but rather in a real tabular environment.
If I add \begin{tabularx}
in a \newenvironment
or the command form \tabularx
after a \begin{table}
, I always get this error:
File ended while scanning use of \TX@get@body.
Best Answer
The problem with the
tabularx
environment is, that it is not an actual environment. It is a wrapped command somehow denying any\end
after the actual\endtabularx
. The solution is to use the command form for bothtable
andtabularx
.This is a complete Tex Sample for the table below.
Results in: