How to \label a long table without adding a new row?
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:
\documentclass[12pt]{article}
%Preamble
\usepackage[margin=1in]{geometry}
%\usepackage[draft]{graphicx}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amsthm}
%\usepackage{amssymb}
%\usepackage{mathrsfs}
%\usepackage{upgreek}
%\usepackage{cancel}
%\usepackage{graphicx}
%\usepackage{subfig}
%\usepackage{ragged2e}
%\usepackage{longtable}
\usepackage{array}
%\usepackage{changepage}
%\usepackage{stackengine}
%\stackMath
%\usepackage{makecell}
\usepackage{longtable}
%\usepackage{supertabular}
\usepackage[colorlinks=true,
linkcolor={red},citecolor={red},
]{hyperref}
\renewcommand\arraystretch{1.3}
\title{Table Problem}
\begin{document}
\maketitle
%\tableofcontents
%\newpage
\begin{longtable}{ | m{5.5cm} | m{5.5cm} |}
\caption{Things I love about Mexico}
\label{The_Most_Important_Table_Ever}\\ %<---- Problem
\hline
Princess Yagoda & Prince Khan\footnote{Tacos!}\\
\hline
\hline
Uno & Dos \\
\hline
Tres & Quarto\\
\hline
\end{longtable}
see table \ref{The_Most_Important_Table_Ever}
\end{document}
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
and longtable
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.
It isn't really specifically the \label
that generates the spurious cell. Anything after the \\
other than \hline
or similar commands will start a new cell, {}
or \relax
for example.
You can place \label
more or less anywhere in the table other than where you put it. It's pretty odd not to have a \caption
as otherwise there is no visible number that relates to the generated \ref
however it does work, as shown below. Normally I'd put \label
inside the argument of \caption
as in normal tables but:
\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\label{The_Most_Important_Table_Ever} \\
\hline
{
Tres
} & Quarto\\
\hline
\end{longtable}
see \ref{The_Most_Important_Table_Ever}
\end{document}