Combining sidewaystable, adjustbox and threeparttablex












3














I need to have a table which 1) is sideways 2) is rescaled to fit the page 3) has tablenotes. I'm trying to combine sidewaystable, adjustbox and threeparttablex to do so, but I encounter three problems:




  1. I don't know where/how to include the table caption. I tried several positions within the environments but I keep getting compilation errors.

  2. The width of the tablenotes is not correct, not even after including renewcommandTPTminimum{linewidth}

  3. Labels "b" and "c" overlap in the third cell of the first row.


This is what my current MWE attempt looks like (the actual table is much larger, hence the sidewaystable/adjustbox combination):



documentclass{article}
usepackage{adjustbox}
usepackage{caption}
usepackage{multirow}
usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
usepackage{rotating}
usepackage{longtable}
usepackage{threeparttablex}

begin{document}

begin{sidewaystable}
begin{adjustbox}{width=linewidth}
begin{ThreePartTable}
renewcommand{TPTminimum}{linewidth}
begin{TableNotes}
small
item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
end{TableNotes}
begin{tabular}{lllllll}
%caption{My table caption.} \
hline
multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
& & & ES approach & RD approach & ES approach & RD approach \ hline
$1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
$2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
$3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
insertTableNotes
end{tabular}
end{ThreePartTable}
end{adjustbox}
end{sidewaystable}
end{document}


enter image description here










share|improve this question
























  • it is best to never scale tables even in cases where it doesn't give an error, it produces inconsistent font sizes and poor output.
    – David Carlisle
    Dec 13 '18 at 7:50










  • Welcome to TeX - LaTeX!
    – Andrew Swann
    Dec 13 '18 at 7:55
















3














I need to have a table which 1) is sideways 2) is rescaled to fit the page 3) has tablenotes. I'm trying to combine sidewaystable, adjustbox and threeparttablex to do so, but I encounter three problems:




  1. I don't know where/how to include the table caption. I tried several positions within the environments but I keep getting compilation errors.

  2. The width of the tablenotes is not correct, not even after including renewcommandTPTminimum{linewidth}

  3. Labels "b" and "c" overlap in the third cell of the first row.


This is what my current MWE attempt looks like (the actual table is much larger, hence the sidewaystable/adjustbox combination):



documentclass{article}
usepackage{adjustbox}
usepackage{caption}
usepackage{multirow}
usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
usepackage{rotating}
usepackage{longtable}
usepackage{threeparttablex}

begin{document}

begin{sidewaystable}
begin{adjustbox}{width=linewidth}
begin{ThreePartTable}
renewcommand{TPTminimum}{linewidth}
begin{TableNotes}
small
item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
end{TableNotes}
begin{tabular}{lllllll}
%caption{My table caption.} \
hline
multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
& & & ES approach & RD approach & ES approach & RD approach \ hline
$1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
$2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
$3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
insertTableNotes
end{tabular}
end{ThreePartTable}
end{adjustbox}
end{sidewaystable}
end{document}


enter image description here










share|improve this question
























  • it is best to never scale tables even in cases where it doesn't give an error, it produces inconsistent font sizes and poor output.
    – David Carlisle
    Dec 13 '18 at 7:50










  • Welcome to TeX - LaTeX!
    – Andrew Swann
    Dec 13 '18 at 7:55














3












3








3







I need to have a table which 1) is sideways 2) is rescaled to fit the page 3) has tablenotes. I'm trying to combine sidewaystable, adjustbox and threeparttablex to do so, but I encounter three problems:




  1. I don't know where/how to include the table caption. I tried several positions within the environments but I keep getting compilation errors.

  2. The width of the tablenotes is not correct, not even after including renewcommandTPTminimum{linewidth}

  3. Labels "b" and "c" overlap in the third cell of the first row.


This is what my current MWE attempt looks like (the actual table is much larger, hence the sidewaystable/adjustbox combination):



documentclass{article}
usepackage{adjustbox}
usepackage{caption}
usepackage{multirow}
usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
usepackage{rotating}
usepackage{longtable}
usepackage{threeparttablex}

begin{document}

begin{sidewaystable}
begin{adjustbox}{width=linewidth}
begin{ThreePartTable}
renewcommand{TPTminimum}{linewidth}
begin{TableNotes}
small
item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
end{TableNotes}
begin{tabular}{lllllll}
%caption{My table caption.} \
hline
multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
& & & ES approach & RD approach & ES approach & RD approach \ hline
$1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
$2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
$3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
insertTableNotes
end{tabular}
end{ThreePartTable}
end{adjustbox}
end{sidewaystable}
end{document}


enter image description here










share|improve this question















I need to have a table which 1) is sideways 2) is rescaled to fit the page 3) has tablenotes. I'm trying to combine sidewaystable, adjustbox and threeparttablex to do so, but I encounter three problems:




  1. I don't know where/how to include the table caption. I tried several positions within the environments but I keep getting compilation errors.

  2. The width of the tablenotes is not correct, not even after including renewcommandTPTminimum{linewidth}

  3. Labels "b" and "c" overlap in the third cell of the first row.


This is what my current MWE attempt looks like (the actual table is much larger, hence the sidewaystable/adjustbox combination):



documentclass{article}
usepackage{adjustbox}
usepackage{caption}
usepackage{multirow}
usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
usepackage{rotating}
usepackage{longtable}
usepackage{threeparttablex}

begin{document}

begin{sidewaystable}
begin{adjustbox}{width=linewidth}
begin{ThreePartTable}
renewcommand{TPTminimum}{linewidth}
begin{TableNotes}
small
item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
end{TableNotes}
begin{tabular}{lllllll}
%caption{My table caption.} \
hline
multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
& & & ES approach & RD approach & ES approach & RD approach \ hline
$1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
$2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
$3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
insertTableNotes
end{tabular}
end{ThreePartTable}
end{adjustbox}
end{sidewaystable}
end{document}


enter image description here







rotating adjustbox tablenotes threeparttablex sidewaystable






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 13 '18 at 7:53









Andrew Swann

76.6k9128325




76.6k9128325










asked Dec 13 '18 at 7:45









LDeclercq

161




161












  • it is best to never scale tables even in cases where it doesn't give an error, it produces inconsistent font sizes and poor output.
    – David Carlisle
    Dec 13 '18 at 7:50










  • Welcome to TeX - LaTeX!
    – Andrew Swann
    Dec 13 '18 at 7:55


















  • it is best to never scale tables even in cases where it doesn't give an error, it produces inconsistent font sizes and poor output.
    – David Carlisle
    Dec 13 '18 at 7:50










  • Welcome to TeX - LaTeX!
    – Andrew Swann
    Dec 13 '18 at 7:55
















it is best to never scale tables even in cases where it doesn't give an error, it produces inconsistent font sizes and poor output.
– David Carlisle
Dec 13 '18 at 7:50




it is best to never scale tables even in cases where it doesn't give an error, it produces inconsistent font sizes and poor output.
– David Carlisle
Dec 13 '18 at 7:50












Welcome to TeX - LaTeX!
– Andrew Swann
Dec 13 '18 at 7:55




Welcome to TeX - LaTeX!
– Andrew Swann
Dec 13 '18 at 7:55










3 Answers
3






active

oldest

votes


















4














Only scale tables as a last resort (and even then don't do it) also as you are using threeepartx rather than threepart I think you want longtable rather than tabular



enter image description here



documentclass{article}
usepackage{adjustbox}
usepackage{caption}
usepackage{multirow}
usepackage{longtable}
usepackage{threeparttablex}
usepackage{pdflscape}
begin{document}

begin{landscape}
begin{ThreePartTable}
begin{TableNotes}
small
item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
end{TableNotes}
begin{longtable}{lllllll}
%caption{My table caption.}
hline
multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
& & & ES approach & RD approach & ES approach & RD approach \ hline
$1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
$2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
$3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
insertTableNotes
end{longtable}
end{ThreePartTable}
end{landscape}
end{document}





share|improve this answer





























    4














    Since the table -- including table footnotes -- has to fit on a single page, I wouldn't use the machinery of the longtable and ThreePartTable environments. Moreover, I wouldn't use the adjustbox machinery either, as it will almost certainly cause wildly inconsistent font sizes across parts of the documents.



    I can't see how you can go wrong employing sidewaystable, threeparttable, tabularx, and tablenotes environments. In particular, using a tabularx environment and allowing line breaks in cells should remove any need to resort to the adjustbox sledgehammer. For well-spaced horizontal lines or "rules", do consider loading the booktabs package and employing its toprule, cmidrule, midrule, and bottomrule macros. And, instead of tnote{a}tnote{b}, do write tnote{a,b}.



    enter image description here



    documentclass{article}
    usepackage[skip=0.333baselineskip]{caption}
    %usepackage[letterpaper,margin=1in]{geometry} % select the appropriate page parameters
    usepackage{rotating}
    usepackage{tabularx,ragged2e}
    newcolumntype{C}{>{Centeringarraybackslash}X}
    newcolumntype{E}{>{hsize=dimexpr2hsize+2tabcolseprelax}C}
    usepackage[flushleft]{threeparttable}
    usepackage{booktabs}
    newcommandminitab[1]{smash{%
    begin{tabular}[t]{@{}c@{}}#1end{tabular}}}

    begin{document}
    begin{sidewaystable}
    begin{threeparttable}
    caption{My table caption.}
    begin{tabularx}{textwidth}{@{} l *{6}{C} @{}}
    toprule
    Model &
    Specificationtnote{a} &
    minitab{Covariance\structuretnote{a,b}} &
    multicolumn{2}{E}{Number of fixed effectstnote{c}} &
    multicolumn{2}{E@{}}{Number of variance componentstnote{c}} \
    cmidrule(lr){4-5} cmidrule(l){6-7}
    & & & ES approach & RD approach & ES approach & RD approach \
    midrule
    $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
    $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
    $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$& $43$ \
    bottomrule
    end{tabularx}

    medskip % or "smallskip"
    begin{tablenotes}
    small
    item [a] Note note note note note note note note note note note note note
    nnote note note note note note note note note note note note note
    item [b] Note note note note note note note note note note note note note
    note note note note note note note note note note note note note
    item [c] Note note note note note note note note note note note note note
    note note note note note note note note note note note note note
    end{tablenotes}
    end{threeparttable}
    end{sidewaystable}
    end{document}





    share|improve this answer





























      2














      threeparttablex is for use with longtable not ordinary tabular. Use threeparttable commands for a tabular:



      Sample output



      documentclass{article}
      usepackage{adjustbox}
      usepackage{caption}
      usepackage{multirow}
      usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
      usepackage{rotating}
      usepackage{longtable}
      usepackage{threeparttable}
      usepackage{booktabs}

      begin{document}

      begin{sidewaystable}
      begin{adjustbox}{width=linewidth}
      begin{threeparttable}
      renewcommand{TPTminimum}{.9linewidth}
      caption{My table caption.}
      begin{tabular}{*{7}{l}}
      toprule
      multirow{2}{*}{Model}
      & multirow{2}{*}{Specificationtnote{a}}
      & multirow{2}{*}{Covariance structuretnote{a,b} }
      & multicolumn{2}{l}{Number of fixed effectstnote{c}}
      & multicolumn{2}{l}{Number of variance componentstnote{c}} \
      cmidrule(lr){4-7}
      & & & ES approach & RD approach & ES approach & RD approach \
      midrule
      $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
      $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
      $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \
      bottomrule
      end{tabular}
      begin{tablenotes}
      small
      item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
      item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
      item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
      end{tablenotes}
      end{threeparttable}
      end{adjustbox}
      end{sidewaystable}
      end{document}


      Note loading threeparttablex will work equally well, it loads threeparttable, you just have to use the commands from threeparttable.



      I used tnote{a,b} for the two adjacent notes. I added a manual space afterwards to give a bit more room.



      I have used the booktabs package for nicer rules including the cmidrule which can be shortened slightly on either side






      share|improve this answer





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "85"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464641%2fcombining-sidewaystable-adjustbox-and-threeparttablex%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        4














        Only scale tables as a last resort (and even then don't do it) also as you are using threeepartx rather than threepart I think you want longtable rather than tabular



        enter image description here



        documentclass{article}
        usepackage{adjustbox}
        usepackage{caption}
        usepackage{multirow}
        usepackage{longtable}
        usepackage{threeparttablex}
        usepackage{pdflscape}
        begin{document}

        begin{landscape}
        begin{ThreePartTable}
        begin{TableNotes}
        small
        item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
        item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
        item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
        end{TableNotes}
        begin{longtable}{lllllll}
        %caption{My table caption.}
        hline
        multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
        & & & ES approach & RD approach & ES approach & RD approach \ hline
        $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
        $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
        $3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
        insertTableNotes
        end{longtable}
        end{ThreePartTable}
        end{landscape}
        end{document}





        share|improve this answer


























          4














          Only scale tables as a last resort (and even then don't do it) also as you are using threeepartx rather than threepart I think you want longtable rather than tabular



          enter image description here



          documentclass{article}
          usepackage{adjustbox}
          usepackage{caption}
          usepackage{multirow}
          usepackage{longtable}
          usepackage{threeparttablex}
          usepackage{pdflscape}
          begin{document}

          begin{landscape}
          begin{ThreePartTable}
          begin{TableNotes}
          small
          item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
          item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
          item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
          end{TableNotes}
          begin{longtable}{lllllll}
          %caption{My table caption.}
          hline
          multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
          & & & ES approach & RD approach & ES approach & RD approach \ hline
          $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
          $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
          $3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
          insertTableNotes
          end{longtable}
          end{ThreePartTable}
          end{landscape}
          end{document}





          share|improve this answer
























            4












            4








            4






            Only scale tables as a last resort (and even then don't do it) also as you are using threeepartx rather than threepart I think you want longtable rather than tabular



            enter image description here



            documentclass{article}
            usepackage{adjustbox}
            usepackage{caption}
            usepackage{multirow}
            usepackage{longtable}
            usepackage{threeparttablex}
            usepackage{pdflscape}
            begin{document}

            begin{landscape}
            begin{ThreePartTable}
            begin{TableNotes}
            small
            item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
            item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
            item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
            end{TableNotes}
            begin{longtable}{lllllll}
            %caption{My table caption.}
            hline
            multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
            & & & ES approach & RD approach & ES approach & RD approach \ hline
            $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
            $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
            $3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
            insertTableNotes
            end{longtable}
            end{ThreePartTable}
            end{landscape}
            end{document}





            share|improve this answer












            Only scale tables as a last resort (and even then don't do it) also as you are using threeepartx rather than threepart I think you want longtable rather than tabular



            enter image description here



            documentclass{article}
            usepackage{adjustbox}
            usepackage{caption}
            usepackage{multirow}
            usepackage{longtable}
            usepackage{threeparttablex}
            usepackage{pdflscape}
            begin{document}

            begin{landscape}
            begin{ThreePartTable}
            begin{TableNotes}
            small
            item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
            item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
            item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
            end{TableNotes}
            begin{longtable}{lllllll}
            %caption{My table caption.}
            hline
            multirow{2}{*}{Model} & multirow{2}{*}{Specificationtnote{a}} & multirow{2}{*}{Covariance structuretnote{a}tnote{b}} & multicolumn{2}{l}{Number of fixed effectstnote{c}} & multicolumn{2}{l}{Number of variance componentstnote{c}} \ cline{4-7}
            & & & ES approach & RD approach & ES approach & RD approach \ hline
            $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
            $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
            $3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \ hline
            insertTableNotes
            end{longtable}
            end{ThreePartTable}
            end{landscape}
            end{document}






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 13 '18 at 8:01









            David Carlisle

            482k4011141853




            482k4011141853























                4














                Since the table -- including table footnotes -- has to fit on a single page, I wouldn't use the machinery of the longtable and ThreePartTable environments. Moreover, I wouldn't use the adjustbox machinery either, as it will almost certainly cause wildly inconsistent font sizes across parts of the documents.



                I can't see how you can go wrong employing sidewaystable, threeparttable, tabularx, and tablenotes environments. In particular, using a tabularx environment and allowing line breaks in cells should remove any need to resort to the adjustbox sledgehammer. For well-spaced horizontal lines or "rules", do consider loading the booktabs package and employing its toprule, cmidrule, midrule, and bottomrule macros. And, instead of tnote{a}tnote{b}, do write tnote{a,b}.



                enter image description here



                documentclass{article}
                usepackage[skip=0.333baselineskip]{caption}
                %usepackage[letterpaper,margin=1in]{geometry} % select the appropriate page parameters
                usepackage{rotating}
                usepackage{tabularx,ragged2e}
                newcolumntype{C}{>{Centeringarraybackslash}X}
                newcolumntype{E}{>{hsize=dimexpr2hsize+2tabcolseprelax}C}
                usepackage[flushleft]{threeparttable}
                usepackage{booktabs}
                newcommandminitab[1]{smash{%
                begin{tabular}[t]{@{}c@{}}#1end{tabular}}}

                begin{document}
                begin{sidewaystable}
                begin{threeparttable}
                caption{My table caption.}
                begin{tabularx}{textwidth}{@{} l *{6}{C} @{}}
                toprule
                Model &
                Specificationtnote{a} &
                minitab{Covariance\structuretnote{a,b}} &
                multicolumn{2}{E}{Number of fixed effectstnote{c}} &
                multicolumn{2}{E@{}}{Number of variance componentstnote{c}} \
                cmidrule(lr){4-5} cmidrule(l){6-7}
                & & & ES approach & RD approach & ES approach & RD approach \
                midrule
                $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$& $43$ \
                bottomrule
                end{tabularx}

                medskip % or "smallskip"
                begin{tablenotes}
                small
                item [a] Note note note note note note note note note note note note note
                nnote note note note note note note note note note note note note
                item [b] Note note note note note note note note note note note note note
                note note note note note note note note note note note note note
                item [c] Note note note note note note note note note note note note note
                note note note note note note note note note note note note note
                end{tablenotes}
                end{threeparttable}
                end{sidewaystable}
                end{document}





                share|improve this answer


























                  4














                  Since the table -- including table footnotes -- has to fit on a single page, I wouldn't use the machinery of the longtable and ThreePartTable environments. Moreover, I wouldn't use the adjustbox machinery either, as it will almost certainly cause wildly inconsistent font sizes across parts of the documents.



                  I can't see how you can go wrong employing sidewaystable, threeparttable, tabularx, and tablenotes environments. In particular, using a tabularx environment and allowing line breaks in cells should remove any need to resort to the adjustbox sledgehammer. For well-spaced horizontal lines or "rules", do consider loading the booktabs package and employing its toprule, cmidrule, midrule, and bottomrule macros. And, instead of tnote{a}tnote{b}, do write tnote{a,b}.



                  enter image description here



                  documentclass{article}
                  usepackage[skip=0.333baselineskip]{caption}
                  %usepackage[letterpaper,margin=1in]{geometry} % select the appropriate page parameters
                  usepackage{rotating}
                  usepackage{tabularx,ragged2e}
                  newcolumntype{C}{>{Centeringarraybackslash}X}
                  newcolumntype{E}{>{hsize=dimexpr2hsize+2tabcolseprelax}C}
                  usepackage[flushleft]{threeparttable}
                  usepackage{booktabs}
                  newcommandminitab[1]{smash{%
                  begin{tabular}[t]{@{}c@{}}#1end{tabular}}}

                  begin{document}
                  begin{sidewaystable}
                  begin{threeparttable}
                  caption{My table caption.}
                  begin{tabularx}{textwidth}{@{} l *{6}{C} @{}}
                  toprule
                  Model &
                  Specificationtnote{a} &
                  minitab{Covariance\structuretnote{a,b}} &
                  multicolumn{2}{E}{Number of fixed effectstnote{c}} &
                  multicolumn{2}{E@{}}{Number of variance componentstnote{c}} \
                  cmidrule(lr){4-5} cmidrule(l){6-7}
                  & & & ES approach & RD approach & ES approach & RD approach \
                  midrule
                  $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                  $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                  $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$& $43$ \
                  bottomrule
                  end{tabularx}

                  medskip % or "smallskip"
                  begin{tablenotes}
                  small
                  item [a] Note note note note note note note note note note note note note
                  nnote note note note note note note note note note note note note
                  item [b] Note note note note note note note note note note note note note
                  note note note note note note note note note note note note note
                  item [c] Note note note note note note note note note note note note note
                  note note note note note note note note note note note note note
                  end{tablenotes}
                  end{threeparttable}
                  end{sidewaystable}
                  end{document}





                  share|improve this answer
























                    4












                    4








                    4






                    Since the table -- including table footnotes -- has to fit on a single page, I wouldn't use the machinery of the longtable and ThreePartTable environments. Moreover, I wouldn't use the adjustbox machinery either, as it will almost certainly cause wildly inconsistent font sizes across parts of the documents.



                    I can't see how you can go wrong employing sidewaystable, threeparttable, tabularx, and tablenotes environments. In particular, using a tabularx environment and allowing line breaks in cells should remove any need to resort to the adjustbox sledgehammer. For well-spaced horizontal lines or "rules", do consider loading the booktabs package and employing its toprule, cmidrule, midrule, and bottomrule macros. And, instead of tnote{a}tnote{b}, do write tnote{a,b}.



                    enter image description here



                    documentclass{article}
                    usepackage[skip=0.333baselineskip]{caption}
                    %usepackage[letterpaper,margin=1in]{geometry} % select the appropriate page parameters
                    usepackage{rotating}
                    usepackage{tabularx,ragged2e}
                    newcolumntype{C}{>{Centeringarraybackslash}X}
                    newcolumntype{E}{>{hsize=dimexpr2hsize+2tabcolseprelax}C}
                    usepackage[flushleft]{threeparttable}
                    usepackage{booktabs}
                    newcommandminitab[1]{smash{%
                    begin{tabular}[t]{@{}c@{}}#1end{tabular}}}

                    begin{document}
                    begin{sidewaystable}
                    begin{threeparttable}
                    caption{My table caption.}
                    begin{tabularx}{textwidth}{@{} l *{6}{C} @{}}
                    toprule
                    Model &
                    Specificationtnote{a} &
                    minitab{Covariance\structuretnote{a,b}} &
                    multicolumn{2}{E}{Number of fixed effectstnote{c}} &
                    multicolumn{2}{E@{}}{Number of variance componentstnote{c}} \
                    cmidrule(lr){4-5} cmidrule(l){6-7}
                    & & & ES approach & RD approach & ES approach & RD approach \
                    midrule
                    $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                    $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                    $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$& $43$ \
                    bottomrule
                    end{tabularx}

                    medskip % or "smallskip"
                    begin{tablenotes}
                    small
                    item [a] Note note note note note note note note note note note note note
                    nnote note note note note note note note note note note note note
                    item [b] Note note note note note note note note note note note note note
                    note note note note note note note note note note note note note
                    item [c] Note note note note note note note note note note note note note
                    note note note note note note note note note note note note note
                    end{tablenotes}
                    end{threeparttable}
                    end{sidewaystable}
                    end{document}





                    share|improve this answer












                    Since the table -- including table footnotes -- has to fit on a single page, I wouldn't use the machinery of the longtable and ThreePartTable environments. Moreover, I wouldn't use the adjustbox machinery either, as it will almost certainly cause wildly inconsistent font sizes across parts of the documents.



                    I can't see how you can go wrong employing sidewaystable, threeparttable, tabularx, and tablenotes environments. In particular, using a tabularx environment and allowing line breaks in cells should remove any need to resort to the adjustbox sledgehammer. For well-spaced horizontal lines or "rules", do consider loading the booktabs package and employing its toprule, cmidrule, midrule, and bottomrule macros. And, instead of tnote{a}tnote{b}, do write tnote{a,b}.



                    enter image description here



                    documentclass{article}
                    usepackage[skip=0.333baselineskip]{caption}
                    %usepackage[letterpaper,margin=1in]{geometry} % select the appropriate page parameters
                    usepackage{rotating}
                    usepackage{tabularx,ragged2e}
                    newcolumntype{C}{>{Centeringarraybackslash}X}
                    newcolumntype{E}{>{hsize=dimexpr2hsize+2tabcolseprelax}C}
                    usepackage[flushleft]{threeparttable}
                    usepackage{booktabs}
                    newcommandminitab[1]{smash{%
                    begin{tabular}[t]{@{}c@{}}#1end{tabular}}}

                    begin{document}
                    begin{sidewaystable}
                    begin{threeparttable}
                    caption{My table caption.}
                    begin{tabularx}{textwidth}{@{} l *{6}{C} @{}}
                    toprule
                    Model &
                    Specificationtnote{a} &
                    minitab{Covariance\structuretnote{a,b}} &
                    multicolumn{2}{E}{Number of fixed effectstnote{c}} &
                    multicolumn{2}{E@{}}{Number of variance componentstnote{c}} \
                    cmidrule(lr){4-5} cmidrule(l){6-7}
                    & & & ES approach & RD approach & ES approach & RD approach \
                    midrule
                    $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                    $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                    $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$& $43$ \
                    bottomrule
                    end{tabularx}

                    medskip % or "smallskip"
                    begin{tablenotes}
                    small
                    item [a] Note note note note note note note note note note note note note
                    nnote note note note note note note note note note note note note
                    item [b] Note note note note note note note note note note note note note
                    note note note note note note note note note note note note note
                    item [c] Note note note note note note note note note note note note note
                    note note note note note note note note note note note note note
                    end{tablenotes}
                    end{threeparttable}
                    end{sidewaystable}
                    end{document}






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 13 '18 at 8:17









                    Mico

                    274k30370756




                    274k30370756























                        2














                        threeparttablex is for use with longtable not ordinary tabular. Use threeparttable commands for a tabular:



                        Sample output



                        documentclass{article}
                        usepackage{adjustbox}
                        usepackage{caption}
                        usepackage{multirow}
                        usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
                        usepackage{rotating}
                        usepackage{longtable}
                        usepackage{threeparttable}
                        usepackage{booktabs}

                        begin{document}

                        begin{sidewaystable}
                        begin{adjustbox}{width=linewidth}
                        begin{threeparttable}
                        renewcommand{TPTminimum}{.9linewidth}
                        caption{My table caption.}
                        begin{tabular}{*{7}{l}}
                        toprule
                        multirow{2}{*}{Model}
                        & multirow{2}{*}{Specificationtnote{a}}
                        & multirow{2}{*}{Covariance structuretnote{a,b} }
                        & multicolumn{2}{l}{Number of fixed effectstnote{c}}
                        & multicolumn{2}{l}{Number of variance componentstnote{c}} \
                        cmidrule(lr){4-7}
                        & & & ES approach & RD approach & ES approach & RD approach \
                        midrule
                        $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                        $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                        $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \
                        bottomrule
                        end{tabular}
                        begin{tablenotes}
                        small
                        item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                        item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                        item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                        end{tablenotes}
                        end{threeparttable}
                        end{adjustbox}
                        end{sidewaystable}
                        end{document}


                        Note loading threeparttablex will work equally well, it loads threeparttable, you just have to use the commands from threeparttable.



                        I used tnote{a,b} for the two adjacent notes. I added a manual space afterwards to give a bit more room.



                        I have used the booktabs package for nicer rules including the cmidrule which can be shortened slightly on either side






                        share|improve this answer


























                          2














                          threeparttablex is for use with longtable not ordinary tabular. Use threeparttable commands for a tabular:



                          Sample output



                          documentclass{article}
                          usepackage{adjustbox}
                          usepackage{caption}
                          usepackage{multirow}
                          usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
                          usepackage{rotating}
                          usepackage{longtable}
                          usepackage{threeparttable}
                          usepackage{booktabs}

                          begin{document}

                          begin{sidewaystable}
                          begin{adjustbox}{width=linewidth}
                          begin{threeparttable}
                          renewcommand{TPTminimum}{.9linewidth}
                          caption{My table caption.}
                          begin{tabular}{*{7}{l}}
                          toprule
                          multirow{2}{*}{Model}
                          & multirow{2}{*}{Specificationtnote{a}}
                          & multirow{2}{*}{Covariance structuretnote{a,b} }
                          & multicolumn{2}{l}{Number of fixed effectstnote{c}}
                          & multicolumn{2}{l}{Number of variance componentstnote{c}} \
                          cmidrule(lr){4-7}
                          & & & ES approach & RD approach & ES approach & RD approach \
                          midrule
                          $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                          $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                          $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \
                          bottomrule
                          end{tabular}
                          begin{tablenotes}
                          small
                          item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                          item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                          item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                          end{tablenotes}
                          end{threeparttable}
                          end{adjustbox}
                          end{sidewaystable}
                          end{document}


                          Note loading threeparttablex will work equally well, it loads threeparttable, you just have to use the commands from threeparttable.



                          I used tnote{a,b} for the two adjacent notes. I added a manual space afterwards to give a bit more room.



                          I have used the booktabs package for nicer rules including the cmidrule which can be shortened slightly on either side






                          share|improve this answer
























                            2












                            2








                            2






                            threeparttablex is for use with longtable not ordinary tabular. Use threeparttable commands for a tabular:



                            Sample output



                            documentclass{article}
                            usepackage{adjustbox}
                            usepackage{caption}
                            usepackage{multirow}
                            usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
                            usepackage{rotating}
                            usepackage{longtable}
                            usepackage{threeparttable}
                            usepackage{booktabs}

                            begin{document}

                            begin{sidewaystable}
                            begin{adjustbox}{width=linewidth}
                            begin{threeparttable}
                            renewcommand{TPTminimum}{.9linewidth}
                            caption{My table caption.}
                            begin{tabular}{*{7}{l}}
                            toprule
                            multirow{2}{*}{Model}
                            & multirow{2}{*}{Specificationtnote{a}}
                            & multirow{2}{*}{Covariance structuretnote{a,b} }
                            & multicolumn{2}{l}{Number of fixed effectstnote{c}}
                            & multicolumn{2}{l}{Number of variance componentstnote{c}} \
                            cmidrule(lr){4-7}
                            & & & ES approach & RD approach & ES approach & RD approach \
                            midrule
                            $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                            $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                            $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \
                            bottomrule
                            end{tabular}
                            begin{tablenotes}
                            small
                            item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                            item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                            item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                            end{tablenotes}
                            end{threeparttable}
                            end{adjustbox}
                            end{sidewaystable}
                            end{document}


                            Note loading threeparttablex will work equally well, it loads threeparttable, you just have to use the commands from threeparttable.



                            I used tnote{a,b} for the two adjacent notes. I added a manual space afterwards to give a bit more room.



                            I have used the booktabs package for nicer rules including the cmidrule which can be shortened slightly on either side






                            share|improve this answer












                            threeparttablex is for use with longtable not ordinary tabular. Use threeparttable commands for a tabular:



                            Sample output



                            documentclass{article}
                            usepackage{adjustbox}
                            usepackage{caption}
                            usepackage{multirow}
                            usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
                            usepackage{rotating}
                            usepackage{longtable}
                            usepackage{threeparttable}
                            usepackage{booktabs}

                            begin{document}

                            begin{sidewaystable}
                            begin{adjustbox}{width=linewidth}
                            begin{threeparttable}
                            renewcommand{TPTminimum}{.9linewidth}
                            caption{My table caption.}
                            begin{tabular}{*{7}{l}}
                            toprule
                            multirow{2}{*}{Model}
                            & multirow{2}{*}{Specificationtnote{a}}
                            & multirow{2}{*}{Covariance structuretnote{a,b} }
                            & multicolumn{2}{l}{Number of fixed effectstnote{c}}
                            & multicolumn{2}{l}{Number of variance componentstnote{c}} \
                            cmidrule(lr){4-7}
                            & & & ES approach & RD approach & ES approach & RD approach \
                            midrule
                            $1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \
                            $2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \
                            $3$ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \
                            bottomrule
                            end{tabular}
                            begin{tablenotes}
                            small
                            item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                            item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                            item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
                            end{tablenotes}
                            end{threeparttable}
                            end{adjustbox}
                            end{sidewaystable}
                            end{document}


                            Note loading threeparttablex will work equally well, it loads threeparttable, you just have to use the commands from threeparttable.



                            I used tnote{a,b} for the two adjacent notes. I added a manual space afterwards to give a bit more room.



                            I have used the booktabs package for nicer rules including the cmidrule which can be shortened slightly on either side







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 13 '18 at 8:17









                            Andrew Swann

                            76.6k9128325




                            76.6k9128325






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464641%2fcombining-sidewaystable-adjustbox-and-threeparttablex%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                How to change which sound is reproduced for terminal bell?

                                Can I use Tabulator js library in my java Spring + Thymeleaf project?

                                Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents