# landscape/sidewaystable inside mdframed box containing text and another table

I would like a landscape/sideways table in an mdframed box which contains some other text. I would like to insert a sidewaystable in it. The table is too wide to fit in the portrait mode of the document.

Here is an example. The table gets all messed up because putting \begin{sidewaystable}...\end{sidewaystable} inside mdframed is not allowed.

\documentclass{article}
\usepackage{mdframed,graphicx,caption}
\usepackage{lipsum}

\begin{document}

\begin{mdframed}
\lipsum[4]

\begin{sidewaystable}[htb]
\centering
\begin{tabulary}{\textwidth}{LLL}
Location & Major food crops & Livestock type\\
\hline
Java, Indonesia & Upland rice, & Poultry, fish,\\
& maize, vegetables, & goats, sheep,\\
& coconuts, & cows, water,\\
& fruit trees & buffalo\\
Tabasco, Mexico & Maize, beans & Poultry,\\
&  & pigs, sheep\\
&  & and goats\\
Grenada, West Indies & Colocasia, & \\
& xanthosoma, yams, & \\
& maize, pigeon peas & \\
\end{tabulary}
\end{sidewaystable}
\lipsum[1-3]
\end{mdframed}
\end{document}

• I see you are waiting for one of that rare breed of LaTeX-using mind-readers to take an interest in your question. Good luck! – cfr Mar 15 '15 at 3:12
• Welcome to TeX.SX!. Ot is better to provide at least a partial minimal working example to demonstrate what you are trying to do and to help others help you. The MWE should look like \documentclass...\begin{document}...\end{document}, it should compile and contain close to the minimal amount of code needed to explain/demonstrate what you are asking. As it is, It is not clear what you are asking... – Andrew Mar 15 '15 at 4:21
• Apologies. Added an example....it is not really a working example. If I could make it work, I would not have a problem. If I am not clear, I would be happy to elaborate further what I am looking for. – len71 Mar 15 '15 at 13:36