[Tex/LaTex] Long table, caption and notes require adjustment of position – adjustwidth doesn’t work

adjustwidthlongtablepositioning

I have the problem that I would like to hand in an article, however I am required to use the templete the journal provides with multiple restrictions, e.g. a hughe offset on the left side. Now I want to have a table that spans multiple pages (so I cannot use the table environment) and I am not able to adjust it in the correct way. The caption and also the table notes should start on the left side without the offset. The table itself should be centered. Currently the table notes are also not inside a common environment with the table. I hope someone has a solution!

Table 1 shows how it should look like. Table 2 shows how it currently looks like.

Here is my example code:

\documentclass[10pt,letterpaper]{article}
\usepackage[top=0.85in,left=2.75in,footskip=0.75in]{geometry}
\usepackage{changepage}
% Text layout
\raggedright
\setlength{\parindent}{0.5cm}
\textwidth 5.25in 
\textheight 8.75in

% Captions will be left justified
\usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,justification=raggedright,singlelinecheck=off]{caption}

% Header and Footer
\usepackage{fancyhdr}
\pagestyle{myheadings}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{27.023pt}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}}
\fancyheadoffset[L]{2.25in}
\fancyfootoffset[L]{2.25in}

% ltablex package
\usepackage{ltablex}

\begin{document}

This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout.
This is just a dummy text to show the general text layout. \\

\begin{table}[!ht]
    \begin{adjustwidth}{-2.25in}{0in}
        \centering
        \caption{
            {\bf Table caption... This is how it should look like.}}
        \begin{tabular}{|l|l|l|l|l|l|l|l|}
            \hline
            \multicolumn{4}{|l|}{\bf Heading 1} & \multicolumn{4}{|l|}{\bf Heading 2}\\
            \hline
            $cell1 row1$ & cell2 row 1 & cell3 row 1 & cell4 row 1 & cell5 row 1 & cell6 row 1 & cell7 row 1 & cell8 row 1\\ \hline
            $cell1 row2$ & cell2 row 2 & cell3 row 2 & cell4 row 2 & cell5 row 2 & cell6 row 2 & cell7 row 2 & cell8 row 2\\ \hline
            $cell1 row3$ & cell2 row 3 & cell3 row 3 & cell4 row 3 & cell5 row 3 & cell6 row 3 & cell7 row 3 & cell8 row 3\\ \hline
        \end{tabular}
            \begin{flushleft} Table notes...
            \end{flushleft}
        \label{table1}
    \end{adjustwidth}
\end{table}

\begin{longtable}{|l|l|l|l|l|l|l|}%{@{\extracolsep{\fill}}|l+l|l|l|l|l|l|@{}}
    \caption{
    \bf{Table caption... This is how it looks like.}} \\
    \hline
    & \multicolumn{3}{l}{Top Heading 1} \vline & \multicolumn{3}{l}{Top Heading 2} \vline \\
Heading 1                 & Heading 2   & Heading 3   & Heading 4   & Heading 5 & Heading 6 & Heading 7 \\ 
    \hline
    \endfirsthead
    \multicolumn{7}{l}
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
    \hline
    & \multicolumn{3}{l}{Top Heading 1} \vline & \multicolumn{3}{l}{Top Heading 2} \vline \\
Heading 1                 & Heading 2   & Heading 3   & Heading 4   & Heading 5 & Heading 6 & Heading 7 \\ 
    \hline
    \endhead
    \hline \multicolumn{7}{r}{\textit{Continued on next page}} \\
    \endfoot
    \hline
    \endlastfoot
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6        \\
    Text                   & 1         & 2     & 3          & 4       & 5       & 6             \label{table2}
\end{longtable}
Table notes...


\end{document}

Thank you in advance!

Best Answer

You can move the longtable in the margin by using a negative \LTleft. The caption can be moved with the caption package and negative margin too:

\usepackage{ltablex} 
\usepackage{caption}
\captionsetup[longtable]{margin=-2.25in}
\setlength{\LTleft}{-2.25in}

enter image description here

Related Question