Longtable 显示不正确(浮动到右侧)

Longtable 显示不正确(浮动到右侧)

下午好 !

在 Latex 下,我创建了一个长表:

\documentclass[times]{iapress}
\usepackage{moreverb}
\usepackage[dvips,colorlinks,bookmarksopen,bookmarksnumbered,citecolor=red,urlcolor=red]{hyperref}

%%
\usepackage{amsmath, amssymb}
\usepackage{pdflscape}

%%
\def\volumeyear{202x}
\def\volumenumber{x}
\def\volumemonth{Month}
\setcounter{page}{00}
\renewcommand{\baselinestretch}{1.01}
%%

\usepackage{colortbl}
\usepackage[margin=1cm]{caption}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{float}
\usepackage{graphicx}
\graphicspath{{figures/}}

\usepackage{longtable}

%\usepackage{algorithm}

\usepackage{algorithmic}

\usepackage{pdfpages}
\usepackage[ ruled,vlined]{algorithm2e}
\usepackage{ifoddpage}
\usepackage{blindtext}
\usepackage{authblk} 
\usepackage{listings}
\usepackage{xcolor}
%% attention here ! 
\renewcommand{\topfraction}{0.9}

\lstset{
basicstyle=\scriptsize\tt,
}
%%
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}

\lstdefinestyle{mystyle}{
    backgroundcolor=\color{backcolour},   
    commentstyle=\color{codegreen},
    keywordstyle=\color{magenta},
    numberstyle=\tiny\color{codegray},
    stringstyle=\color{codepurple},
    basicstyle=\ttfamily\footnotesize,
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=5pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}

\begin{document}
%% longtable of results 
\usepackage{tikz}


\pagestyle{empty}
\usepackage{everypage}
\usepackage{lipsum}
\usepackage{afterpage}
\newcommand{\Lpagenumber}{\ifdim\textwidth=\linewidth\else\bgroup
  \dimendef\margin=0 %use \margin instead of \dimen0
  \ifodd\value{page}\margin=\oddsidemargin
  \else\margin=\evensidemargin
  \fi
  \raisebox{\dimexpr -\topmargin-\headheight-\headsep-0.5\linewidth}[0pt][0pt]{%
    \rlap{\hspace{\dimexpr \margin+\textheight+\footskip}%
    \llap{\rotatebox{90}{\thepage}}}}%
\egroup\fi}


 \renewcommand\thetable{11} 
 
\setlength\LTleft{-1cm}
\setlength\LTright{-1cm}
\footnotesize        
\begin{longtable}{|c|c|l|l|l|cl|} 

 
\caption{Some simulation results of the suggested hybrid optimizer}
\\
 
\hline
Test function 
  & Study domain 
    & \multicolumn{2}{c|}{\begin{tabular}[c]{@{}c@{}} 
                          initial obtained solution (Algorithm 2 )
                          \end{tabular}} 
      & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}} 
                            Obtained hybrid\\ 
                            optimizer solution\\ 
                            (Algorithm 3 ) 
                            \end{tabular}} 
        & \multicolumn{1}{l}{\begin{tabular}[c]{@{}c@{}} 
                             Objective\\ 
                             function\\ 
                             value  of the\\  
                             solution 
                             \end{tabular}} 
          & \multicolumn{1}{c|}{} \\* 
\hline
\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}   Sphere \\    ( dim = 13 )   \end{tabular}} 
  & \multirow{13}{*}{$ [-6,6]^{13} $ } 
    & $ Nbre\_iter=5  \;\; N=20 \; \; P=4 $  
      & \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
                        $X1=-0.553850768$ \\ 
                        $X2=-1.493074761$\\ 
                        $X3=0.6767506500$ \\ 
                        $X4=-0.602909613$ \\ 
                        $X5=-1.047292736$ \\ 
                        $X6=-0.191411525$ \\ 
                        $X7=-0.079137285$ \\ 
                        $X8=0.2588126665$ \\ 
                        $X9=-1.444664397$ \\ 
                        $X10=-0.92061842$ \\ 
                        $X11=0.424461785$ \\ 
                        $X12=-0.38351937$ \\ 
                        $X13=-0.15875219$ \end{tabular} } 
        & \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
                          $X1=-4.9999e-09$ \\ 
                          $X2=-5.0000e-09$ \\ 
                          $X3=-5e-09$ \\ 
                          $X4=-5e-09$ \\ 
                          $X5=-5e-09$ \\ 
                          $X6=-5e-09$ \\ 
                          $X7=-5.000003e-09$ \\ 
                          $X8=-4.307553e-09$ \\ 
                          $X9=-5.0000006e-09$ \\ 
                          $X10=-5e-09$ \\ 
                          $X11=-5.000723e-09$ \\ 
                          $X12=-5.392374e-09$ \\ 
                          $X13=-5.00000000053859e-09$ \end{tabular}} 
          & \multirow{13}{*}{$ 3.22640e-16  $ } &  \\* 
\cline{3-3}
 &  
   & \begin{tabular}[t]{@{}l@{}} 
     $ \text{Iter} =50 $\\
     $\alpha=0.1$\\
     $\gamma=0.99$    
     \end{tabular} 
     &  &  &  &  \\ 
     &&&&&& \\
     &&&&&& \\ 
     &&&&&& \\ 
     &&&&&& \\
     &&&&&& \\
     &&&&&& \\
     &&&&&& \\
     &&&&&& \\
     &&&&&& \\
\hline
\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}   Himmelblau’s
        ( dim = 2)   \end{tabular}} 
& \multirow{13}{*}{$ [-6,6]^{2} $ } 
& $N\_ter=6 \; N=40 \; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=3.156640$ \\ 
        $X2=2.194130$\\ 
 \end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=2.99876$ \\ 
        $X2=2.01136$ \\ 
\end{tabular}} 
& \multirow{13}{*}{$ 0.001983  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =100 $\\
    $\alpha=0.01$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline

\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}    Rastrigin function ( n = 8 )
           \end{tabular}} 
& \multirow{13}{*}{$ [-5.12,5.12]^{8} $ } 
& $N\_ter=13\; N=40 \; P=10   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=0.2634143048$ \\ 
        $X2=0.9917922607$\\ 
        $X3=1.2036587692$ \\
        $X4=1.0961852101$\\
        $X5=1.1506293024 $ \\
        $X6=0.0556164503$ \\
        $X7=0.03749775658$ \\
        $X8=0.14211747971 $
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=-0.007194304$ \\ 
        $X2=1.0007044373$ \\ 
        $X3= 0.994805762 $ \\ 
        $X4=0.9897889558$ \\ 
        $X5=0.9949586327$ \\ 
        $X6=-0.004661976$ \\ 
        $X7=0.00352526731$ \\ 
        $X8=-0.00242884$ \\ 
\end{tabular}} 
& \multirow{13}{*}{$ 4.00990032  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =50 $\\
    $\alpha=0.1$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline


\newpage
\caption{Some simulation results of the suggested hybrid optimizer}

\hline
\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}      Ackley ( dim = 2 ) 
\end{tabular}} 
& \multirow{13}{*}{$ [-5,5]^{2} $ } 
& $N\_iter=13 \;\; N=18 \;\; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=-0.1406797$ \\ 
        $X2=-0.1101426$\\ 
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=-1.6473706210342e-08$ \\ 
        $X2=-3.51273940349251e-08$ \\ 
\end{tabular}} 
& \multirow{13}{*}{$  1.097385e-07  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =50 $\\
    $\alpha=0.01$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\

\hline


\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}      Beale   
\end{tabular}} 
& \multirow{13}{*}{$ [-4.5,4.5]^{2} $ } 
& $N\_iter=13 \;\; N=20 \;\; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=2.77737$ \\ 
        $X2=0.63832$\\ 
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=2.980414$ \\ 
        $X2=0.494759 $ \\ 
\end{tabular}} 
& \multirow{13}{*}{$  6.54143085562211e-05  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =50 $\\
    $\alpha=0.01$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline
\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}      Shekel ( dim = 4 )   
\end{tabular}} 
& \multirow{13}{*}{$ [0,10]^{4} $ } 
& $N\_iter=3 \;\; N=20 \;\; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=3.964629112$ \\ 
        $X2=3.287228306$\\ 
        $X3=4.047133078$ \\ 
        $X4=4.159858556$
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=4.0060974456$ \\ 
        $X2=3.9907111167$ \\ 
        $X3=4.0069265117$ \\ 
        $X4=3.9947221534$
\end{tabular}} 
& \multirow{13}{*}{$-10.51979349  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =10^3 $\\
    $\alpha=0.01$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline
\newpage
\caption{Some simulation results of the suggested hybrid optimizer}
\hline
\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}      Brown ( dim = 10 )   
\end{tabular}} 
& \multirow{13}{*}{$ [-1,4]^{10} $ } 
& $N\_iter=5 \;\; N=40 \;\; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=0.306416265$ \\ 
        $X2=-0.09236981$\\ 
        $X3=-0.172197343$ \\
        $X4=1.225200175$\\
        $X5=-0.009701219$ \\
        $X6=0.244447773$ \\
        $X7=0.101638211$ \\
        $X8=-0.34120112$ \\
        $X9=-0.599277565$ \\
        $X10=-0.31747776$
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=0.0061166589$ \\ 
        $X2=-0.005133607$\\ 
        $X3=-0.00524210132$ \\
        $X4= 0.00489577184$\\
        $X5=-0.0051129652$ \\
        $X6=-0.004793115$ \\
        $X7=-0.0056673315$ \\
        $X8=-0.00363736016$ \\
        $X9=0.00454737504$ \\
        $X10=0.0049526585$
\end{tabular}} 
& \multirow{13}{*}{$ 0.000447717474  $ } &  \\
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =10^3 $\\
    $\alpha=0.01$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline




\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}      Rosenbrock ( dim=9 )    
\end{tabular}} 
& \multirow{13}{*}{$ [-7,7]^{9} $ } 
& $N\_iter=13 \;\; N=60 \;\; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=0.003125323$ \\ 
        $X2=0.376382705$\\ 
        $X3=0.471540395$ \\
        $X4=0.723433923$\\
        $X5=0.885845371$ \\
        $X6=1.092223856$ \\
        $X7=1.282321586$ \\
        $X8=1.436033536$ \\
        $X9=1.860066613$
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=1.00956272$ \\ 
        $X2=0.99225927$\\ 
        $X3=1.00972756$ \\
        $X4=1.00866214$\\
        $X5=1.01872538$ \\
        $X6=1.03898545$ \\
        $X7=1.08676107$ \\
        $X8=1.17564322$ \\
        $X9=1.38090932$
\end{tabular}} 
& \multirow{13}{*}{$   0.197018127  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =1000 $\\
    $\alpha=0.01$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline

\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}        Alpine ( dim = 10)     
\end{tabular}} 
& \multirow{13}{*}{$ [0,10]^{10} $ } 
& $N\_iter=18 \;\; N=25 \;\; P=10   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=-1.44697297481$ \\ 
        $X2=-0.5245679914 $\\ 
        $X3=-1.06582528$ \\
        $X4=-0.38062335$\\
        $X5=1.680703443$ \\
        $X6=-0.519615052$ \\
        $X7=0.90813055351$ \\
        $X8=2.1929963152$ \\
        $X9=1.3502745645$ \\
        $X10=0.4988162137$
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=0.0049088240673$ \\ 
        $X2=0.02934661029$\\ 
        $X3=-0.013279784336$ \\
        $X4=-0.013808317649$\\
        $X5=-0.02789379609$ \\
        $X6=-0.0899579504$ \\
        $X7=0.04198229397$ \\
        $X8=3.242242583$ \\
        $X9=-0.0798609148$ \\
        $X10=-0.1128582965$
\end{tabular}} 
& \multirow{13}{*}{$   0.02013423150  $ } &  \\
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =100 $\\
    $\alpha=0.1$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline
\newpage
\caption{Some simulation results of the suggested hybrid optimizer}
\hline
\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}       Colville ( dim = 4)     
\end{tabular}} 
& \multirow{13}{*}{$ [-10,10]^{4} $ } 
& $N\_iter=13 \;\; N=40 \;\; P=10   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=1.5033964240414$ \\ 
        $X2=1.518321258364$\\ 
        $X3=1.282880998239$ \\
        $X4=1.814449944069$\\
        $ $
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=1.0495214623$ \\ 
        $X2=1.1309573138$\\ 
        $X3=0.97205952961$ \\
        $X4=0.960630041902$
\end{tabular}} 
& \multirow{13}{*}{$  0.199087493  $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =100 $\\
    $\alpha=0.1$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline

\multirow{13}{*}{\begin{tabular}[c]{@{}c@{}}       Schaffer ( dim = 2 )          \end{tabular}} 
& \multirow{13}{*}{$ [-100,100]^{2} $ } 
& $N\_iter=17 \;\; N=20 \;\; P=5   $  
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=0.73493131146$ \\ 
        $X2=0.8971795174$\\ 
        $ $ \\
        $ $\\
        $ $
\end{tabular} } 
& \multirow{13}{*}{\begin{tabular}[c]{@{}l@{}} 
        $X1=1.4414812e-06$ \\ 
        $X2=-1.871135e-06$\\ 
        $ $
\end{tabular}} 
& \multirow{13}{*}{$  5.551115123e-15 $ } &  \\* 
\cline{3-3}
&  
& \begin{tabular}[t]{@{}l@{}} 
    $ \text{Iter} =10^{3} $\\
    $\alpha=0.1$\\
    $\gamma=0.9$    
\end{tabular} 
&  &  &  &  \\ 
&&&&&& \\
&&&&&& \\ 
&&&&&& \\ 
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
&&&&&& \\
\hline
 
  
\end{longtable}
\end{document}

得出以下结果:

在此处输入图片描述

我正在寻找适合页边距的表格。

使用的 iapress 类文件可以在这里找到:

https://drive.google.com/file/d/1M3ZEjdt6PSXOuzN9d2Ex4CYdOjtBAGNI/view?usp=sharing

谢谢你的帮助 !

相关内容