My minimum working example :
\documentclass[11pt,a4paper]{article}
\usepackage[francais]{babel}
%\usepackage[latin1]{inputenc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
\usepackage{array,multirow,makecell}
\setcellgapes{1pt}
\makegapedcells
\usepackage[table]{xcolor}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}
\begin{document}
\begin{tabular}{m{.18\textwidth} m{.18\textwidth} m{.18\textwidth} m{.18\textwidth} m{.18\textwidth}}
\hline \rowcolor{lightgray} Lipsum Lipsum Lipsum 1 & Lipsum Lipsum Lipsum 2 & Lipsum Lipsum Lipsum 3 & Lipsum Lipsum Lipsum 4 & Lipsum Lipsum Lipsum 5 \\
\hline Lipsum Lipsum Lipsum UNDER 1 & Lipsum Lipsum Lipsum UNDER 2 & Lipsum Lipsum Lipsum UNDER 3 & Lipsum Lipsum Lipsum UNDER 4 & Lipsum Lipsum Lipsum UNDER 5 \\
\hline
\end{tabular}
\end{document}
I am trying to align my table
- Centered vertically (this point seems ok)
- Left horizontally
However, given my above code the text is not aligned on left horizontally, but justified, which gives some horrible display with tons of word breaks. I simply want to force it aligned to left.
Thank you in advance for your help.
Best Answer
You defined a raggedright column type but didn't use it?