Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to create a simple table with tabulary:

\documentclass{article}
\usepackage[english]{babel}
\usepackage{tabulary}

\begin{document}

\begin{tabulary}{\linewidth}{|L|L|L|}
A & B & C
\\
Blablab & Blablablabl & Blabl bl bla blabl blablabl blabl blabl bl blab blab bla blabla bl blablabla bla blabla
\\
\end{tabulary}

\end{document}

But the generated columns are a mess. The first two columns are not big enough. The words overflow into the next columns.

Overfull \hbox (10.59239pt too wide) in paragraph at lines 12--12
[]\OT1/cmr/m/n/10 Blablab|

Overfull \hbox (16.04956pt too wide) in paragraph at lines 12--12
[]\OT1/cmr/m/n/10 Blablablabl|

Overfull \hbox (15.00195pt too wide) in paragraph at lines 12--13
[][]

What is the best way to fix this?

share|improve this question
    
Welcome to TeX.SX! –  egreg Aug 6 at 9:42

2 Answers 2

up vote 5 down vote accepted

The Blablablabl is too big and tex doesn't hyphenate that. You can over come this by specifying

\tymin=60pt
\tymax=\maxdimen

Full code:

\documentclass{article}
\usepackage[english]{babel}
\usepackage{tabulary,showframe}  %% showframe just for demo
\tymin=60pt
\tymax=\maxdimen
\begin{document}
\noindent
\begin{tabulary}{\linewidth}{|L|L|L|}
A & B & C
\\
Blablab & Blablablabl & Blabl bl bla blabl blablabl blabl blabl bl blab blab bla blabla bl blablabla bla blabla
\\
\end{tabulary}
\end{document}

enter image description here

share|improve this answer

Use of column specifier l from tabular for the first two columns. and use of \noindent right before tabulary environment.

enter image description here

Code

\documentclass{article}
\usepackage[english]{babel}
\usepackage{tabulary}
\usepackage[showframe]{geometry}

\begin{document}
\noindent
\begin{tabulary}{\linewidth}{|l|l|L|}
A & B & C\\
Blablab & Blablablabl & Blabl bl bla blabl blablabl blabl blabl bl blab blab bla blabla bl blablabla bla blabla\\
\end{tabulary}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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