Vertical Center in Tabularx

I know this question has asked many times before, but is there maybe another efficient way to really vertically centre text in a tabularx environment?

\documentclass[a4paper,9pt]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\usepackage{xcolor}
\definecolor{table_lines}{cmyk}{0, 0, 0, 0.24} % define color
\usepackage{fancyhdr} % page numbering
\usepackage{colortbl} % column lines color
\usepackage{tabularx} % different column width
\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}
\newcolumntype{C}[1]{>{\hsize=#1\hsize\centering\arraybackslash}X}
\makeatletter
\newcommand{\thickhline}{\noalign {\hrule height 2pt}}
\newcolumntype{'}{!{\color{table_lines}\vrule}}
\makeatother
\usepackage{tcolorbox} % fancy section
\renewcommand*\footnoterule{} % remove footnote line
\usepackage{array}
\makeatletter
\def\tabularxcolumn#1{m{#1}} % vertical center in tabualrx
\makeatother

\begin{document}
\renewcommand{\tabularxcolumn}[1]{>{\arraybackslash}m{#1}}
\begin{center}
\begin{tabularx}{\textwidth}{' L{0.20} '@{}L{0.53} ' C{0.27} '}
\arrayrulecolor{table_lines}\hline
0 & 11/02/2011 & \raisebox{-0.05cm}{1} \\[0.0775cm]\hline
Hallelujah & 04/17/2012 & \raisebox{-0.05cm}{1} \\[0.0775cm]\hline
1 & 07/05/2013 & \raisebox{-0.05cm}{0} \\[0.0775cm]\arrayrulecolor{table_lines}\hline
\end{tabularx}
\end{center}
\vspace*{0.7cm}
\end{document}


The results is as in the picture and you can see that the text is not really centred.

• The entries are only one line, so vertical centre is almost indistinguishable from top or bottom alignment if you apply it to all the columns. Did you mean horizontal alignment???? Sep 30, 2015 at 20:19
• yea, it may be hard to see but they are not really vertically centred, but this is what I am actually looking for. Maybe it isn't so easily doable, but that is what I want to find out. Sep 30, 2015 at 20:24
• @Hiro They are vertically centered. See slashes. Sep 30, 2015 at 20:28
• @Hiro the vertical centres of each entry are lined up, but as the entries in each column are single row they are all aligned just as if they had baseline alignment. For such a table anything other than baseline alignment is going to look really odd anyway! Sep 30, 2015 at 20:33
• @buhtz why did you ping me It wasn't my example:-) Dec 11, 2016 at 23:32

Mostly the alignment was off due to the \raisebox and extra length specified to \\[.] however you also want to add a little extra space above each row to compensate for the visual effect of the descender on / making the digits appear over-high within their row.

Something like

\documentclass[a4paper,9pt]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\usepackage{xcolor}
\definecolor{table_lines}{cmyk}{0, 0, 0, 0.24} % define color

\usepackage{colortbl} % column lines color
\usepackage{tabularx} % different column width
\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}
\newcolumntype{C}[1]{>{\hsize=#1\hsize\centering\arraybackslash}X}
\makeatletter
\newcommand{\thickhline}{\noalign {\hrule height 2pt}}
\newcolumntype{'}{!{\color{table_lines}\vrule}}
\makeatother

\begin{document}

\begin{center}
\renewcommand\arraystretch{1.2}

Incidentally as there is no line breaking within the rows tabularx isn't doing very much useful work here, I'd simply use tabular (although the vertical spacing is the same)