6

An example will speak for itself:

\documentclass[a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage{tabulary}

\begin{document}

\begin{tabular}{c}aa\end{tabular}
\begin{tabulary}{\textwidth}{C}aa\end{tabulary}
\begin{tabulary}{\textwidth}{C}bb\end{tabulary}

\end{document}

Here, a warning is raised by only the first tabulary. It says Package tabulary Warning: No suitable columns. Whether it happens depends on the content of the cell, but I could not really understand in what case.

Why does this warning appear? It seems like a bug in either fontenc or tabulary so it should be corrected.

Note: Even though it is just a warning, it alters the display of tables. See this thread. Edit: Actually not. The problem was unrelated.

4

The problem seems to be in the fact that the European Modern font have a slightly thinner em than Computer Modern.

If I load tabulary with the debugshow option, I get

Table
Target Width: 345.0pt
\tabcolsep: 6.0pt \arrayrulewidth: 0.4pt \doublerulesep: 2.0pt
\tymin: 10.0pt \tymax: 690.0pt
Col 1: Initial=22.00003pt         -12.0pt  Final=10.00003pt  > tymin

Line Width: 333.0pt, Natural Width: 10.00003pt, Ratio: 1
10.00003pt,  
Total:10.00003pt

for the first tabulary when T1 is not loaded. Conversely, I get

Table
Target Width: 345.0pt
\tabcolsep: 6.0pt \arrayrulewidth: 0.4pt \doublerulesep: 2.0pt
\tymin: 10.0pt \tymax: 690.0pt
Col 1: Initial=21.99756pt         -12.0pt  Final=9.99756pt  < tymin

Package tabulary Warning: No suitable columns! on input line 10.


Line Width: 323.00244pt, Natural Width: 0.0pt, Ratio: 1
9.99756pt,  
Total:0.0pt

when T1 is loaded.

If I add

\AtBeginDocument{\setlength{\tymin}{1em}}

to the document preamble, the diagnostic is

Table
Target Width: 345.0pt
\tabcolsep: 6.0pt \arrayrulewidth: 0.4pt \doublerulesep: 2.0pt
\tymin: 9.99756pt \tymax: 690.0pt
Col 1: Initial=21.99756pt         -12.0pt  Final=9.99756pt  > tymin

Line Width: 333.0pt, Natural Width: 9.99756pt, Ratio: 1
9.99756pt,  
Total:9.99756pt

that avoids the warning.

  • Wow, such knowledge! That removed the warning, thanks! (It doesn't seem to solve my previous problem though. Anyway.) – Neptilo Jun 23 '14 at 10:14
  • Yes I noticed that, possibly it's a feature or I could change the warning a bit, but hopefully except for MWE people are not using such narrow columns and asking TY to stretch them.... – David Carlisle Jun 23 '14 at 11:21
  • Oh, so that's because my column was too narrow. I agree it's not very common to use such narrow columns. It just happened as I was writing a minimal example document. – Neptilo Jun 23 '14 at 11:40
  • I am getting the same warning without using [fontenc] package. – Dellu May 22 '18 at 20:56
4

The column is narrower that \tymin which is 10pt by default. Set \tymin to a smaller value to avoid the warning:

\documentclass[a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage{tabulary}

\begin{document}

\setlength{\tymin}{5pt}
\begin{tabulary}{\textwidth}{C}aa\end{tabulary}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.