Continuous vertical line using booktabs in tabularx table?Which tabular packages do which tasks and which...

Why does Intel's Haswell chip allow FP multiplication to be twice as fast as addition?

How can I solve for the intersection points of two ellipses?

Three legged NOT gate? What is this symbol?

What costs less energy? Roll or Yaw?

Multirow in tabularx?

Y2K... in 2019?

The equation of motion for a scalar field in curved spacetime in terms of the covariant derivative

How to avoid the "need" to learn more before conducting research?

what is measured in units of sat/kw?

Trying to write a shell script that keeps testing a server remotely, but it keeps falling in else statement when I logout

During the Space Shuttle Columbia Disaster of 2003, Why Did The Flight Director Say, "Lock the doors."?

Help evaluating integral (anything simple that I am missing?)

Is refreshing multiple times a test case for web applications?

Blocking people from taking pictures of me with smartphone

Write an interpreter for *

Should I ask for permission to write an expository post about someone's else research?

Does a code snippet compile? Or does it get compiled?

In a 2 layer PCB with a top layer densely populated, from an EMI & EMC point of view should the ground plane be on top, bottom or both and why?

Double redundancy for the Saturn V LVDC computer memory, how were disagreements resolved?

What is the length of pair of wires after twisting them around each other?

Why did the RAAF procure the F/A-18 despite being purpose-built for carriers?

(11 of 11: Meta) What is Pyramid Cult's All-Time Favorite?

Who are these characters/superheroes in the posters from Chris's room in Family Guy?

In SQL Server, why does backward scan of clustered index cannot use parallelism?



Continuous vertical line using booktabs in tabularx table?


Which tabular packages do which tasks and which packages conflict?Vertical table lines are discontinuous with booktabsVertical alignment using multirow and booktabsVertical table lines are discontinuous with booktabsTable without using booktabsvertical alignment using tabularx / arraystretchFormatting table using booktabsBooktabs table with multirows: alternative to vertical rules?Vertical line not shown in a booktabs style table.Discontinuous vertical dash lines in tabularx, booktabs environmentBroken vertical line in tabularxTable with vertical aligned header text [tabularx]






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















How can we draw a continuous vertical line using booktabs in table?
What is the simplest method to maximise the width of a table?
There are lots of methods, very confusing.



documentclass{article}
usepackage{makecell} % for bold in table using small
renewcommandtheadfont{small} % for bold in table using small
usepackage{tabularx, ragged2e}
usepackage{booktabs}

begin{document}

begin{table}[!ht]
centering
begin{tabularx}{textwidth}{l>{raggedrightarraybackslash}ccc|ccc}
toprule
& multicolumn{3}{c|}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
cmidrule{2-7}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}} \
midrule
Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
bottomrule
end{tabularx}
caption{Testing Testing Testing%
label{tab:test1234}%
}
end{table}

end{document}


enter image description here










share|improve this question






















  • 1





    A tabularx environment requires at least one X column to make sense. This answers you second question. As to the first, booktabs is not adapted to vertical rules. For which reason do you ue it?

    – Bernard
    8 hours ago






  • 3





    To quote from the booktabs manual: "You will not go far wrong if you remember two simple guidelines at all times: 1. Never, ever use vertical rules. [...]" Therefore, I'd recommend to either stick to this rule, or, if you prefer vertical lines, use hline instead of teh booktabs horizontal lines.

    – leandriis
    8 hours ago











  • Please also note, that oyu can remove small from a thead commands, as you already used renewcommandtheadfont{small}´ to automatically make all text in thead` commands small. You can go even further and remove all the textbf inside of thead commands, if you use renewcommandtheadfont{smallbfseries}

    – leandriis
    8 hours ago











  • Regarding "the simplest method to maximise the width of a table" where would you like the extra white space to be? Between column 1 and 2, or 4 and 5 or equally distributed between all columns? Are there entries in the first column that are wider than the shown one? Why would wou even want your table to be wieder than it currently is?

    – leandriis
    8 hours ago






  • 1





    Regarding the vertical lines, you might also want to have a loom at Vertical table lines are discontinuous with booktabs

    – leandriis
    8 hours ago


















2















How can we draw a continuous vertical line using booktabs in table?
What is the simplest method to maximise the width of a table?
There are lots of methods, very confusing.



documentclass{article}
usepackage{makecell} % for bold in table using small
renewcommandtheadfont{small} % for bold in table using small
usepackage{tabularx, ragged2e}
usepackage{booktabs}

begin{document}

begin{table}[!ht]
centering
begin{tabularx}{textwidth}{l>{raggedrightarraybackslash}ccc|ccc}
toprule
& multicolumn{3}{c|}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
cmidrule{2-7}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}} \
midrule
Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
bottomrule
end{tabularx}
caption{Testing Testing Testing%
label{tab:test1234}%
}
end{table}

end{document}


enter image description here










share|improve this question






















  • 1





    A tabularx environment requires at least one X column to make sense. This answers you second question. As to the first, booktabs is not adapted to vertical rules. For which reason do you ue it?

    – Bernard
    8 hours ago






  • 3





    To quote from the booktabs manual: "You will not go far wrong if you remember two simple guidelines at all times: 1. Never, ever use vertical rules. [...]" Therefore, I'd recommend to either stick to this rule, or, if you prefer vertical lines, use hline instead of teh booktabs horizontal lines.

    – leandriis
    8 hours ago











  • Please also note, that oyu can remove small from a thead commands, as you already used renewcommandtheadfont{small}´ to automatically make all text in thead` commands small. You can go even further and remove all the textbf inside of thead commands, if you use renewcommandtheadfont{smallbfseries}

    – leandriis
    8 hours ago











  • Regarding "the simplest method to maximise the width of a table" where would you like the extra white space to be? Between column 1 and 2, or 4 and 5 or equally distributed between all columns? Are there entries in the first column that are wider than the shown one? Why would wou even want your table to be wieder than it currently is?

    – leandriis
    8 hours ago






  • 1





    Regarding the vertical lines, you might also want to have a loom at Vertical table lines are discontinuous with booktabs

    – leandriis
    8 hours ago














2












2








2








How can we draw a continuous vertical line using booktabs in table?
What is the simplest method to maximise the width of a table?
There are lots of methods, very confusing.



documentclass{article}
usepackage{makecell} % for bold in table using small
renewcommandtheadfont{small} % for bold in table using small
usepackage{tabularx, ragged2e}
usepackage{booktabs}

begin{document}

begin{table}[!ht]
centering
begin{tabularx}{textwidth}{l>{raggedrightarraybackslash}ccc|ccc}
toprule
& multicolumn{3}{c|}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
cmidrule{2-7}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}} \
midrule
Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
bottomrule
end{tabularx}
caption{Testing Testing Testing%
label{tab:test1234}%
}
end{table}

end{document}


enter image description here










share|improve this question
















How can we draw a continuous vertical line using booktabs in table?
What is the simplest method to maximise the width of a table?
There are lots of methods, very confusing.



documentclass{article}
usepackage{makecell} % for bold in table using small
renewcommandtheadfont{small} % for bold in table using small
usepackage{tabularx, ragged2e}
usepackage{booktabs}

begin{document}

begin{table}[!ht]
centering
begin{tabularx}{textwidth}{l>{raggedrightarraybackslash}ccc|ccc}
toprule
& multicolumn{3}{c|}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
cmidrule{2-7}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}}
& small {textbf{Statistic}}
& thead{small {textbf{df}}}
& thead{small {textbf{Sig.}}} \
midrule
Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
bottomrule
end{tabularx}
caption{Testing Testing Testing%
label{tab:test1234}%
}
end{table}

end{document}


enter image description here







tables vertical-alignment tabularx booktabs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 hours ago









leandriis

17.8k1 gold badge11 silver badges37 bronze badges




17.8k1 gold badge11 silver badges37 bronze badges










asked 8 hours ago









aanaan

1566 bronze badges




1566 bronze badges











  • 1





    A tabularx environment requires at least one X column to make sense. This answers you second question. As to the first, booktabs is not adapted to vertical rules. For which reason do you ue it?

    – Bernard
    8 hours ago






  • 3





    To quote from the booktabs manual: "You will not go far wrong if you remember two simple guidelines at all times: 1. Never, ever use vertical rules. [...]" Therefore, I'd recommend to either stick to this rule, or, if you prefer vertical lines, use hline instead of teh booktabs horizontal lines.

    – leandriis
    8 hours ago











  • Please also note, that oyu can remove small from a thead commands, as you already used renewcommandtheadfont{small}´ to automatically make all text in thead` commands small. You can go even further and remove all the textbf inside of thead commands, if you use renewcommandtheadfont{smallbfseries}

    – leandriis
    8 hours ago











  • Regarding "the simplest method to maximise the width of a table" where would you like the extra white space to be? Between column 1 and 2, or 4 and 5 or equally distributed between all columns? Are there entries in the first column that are wider than the shown one? Why would wou even want your table to be wieder than it currently is?

    – leandriis
    8 hours ago






  • 1





    Regarding the vertical lines, you might also want to have a loom at Vertical table lines are discontinuous with booktabs

    – leandriis
    8 hours ago














  • 1





    A tabularx environment requires at least one X column to make sense. This answers you second question. As to the first, booktabs is not adapted to vertical rules. For which reason do you ue it?

    – Bernard
    8 hours ago






  • 3





    To quote from the booktabs manual: "You will not go far wrong if you remember two simple guidelines at all times: 1. Never, ever use vertical rules. [...]" Therefore, I'd recommend to either stick to this rule, or, if you prefer vertical lines, use hline instead of teh booktabs horizontal lines.

    – leandriis
    8 hours ago











  • Please also note, that oyu can remove small from a thead commands, as you already used renewcommandtheadfont{small}´ to automatically make all text in thead` commands small. You can go even further and remove all the textbf inside of thead commands, if you use renewcommandtheadfont{smallbfseries}

    – leandriis
    8 hours ago











  • Regarding "the simplest method to maximise the width of a table" where would you like the extra white space to be? Between column 1 and 2, or 4 and 5 or equally distributed between all columns? Are there entries in the first column that are wider than the shown one? Why would wou even want your table to be wieder than it currently is?

    – leandriis
    8 hours ago






  • 1





    Regarding the vertical lines, you might also want to have a loom at Vertical table lines are discontinuous with booktabs

    – leandriis
    8 hours ago








1




1





A tabularx environment requires at least one X column to make sense. This answers you second question. As to the first, booktabs is not adapted to vertical rules. For which reason do you ue it?

– Bernard
8 hours ago





A tabularx environment requires at least one X column to make sense. This answers you second question. As to the first, booktabs is not adapted to vertical rules. For which reason do you ue it?

– Bernard
8 hours ago




3




3





To quote from the booktabs manual: "You will not go far wrong if you remember two simple guidelines at all times: 1. Never, ever use vertical rules. [...]" Therefore, I'd recommend to either stick to this rule, or, if you prefer vertical lines, use hline instead of teh booktabs horizontal lines.

– leandriis
8 hours ago





To quote from the booktabs manual: "You will not go far wrong if you remember two simple guidelines at all times: 1. Never, ever use vertical rules. [...]" Therefore, I'd recommend to either stick to this rule, or, if you prefer vertical lines, use hline instead of teh booktabs horizontal lines.

– leandriis
8 hours ago













Please also note, that oyu can remove small from a thead commands, as you already used renewcommandtheadfont{small}´ to automatically make all text in thead` commands small. You can go even further and remove all the textbf inside of thead commands, if you use renewcommandtheadfont{smallbfseries}

– leandriis
8 hours ago





Please also note, that oyu can remove small from a thead commands, as you already used renewcommandtheadfont{small}´ to automatically make all text in thead` commands small. You can go even further and remove all the textbf inside of thead commands, if you use renewcommandtheadfont{smallbfseries}

– leandriis
8 hours ago













Regarding "the simplest method to maximise the width of a table" where would you like the extra white space to be? Between column 1 and 2, or 4 and 5 or equally distributed between all columns? Are there entries in the first column that are wider than the shown one? Why would wou even want your table to be wieder than it currently is?

– leandriis
8 hours ago





Regarding "the simplest method to maximise the width of a table" where would you like the extra white space to be? Between column 1 and 2, or 4 and 5 or equally distributed between all columns? Are there entries in the first column that are wider than the shown one? Why would wou even want your table to be wieder than it currently is?

– leandriis
8 hours ago




1




1





Regarding the vertical lines, you might also want to have a loom at Vertical table lines are discontinuous with booktabs

– leandriis
8 hours ago





Regarding the vertical lines, you might also want to have a loom at Vertical table lines are discontinuous with booktabs

– leandriis
8 hours ago










3 Answers
3






active

oldest

votes


















2














Here is my suggestion. I have used tabular* in combination with @{extracolsep{fill}} to make the table as wide as the textwidth and to evenly distribute the excess white space between the columns. I have also removed the vertical line and replaced the single cmidrule by two adjacent ones with a small white space inbetween. In order to clean up the code, I have also removed the repeated occurences ot small and textbf and instead added bfseries to thedfont:



enter image description here



documentclass{article}
usepackage{makecell} % for bold in table using small
renewcommandtheadfont{smallbfseries} % for bold in table using small
usepackage{tabularx, ragged2e}
usepackage{booktabs}

begin{document}

begin{table}[!ht]
begin{tabular*}{textwidth}{@{extracolsep{fill}}lcccccc}
toprule
& multicolumn{3}{c}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
cmidrule(r){2-4} cmidrule(l){5-7}
& thead{Statistic}
& thead{df}
& thead{Sig.}
& thead{Statistic}
& thead{df}
& thead{Sig.} \
midrule
Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
bottomrule
end{tabular*}
caption{Testing Testing Testing%
label{tab:test1234}%
}
end{table}

end{document}





share|improve this answer

































    3














    I would rather replace the vertical line with a supplementary empty column to have a clear separation between the two group of columns. Another possibility, aesthetically, might be to delete the vertical padding of horizontal rules, and replace it with the makegapedcells command from makecell, which adds a vertical space at the top and bottom of all cells. As a demonstration, I replaced the vertical line with thick, light grey vrule, which I find more pleasing to the eye than the default thin, black, vertical rule.



    documentclass{article}
    usepackage{makecell} % for bold in table using small
    renewcommandtheadfont{smallbfseries} % for bold in table using small
    usepackage{tabularx, ragged2e}
    usepackage{booktabs}
    usepackage[table, svgnames]{xcolor}

    begin{document}

    begin{table}[!ht]
    centering
    begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccccccc}
    toprule
    & multicolumn{3}{c}{textbf{Paired Differences1}} & & multicolumn{3}{c}{textbf{Paired Differences2}}\
    cmidrule(lr){2-4} cmidrule(lr){6-8}
    & thead{Statistic}
    & thead{df }
    & thead{ Sig. }
    & & thead{Statistic}
    & thead{df}
    & thead{Sig.} \
    midrule
    Difference & 44.20 & 14.36 & 4.54 & & .957 & 10 & .746\
    bottomrule
    end{tabularx}
    caption{Testing Testing Testing%
    label{tab:test1234}%
    }
    end{table}

    begin{table}[!ht]
    centering
    setlength{aboverulesep}{0pt}
    setlength{belowrulesep}{0pt}
    setcellgapes{3pt}makegapedcells
    begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccc!{color{Gainsboro!50!Lavender}vline width 0.75em}ccc}
    toprule
    & multicolumn{3}{c!{color{Gainsboro!50!Lavender}vline width 0.75em}}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\noalign{vskip -0.033em}
    cmidrule(lr{1.33em}){2-4} cmidrule(lr){5-7}
    & thead{Statistic}
    & thead{df}
    & thead{Sig.}
    & thead{Statistic}
    & thead{df}
    & thead{Sig.} \
    noalign{vskip-0.05em}
    cmidrule[0.05em](r{0.9em}){1-4}cmidrule[0.05em](l{0.15em}){5-7}
    Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
    bottomrule
    end{tabularx}
    caption{Testing Testing Testing%
    label{tab:test1234}%
    }
    end{table}

    end{document}


    enter image description here






    share|improve this answer



































      3














      With combination of S and X columns type, without vertical lines, with rounded numbers ... :



      documentclass{article}
      usepackage{booktabs, tabularx}
      usepackage{xparse}
      NewExpandableDocumentCommandmcx{O{1}m}
      {multicolumn{#1}{>{Centeringsmallbfserieshsize=#1hsize}X}{#2}}
      usepackage{ragged2e}
      usepackage{siunitx}

      begin{document}
      begin{table}[ht]
      centering
      setlengthtabcolsep{0pt}
      sisetup{round-integer-to-decimal,
      round-mode=places,
      table-format=2.2}
      begin{tabularx}{linewidth}{l *{6}{S} }
      toprule
      & mcx[3]{Paired Differences 1}
      & mcx[3]{Paired Differences 2} \
      cmidrule(r){2-4}cmidrule(l){5-7}
      & mcx{Statistic} & mcx{df} & mcx{Sig.}
      & mcx{Statistic} & mcx{df} & mcx{Sig.} \
      midrule
      Difference
      & 44.20 & 14.36 & 4.54 & 0.957 & 10 & 0.746 \
      bottomrule
      end{tabularx}
      caption{Testing Testing Testing}
      label{tab:test1234}
      end{table}
      end{document}


      enter image description here






      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%2f503806%2fcontinuous-vertical-line-using-booktabs-in-tabularx-table%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









        2














        Here is my suggestion. I have used tabular* in combination with @{extracolsep{fill}} to make the table as wide as the textwidth and to evenly distribute the excess white space between the columns. I have also removed the vertical line and replaced the single cmidrule by two adjacent ones with a small white space inbetween. In order to clean up the code, I have also removed the repeated occurences ot small and textbf and instead added bfseries to thedfont:



        enter image description here



        documentclass{article}
        usepackage{makecell} % for bold in table using small
        renewcommandtheadfont{smallbfseries} % for bold in table using small
        usepackage{tabularx, ragged2e}
        usepackage{booktabs}

        begin{document}

        begin{table}[!ht]
        begin{tabular*}{textwidth}{@{extracolsep{fill}}lcccccc}
        toprule
        & multicolumn{3}{c}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
        cmidrule(r){2-4} cmidrule(l){5-7}
        & thead{Statistic}
        & thead{df}
        & thead{Sig.}
        & thead{Statistic}
        & thead{df}
        & thead{Sig.} \
        midrule
        Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
        bottomrule
        end{tabular*}
        caption{Testing Testing Testing%
        label{tab:test1234}%
        }
        end{table}

        end{document}





        share|improve this answer






























          2














          Here is my suggestion. I have used tabular* in combination with @{extracolsep{fill}} to make the table as wide as the textwidth and to evenly distribute the excess white space between the columns. I have also removed the vertical line and replaced the single cmidrule by two adjacent ones with a small white space inbetween. In order to clean up the code, I have also removed the repeated occurences ot small and textbf and instead added bfseries to thedfont:



          enter image description here



          documentclass{article}
          usepackage{makecell} % for bold in table using small
          renewcommandtheadfont{smallbfseries} % for bold in table using small
          usepackage{tabularx, ragged2e}
          usepackage{booktabs}

          begin{document}

          begin{table}[!ht]
          begin{tabular*}{textwidth}{@{extracolsep{fill}}lcccccc}
          toprule
          & multicolumn{3}{c}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
          cmidrule(r){2-4} cmidrule(l){5-7}
          & thead{Statistic}
          & thead{df}
          & thead{Sig.}
          & thead{Statistic}
          & thead{df}
          & thead{Sig.} \
          midrule
          Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
          bottomrule
          end{tabular*}
          caption{Testing Testing Testing%
          label{tab:test1234}%
          }
          end{table}

          end{document}





          share|improve this answer




























            2












            2








            2







            Here is my suggestion. I have used tabular* in combination with @{extracolsep{fill}} to make the table as wide as the textwidth and to evenly distribute the excess white space between the columns. I have also removed the vertical line and replaced the single cmidrule by two adjacent ones with a small white space inbetween. In order to clean up the code, I have also removed the repeated occurences ot small and textbf and instead added bfseries to thedfont:



            enter image description here



            documentclass{article}
            usepackage{makecell} % for bold in table using small
            renewcommandtheadfont{smallbfseries} % for bold in table using small
            usepackage{tabularx, ragged2e}
            usepackage{booktabs}

            begin{document}

            begin{table}[!ht]
            begin{tabular*}{textwidth}{@{extracolsep{fill}}lcccccc}
            toprule
            & multicolumn{3}{c}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
            cmidrule(r){2-4} cmidrule(l){5-7}
            & thead{Statistic}
            & thead{df}
            & thead{Sig.}
            & thead{Statistic}
            & thead{df}
            & thead{Sig.} \
            midrule
            Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
            bottomrule
            end{tabular*}
            caption{Testing Testing Testing%
            label{tab:test1234}%
            }
            end{table}

            end{document}





            share|improve this answer













            Here is my suggestion. I have used tabular* in combination with @{extracolsep{fill}} to make the table as wide as the textwidth and to evenly distribute the excess white space between the columns. I have also removed the vertical line and replaced the single cmidrule by two adjacent ones with a small white space inbetween. In order to clean up the code, I have also removed the repeated occurences ot small and textbf and instead added bfseries to thedfont:



            enter image description here



            documentclass{article}
            usepackage{makecell} % for bold in table using small
            renewcommandtheadfont{smallbfseries} % for bold in table using small
            usepackage{tabularx, ragged2e}
            usepackage{booktabs}

            begin{document}

            begin{table}[!ht]
            begin{tabular*}{textwidth}{@{extracolsep{fill}}lcccccc}
            toprule
            & multicolumn{3}{c}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\
            cmidrule(r){2-4} cmidrule(l){5-7}
            & thead{Statistic}
            & thead{df}
            & thead{Sig.}
            & thead{Statistic}
            & thead{df}
            & thead{Sig.} \
            midrule
            Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
            bottomrule
            end{tabular*}
            caption{Testing Testing Testing%
            label{tab:test1234}%
            }
            end{table}

            end{document}






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 7 hours ago









            leandriisleandriis

            17.8k1 gold badge11 silver badges37 bronze badges




            17.8k1 gold badge11 silver badges37 bronze badges




























                3














                I would rather replace the vertical line with a supplementary empty column to have a clear separation between the two group of columns. Another possibility, aesthetically, might be to delete the vertical padding of horizontal rules, and replace it with the makegapedcells command from makecell, which adds a vertical space at the top and bottom of all cells. As a demonstration, I replaced the vertical line with thick, light grey vrule, which I find more pleasing to the eye than the default thin, black, vertical rule.



                documentclass{article}
                usepackage{makecell} % for bold in table using small
                renewcommandtheadfont{smallbfseries} % for bold in table using small
                usepackage{tabularx, ragged2e}
                usepackage{booktabs}
                usepackage[table, svgnames]{xcolor}

                begin{document}

                begin{table}[!ht]
                centering
                begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccccccc}
                toprule
                & multicolumn{3}{c}{textbf{Paired Differences1}} & & multicolumn{3}{c}{textbf{Paired Differences2}}\
                cmidrule(lr){2-4} cmidrule(lr){6-8}
                & thead{Statistic}
                & thead{df }
                & thead{ Sig. }
                & & thead{Statistic}
                & thead{df}
                & thead{Sig.} \
                midrule
                Difference & 44.20 & 14.36 & 4.54 & & .957 & 10 & .746\
                bottomrule
                end{tabularx}
                caption{Testing Testing Testing%
                label{tab:test1234}%
                }
                end{table}

                begin{table}[!ht]
                centering
                setlength{aboverulesep}{0pt}
                setlength{belowrulesep}{0pt}
                setcellgapes{3pt}makegapedcells
                begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccc!{color{Gainsboro!50!Lavender}vline width 0.75em}ccc}
                toprule
                & multicolumn{3}{c!{color{Gainsboro!50!Lavender}vline width 0.75em}}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\noalign{vskip -0.033em}
                cmidrule(lr{1.33em}){2-4} cmidrule(lr){5-7}
                & thead{Statistic}
                & thead{df}
                & thead{Sig.}
                & thead{Statistic}
                & thead{df}
                & thead{Sig.} \
                noalign{vskip-0.05em}
                cmidrule[0.05em](r{0.9em}){1-4}cmidrule[0.05em](l{0.15em}){5-7}
                Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
                bottomrule
                end{tabularx}
                caption{Testing Testing Testing%
                label{tab:test1234}%
                }
                end{table}

                end{document}


                enter image description here






                share|improve this answer
































                  3














                  I would rather replace the vertical line with a supplementary empty column to have a clear separation between the two group of columns. Another possibility, aesthetically, might be to delete the vertical padding of horizontal rules, and replace it with the makegapedcells command from makecell, which adds a vertical space at the top and bottom of all cells. As a demonstration, I replaced the vertical line with thick, light grey vrule, which I find more pleasing to the eye than the default thin, black, vertical rule.



                  documentclass{article}
                  usepackage{makecell} % for bold in table using small
                  renewcommandtheadfont{smallbfseries} % for bold in table using small
                  usepackage{tabularx, ragged2e}
                  usepackage{booktabs}
                  usepackage[table, svgnames]{xcolor}

                  begin{document}

                  begin{table}[!ht]
                  centering
                  begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccccccc}
                  toprule
                  & multicolumn{3}{c}{textbf{Paired Differences1}} & & multicolumn{3}{c}{textbf{Paired Differences2}}\
                  cmidrule(lr){2-4} cmidrule(lr){6-8}
                  & thead{Statistic}
                  & thead{df }
                  & thead{ Sig. }
                  & & thead{Statistic}
                  & thead{df}
                  & thead{Sig.} \
                  midrule
                  Difference & 44.20 & 14.36 & 4.54 & & .957 & 10 & .746\
                  bottomrule
                  end{tabularx}
                  caption{Testing Testing Testing%
                  label{tab:test1234}%
                  }
                  end{table}

                  begin{table}[!ht]
                  centering
                  setlength{aboverulesep}{0pt}
                  setlength{belowrulesep}{0pt}
                  setcellgapes{3pt}makegapedcells
                  begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccc!{color{Gainsboro!50!Lavender}vline width 0.75em}ccc}
                  toprule
                  & multicolumn{3}{c!{color{Gainsboro!50!Lavender}vline width 0.75em}}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\noalign{vskip -0.033em}
                  cmidrule(lr{1.33em}){2-4} cmidrule(lr){5-7}
                  & thead{Statistic}
                  & thead{df}
                  & thead{Sig.}
                  & thead{Statistic}
                  & thead{df}
                  & thead{Sig.} \
                  noalign{vskip-0.05em}
                  cmidrule[0.05em](r{0.9em}){1-4}cmidrule[0.05em](l{0.15em}){5-7}
                  Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
                  bottomrule
                  end{tabularx}
                  caption{Testing Testing Testing%
                  label{tab:test1234}%
                  }
                  end{table}

                  end{document}


                  enter image description here






                  share|improve this answer






























                    3












                    3








                    3







                    I would rather replace the vertical line with a supplementary empty column to have a clear separation between the two group of columns. Another possibility, aesthetically, might be to delete the vertical padding of horizontal rules, and replace it with the makegapedcells command from makecell, which adds a vertical space at the top and bottom of all cells. As a demonstration, I replaced the vertical line with thick, light grey vrule, which I find more pleasing to the eye than the default thin, black, vertical rule.



                    documentclass{article}
                    usepackage{makecell} % for bold in table using small
                    renewcommandtheadfont{smallbfseries} % for bold in table using small
                    usepackage{tabularx, ragged2e}
                    usepackage{booktabs}
                    usepackage[table, svgnames]{xcolor}

                    begin{document}

                    begin{table}[!ht]
                    centering
                    begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccccccc}
                    toprule
                    & multicolumn{3}{c}{textbf{Paired Differences1}} & & multicolumn{3}{c}{textbf{Paired Differences2}}\
                    cmidrule(lr){2-4} cmidrule(lr){6-8}
                    & thead{Statistic}
                    & thead{df }
                    & thead{ Sig. }
                    & & thead{Statistic}
                    & thead{df}
                    & thead{Sig.} \
                    midrule
                    Difference & 44.20 & 14.36 & 4.54 & & .957 & 10 & .746\
                    bottomrule
                    end{tabularx}
                    caption{Testing Testing Testing%
                    label{tab:test1234}%
                    }
                    end{table}

                    begin{table}[!ht]
                    centering
                    setlength{aboverulesep}{0pt}
                    setlength{belowrulesep}{0pt}
                    setcellgapes{3pt}makegapedcells
                    begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccc!{color{Gainsboro!50!Lavender}vline width 0.75em}ccc}
                    toprule
                    & multicolumn{3}{c!{color{Gainsboro!50!Lavender}vline width 0.75em}}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\noalign{vskip -0.033em}
                    cmidrule(lr{1.33em}){2-4} cmidrule(lr){5-7}
                    & thead{Statistic}
                    & thead{df}
                    & thead{Sig.}
                    & thead{Statistic}
                    & thead{df}
                    & thead{Sig.} \
                    noalign{vskip-0.05em}
                    cmidrule[0.05em](r{0.9em}){1-4}cmidrule[0.05em](l{0.15em}){5-7}
                    Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
                    bottomrule
                    end{tabularx}
                    caption{Testing Testing Testing%
                    label{tab:test1234}%
                    }
                    end{table}

                    end{document}


                    enter image description here






                    share|improve this answer















                    I would rather replace the vertical line with a supplementary empty column to have a clear separation between the two group of columns. Another possibility, aesthetically, might be to delete the vertical padding of horizontal rules, and replace it with the makegapedcells command from makecell, which adds a vertical space at the top and bottom of all cells. As a demonstration, I replaced the vertical line with thick, light grey vrule, which I find more pleasing to the eye than the default thin, black, vertical rule.



                    documentclass{article}
                    usepackage{makecell} % for bold in table using small
                    renewcommandtheadfont{smallbfseries} % for bold in table using small
                    usepackage{tabularx, ragged2e}
                    usepackage{booktabs}
                    usepackage[table, svgnames]{xcolor}

                    begin{document}

                    begin{table}[!ht]
                    centering
                    begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccccccc}
                    toprule
                    & multicolumn{3}{c}{textbf{Paired Differences1}} & & multicolumn{3}{c}{textbf{Paired Differences2}}\
                    cmidrule(lr){2-4} cmidrule(lr){6-8}
                    & thead{Statistic}
                    & thead{df }
                    & thead{ Sig. }
                    & & thead{Statistic}
                    & thead{df}
                    & thead{Sig.} \
                    midrule
                    Difference & 44.20 & 14.36 & 4.54 & & .957 & 10 & .746\
                    bottomrule
                    end{tabularx}
                    caption{Testing Testing Testing%
                    label{tab:test1234}%
                    }
                    end{table}

                    begin{table}[!ht]
                    centering
                    setlength{aboverulesep}{0pt}
                    setlength{belowrulesep}{0pt}
                    setcellgapes{3pt}makegapedcells
                    begin{tabularx}{textwidth}{X>{raggedrightarraybackslash}ccc!{color{Gainsboro!50!Lavender}vline width 0.75em}ccc}
                    toprule
                    & multicolumn{3}{c!{color{Gainsboro!50!Lavender}vline width 0.75em}}{textbf{Paired Differences1}} & multicolumn{3}{c}{textbf{Paired Differences2}}\noalign{vskip -0.033em}
                    cmidrule(lr{1.33em}){2-4} cmidrule(lr){5-7}
                    & thead{Statistic}
                    & thead{df}
                    & thead{Sig.}
                    & thead{Statistic}
                    & thead{df}
                    & thead{Sig.} \
                    noalign{vskip-0.05em}
                    cmidrule[0.05em](r{0.9em}){1-4}cmidrule[0.05em](l{0.15em}){5-7}
                    Difference & 44.20 & 14.36 & 4.54 & .957 & 10 & .746\
                    bottomrule
                    end{tabularx}
                    caption{Testing Testing Testing%
                    label{tab:test1234}%
                    }
                    end{table}

                    end{document}


                    enter image description here







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 7 hours ago

























                    answered 7 hours ago









                    BernardBernard

                    187k7 gold badges84 silver badges221 bronze badges




                    187k7 gold badges84 silver badges221 bronze badges


























                        3














                        With combination of S and X columns type, without vertical lines, with rounded numbers ... :



                        documentclass{article}
                        usepackage{booktabs, tabularx}
                        usepackage{xparse}
                        NewExpandableDocumentCommandmcx{O{1}m}
                        {multicolumn{#1}{>{Centeringsmallbfserieshsize=#1hsize}X}{#2}}
                        usepackage{ragged2e}
                        usepackage{siunitx}

                        begin{document}
                        begin{table}[ht]
                        centering
                        setlengthtabcolsep{0pt}
                        sisetup{round-integer-to-decimal,
                        round-mode=places,
                        table-format=2.2}
                        begin{tabularx}{linewidth}{l *{6}{S} }
                        toprule
                        & mcx[3]{Paired Differences 1}
                        & mcx[3]{Paired Differences 2} \
                        cmidrule(r){2-4}cmidrule(l){5-7}
                        & mcx{Statistic} & mcx{df} & mcx{Sig.}
                        & mcx{Statistic} & mcx{df} & mcx{Sig.} \
                        midrule
                        Difference
                        & 44.20 & 14.36 & 4.54 & 0.957 & 10 & 0.746 \
                        bottomrule
                        end{tabularx}
                        caption{Testing Testing Testing}
                        label{tab:test1234}
                        end{table}
                        end{document}


                        enter image description here






                        share|improve this answer
































                          3














                          With combination of S and X columns type, without vertical lines, with rounded numbers ... :



                          documentclass{article}
                          usepackage{booktabs, tabularx}
                          usepackage{xparse}
                          NewExpandableDocumentCommandmcx{O{1}m}
                          {multicolumn{#1}{>{Centeringsmallbfserieshsize=#1hsize}X}{#2}}
                          usepackage{ragged2e}
                          usepackage{siunitx}

                          begin{document}
                          begin{table}[ht]
                          centering
                          setlengthtabcolsep{0pt}
                          sisetup{round-integer-to-decimal,
                          round-mode=places,
                          table-format=2.2}
                          begin{tabularx}{linewidth}{l *{6}{S} }
                          toprule
                          & mcx[3]{Paired Differences 1}
                          & mcx[3]{Paired Differences 2} \
                          cmidrule(r){2-4}cmidrule(l){5-7}
                          & mcx{Statistic} & mcx{df} & mcx{Sig.}
                          & mcx{Statistic} & mcx{df} & mcx{Sig.} \
                          midrule
                          Difference
                          & 44.20 & 14.36 & 4.54 & 0.957 & 10 & 0.746 \
                          bottomrule
                          end{tabularx}
                          caption{Testing Testing Testing}
                          label{tab:test1234}
                          end{table}
                          end{document}


                          enter image description here






                          share|improve this answer






























                            3












                            3








                            3







                            With combination of S and X columns type, without vertical lines, with rounded numbers ... :



                            documentclass{article}
                            usepackage{booktabs, tabularx}
                            usepackage{xparse}
                            NewExpandableDocumentCommandmcx{O{1}m}
                            {multicolumn{#1}{>{Centeringsmallbfserieshsize=#1hsize}X}{#2}}
                            usepackage{ragged2e}
                            usepackage{siunitx}

                            begin{document}
                            begin{table}[ht]
                            centering
                            setlengthtabcolsep{0pt}
                            sisetup{round-integer-to-decimal,
                            round-mode=places,
                            table-format=2.2}
                            begin{tabularx}{linewidth}{l *{6}{S} }
                            toprule
                            & mcx[3]{Paired Differences 1}
                            & mcx[3]{Paired Differences 2} \
                            cmidrule(r){2-4}cmidrule(l){5-7}
                            & mcx{Statistic} & mcx{df} & mcx{Sig.}
                            & mcx{Statistic} & mcx{df} & mcx{Sig.} \
                            midrule
                            Difference
                            & 44.20 & 14.36 & 4.54 & 0.957 & 10 & 0.746 \
                            bottomrule
                            end{tabularx}
                            caption{Testing Testing Testing}
                            label{tab:test1234}
                            end{table}
                            end{document}


                            enter image description here






                            share|improve this answer















                            With combination of S and X columns type, without vertical lines, with rounded numbers ... :



                            documentclass{article}
                            usepackage{booktabs, tabularx}
                            usepackage{xparse}
                            NewExpandableDocumentCommandmcx{O{1}m}
                            {multicolumn{#1}{>{Centeringsmallbfserieshsize=#1hsize}X}{#2}}
                            usepackage{ragged2e}
                            usepackage{siunitx}

                            begin{document}
                            begin{table}[ht]
                            centering
                            setlengthtabcolsep{0pt}
                            sisetup{round-integer-to-decimal,
                            round-mode=places,
                            table-format=2.2}
                            begin{tabularx}{linewidth}{l *{6}{S} }
                            toprule
                            & mcx[3]{Paired Differences 1}
                            & mcx[3]{Paired Differences 2} \
                            cmidrule(r){2-4}cmidrule(l){5-7}
                            & mcx{Statistic} & mcx{df} & mcx{Sig.}
                            & mcx{Statistic} & mcx{df} & mcx{Sig.} \
                            midrule
                            Difference
                            & 44.20 & 14.36 & 4.54 & 0.957 & 10 & 0.746 \
                            bottomrule
                            end{tabularx}
                            caption{Testing Testing Testing}
                            label{tab:test1234}
                            end{table}
                            end{document}


                            enter image description here







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited 6 hours ago

























                            answered 7 hours ago









                            ZarkoZarko

                            143k8 gold badges79 silver badges192 bronze badges




                            143k8 gold badges79 silver badges192 bronze badges

































                                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.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f503806%2fcontinuous-vertical-line-using-booktabs-in-tabularx-table%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

                                Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                                Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                                Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...