As you can see on the image, the left column is justifying its content hence add uneven spaces between the content there. I am trying to keep the left column content vertically in the centre and horizontally leftwards.
I tried adding \begin{tabular}{>{\RaggedRight}m{3.7cm} m{5cm} to the following script but it did not work.
\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\begin{table}
\begin{tabular}{m{3.7cm}| m{5cm}}
\toprule
Sample1 & Sample2 \\ \midrule
AB\_CDEFG and AB\_CDE & This is sample text.This is sample text. This is sample text. This is sample text. This is sample text. This is sample text.This is sample text. This is sample text. This is sample text. This is sample text.\\ \midrule
AB\_CD, AB\_CD,AB\_CD and AB\_CD & This is sample text.This is sample text. This is sample text. This is sample text. This is sample text. This is sample text.This is sample text. This is sample text. This is sample text. This is sample text.\\ \bottomrule
\end{tabular}
\label{table:referent-table}
\end{table}
\end{document}
Appreciate suggestions on how this can be achieved.


\tbldefined? – Mico Jan 12 '23 at 17:10\tblfrom the question. It was overriding some of the commands in booktabs package like\midrule– Mad Jan 12 '23 at 17:39pcolumns but the answer is the same formcolumns: use>{\raggedright\arraybackslash}m{...}. – campa Jan 12 '23 at 17:41booktabsdoes not like vertical lines in columns, as you can see;-)– campa Jan 12 '23 at 17:43>{\raggedright\arraybackslash}m{...}but with uppercaseR, i.e.\RaggedRight. Thank you for pointing this. It works. If you can add this as an answer, otherwise I will remove the question if this is duplicating the other one. – Mad Jan 12 '23 at 17:54m{...}as far as I can left align and centre vertically. When I tried{>{\raggedright\arraybackslash}p{3.5cm} m{5.0cm}}it works but the content is not vertically centred but{>{\raggedright\arraybackslash}m{3.5cm} m{5.0cm}}works well. So I don't think the question you linked directly answer my question but it does help indeed. – Mad Jan 13 '23 at 04:03