在新页面上表格会移动

在新页面上表格会移动

我正在尝试在文档中实现符号列表。符号列表的第一页看起来不错。但是,在第二页(以及后续页面)上,表格由于未知原因而缩进,如下图所示(注意红线)。我希望两页对齐。我无法实现这一点。

我不在乎是否必须更改第一页才能使文本出现在第二页中,反之亦然,只要它们对齐即可。有人知道为什么会发生这种情况以及我如何实现我想要的结果吗?

我使用的代码:

\chapter*{List of Symbols} \label{list}
\addcontentsline{toc}{chapter}{List of Symbols}
\begin{tabular}{cp{1.0\textwidth}}
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 ...
\end{tabular}

\clearpage
\thispagestyle{plain}
\begin{tabular}{cp{1.0\textwidth}}
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 ...
\end{tabular}

问题形象

编辑:在这里,我描述了一个新问题,即前一页的页眉显示在符号列表之后的页面中。当使用跨多页的表格时会发生这种情况。当我手动将符号列表的表格拆分为多页时,页眉不会出现在符号列表中。

   \documentclass[english,12pt,a4paper,pdftex,twoside]{report}

\usepackage[english]{babel}
\usepackage{array}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{amsfonts,amssymb,amsbsy}
\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{xltabular}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{relsize}
\usepackage{calc}
\usepackage{gensymb}
\usepackage{caption} 
\usepackage{textcomp}
\usepackage{epstopdf}
\usepackage{subcaption}
\usepackage{color}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage[a4paper,margin=3.5cm,footskip=0.5cm,top=1.8in,bottom=4.5cm]{geometry}
\usepackage[font={small}]{caption}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{cite}
\usepackage{tocbibind}
\usepackage{appendix}
\usepackage{xcolor}
\usepackage{amsthm}
\usepackage{chngpage}
\usepackage{mathtools}
\usepackage[figuresright]{rotating}



\setlength\parindent{24pt}


\titleclass{\subsubsubsection}{straight}[\subsection]

\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered

\titleformat{\subsubsubsection}
  {\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
  {3.25ex \@plus1ex \@minus.2ex}%
  {-1em}%
  {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
  {3.25ex \@plus1ex \@minus .2ex}%
  {-1em}%
  {\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}







\captionsetup[table]{skip = 12 pt}

\newlength{\depthofsumsign}
\setlength{\depthofsumsign}{\depthof{$\sum$}}
\newlength{\totalheightofsumsign}
\newlength{\heightanddepthofargument}

\newcommand{\nsum}[1][1.4]{
    \mathop{
        \raisebox
            {-#1\depthofsumsign+1\depthofsumsign}
            {\scalebox
                {#1}
                {$\displaystyle\sum$}%
            }
    }
}
\newcommand{\resum}[1]{
    \def\s{#1}
    \mathop{
        \mathpalette\resumaux{#1}
    }
}
\newcommand{\resumaux}[2]{
    \sbox0{$#1#2$}
    \sbox1{$#1\sum$}
    \setlength{\heightanddepthofargument}{\wd0+\dp0}
    \setlength{\totalheightofsumsign}{\wd1+\dp1}
    \def\quot{\DivideLengths{\heightanddepthofargument}{\totalheightofsumsign}}
    \nsum[\quot]
}
% http://tex.stackexchange.com/a/6424/16595
\makeatletter
\newcommand*{\DivideLengths}[2]{
  \strip@pt\dimexpr\number\numexpr\number\dimexpr#1\relax*65536/\number\dimexpr#2\relax\relax sp\relax
}
\makeatother



\newcommand\varpm{\mathbin{\vcenter{\hbox{%
  \oalign{\hfil$\scriptstyle+$\hfil\cr
          \noalign{\kern-.3ex}
          $\scriptscriptstyle({-})$\cr}%
}}}}
\newcommand\varmp{\mathbin{\vcenter{\hbox{%
  \oalign{\hfil$\scriptstyle-$\hfil\cr
          \noalign{\kern-.3ex}
          $\scriptscriptstyle({+})$\cr}%
}}}}



\setlength{\tabcolsep}{8pt}
\renewcommand{\arraystretch}{1.5}
\pagestyle{fancy}
\fancyfoot{}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\hypersetup{pdfpagemode=UseNone, pdfstartview=FitH,
  colorlinks=true,urlcolor=red,linkcolor=black,citecolor=black,
  pdftitle={Default Title, Modify},pdfauthor={Your Name},
  pdfkeywords={Modify keywords}}
\renewcommand*\rmdefault{lmr}
\newcommand{\bb}{\textbf}
\newcommand{\ita}{\textit}
\newcommand{\tx}{\textrm}
\newcommand{\todo}{\textbf{TODO: }}


\newcommand*\xbar[1]{%
   \hbox{%
     \vbox{%
       \hrule height 0.5pt % The actual bar
       \kern0.5ex%         % Distance between bar and symbol
       \hbox{%
         \kern-0.1em%      % Shortening on the left side
         \ensuremath{#1}%
         \kern-0.1em%      % Shortening on the right side
       }%
     }%
   }%
} 

\renewcommand{\headrulewidth}{0 pt}

\begin{document}

% -----------------------------------------------------

\begin{titlepage}

\selectlanguage{english}

\setlength{\headheight}{3 cm}
\thispagestyle{fancy}
\fancyhead[L]{Header1\\ Header1 Header1 Header1\\ Header1 Header1 Header1 Header1 Header1}

\setcounter{page}{0}
\pagenumbering{roman}


\mbox{}\\[2.5cm]

\noindent
Name Lastname\\

\noindent
{\Large \bfseries Title title title \\title}


\mbox{}\\[90 mm]



\noindent
Document type\\
Place, \today \\

\noindent
Supervisor:\,\,\,\,\,\,\,\, Supervisor\\
Advisor:\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, Advisor \\




\selectlanguage{english}


\end{titlepage}






% --------------------------------------------------



\clearpage

\setlength{\headheight}{16pt}
\thispagestyle{fancy}
\fancyhead[R]{DOCUMENT \\ TYPE}
\fancyhead[L]{Header2 \\ Header2 Header2\\Header2 Header2 Header2 \\Header2}
\selectlanguage{english}

\mbox{}\\[0mm]

\enlargethispage{20mm}

\begin{center}
\begin{tabular}{ |l l| }
  \hline
  \bb{Author:} & Name Lastname\\
  \hline
  \bb{Title:} & Title title title\\
  \hline
  \bb{Date:} & \today \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \bb{Pages:}\,\,\, $n+m$\\
  \hline
  \bb{Major:} & Major major major major\\
  \bb{Code:} & 1234\\
  \hline
  \bb{Supervisor:} &  Supervisor\\
  \bb{Advisor:} & Supervisor\\
  \hline

  \multicolumn{2}{|l|}{
  \parbox{13.2cm}{

\mbox{}\\[0mm]
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem\\

Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum \\

Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum \\
}} \\
  \hline
  \parbox[t][11 mm][t]{2.7cm}{\bb{Keywords:}} & \parbox[t][16mm][t]{10.0cm}{keyword1, keyword2, keyword3} \\
  \hline
  \bb{Language:} & English \\
  \hline

\end{tabular}
\end{center}


%---------------------------------------------------


\clearpage

\setlength{\headheight}{16pt}
\thispagestyle{fancy}
\fancyhead[R]{DOCUMENT\\ TYPE}
\fancyhead[L]{Header2 \\ Header2 Header2\\Header2 Header2 Header2 \\Header2}
\selectlanguage{english}

\mbox{}\\[0mm]

\enlargethispage{20mm}

\begin{center}
\begin{tabular}{ |l l| }
  \hline
  \bb{Author:} & Name Lastname\\
  \hline
  \bb{Title:} & Title title title\\
  \hline
  \bb{Date:} & \today \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \bb{Pages:}\,\,\, $n+m$\\
  \hline
  \bb{Major:} & Major major major major\\
  \bb{Code:} & 1234\\
  \hline
  \bb{Supervisor:} &  Supervisor\\
  \bb{Advisor:} & Supervisor\\
  \hline

  \multicolumn{2}{|l|}{
  \parbox{13.2cm}{

\mbox{}\\[0mm]
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum \\

Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum \\

Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum 
}} \\
  \hline
  \parbox[t][11 mm][t]{2.7cm}{\bb{Keywords:}} & \parbox[t][16mm][t]{10.0cm}{keyword1, keyword2, keyword3} \\
  \hline
  \bb{Language:} & language2\\
  \hline

\end{tabular}
\end{center}

\selectlanguage{english}


%---------------------------------------------------


\clearpage
\thispagestyle{plain}

\chapter*{Acknowledgements} \label{ch:ackno}

Thanks for all to be thanked.\mbox{}\\[2.5cm]
\ita{Place, Time time}\\\\\\\\
Author



\vspace*{-38.5mm}

\setlength{\footskip}{40pt}

\addcontentsline{toc}{chapter}{\nameref{ch:ackno}}


\thispagestyle{plain}

%----------------------------------------------------

\clearpage
\thispagestyle{plain}

\chapter*{Abbreviations} \label{abbr}

\addcontentsline{toc}{chapter}{Abbreviations}

\begin{tabular}{cp{0.6\textwidth}}
 ABBR & Abbreviation explanation\\ 
 ABBR & Abbreviation explanation\\
 ABBR & Abbreviation explanation\\
 ABBR & Abbreviation explanation\\
 ABBR & Abbreviation explanation\\
\end{tabular}


%----------------------------------------------------

\clearpage
\thispagestyle{plain}
\chapter*{List of Symbols}
\label{list}

\begin{xltabular}{\linewidth}{@{}>{$}r<{$} X @{}}
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\vdots  & other symbols with long explanation other symbols with long explanation other symbols with long explanation            \\
\sigma^2  & standard deviation\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\

\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\end{xltabular}
\end{document}

在此处输入图片描述

答案1

使用

\usepackage{tabularx}
...


\chapter*{List of Symbols} \label{list}
\addcontentsline{toc}{chapter}{List of Symbols}

\noindent
\begin{tabularx}{\linewidth}{@{}cX}
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 ...
\end{tabularx}

\clearpage
\thispagestyle{plain}

\noindent
\begin{tabularx}{\linewidth}{@{}cX}
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 ...
\end{tabularx}

如果需要分页符,请使用xltabular具有相同名称环境的包。

答案2

正如我在评论中提到的:

\documentclass{book}
\usepackage{array,xltabular}

\begin{document}
\chapter*{List of Symbols}
\label{list}

\begin{xltabular}{\linewidth}{@{}>{$}r<{$} X @{}}
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\vdots  & other symbols with long explanation other symbols with long explanation other symbols with long explanation            \\
\sigma^2  & standard deviation\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\alpha  & Explanation of the symbol\\
\beta   & Explanation of the symbol\\
\gamma  & Explanation of the symbol\\
\end{xltabular}
\end{document}

在此处输入图片描述 在此处输入图片描述

答案3

\noindent并将@{}帮助您实现您的需求:

\chapter*{List of Symbols} \label{list}
\addcontentsline{toc}{chapter}{List of Symbols}
\begin{tabular}{@{}cp{1.0\textwidth}}
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 ...
\end{tabular}

\clearpage
\thispagestyle{plain}

\noindent\begin{tabular}{@{}cp{1.0\textwidth}}
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 $symbol$ & Explanation of the symbol\\
 ...
\end{tabular}

另外,请注意,很少有包可用于将表格变为自动分页模式,例如,supertabularlongtable包......

相关内容