I once again have a problem creating a table in a self-defined table.

So this post is somehow related to this one.
Here a little example:
Code: Select all
%----------------
\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{rotating}
%----------------
\newenvironment{MyTable}{
% \begin{sideways}
\tabularx{\textwidth}
{@{\hspace{.2mm}}p{1.7cm}@{\hspace{.8mm}}
*{3}{@{\hspace{1.8mm}}X}@{\hspace{.8mm}}
p{1.7cm}@{\hspace{.2mm}}
}%%
\toprule
\textbf{Project} &
\textbf{Stuff}&
\textbf{Strategic}&
\textbf{Other}&
\textbf{Total}\\
\midrule
}{%
\endtabularx
% \end{sideways}
}%% End new environment
%----------------
\begin{document}
\begin{MyTable}
1 & 2 & 3 & l &5 \\
1 & 2 & 3 & l &5 \\
\end{MyTable}
\end{document}
%----------------
I've tried landscape and rotate in different variations but failed to find a solution. The problems are, that in a new environment you can't span a \rotate, e.g.
Code: Select all
\newenvironment{sth.}{
\rotate{90}{
\tabularx ....
}
{
\endtabularx
}
}
Code: Select all
\newenvironment{sth.}{
\begin{rotate}{90}
\tabularx ....
}
{
\endtabularx
\end{rotate}
}
Thanks for any clues
