代码如下:
\documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
\usepackage{tablefootnote}
\usepackage[flushleft]{threeparttable}
%\setTableNoteFont{\scriptsize}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
%\geometry{landscape} % Activate for rotated page geometry
\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{amsmath} % For table numbering based on Section
\numberwithin{table}{section}
\renewcommand\thetable{\thesection.\arabic{table}}
\usepackage[
singlelinecheck=false % <-- important
]{caption}
\usepackage[labelfont=bf,textfont=md]{caption}
%\usepackage{placeins} % for fixing table position
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{subfig}
\usepackage{xcolor}
\usepackage{float}
\usepackage{longtable}
\usepackage{makecell}
\usepackage{booktabs} % for toprule,midrule, and bottomrule
%\usepackage{dirtytalk} % for quotes
\usepackage{lscape} % changes a page to a landscape
\pgfplotsset{compat=1.16}
\usetikzlibrary{intersections,decorations.markings,,pgfplots.colorbrewer,shapes.arrows}
\usepgfmodule{nonlineartransformations}
\usepgflibrary{curvilinear}
\usepgfmodule{nonlineartransformations}
\tikzset{arrownode/.style={
shape=single arrow,
single arrow head extend=.75em,
single arrow head indent=.25em,
minimum width=3em,
draw,
}
}
\usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
% TeX will automatically convert eps --> pdf in pdflatex
\usepackage{amssymb}
\usepackage{hyperref} %Make this the last package imported
\usepackage[bottom]{footmisc} % Make footnotes to go to the buttom of a page
\usepackage[screen,nopanel]{pdfscreen} % Makes sections colorful
\usepackage{pdfpages} % allows to load a pdf page into latex
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue,
pdftitle={Sharelatex Example},
pdfpagemode=FullScreen,
}
\title{Experiment}
\author{Vahe}
\begin{document}
\maketitle
\pagebreak
\tableofcontents
\pagebreak
\section{Section A}
\subsection{Subsection A}
%\setlength\LTleft{-2in}
\setlength\LTright{2in}
{\setlength{\tabcolsep}{2pt}
\begin{longtable}{l*{5}r}
\caption{Numbers}\\
%&\multicolumn{5}{c}{\textit{\textbf{Date}}}\\
\toprule
& May 2019 & Jun 2019 & Jul 2019 & Aug 2019 & Sep 2019\\
\midrule
\endfirsthead
\caption{Continued}\\
\toprule
& May 2019 & Jun 2019 & Jul 2019 & Aug 2019 & Sep 2019\\
\midrule
\endhead
\makecell[l]{A} & 172.71 & 182.98 & 183.62 & 174.33 & 177.31 \\
\makecell[l]{B} & 18.29 & 18.45 & 18.35 & 18.38 & 23.36 \\
\makecell[l]{C} & 191.00 & 201.43 & 201.97 & 192.71 & 200.67 \\
\end{longtable}}
\end{document}
结果表如下。
如您所见,存在错位。我无法理解这个问题。如果有人知道如何处理这个问题,请帮忙。此外,\tableofcontents 命令只显示第二页顶部的内容,没有其他内容。如果您能帮助我解决这个问题,我将不胜感激。提前谢谢您。