I realize this is probably a really simple issue but I'm a complete beginner.
I am auto-generating code very similar to the LaTeX code below. However no matter what I do I can't get space between the two tables - vspace just doesn't seem to work.
However, if I have a figure after these tables vspace then works fine between the tables and the figure.
Does anyone have any advice please? I added
\usepackage{parskip}
today as I don't want paragraph formatting.
THANKS a lot for any help,
Tom.
%% WriteReport.m method created this file.
\documentclass[english]{article}
\usepackage{avant}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry {verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=1cm,headsep=1cm,footskip=1cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{color}
\usepackage{babel}
\usepackage{array}
\usepackage{float}
\usepackage{graphicx}
\usepackage{parskip}
\usepackage[bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
{hyperref}
\hypersetup{pdftitle={MyOutput},
pdfauthor={Autogenerated by MyOutput}}
\providecommand{\tabularnewline}{\\}
\usepackage{color}
\lhead{MyOutput}
\begin{document}
\section{\textsf{Section title}}
\begin{tabular}{|r|l|}
\hline
one & two \\
\hline
one & two \\
\hline
one & two \\
\hline
one & two \\
\hline
one & two \\
\hline
\end{tabular}
\newline
\vspace*{1 cm}
\begin{tabular}{|r|l|}
\hline
three & four \\
\hline
three & four \\
\hline
three & four \\
\hline
three & four \\
\hline
three & four \\
\hline
\end{tabular}
\end{document}
Just out of interest, why do I need the new line afterwards? I know what I was doing was wrong but wouldn't the vspace just insert the space and then the new table would start from there?
– Tom Dec 20 '11 at 11:01\vspaceinserts a0width vertical space. Without the newline after the\vspacethe tabular is set next to the0widthvspace. If you put a\newlineafter the last tabular and then place something there, you should see the vspace there. You shouldn't really need the\newlinebefore the\vspace, you can just move ti after and it should be fine. The\vspaceis then set next to the first tabular then you get a newline and TeX will respect the verical space and place the next line that amount lower. – Roelof Spijker Dec 20 '11 at 11:16\vspace, rather than\newline; a\newlineafter\vspaceis definitely wrong. – egreg Dec 20 '11 at 17:14\partoken before would do as well indeed. why is a\newlineafter wrong exactly? – Roelof Spijker Dec 20 '11 at 18:37Underfull \hbox (badness 10000) detected? So it's wrong (and useless if you put\paror an empty line, which is exactly the same). – egreg Dec 20 '11 at 18:46