I need a table with blank lines for my Lab reports, If I write a normal table I get lines that are too small, I searched the internet and what I found was a table here with the following code ( slightly altered ): ( Need Horizontal spacing )
\documentclass{article}
\usepackage{tabularx}
\usepackage{geometry}
\newcolumntype{C}{>{\centering\arraybackslash $}X<{$}}
\begin{document}
\begin{center}
\begin{tabularx}{\textwidth}{@{\rule[-4ex]{0pt}{7ex}}|*{12}{C|}}
\hline
\Delta d (cm) & 0 & 0.5 & 1 & 1.5 & 2 & 2.5 & 3 & 3.5 & 4 & 4.5 & 5 \\
\hline
y_R & & & & & & & & & & \\
\Delta ( \Delta d ) (mm) & & & & & & & & & & \\ [0.5ex]
\hline \hline
\Delta d (cm ) & 5.5 & 6 & 6.5 & 7 & 7.5 & 8 & 8.5 & 9 & 9.5 & 10\\
\hline
y_R & & & & & & & & & & \\
\hline
\Delta ( \Delta d ) (mm) & & & & & & & & & &\\ [0.5 ex]
\hline \hline
\Delta d (cm) & 10.5 & 11 & 11.5 & 12 &12.5 & 13 & 13.5 & 14 & 14.5\\
y_R & & & & & & & & & & \\
\Delta ( \Delta d ) (mm) & & & & & & & & & &\\
\hline
\end{tabularx}
\end{center}
\end{document}
Three points on this one :
- If I don't use the center environment more than half the table will get out of the page
- No lines in between the rows
- The last lines are half blank
I use ShareLatex at the moment, so don't know if it can do any bad, Local Tex editor makes my equations go crazy.
EDIT: Issue Fixed, the last lines being half blank was due to the table being wider than the maximum ( I thought it would just reduce it ) But apparently due to the code I found, the width is set, and overrid Latex's compiler. reducing the table's collumns number to 11 fixed it. Though the extra table that contains the other values is ugly. And if I reduce the table size more I will have to make 4 tables, which is not very pretty.
array
package and its option to increase spacing (arraystretch
)?arraystretch
works on Vertical spacing if I'm not mistaken.p
) column type to make the horizontal spacing match your needs?