0

I would like my LaTeX produced table to look more vertically stretched, so it wouldn't appear so vertically compact. I would like it to look more like the google docs equivalent (see pic). How would I go about doing this?

\usepackage{tabularx} 
\usepackage{booktabs}
\usepackage{array

\begin{center}
\begin{tabularx}{\textwidth}{ 
   >{\raggedright\arraybackslash\hsize=0.348\hsize}X 
   >{\centering\arraybackslash\hsize=0.1\hsize}X
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X 
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X 
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X 
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X }
    \setlength\cellspacetoplimit{6pt}
    \setlength\cellspacebottomlimit{6pt}
  & & Unrestricted Funds 2019 & Restricted Funds 2019 & Total Funds 2019 & Total Funds 2018\\
  & \small{Note} & £ & £ & £ & £\\
  \textsc{Income} &&&&&\\ 
  \hspace{3mm} Voluntary Income & \footnotesize{2} & 43,933 & - & 43,933 & 36,196\\
  \hspace{3mm} Investment Income & \footnotesize{2} & - & - & - & 31\\
  \hspace{3mm} Charitable Activities & \footnotesize{2} & 597 & - & 597 & 530\\ \cmidrule{3-6}
  \textsc{Total Income} && 44,530 & - & 44,530 & 36,757\\[10mm]
  \textsc{Expenditure} &&&&&\\
  \hspace{3mm} Charitable Activities & \footnotesize{3,4,5,6} & 39,359 & - & 39,359 & 28,343\\
  \hspace{3mm} Governance Costs & \footnotesize{4} & 412 & - & 412 & 110\\ \cmidrule{3-6}
  \textsc{Total Expenditure} && 39,771 & - & 39,771 & 28,453\\[10mm]
  \textsc{Net Income (Expenditure)} && 4,759 & - &4,759 & 8,304\\
  \textsc{Net Movement in Funds} && 4,759 & - &4,759 & 8,304\\[10mm]
  \textsc{Reconciliation of Funds} &&&&&\\
  Total Funds Brought Forward && 35,356 & - &35,356 & 27,052\\
  Total Funds Carried Forward && 40,115 & - &40,115 & 35,356\\ \cmidrule{3-6}
\end{tabularx}
\end{center}

Tabularx Latex


Google Docs version: Google Docs

New contributor
Ollie Bliss is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

You defined values for \cellspacetop/bottomlimits, which is fine, as the cells contents will be vertically centred. However you didn't load the cellspace package, which defines these lengths. Further more, columns for which cells will have this vertical padding must have their specifier prefixed with the letter S (or C if you load siunitx). It works with all standard specifiers, but not with the Xcolumn type, which must be added to the list of recognised specifiers.

So here is a code which works. I took the opportunity to simplify your code. Note that you do not have to load array when you load tabularx – the latter does it for you. Also, your calculations for the coefficients in \hsize=... are wrong. They're not exactly proportionality coefficients, as they must sum up to the total number of X columns, but rather barycentric coordinates.

\documentclass{article}
\usepackage{geometry} 
\usepackage{tabularx,booktabs, cellspace}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}
\addparagraphcolumntypes{X}

\begin{document}

\begin{center}%\footnotesize
\setlength{\tabcolsep}{4pt}\small
\begin{tabularx}{\textwidth}{
@{} S{>{\raggedright\arraybackslash\hsize=2\hsize}X}
   >{\centering\arraybackslash\hsize=0.48\hsize}X
   *{4}{>{\raggedleft\arraybackslash\hsize=0.88\hsize}X}}
& &\multicolumn{2}{c}{ Funds 2019 } & \multicolumn{2}{c}{Total} \\[-0.5ex]
\cmidrule(lr){3-4} \cmidrule(lr){5-6}
  & & Unrestricted& Restricted & Funds 2019 & Funds 2018\\
  & \small{Note} & £ & £ & £ & £\\
  \textsc{Income} &&&&&\\
  \hspace{3mm} Voluntary Income & \footnotesize{2} & 43,933 & - & 43,933 & 36,196\\
  \hspace{3mm} Investment Income & \footnotesize{2} & - & - & - & 31\\
  \hspace{3mm} Charitable Activities & \footnotesize{2} & 597 & - & 597 & 530\\ \cmidrule(l){3-6}
  \textsc{Total Income} && 44,530 & - & 44,530 & 36,757\\[10mm]
  \textsc{Expenditure} &&&&&\\
  \hspace{3mm} Charitable Activities & \footnotesize{3,4,5,6} & 39,359 & - & 39,359 & 28,343\\
  \hspace{3mm} Governance Costs & \footnotesize{4} & 412 & - & 412 & 110\\ \cmidrule(l){3-6}
  \textsc{Total Expenditure} && 39,771 & - & 39,771 & 28,453\\[10mm]
  \textsc{Net Income (Expenditure)} && 4,759 & - &4,759 & 8,304\\
  \textsc{Net Movement in Funds} && 4,759 & - &4,759 & 8,304\\[10mm]
  \textsc{Reconciliation of Funds} &&&&&\\
  Total Funds Brought Forward && 35,356 & - &35,356 & 27,052\\
  Total Funds Carried Forward && 40,115 & - &40,115 & 35,356\\ \cmidrule(l){3-6}
\end{tabularx}
\end{center}

\end{document} 

enter image description here

0

Set it with \renewcommand{\arraystretch}{1.5}

\documentclass[a4paper]{article}
\usepackage{tabularx} 
\usepackage{booktabs}
\usepackage{array}
\begin{document}

\renewcommand{\arraystretch}{1.5}

\begin{center}
\begin{tabularx}{\textwidth}{ 
   >{\raggedright\arraybackslash\hsize=0.348\hsize}X 
   >{\centering\arraybackslash\hsize=0.1\hsize}X
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X 
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X 
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X 
   >{\raggedleft\arraybackslash\hsize=0.138\hsize}X }

  & & Unrestricted Funds 2019 & Restricted Funds 2019 & Total Funds 2019 & Total Funds 2018\\
  & \small{Note} & £ & £ & £ & £\\
  \textsc{Income} &&&&&\\ 
  \hspace{3mm} Voluntary Income & \footnotesize{2} & 43,933 & - & 43,933 & 36,196\\
  \hspace{3mm} Investment Income & \footnotesize{2} & - & - & - & 31\\
  \hspace{3mm} Charitable Activities & \footnotesize{2} & 597 & - & 597 & 530\\ \cmidrule{3-6}
  \textsc{Total Income} && 44,530 & - & 44,530 & 36,757\\[10mm]
  \textsc{Expenditure} &&&&&\\
  \hspace{3mm} Charitable Activities & \footnotesize{3,4,5,6} & 39,359 & - & 39,359 & 28,343\\
  \hspace{3mm} Governance Costs & \footnotesize{4} & 412 & - & 412 & 110\\ \cmidrule{3-6}
  \textsc{Total Expenditure} && 39,771 & - & 39,771 & 28,453\\[10mm]
  \textsc{Net Income (Expenditure)} && 4,759 & - &4,759 & 8,304\\
  \textsc{Net Movement in Funds} && 4,759 & - &4,759 & 8,304\\[10mm]
  \textsc{Reconciliation of Funds} &&&&&\\
  Total Funds Brought Forward && 35,356 & - &35,356 & 27,052\\
  Total Funds Carried Forward && 40,115 & - &40,115 & 35,356\\ \cmidrule{3-6}
\end{tabularx}
\end{center}
\end{document}

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