5

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?

2

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

3

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}

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.