I wish to label a long table using \label{long_table_1}
However, when I insert it at the bottom of the page it shows
Notice there is another row sort of added to the table!
I cannot adjust the \label
above the final \hline
either because that triggers an error.
Can someone please tell me how I can \label
a long table without inserting another row as above?
Example Code:
\documentclass[12pt]{article}
%Preamble
\usepackage[margin=1in]{geometry}
\usepackage[draft]{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{upgreek}
\usepackage{hyperref}
\usepackage{cancel}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{ragged2e}
\usepackage{longtable}
\usepackage{array}
\usepackage{changepage}
\usepackage{stackengine}
\stackMath
\usepackage{longtable}
\usepackage{supertabular}
\title{Table Problem}
\begin{document}
\maketitle
\tableofcontents
\newpage
{\bfseries Things I love about Mexico}
\begin{longtable}{ | m{5.5cm} | m{5.5cm} |}
\hline
Princess Yagoda & Prince Khan\footnote{Tacos!}\\
\hline
\hline
{
Uno
} & Dos \\
\hline
{
Tres
} & Quarto\\
\hline
\label{The_Most_Important_Table_Ever} %<---- Problem
\end{longtable}
\end{document}
Best Answer
For referencing of table you should in the first place to have table caption. A label should follows caption.
longtable
is designed so, that the caption has place in the table:Above MWE gives:
Off-topic: in your preamble you have many packages load twice,
hyperref
had to be last in the preamble (with some exception not presented in your case),supertabular
andlongtable
better not use in the same document. For better table looking I increase\arraystretch
to 1.3. Also I comment all packages not relevant to your problem.