0

I am getting uneven space between this specific table and text in my latex. I cannot understand why. I have searched (tirelessly) for examples that correlate to my problem, but all has been in vain.

\documentclass[11pt,twoside,dvipsnames]{article}
\usepackage{geometry}
\usepackage{enumerate}
\usepackage{latexsym,booktabs}
\usepackage{amsmath,amssymb}
\usepackage[singlespacing]{setspace}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref} %% to make the referencing clickable 
\usepackage{graphicx}
\usepackage{caption} 
\captionsetup[table]{skip=1pt}
\usepackage{float}
\usepackage{makecell}
\usepackage{booktabs}

% Referencing 
\usepackage[natbibapa]{apacite}

%% Copied from repository before to make make comments

\usepackage{xcolor}
\newcommand{\tb}[1]{\noindent \textcolor{NavyBlue}{\textbf{Tom:}  #1}} % 1 'cause Trom is the best! 
\newcommand{\ish}[1]{\noindent \textcolor{Orange}{\textbf{Ish:}  #1}}


%% For modeling
\usepackage{optidef} % Ugly package, remove this package later. 

\geometry{a4paper,left=2cm,right=2.0cm, top=2cm, bottom=2.0cm}

\newtheorem{Definition}{Definition}
\newtheorem{Theorem}{Theorem}
\newtheorem{Lemma}{Lemma}
\newtheorem{Corollary}{Corollary}
\newtheorem{Proposition}{Proposition}
\newtheorem{Algorithm}{Algorithm}
\numberwithin{Theorem}{section}
\numberwithin{Definition}{section}
\numberwithin{Lemma}{section}
\numberwithin{Algorithm}{section}
\numberwithin{equation}{section}


% *********************************************************************
% Headings and page layout
% *********************************************************************
\usepackage{fancyhdr} % to design my own headings
\usepackage{titlesec, titletoc} % to design my own toc and part/chapter/section styles

% page style of "chapter"
\titleformat{\chapter}[display]{\LARGE \bfseries}
    {\Large Chapter \thesection \thispagestyle{plain}}{0ex}{\titlerule\vspace{2ex}}
\titlespacing*{\chapter}{0ex}{-8ex}{8ex}

\titleformat{\section}[display]{\LARGE \bfseries}
    {\thispagestyle{plain}}{0ex}{\titlerule\vspace{2ex}}
\titlespacing*{\section}{0ex}{0ex}{0ex}

\titleformat{\subsection}[display]{\Large \bfseries}
    {\thispagestyle{plain}}{0ex}{\vspace{2ex}}
\titlespacing*{\subsection}{0ex}{0ex}{3ex}


% definition of headings
\fancypagestyle{memo}{
    \pagestyle{fancy}
    \fancyhf{}
    \fancyhead[RO,LE]{\thepage}
    \fancyhead[RE]{\rightmark}
    \fancyhead[LO]{\leftmark}
    \renewcommand\headrulewidth{0.5pt}
}


\begin{document}

As a part of the programme mentioned above, delivery models are designed to meet the needs of each group. The table below summarises their delivery model.

\begin{table}[H]
\caption{Delivery model} 
\centering\renewcommand\cellalign{lc}
\setcellgapes{3pt}\makegapedcells
\begin{tabular}{|l| c| l|} \hline 
\textbf{JCVI Priority} & \textbf{Deployment strategy} & \textbf{Estimated finishing date} \\ \hline
1 and 2 & \makecell{Care home residents and staff: Resident homes \\ Over 80 years old: GP surgeries } & 5th Februrary 2021\\
3,4 and 5 & Vaccination appointment & Early March 2021 \\ 
6,7,8 and 9 & Mass vaccination centres & Early May 2021 \\ \hline\end{tabular}
\vspace{-3mm}
\end{table}


The indicates that the vaccinations began in Scotland on 8 January 2021. However, whether the vaccination process began all across Scotland. 

\end{document} 

1 Answer 1

4

How about commenting out the \vspace at the end of the table?

enter image description here

\documentclass[11pt,twoside,dvipsnames]{article}
\usepackage{geometry}
\usepackage{enumerate}
\usepackage{latexsym,booktabs}
\usepackage{amsmath,amssymb}
\usepackage[singlespacing]{setspace}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref} %% to make the referencing clickable 
\usepackage{graphicx}
\usepackage{caption} 
\captionsetup[table]{skip=1pt}
\usepackage{float}
\usepackage{makecell}
\usepackage{booktabs}

% Referencing 
\usepackage[natbibapa]{apacite}

%% Copied from repository before to make make comments

\usepackage{xcolor}
\newcommand{\tb}[1]{\noindent \textcolor{NavyBlue}{\textbf{Tom:}  #1}} % 1 'cause Trom is the best! 
\newcommand{\ish}[1]{\noindent \textcolor{Orange}{\textbf{Ish:}  #1}}


%% For modeling
\usepackage{optidef} % Ugly package, remove this package later. 

\geometry{a4paper,left=2cm,right=2.0cm, top=2cm, bottom=2.0cm}

\newtheorem{Definition}{Definition}
\newtheorem{Theorem}{Theorem}
\newtheorem{Lemma}{Lemma}
\newtheorem{Corollary}{Corollary}
\newtheorem{Proposition}{Proposition}
\newtheorem{Algorithm}{Algorithm}
\numberwithin{Theorem}{section}
\numberwithin{Definition}{section}
\numberwithin{Lemma}{section}
\numberwithin{Algorithm}{section}
\numberwithin{equation}{section}


% *********************************************************************
% Headings and page layout
% *********************************************************************
\usepackage{fancyhdr} % to design my own headings
\usepackage{titlesec, titletoc} % to design my own toc and part/chapter/section styles

% page style of "chapter"
\titleformat{\chapter}[display]{\LARGE \bfseries}
    {\Large Chapter \thesection \thispagestyle{plain}}{0ex}{\titlerule\vspace{2ex}}
\titlespacing*{\chapter}{0ex}{-8ex}{8ex}

\titleformat{\section}[display]{\LARGE \bfseries}
    {\thispagestyle{plain}}{0ex}{\titlerule\vspace{2ex}}
\titlespacing*{\section}{0ex}{0ex}{0ex}

\titleformat{\subsection}[display]{\Large \bfseries}
    {\thispagestyle{plain}}{0ex}{\vspace{2ex}}
\titlespacing*{\subsection}{0ex}{0ex}{3ex}


% definition of headings
\fancypagestyle{memo}{
    \pagestyle{fancy}
    \fancyhf{}
    \fancyhead[RO,LE]{\thepage}
    \fancyhead[RE]{\rightmark}
    \fancyhead[LO]{\leftmark}
    \renewcommand\headrulewidth{0.5pt}
}


\begin{document}
As a part of the programme mentioned above, delivery models are designed to meet the needs of each group. The table below summarises their delivery model.
\begin{table}[H]
\caption{Delivery model} 
\centering
\renewcommand\cellalign{lc}
\setcellgapes{3pt}
\makegapedcells
\begin{tabular}{|l|c|l|}
  \hline 
  \textbf{JCVI Priority} &
  \textbf{Deployment strategy} &
  \textbf{Estimated finishing date} \\
  \hline
  1 and 2 &
  \makecell{Care home residents and staff: Resident homes \\
    Over 80 years old: GP surgeries } &
  5th Februrary 2021 \\
  3,4 and 5 &
  Vaccination appointment & Early March 2021 \\ 
  6,7,8 and 9 &
  Mass vaccination centres & Early May 2021 \\
\hline
\end{tabular}
%\vspace{-3mm}  %% <------
\end{table}
The indicates that the vaccinations began in Scotland on 8 January
2021. However, whether the vaccination process began all across
Scotland.

\end{document}
2
  • I dont know what is happening. When I post the same code to a different tex file, this works as desired, but it does not work in my latex file. Aug 8, 2021 at 13:02
  • The only difference between your tex file and mine is that \vspace{-3mm}.
    – citsahcots
    Aug 8, 2021 at 13:40

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.