2

This code runs fine:

\documentclass{article}
\usepackage{amsmath}
\usepackage{tabulary}
\begin{document}
\begin{tabulary}{\linewidth}{L}
    $ M $\\
\end{tabulary}
\end{document}

But this code produces the message "Package tabulary Warning: No suitable columns! on input line 7.":

\documentclass{article}
\usepackage{amsmath}
\usepackage{tabulary}
\begin{document}
\begin{tabulary}{\linewidth}{L}
    $ \begin{cases} M \end{cases}$\\
\end{tabulary}
\end{document}

Can anyone figure out why this is and/or how to fix it? It also fails if the cases is in an 'l' column (which is actually the case in the production code I'm trying to get working), so it's not just tabulary having trouble with stretching a cases or anything like that. It works just fine in tabular.

I am aware that a warning is not an error, and the code above compiles fine. But the problem in my actual use case is that tabulary gives up on finding suitable columns, and therefore other rows, ones which don't even have a cases in them, run off the page.

1 Answer 1

1

Er who knows what tabulary is doing:-)

Something in its setup is confusing the nested cases construct. You could try complaining to the package author and it might get resolved, but if you just want to get on with the document and and make the warning go away, I'd avoid the nesting:

\documentclass{article}
\usepackage{amsmath}
\usepackage{tabulary}
\newsavebox\mybox
\begin{document}
\sbox\mybox{$ \begin{cases} M \end{cases}$}
\begin{tabulary}{\linewidth}{L}
   \usebox{\mybox}\\
\end{tabulary}
\end{document}
1
  • I suspect, given that cases renders successfully but the line runs off the page, that it's actually the nested cases construct that's somehow confusing tabulary instead of the other way around. But in any event, your solution works, and that's the important part! Thanks. Commented Apr 29, 2016 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .