1

This is the image where the table is alignedIn my supplemental material, I have some tables such as this one. This is the xtabular which is not aligned

\documentclass{article}
\usepackage{xltabular}
\usepackage{makecell}
\usepackage{array, booktabs, longtable,  makecell, multirow}
\usepackage{rotating}
\renewcommand{\theadfont}{\normalsize}

\small
\setlength\tabcolsep{2.4pt}
\begin{longtable}{@{}ccc l ccc 
                   >{\linespread{0.84}\selectfont\raggedright\arraybackslash}p{15em}
                  @{} }
  \caption{\gls{paml} results for site model comparisons for test of positive selection of the \gls{Tas2r}40 datasets} \\
    \toprule
  \centering
\makecell{Dataset} 
    & $\kappa$
        & Model 
            & \makecell{Parameters} 
                & \makecell{Likelihood\\ (lnL)} 
                    & \makecell{$2\Delta\ln L$\\ (LRT)} 
                        & \makecell{Significance\\ (p-value)} 
                            &  \makecell{PSS}                           \\
    \midrule
\multirow{21}[1]{*}{\rotatebox{90}{\texttt{Basal\_40}}} 
    & \multirow{4}{*}{0.2} 
        & M7    & p = 0.616, q = 0.374 
                    & -4234.922
                        & \multirow{2}{*}{-4.121}
                            & \multirow{2}{*}{1.000} 
                                & \multirow{4}{*}{---}                  \\
    &   & M8    & \makecell[l]{ p0 = 0.994,  p = 0.634 q = 0.421\\ 
                               (p1 = 0.006), w = 2.742}
                    & -4236.983 &    &   &               \\
    &   & M8a   & \makecell[l]{ p0 = 0.516, p = 32.811, q = 99.000\\
                               (p1 = 0.484), w = 1.000} 
                    & -4232.605 
                        & \multirow{2}{*}{-8.755} 
                            & \multirow{2}{*}{1.000} &                  \\
    &   & M8    & \makecell[l]{ p0 = 0.994, p = 0.634, q = 0.421\\
                               (p1 = 0.006), w = 2.742} 
                    & -4236.983 
                        &    &                                          \\
    \cmidrule{2-8}
    & \multirow{4}{*}{2} 
        & M7    & p = 0.642, q = 0.412
                    & -4235.016 
                        & \multirow{2}{*}{6.681} 
                            & \multirow{2}{*}{0.035} 
                                & \multirow{4}{*}{---}                  \\
    &   & M8    & \makecell[l]{ p0 = 0.748, p = 1.586, q = 2.192\\
                               (p1 = 0.252), w = 1.475} 
                    & -4231.675
                        &   &                                           \\
    &   & M8a   & \makecell[l]{ p0 = 0.516, p = 32.811, q = 99.000\\
                              (p1 =   0.4838), w = 1.000} 
                    & -4232.605
                        & \multirow{2}{*}{1.860}
                            & \multirow{2}{*}{0.173}                    \\
    &   & M8    & \makecell[l]{ p0 = 0.748, p = 1.586, q = 2.192\\
                               (p1 = 0.252), w = 1.475}
                    & -4231.675 
                            &   &   &  \\
    \cmidrule{2-8}
    & \multirow{4}{*}{5} 
        & M7    & p = 0.548 q = 0.314
                    & -4235.293 
                        & \multirow{2}{*}{5.375}
                            & \multirow{2}{*}{0.068} 
                                & \multirow{4}{*}{---}                  \\
    &   & M8    & \makecell[l]{ p0 = 0.859, p = 0.918, q = 0.804\\
                               (p1 = 0.141), w = 1.701} 
                    & -4232.419
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.516, p = 32.811, q = 99.000\\
                               (p1 = 0.484), w = 1.000}
                    & -4232.605
                        & \multirow{2}{*}{0.372}
                            & \multirow{2}{*}{0.542}
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.859, p = 0.918, q = 0.804\\
                               (p1 = 0.141) w = 1.701} 
                    & -4232.419 
                        &   &   &                                       \\
    \midrule
\multirow{21}{*}{\rotatebox{90}{\texttt{Strisores\_Aequorlitornithes\_40}}} 
    & \multirow{4}{*}{0.2} 
        & M7    & p = 0.651, q = 0.345
                    & -5150.191 
                        & \multirow{2}{*}{43.958} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{231, 276}             \\
    &   & M8    & \makecell[l]{ p0 = 0.755, p = 77.686, q = 99.000\\
                               (p1 = 0.245), w = 1.968}
                    & -5128.212 
                        &   &   &                                       \\
    &   & M8a   &  \makecell[l]{ p0 = 0.528, p = 37.626, q = 99.000\\
                                (p1 = 0.472), w = 1.000}
                    & -5141.065 
                        & \multirow{2}{*}{25.706} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    &  \makecell[l]{ p0 = 0.755, p = 77.686, q = 99.000\\
                                (p1 = 0.245), w = 1.968}
                    & -5128.212 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{2} 
        & M7    &  p = 0.651, q = 0.341
                    & -5147.952 
                        & \multirow{2}{*}{34.978} 
                            & \multirow{2}{*}{0.000} 
                                &  \multirow{4}{=}{48, 231, 276}        \\
    &   & M8    &  \makecell[l]{ p0 = 0.851, p = 1.259, q = 0.934\\
                                (p1 = 0.149), w = 2.375}
                    & -5130.463 
                        &   &   &                                       \\
    &   & M8a   &  \makecell[l]{ p0 = 0.535, p = 39.756, q = 99.000\\
                                (p1 = 0.465), w = 1.000}
                    & -5141.103 
                        & \multirow{2}{*}{21.279} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    &  \makecell[l]{ p0 = 0.851, p = 1.259, q = 0.934\\
                                (p1 = 0.149), w = 2.375}
                    & -5130.463 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{5} 
        & M7    & p = 0.722, q = 0.415
                    & -5147.937 
                        & \multirow{2}{*}{13.745} 
                            & \multirow{2}{*}{0.001} 
                                & \multirow{4}{*}{231, 276}             \\
    &   & M8    &  \makecell[l]{ p0 = 0.831, p = 1.645, q = 1.435\\
                                (p1 = 0.169) w = 2.193}
                    & -5129.820 
                        &   &   &                                       \\
    &   & M8a   &  \makecell[l]{ p0 = 0.528, p = 37.626, q = 99.000\\
                                (p1 = 0.472) w = 1.000}
                    & -5141.065
                        & \multirow{2}{*}{22.491}
                            & \multirow{2}{*}{0.000}
                                &                                       \\
    &   & M8    &  \makecell[l]{ p0 = 0.831, p = 1.645, q = 1.435\\
                                (p1 = 0.169), w = 2.193} 
                    & -5129.820 
                        &   &   &                                       \\
    \midrule
\multirow{21}{*}{\rotatebox{90}{\texttt{Acanthisittidae\_Tyranni\_Passeri\_40}}} 
    & \multirow{4}{*}{0.2} 
        & M7    & p = 0.474, q = 0.321
            & -9711.558 
                & \multirow{2}{*}{234.997} 
                    & \multirow{2}{*}{0.000} 
                        & \multirow{4}{=}{33 , 36 , 37 , 40, 41, 43, 44, 46, 47, 48, 49, 51, 54, 55, 56, 58, 59, 67, 69, 111, 116, 122, 124, 125, 127, 128, 130, 153, 157, 164, 179, 228, 229, 230, 231, 233, 234, 237, 238, 241, 243, 265, 275}                                      \\
    &   & M8    & \makecell[l]{ p0 = 0.799, p = 0.561, q = 0.446\\
                               (p1 = 0.201), w = 2.790} 
                    & -9594.059 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.507, p = 2.450, q = 11.117\\
                               (p1 = 0.494), w = 1.000}
                    & -9688.670 & 
                        \multirow{2}{*}{189.221} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    &\makecell[l]{ p0 = 0.799, p = 0.561, q = 0.446\\
                              (p1 = 0.201), w = 2.790}
                    & -9594.059 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{2}
        & M7    & p = 0.480 q = 0.319
                    & -9711.442 
                        & \multirow{2}{*}{234.203} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{14, 33 , 36 , 37 , 40, 41, 43, 44, 46, 47, 48, 49, 51, 54, 55, 56, 58, 59, 67, 69, 111, 116, 122, 124, 125, 127, 128, 130, 153, 157, 164, 179, 228, 229, 230, 231, 233, 234, 237, 238, 241, 243, 265, 275} \\
    &   & M8    & \makecell[l]{ p0 = 0.800, p = 0.550, q = 0.435\\
                               (p1 = 0.200) w = 2.762}
                    & -9594.340 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.507, p = 2.450, q = 11.120\\
                               (p1 = 0.494) w = 1.000}
                    & -9688.670 
                        & \multirow{2}{*}{188.659} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.800, p = 0.550, q = 0.435\\
                               (p1 = 0.200) w = 2.762}
                    & -9594.340 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{5} 
        & M7    & p = 0.187, q = 0.041
                    & -9713.369 
                        & \multirow{2}{*}{237.519} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{14, 33 , 36 , 37 , 40, 41, 43, 44, 46, 47, 48, 49, 51, 54, 55, 56, 58, 59, 67, 69, 111, 113, 116, 122, 124, 125, 127, 128, 130, 153, 157, 164, 179, 228, 229, 230, 231, 233, 234, 237, 238, 241, 243, 265, 275}                     \\
    &   & M8    & \makecell[l]{ p0 = 0.811, p = 0.540, q = 0.444\\
                               (p1 = 0.189), w = 2.768}
                    & -9594.610 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.507, p = 2.450, q = 11.117\\
                           (p1 = 0.494), w = 1.000}
                    & -9688.670 
                        & \multirow{2}{*}{188.120} 
                            & \multirow{2}{*}{0.000}
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.811, p = 0.540, q = 0.444\\
                               (p1 = 0.189), w = 2.768}
                    & -9594.610 
                        &   &   &                                       \\
    \midrule
\multirow{21}{*}{\rotatebox{90}{\texttt{Passeri\_1\_40}}} 
    & \multirow{4}{*}{0.2} 
        & M7    & p = 0.421 q = 0.386
            & -11405.799 
                & \multirow{2}{*}{256.626} 
                    & \multirow{2}{*}{0.000} 
                        & \multirow{4}{=}{6, 7, 20, 33, 36, 40, 41, 43, 46, 48, 49, 50, 52, 55, 56, 57, 59, 60, 61, 64, 70, 112, 114, 125, 127, 128, 129, 130, 131, 151, 152, 158, 160, 161, 163, 164, 165, 180, 184, 188, 190, 205, 206, 220, 231, 232, 235, 238, 239, 242, 244, 245, 246, 252, 256, 266, 277, 279}                                      \\
    &   & M8    & \makecell[l]{ p0 = 0.745 p = 0.872 q = 1.130\\
                               (p1 = 0.255) w = 2.364} 
                    & -11277.486 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.598 p = 2.219 q = 8.395\\
                               (p1 = 0.402) w = 1.000}
                    & -11373.833 & 
                        \multirow{2}{*}{192.695} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    &\makecell[l]{ p0 = 0.745 p = 0.872 q = 1.130\\
                              (p1 = 0.255) w = 2.364}
                    & -11277.486 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{2}
        & M7    & p = 0.469 q = 0.411
                    & -11405.085 
                        & \multirow{2}{*}{253.680} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{6, 7, 20, 33, 36, 40, 41, 43, 46, 48, 49, 50, 52, 55, 56, 57, 59, 60, 61, 64, 70, 112, 114, 125, 127, 128, 129, 130, 131, 151, 152, 158, 160, 161, 163, 164, 165, 180, 184, 188, 190, 205, 206, 220, 231, 232, 235, 238, 239, 242, 244, 245, 246, 252, 256, 266, 277, 279} \\
    &   & M8    & \makecell[l]{ p0 = 0.767 p = 0.860 q = 1.137\\
                               (p1 = 0.233) w = 2.325}
                    & -11278.245 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.598 p = 2.219 q = 8.395\\
                               (p1 = 0.402) w = 1.000}
                    & -11373.833 
                        & \multirow{2}{*}{191.177} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.767 p = 0.860 q = 1.137\\
                               (p1 = 0.233) w = 2.325}
                    & -11278.245 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{5} 
        & M7    & p = 0.437 q = 0.387
                    & -11405.189 
                        & \multirow{2}{*}{62.711} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{6, 7, 20, 33, 36, 40, 41, 43, 46, 48, 49, 50, 52, 55, 56, 57, 59, 60, 61, 64, 70, 112, 114, 125, 127, 128, 129, 130, 131, 151, 152, 158, 160, 161, 163, 164, 165, 180, 184, 188, 190, 205, 206, 220, 231, 232, 235, 238, 239, 242, 244, 245, 246, 252, 256, 266, 277, 279}                     \\
    &   & M8    & \makecell[l]{ p0 = 0.777 p = 0.839 q = 1.090\\
                               (p1 = 0.223) w = 2.389}
                    & -11278.856 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.598 p = 2.219 q = 8.395\\
                           (p1 = 0.402) w = 1.000}
                    & -11373.833 
                        & \multirow{2}{*}{189.954} 
                            & \multirow{2}{*}{0.000}
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.777 p = 0.839 q = 1.090\\
                               (p1 = 0.223) w = 2.389}
                    & -11278.856 
                        &   &   &                                       \\
    \midrule
\multirow{21}{*}{\rotatebox{90}{\texttt{Passeri\_2\_40}}} 
    & \multirow{4}{*}{0.2} 
        & M7    & p = 0.581 q = 0.493
            & -15508.558 
                & \multirow{2}{*}{192.533} 
                    & \multirow{2}{*}{0.000} 
                        & \multirow{4}{=}{7, 11, 70, 117, 126, 128, 131, 154, 160, 165, 180, 188, 220, 235, 239, 266, 275, 279}                                      \\
    &   & M8    & \makecell[l]{ p0 = 0.920 p = 0.669 q = 0.610\\
                               (p1 = 0.080) w = 2.609} 
                    & -15412.292 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.667 p = 1.297 q = 3.397\\
                               (p1 = 0.333) w = 1.000}
                    & -15489.545 & 
                        \multirow{2}{*}{154.507} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    &\makecell[l]{ p0 = 0.920 p = 0.669 q = 0.610\\
                              (p1 = 0.080) w = 2.609}
                    & -15412.292 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{2}
        & M7    & p = 0.545 q = 0.489
                    & -15509.467 
                        & \multirow{2}{*}{194.352} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{7, 11, 70, 117, 126, 128, 131, 154, 160, 165, 180, 188, 220, 235, 239, 266, 275, 279} \\
    &   & M8    & \makecell[l]{ p0 = 0.920 p = 0.669 q = 0.610\\
                               (p1 = 0.080) w = 2.609}
                    & -15412.292 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.667 p = 1.297 q = 3.397\\
                               (p1 = 0.333) w = 1.000}
                    & -15489.545 
                        & \multirow{2}{*}{154.507} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.920 p = 0.669 q = 0.610\\
                               (p1 = 0.080) w = 2.609}
                    & -15412.292 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{5} 
        & M7    & p = 0.551 q = 0.465
                    & -15509.257 
                        & \multirow{2}{*}{39.424} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{7, 11, 70, 117, 126, 128, 131, 154, 160, 165, 166, 180, 188, 220, 235, 239, 266, 275, 279}                     \\
    &   & M8    & \makecell[l]{ p0 = 0.928 p = 0.698 q = 0.676\\
                               (p1 = 0.072) w = 2.372}
                    & -15415.125 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.667 p = 1.297 q = 3.396\\
                           (p1 = 0.333) w = 1.000}
                    & -15489.545
                        & \multirow{2}{*}{148.840} 
                            & \multirow{2}{*}{0.000}
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.928 p = 0.698 q = 0.676\\
                               (p1 = 0.072) w = 2.372}
                    & -15415.125 
                        &   &   &                                       \\
    \midrule
\multirow{21}{*}{\rotatebox{90}{\texttt{Passeri\_3\_40}}} 
    & \multirow{4}{*}{0.2} 
        & M7    & p = 0.106 q = 0.223
            & -19091.743 
                & \multirow{2}{*}{610.258} 
                    & \multirow{2}{*}{0.000} 
                        & \multirow{4}{=}{7, 36, 40, 43, 46, 48, 49, 52, 55, 56, 57, 59, 61, 117, 125, 128, 131, 149, 152, 154, 158, 164, 179, 187, 230, 231, 238, 243, 255, 265}                                      \\
    &   & M8    & \makecell[l]{ p0 = 0.855 p = 0.679 q = 0.569\\
                               (p1 = 0.146) w = 2.593} 
                    & -18786.613 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.604 p = 1.530 q = 4.571\\
                               (p1 = 0.396) w = 1.000}
                    & -18950.591 & 
                        \multirow{2}{*}{327.956} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    &\makecell[l]{ p0 = 0.855 p = 0.679 q = 0.569\\
                              (p1 = 0.146) w = 2.593}
                    & -18786.613 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{2}
        & M7    & p = 0.576 q = 0.480
                    & -18987.839 
                        & \multirow{2}{*}{402.451} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{7, 36, 40, 43, 46, 48, 49, 52, 55, 56, 57, 59, 61, 117, 125, 128, 131, 149, 152, 154, 158, 164, 179, 187, 230, 231, 238, 243, 255, 265} \\
    &   & M8    & \makecell[l]{ p0 = 0.855 p = 0.679 q = 0.569\\
                               (p1 = 0.146) w = 2.593}
                    & -18786.613 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.604 p = 1.530 q = 4.571\\
                               (p1 = 0.396) w = 1.000}
                    & -18950.591 
                        & \multirow{2}{*}{327.956} 
                            & \multirow{2}{*}{0.000} 
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.855 p = 0.679 q = 0.569\\
                               (p1 = 0.146) w = 2.593}
                    & -18786.613 
                        &   &   &                                       \\
    \cmidrule{2-8}
    & \multirow{4}{*}{5} 
        & M7    & p = 0.094 q = 0.068
                    & -19012.260 
                        & \multirow{2}{*}{123.336} 
                            & \multirow{2}{*}{0.000} 
                                & \multirow{4}{=}{7, 36, 40, 43, 46, 48, 49, 52, 55, 56, 57, 59, 61, 117, 125, 128, 131, 149, 152, 154, 158, 164, 179, 187, 230, 231, 238, 243, 255, 265}                     \\
    &   & M8    & \makecell[l]{ p0 = 0.881 p = 0.663 q = 0.539\\
                               (p1 = 0.119) w = 2.727}
                    & -18788.235 
                        &   &   &                                       \\
    &   & M8a   & \makecell[l]{ p0 = 0.604 p = 1.530 q = 4.571\\
                           (p1 = 0.396) w = 1.000}
                    & -18950.591 
                        & \multirow{2}{*}{324.714} 
                            & \multirow{2}{*}{0.000}
                                &                                       \\
    &   & M8    & \makecell[l]{ p0 = 0.881 p = 0.663 q = 0.539\\
                               (p1 = 0.119) w = 2.727}
                    & -18788.235 
                        &   &   &                                       \\
    \midrule
  \label{table:Supplemental Table 9}%
\end{longtable}%

Then when I put the one that it's beneath I couldn't align it with the other ones. I needed to push it more to the right. Does someone know how I could do it? I added an image to show what the output looks like.

\small
\setlength{\tabcolsep}{10pt}
\centering
\begin{xltabular}{\textwidth}{c l X X X X}
  \caption{\gls{dm} (\gls{slac}, \gls{meme}, \gls{fel}, \gls{fubar}) results for site model comparisons for test of positive selection of the \gls{Tas2r}9 datasets.} \\  
    \toprule
    \thead{Dataset} &  & \thead{SLAC} & \thead{MEME}  & \thead{FEL}   & \thead{FUBAR} \\
    \midrule
    \multicolumn{1}{c}{\multirow{6}{*}{\rotatebox{90}{Basal\_9}}} & number of PSS &  \multicolumn{1}{c}{2} & \multicolumn{1}{c}{15} & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{2} \\
\cmidrule{2-6}          & sites & 175, 184 & 7, 15, 71, 75, 81, 144, 164, 169, 175, 179, 181, 182, 184, 258, 288 & 71, 81, 88, 143, 144, 164, 175, 181, 182, 184, 258 & 81, 184 \\
    \midrule
    \multicolumn{1}{c}{\multirow{5}{*}{\rotatebox{90}{Strisores\_Aequorlitornithes\_9}}} & number of PSS &  \multicolumn{1}{c}{5} & \multicolumn{1}{c}{19} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{3} \\
\cmidrule{2-6}          & sites & 71, 165, 176, 194, 261 & 18, 30, 59, 70, 71, 75, 76, 80, 86, 90, 95, 104, 165, 176, 194, 204, 222, 261, 272 & 18, 70, 71, 76, 86, 90, 165, 176, 194, 204, 218, 254, 261, 272 & 71, 86, 261 \\
                        &   &   &                                        \\
    \midrule
    \multicolumn{1}{c}{\multirow{8}{*}{\rotatebox{90}{Piciformes\_9}}} & number of PSS &  \multicolumn{1}{c}{5} & \multicolumn{1}{c}{24} & \multicolumn{1}{c}{15} & \multicolumn{1}{c}{4} \\
\cmidrule{2-6}          & sites & 92, 94, 168, 254, 270 & 14, 23, 50, 55, 62, 67, 71, 73, 74, 82, 92, 94, 98, 120, 143, 168, 173, 236, 254, 263, 270, 294, 295, 302 & 23, 55, 59, 73, 92, 94, 143, 168, 188, 254, 257, 263, 270, 294, 302 & 94, 168, 254, 263 \\
    \midrule
    \multicolumn{1}{c}{\multirow{11}{*}{\rotatebox{90}{Acanthisittidae\_Tyranni\_Passeri\_1\_9}}} & number of PSS &  \multicolumn{1}{c}{27} & \multicolumn{1}{c}{35} & \multicolumn{1}{c}{27} & \multicolumn{1}{c}{24} \\
    \midrule                    
  \label{table:Supplemental Table 9}%
\end{xltabular}
16
  • 1
    it would be much easier to help if you provided code that showed the problem, can you not edit the example to use a standard class and remove all packages not used in the example, so people can see the issue. Currently we can not run the code so you are asking us to guess what the output looks like and guess how you want to change it Nov 16, 2020 at 22:47
  • I edited my code, however, I can't replicate what happens in my document because in this new document it's the first table that is too far to the right, while in my original document is the second table that is not aligned. Basically, I wanted to know is there is some command I can use instead of \textwidth that allows me to move the table a bit to the right. Thanks and I'm sorry for not being clear Nov 16, 2020 at 23:23
  • 2
    it's very hard to guess the issue if we can't run the code and you don't even show an image of the output. Looking at the code the second table is forced to be textwidth wide, the first (longtable) one is set natural width and centred. There is no alignment between the two specified and (despite it being my code mostly) I really can't guess what the output looks like or what alignment you want. Nov 16, 2020 at 23:31
  • 1
    You already ask similar question (tex.stackexchange.com/questions/568834/…) which answer <ou accepted. What is now different in comparison to this answer? Why now you not use solution in accepted answer?
    – Zarko
    Nov 16, 2020 at 23:47
  • I added an image so I can show what the output looks like. Nov 16, 2020 at 23:49

2 Answers 2

1

The screenshot you added to your question clearly shows a non standard behaviour of the longtable. Since it is definitely wider than the textwidth, I would expect it to start at the first vertical red line and protrude quite significantly into the right margin. Since this is not the case here, you must have used \setlength\LTleft{...} somewhere in your document to make your overly wide longtable(s) "centered" on the page while letting it/them protrude into both margins. This setting also influences the position of the following xltabular and is thus the reason for the observed "misalignment".

To overcome this, you have the following options:

  1. Remove \setlength\LTleft{...}, and rewrite your longtable(s) to xltabular(s) in order to make sure all tables fit into the textwidth.

  2. Remove \setlength\LTleft{...}, and decrease the (left and right) margin sizes for your appendix (?) and make sure the textwidth is now wider or just as wide as your widest longtable.

  3. Use \setlength\LTleft{...} only locally for the longtable(s) or reset it to \setlength\LTleft{...} right before the start of the xltabular.

(Options are listed in order of my personal preference.)

1

No really an answer, but a try to clarifying misunderstandings:

  • You use article document class with default page layout, which \textwidth is for your table (far) to small
  • Answer, which I provide you on your question, use book document class and has page layout defined by geometry package:
\documentclass{book}
\usepackage[margin=20mm]{geometry}
  • If you will add to your MWE \usepackage[margin=20mm]{geometry}, than your table will nicely placed on your table.
  • If this is not an allowed option, then you have to rethink about table layout. About this, the following cross my mind:
    • rotate table, i.e. set it in landscape orientation
    • the first column replace with row, and fourth column make narrower with list cells contents for example as
\multicolumn{7}{l}{\texttt{Basal\_40}}                          \\
    \addlinespace
0.2 & M7 & \makecell[lt]{p = 0.616,\\ 
                         q = 0.374}
            & -4234.922
                & \multirow{2}{*}{-4.121}
                    & \multirow{2}{*}{1.000}
                        & \multirow{4}{=}{---}                  \\
  • In the both cases I would use xltabular instead of longtable. Using it is simpler adopt table width to \textwidth. For example:
\setlength\tabcolsep{3pt}
\begin{xltabular}{\textwidth}{@{}   ccc l ccc
{\linespread{0.84}\selectfont\raggedright\arraybackslash}X  % <---
                            @{} }
    \caption{\gls{paml} results for site model comparisons for test of positive selection of the \gls{Tas2r}40 datasets}
    \label{table:Supplemental Table 9}  \\

Now is up to you, what you more prefer. At this, please be aware, that it is extremely difficult to put elephant into lady suitcase ...

1
  • Thank you but I rest the \setlength\LTleft{-1.8cm} to 0 before xtabular and it worked Nov 18, 2020 at 15:37

Not the answer you're looking for? Browse other questions tagged .