I would like to :
- center vertically the content in a row
- change the height of the row
Here is an attempt:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\renewcommand{\tabularxcolumn}[1] {m{#1}}
\begin{document}
\renewcommand{\arraystretch}{4}
\begin{tabularx}{\linewidth}{|*{2}{Y|}}
\hline
test & test \\ \hline
\end{tabularx}
\end{document}
but it does not work.
What is the best way to handle tables in an easy and highly customisable way? How to to solve the present issue?
Thanks
EDIT: The solution of Zarko does not work, as shown in this MWE: the text is not entered vertically.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{makecell,tabularx}
\setcellgapes{12pt}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
{
\makegapedcells
\begin{tabularx}{\linewidth}{|*{2}{Y|}}
\hline
This is a longer line, this is a longer line, this is a longer line & test \\
\hline
\end{tabularx}
}
\end{document}
Best Answer
makecell
package:edit:
cellspace
pacakge and in cells with multi line content use\parbox{\linewidth}{...}
(unfortunatelymakecell
doesn't work withm
column types, andcellspace
has problems with multi lines contents too).