[Tex/LaTex] How to vertically align multiline column

tablestabularxvertical alignment

I am trying to set up a table with the tabularx package (although the used package does not really matter to me).

The table should stretch across the entire line. I am trying to get both columns centered vertically.

This works fine for the first column, but the second column is aligned (as it seems to me) at the same height as the text in the first column, which renders the second line of text being below the desired "middle" of the cell (The "middle" being somewhere in between the two lines of text). Oddly enough, if i shorten the text in the second column to fit into one line, neither of the columns is aligned correctly (or maybe it is, though not in the fashion i desire…).

Here's what i have so far:

\documentclass[a4paper,12pt,headsepline]{scrartcl}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{\linewidth}{| p{0.25\linewidth}| X |}  
\hline
\LaTeX & Is a document markup language and document preparation system for
the \TeX typesetting program.\\
\hline
\end{tabularx}
\end{document}

I am aware that vertical alignment in tables is discussed fairly often, although so far i was unable to find any solution that would work for me (including defining new column types).
Any hint or suggestion is greatly appreciated, i've been stuck on this for quite some time now…

Best Answer

You can try using m{...} type columns (redefining \tabularxcolumn you can change the default p{...} type used by tabularx):

\documentclass[a4paper,12pt,headsepline]{scrartcl}
\usepackage{tabularx}

\renewcommand{\tabularxcolumn}[1]{m{#1}}

\begin{document}

\noindent\begin{tabularx}{\linewidth}{| m{0.25\linewidth}| X |}  
\hline
\LaTeX & Is a document markup language and document preparation system for
the \TeX\ typesetting program.\\
\hline
\end{tabularx}

\end{document}

enter image description here

Related Question