# Table: Text is Streched (Fully-Justified) and Looks Ugly - Looking for Left Aligned (\raggedright)

I have a table containing a few lines that don't extend all the way to the end. These lines being end up being stretched beyond presentability. I've tried several methods looked up here and none seem to work. The only thing that does is putting it in Math mode, which is not what I want for the table I am working with.

The line

not(dep(adjective, dep)), (dep(adjective, nmod)


ends up looking like

not(dep(adjective,     dep)),     (dep(adjective,     nmod)


in order to fit the space in the Table

My MWE

\documentclass[11pt]{article}

\begin{document}

\begin{table*}[t]
\small
\caption{\small \label{table-4} \textit{Table}}
\begin{tabular}{|p{13.5cm}|}
\hline

\\
\hline
\end{tabular}
\end{table*}
\end{document}


• Dec 10 '16 at 19:03
• I edited the title of your question. If i got it wrong then change it back. Dec 10 '16 at 19:07

Your table has two issues. The first, already mentioned in your posting, is that it would be better if the material were typeset ragged-right rather than fully justified. The second issue is that the tabular environment is quite a bit wider than the text block.

To remedy both problems, I suggest you use a tabularx environment, with width set to \textwidth, and that you use a modified form of the X column type that typesets its material ragged-right (aka flushleft) while still allowing hyphenation. See the code below for an implementation of these suggestions.

Separately, instead of engaging in visual formatting by typing \caption{\small \label{table-4} \textit{Table}}, consider loading the caption package and using suitable arguments for a \captionsetup instruction. Again, see the code below for a specific implementation of this recommendation.

\documentclass[11pt]{article}
\usepackage{tabularx,ragged2e,caption}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}
\begin{document}

\begin{table}
\captionsetup{size=small,textfont=it,skip=0.333\baselineskip}
\small
\caption{Table}
\begin{tabularx}{\textwidth}{|Y|}
\hline
\\
\hline
\end{tabularx}
\end{table}
\end{document}

• Well, I can't compete with that :). Dec 10 '16 at 19:17

Following the questions I mentioned in my comment, you can use this for example (array package and \raggedright command):

\documentclass[11pt]{article}

\usepackage{array}

\begin{document}

\begin{table*}[t]
\small
\caption{\small \label{table-4} \textit{Table}}
\begin{tabular}{|>{\raggedright\arraybackslash}p{135mm}|}
\hline