I have created a table using tabularx
but I can't seem to centre the text within the columns. I have tried to use 'X' and 'c' (which works on tabular) but nothing seems to work. Can someone please advise? I am also unsure what @{}*{3}
in the line {\linewidth}{@{}*{3}{>{\arraybackslash}X}}
means.
Here's my MWE:
\documentclass[a4paper,11pt]{article}
\usepackage{tabularx}
\usepackage{booktabs,caption, makecell}
\usepackage{pdflscape,afterpage}
\begin{document}
\begin{landscape}% Landscape page
\begin{table}[ht]
\caption{Cognitive walkthrough goals, tasks and actions}
\centering
\small
\begin{tabularx}{\linewidth}{@{}*{3}{>{\arraybackslash}X}}
\toprule\midrule[0.5pt]
\thead{\textbf{Goal}}& \thead{\textbf{Task}} & \thead{\textbf{Action}} \\
\midrule
Evaluate the ease in which users can join projects & Access and account set up &
\begin{enumerate}
\item Teast A: Video provides a powerful way to help you prove your point. \par
Test B: Video provides a powerful way to help you prove your point.
\item Video provides a powerful way to help you prove your point.
\end{enumerate} \\
\addlinespace
Evaluate the ease in learning to map & Learning how to map & Read tutorial \\
\addlinespace
Contribute data & Contributing data by classifying maps &
\begin{enumerate}
\item Video provides a powerful way to help you prove your point.
\item Test A: Video provides a powerful way to help you prove your point. \par
Test B: Video provides a powerful way to help you prove your point.
\item Video provides a powerful way to help you prove your point.
\end{enumerate} \\
\addlinespace
Evaluate if the user likes using the application and whether they like using it & - & - \\
\bottomrule
\end{tabularx}%
\hspace*{-12mm}%
\label{table:comparison of techniques}
\end{table}
\end{landscape}
\end{document}
I've also attached a picture of what I'd like to centre as an example.
Thanks in advance!
X
column type:>{\centering\arraybackslash}X}
multirow
cell. if you like to vertical center text in all columns, than redefineX
column as:\renewcommand\tabularxcolumn[1]{m{#1}}
. your comment is not very clear ...