1

I have a simple table that can be recreated with the simple MWE below, I am compiling with XeLaTeX:

\documentclass[12pt]{article}
\usepackage[letterpaper, left=19mm, right=19mm, top=3.52cm, bottom=2.84cm, headheight=38.7pt]{geometry}
\usepackage{setspace}
\setstretch{1.15}

\usepackage{tabularx}
\usepackage{array}

\usepackage{fontspec}
\setmainfont{Arial}

\usepackage{microtype}

\begin{document}

\begin{flushleft}
\begin{tabular}{@{}m{4.4cm}m{12.5cm}@{}}
\hline
\textbf{TO:} & Mr.\noindent and Mrs.\noindent J. Doe \\[0.54cm]
\hline
\textbf{SUBJECT:} & This is just a sample subject that is design to illustrate the text wrapping\\[0.54cm]
\hline
\textbf{DATE:} & \today \\
\hline
\end{tabular}
\end{flushleft}

\end{document}

Which produces the following table:

enter image description here

As you can see in the first two rows, the contents of the cells next to one another aren't vertically aligned by their respective centres, I've added hlines to make this obvious. How can I centre them properly?

  • Just remove those \\[.54cm]. What are they for? – LaRiFaRi Aug 13 '15 at 14:07
  • I was using those to set an empty space between rows of the table. Is there a better way of doing that? – Ben Aug 13 '15 at 14:09
3

If you want to increase the height of the rows, you should go via \renewcommand{\arraystretch}{<someFactor>}.

% arara: xelatex

\documentclass[12pt]{article}
\usepackage[letterpaper, left=19mm, right=19mm, top=3.52cm, bottom=2.84cm, headheight=38.7pt]{geometry}
\usepackage{setspace}
\setstretch{1.15}
\usepackage{booktabs}
\usepackage{array}

\begin{document}
%\renewcommand{\arraystretch}{1.5} % adjust value to your needs
\noindent
\begin{tabular}{@{}m{4.4cm}m{12.95cm}@{}} % increased to maximum width
    \toprule
    \textbf{TO:} & Mr.\ and Mrs.\ J.~Doe \\%\addlinespace % if you need some space after your row
    \midrule
    \textbf{SUBJECT:} & This is just a sample subject that is design to illustrate the text wrapping\\
    \midrule
    \textbf{DATE:} & \today \\
    \bottomrule
\end{tabular}   
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.