Please consider the following example for better understanding. I would like LaTex to use page breaks within the tabularx environment, so that one part of the contains of \LongText will be displayed on the first and the rest on the second page. Maybe there is another useful package for page breaks within long tables or a complete other package for my purpose: a glossary within the main text.
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{tabularx}
\usepackage{lipsum}
\begin{document}
\newenvironment{foo}{\tabularx{\textwidth}{p{2cm}X}}{\endtabularx}
\newcommand{\LongText}{This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text. This is a long text.}
\lipsum[1-3]
\begin{foo}
Whatever & \LongText \\
Something else & \LongText \LongText
\end{foo}
\end{document}


texhash? However, the file should go into.../texlive/texmf-local/tex/latex/ltablex/– Jun 22 '12 at 05:16\usepackage{ltablex}to the preamble and using\begin{tabularx}{\textwidth}{p{2cm}X}instead of\begin{foo}it just works fin. But why isn't possible to use myfoo-environment as defined? – John Jun 22 '12 at 06:02endtabularxwhich cannot be used inside another definition. – Jun 22 '12 at 06:05lstlisting-environment within thetabularx-environment:\begin{tabularx}{\textwidth}{p{2cm}X} Whatever & \LongText \LongText \Something else & \LongText \LongText \Code & \begin{lstlisting} for i=0 do... \end{lstlisting} \\end{tabularx}. – John Jun 22 '12 at 14:41