Table alignment (make the content centre)What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?Column with fixed width and centre alignmentHelp to make table of contentMake a linewidth table with booktabsTable: cmidrule alignment problem when working with tabular* environmentsMake the table look betterpositioning and alignment of table contentCan't centre tabular tableAlignment issues with rotated table contentVertically-centre content of a TableTable content alignment to centre using tabular

Using font to highlight a god's speech in dialogue

How to find better food in airports

Tasha's Hideous Laughter used on a deaf person?

Can my UK debt be collected because I have to return to US?

Cheap oscilloscope showing 16 MHz square wave

Why is Mitch McConnell blocking nominees to the Federal Election Commission?

Is it good practice to speed up and slow down where not written in a song?

Why do fuses burn at a specific current?

Divide Numbers by 0

Heuristic argument for the Riemann Hypothesis

What is the definition of Product

Using large parts of a research paper

Calculate Landau's function

How to have the "Restore Missing Files" function from Nautilus without installing Nautilus?

Why didn't Thatcher give Hong Kong to Taiwan?

Get rows that exist exactly once per day for a given period

Can a system of three stars exist?

Blogging in LaTeX

Would someone mind just getting me started with my Russian homework?

How are the cards determined in an incomplete deck of many things?

How do you manage to study and have a balance in your life at the same time?

Turn off Google Chrome's Notification for "Flash Player will no longer be supported after December 2020."

Blender - Alpha is Luminance equivalent

Doesn't the concept of marginal utility speak to a cardinal utility function?



Table alignment (make the content centre)


What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?Column with fixed width and centre alignmentHelp to make table of contentMake a linewidth table with booktabsTable: cmidrule alignment problem when working with tabular* environmentsMake the table look betterpositioning and alignment of table contentCan't centre tabular tableAlignment issues with rotated table contentVertically-centre content of a TableTable content alignment to centre using tabular






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








2















I want to make the content center, i have out of idea what else I can change.



enter image description hereenter image description here



documentclass[12pt,oneside]book

usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred

usepackagemakecell,siunitx
usepackagebooktabs

begindocument

begintable[htp!]
centering
begintabular
l
S[table-format=2.2,table-space-text-post=%]
S[table-format=3.2,,table-space-text-post=%]

toprule
& multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
cmidrule2-3
& textbfMM
& textbfCM \
midrule
N & 10 & 10 \
Mean & 91.45% & 8.55% \
Median & 94.74% & 5.26% \
bottomrule
endtabular
endtable

enddocument









share|improve this question






























    2















    I want to make the content center, i have out of idea what else I can change.



    enter image description hereenter image description here



    documentclass[12pt,oneside]book

    usepackageshowframe
    renewcommandShowFrameLinethickness0.15pt
    renewcommand*ShowFrameColorcolorred

    usepackagemakecell,siunitx
    usepackagebooktabs

    begindocument

    begintable[htp!]
    centering
    begintabular
    l
    S[table-format=2.2,table-space-text-post=%]
    S[table-format=3.2,,table-space-text-post=%]

    toprule
    & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
    cmidrule2-3
    & textbfMM
    & textbfCM \
    midrule
    N & 10 & 10 \
    Mean & 91.45% & 8.55% \
    Median & 94.74% & 5.26% \
    bottomrule
    endtabular
    endtable

    enddocument









    share|improve this question


























      2












      2








      2








      I want to make the content center, i have out of idea what else I can change.



      enter image description hereenter image description here



      documentclass[12pt,oneside]book

      usepackageshowframe
      renewcommandShowFrameLinethickness0.15pt
      renewcommand*ShowFrameColorcolorred

      usepackagemakecell,siunitx
      usepackagebooktabs

      begindocument

      begintable[htp!]
      centering
      begintabular
      l
      S[table-format=2.2,table-space-text-post=%]
      S[table-format=3.2,,table-space-text-post=%]

      toprule
      & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
      cmidrule2-3
      & textbfMM
      & textbfCM \
      midrule
      N & 10 & 10 \
      Mean & 91.45% & 8.55% \
      Median & 94.74% & 5.26% \
      bottomrule
      endtabular
      endtable

      enddocument









      share|improve this question














      I want to make the content center, i have out of idea what else I can change.



      enter image description hereenter image description here



      documentclass[12pt,oneside]book

      usepackageshowframe
      renewcommandShowFrameLinethickness0.15pt
      renewcommand*ShowFrameColorcolorred

      usepackagemakecell,siunitx
      usepackagebooktabs

      begindocument

      begintable[htp!]
      centering
      begintabular
      l
      S[table-format=2.2,table-space-text-post=%]
      S[table-format=3.2,,table-space-text-post=%]

      toprule
      & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
      cmidrule2-3
      & textbfMM
      & textbfCM \
      midrule
      N & 10 & 10 \
      Mean & 91.45% & 8.55% \
      Median & 94.74% & 5.26% \
      bottomrule
      endtabular
      endtable

      enddocument






      tables booktabs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 8 hours ago









      aanaan

      3361 silver badge7 bronze badges




      3361 silver badge7 bronze badges























          4 Answers
          4






          active

          oldest

          votes


















          4















          You should fix the number of digits for the S column and two pairs of are required around the two textbf.... You may consider also removing the braces around 10 but I'll leave it for you to decide.



          documentclassarticle
          usepackageshowframe
          renewcommandShowFrameLinethickness0.15pt
          renewcommand*ShowFrameColorcolorred

          usepackagemakecell,siunitx
          usepackagebooktabs

          begindocument

          begintable[htp!]
          setlengthtabcolsep1em
          centering
          begintabular
          l
          S[table-format=2.2,table-space-text-post=%]
          S[table-format=2.2,table-space-text-post=%]

          toprule
          & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
          cmidrule2-3
          & textbfMM
          & textbfCM \
          midrule
          N & 10 & 10 \
          Mean & 91.45% & 8.55% \
          Median & 94.74% & 5.26% \
          bottomrule
          endtabular
          endtable

          enddocument



          enter image description here







          share|improve this answer

























          • Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

            – aan
            7 hours ago











          • @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

            – leandriis
            6 hours ago











          • @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

            – Sveinung
            5 hours ago



















          3















          Here is how I interpret your table. Since you have aligned the table at decimal point, the number without decimal is set to the left. You may overcome this by enclosing the two nunbers 10 in curly brackets (10) or using multicolumn1c10, but this is typographically probably not correct.



          enter image description here



          documentclass[12pt,oneside]book

          usepackageshowframe
          renewcommandShowFrameLinethickness0.15pt
          renewcommand*ShowFrameColorcolorred

          usepackagemakecell,siunitx
          usepackagebooktabs

          begindocument

          begintable
          centering
          begintabular@
          l
          S[table-format=2.2,table-space-text-post=%]
          S[table-format=2.2,table-space-text-post=%] % As @Zarko says, reduce this numer to 1.1 if number 10 is centred, else 2.2
          @
          toprule
          & multicolumn2@c@theadtextbfDescriptive Analysis 1\
          cmidrule2-3
          & multicolumn1ctextbfMM
          & multicolumn1ctextbfCM \
          midrule
          %N & 10 & 10 \ % Enclose in brackets to centre the content
          N & 10 & 10 \
          Mean & 91.45% & 8.55% \
          Median & 94.74% & 5.26% \
          bottomrule
          endtabular
          endtable

          enddocument





          share|improve this answer


































            2















            You need to override the S column to a c in all places where you don't have a percentage (and the numbers in the first column should be 4.2):



            begintabular
            l
            S[table-format=4.2,table-space-text-post=%]
            S[table-format=3.2,,table-space-text-post=%]

            toprule
            & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
            cmidrule2-3
            & multicolumn1ctextbfMM & multicolumn1ctextbfCM \
            midrule
            N & multicolumn1c10 & multicolumn1c10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular


            enter image description here






            share|improve this answer

























            • "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

              – leandriis
              6 hours ago











            • @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

              – Rmano
              5 hours ago


















            2















            One more variation ...



            Your problem arise from the fact that text in multicolumn cell is wider than natural width of the spanned columns. Problem is solved, if you make those column has equal wider width, for example with determine their widths enough large as it is done in the following MWE:



            documentclass[12pt,oneside]book
            usepackagebooktabs, makecell
            renewcommandtheadfontsmallbfseries
            renewcommandtheadgape
            usepackagesiunitx

            begindocument
            begintable
            centering
            sisetuptable-format=2.2,
            table-space-text-post=%,
            table-column-width=5em % <-----
            begintabular@ l S S @
            toprule
            & multicolumn2@c@theadDescriptive Analysis 1 \
            cmidrule2-3
            & theadMM & theadCM \
            midrule
            N & 10 & 10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular
            endtable
            enddocument


            enter image description here






            share|improve this answer



























            • I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

              – Sveinung
              5 hours ago












            • @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

              – Zarko
              5 hours ago











            • @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

              – Zarko
              5 hours ago











            • Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

              – Sveinung
              4 hours ago














            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%2f506590%2ftable-alignment-make-the-content-centre%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4















            You should fix the number of digits for the S column and two pairs of are required around the two textbf.... You may consider also removing the braces around 10 but I'll leave it for you to decide.



            documentclassarticle
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred

            usepackagemakecell,siunitx
            usepackagebooktabs

            begindocument

            begintable[htp!]
            setlengthtabcolsep1em
            centering
            begintabular
            l
            S[table-format=2.2,table-space-text-post=%]
            S[table-format=2.2,table-space-text-post=%]

            toprule
            & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
            cmidrule2-3
            & textbfMM
            & textbfCM \
            midrule
            N & 10 & 10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular
            endtable

            enddocument



            enter image description here







            share|improve this answer

























            • Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

              – aan
              7 hours ago











            • @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

              – leandriis
              6 hours ago











            • @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

              – Sveinung
              5 hours ago
















            4















            You should fix the number of digits for the S column and two pairs of are required around the two textbf.... You may consider also removing the braces around 10 but I'll leave it for you to decide.



            documentclassarticle
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred

            usepackagemakecell,siunitx
            usepackagebooktabs

            begindocument

            begintable[htp!]
            setlengthtabcolsep1em
            centering
            begintabular
            l
            S[table-format=2.2,table-space-text-post=%]
            S[table-format=2.2,table-space-text-post=%]

            toprule
            & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
            cmidrule2-3
            & textbfMM
            & textbfCM \
            midrule
            N & 10 & 10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular
            endtable

            enddocument



            enter image description here







            share|improve this answer

























            • Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

              – aan
              7 hours ago











            • @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

              – leandriis
              6 hours ago











            • @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

              – Sveinung
              5 hours ago














            4














            4










            4









            You should fix the number of digits for the S column and two pairs of are required around the two textbf.... You may consider also removing the braces around 10 but I'll leave it for you to decide.



            documentclassarticle
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred

            usepackagemakecell,siunitx
            usepackagebooktabs

            begindocument

            begintable[htp!]
            setlengthtabcolsep1em
            centering
            begintabular
            l
            S[table-format=2.2,table-space-text-post=%]
            S[table-format=2.2,table-space-text-post=%]

            toprule
            & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
            cmidrule2-3
            & textbfMM
            & textbfCM \
            midrule
            N & 10 & 10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular
            endtable

            enddocument



            enter image description here







            share|improve this answer













            You should fix the number of digits for the S column and two pairs of are required around the two textbf.... You may consider also removing the braces around 10 but I'll leave it for you to decide.



            documentclassarticle
            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred

            usepackagemakecell,siunitx
            usepackagebooktabs

            begindocument

            begintable[htp!]
            setlengthtabcolsep1em
            centering
            begintabular
            l
            S[table-format=2.2,table-space-text-post=%]
            S[table-format=2.2,table-space-text-post=%]

            toprule
            & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
            cmidrule2-3
            & textbfMM
            & textbfCM \
            midrule
            N & 10 & 10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular
            endtable

            enddocument



            enter image description here








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 7 hours ago









            AboAmmarAboAmmar

            36.4k3 gold badges31 silver badges87 bronze badges




            36.4k3 gold badges31 silver badges87 bronze badges















            • Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

              – aan
              7 hours ago











            • @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

              – leandriis
              6 hours ago











            • @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

              – Sveinung
              5 hours ago


















            • Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

              – aan
              7 hours ago











            • @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

              – leandriis
              6 hours ago











            • @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

              – Sveinung
              5 hours ago

















            Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

            – aan
            7 hours ago





            Thanks. Could you explain more what is the meaning of setlengthtabcolsep1em? thanks.

            – aan
            7 hours ago













            @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

            – leandriis
            6 hours ago





            @aan: tabcolsep is half of teh horizontal white space between teh contents of adjacent cells. The command setlengthtabcolsep1em sets this space to be as wide as 1em. (See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?)

            – leandriis
            6 hours ago













            @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

            – Sveinung
            5 hours ago






            @aan tabcolsepis half the space between two columns, i.e from the right margin of one cell to the Ieft margin in same cell in the next column, it is two tabcolsep. 1em is approximatly the same as the width of the letter m, or 12 pt here. The standard is 6pt and this example double it. The recommendation in some textbook I have, is 0.5em. It is better to set it relative to the fontsize using em than a fixed number of points.

            – Sveinung
            5 hours ago














            3















            Here is how I interpret your table. Since you have aligned the table at decimal point, the number without decimal is set to the left. You may overcome this by enclosing the two nunbers 10 in curly brackets (10) or using multicolumn1c10, but this is typographically probably not correct.



            enter image description here



            documentclass[12pt,oneside]book

            usepackageshowframe
            renewcommandShowFrameLinethickness0.15pt
            renewcommand*ShowFrameColorcolorred

            usepackagemakecell,siunitx
            usepackagebooktabs

            begindocument

            begintable
            centering
            begintabular@
            l
            S[table-format=2.2,table-space-text-post=%]
            S[table-format=2.2,table-space-text-post=%] % As @Zarko says, reduce this numer to 1.1 if number 10 is centred, else 2.2
            @
            toprule
            & multicolumn2@c@theadtextbfDescriptive Analysis 1\
            cmidrule2-3
            & multicolumn1ctextbfMM
            & multicolumn1ctextbfCM \
            midrule
            %N & 10 & 10 \ % Enclose in brackets to centre the content
            N & 10 & 10 \
            Mean & 91.45% & 8.55% \
            Median & 94.74% & 5.26% \
            bottomrule
            endtabular
            endtable

            enddocument





            share|improve this answer































              3















              Here is how I interpret your table. Since you have aligned the table at decimal point, the number without decimal is set to the left. You may overcome this by enclosing the two nunbers 10 in curly brackets (10) or using multicolumn1c10, but this is typographically probably not correct.



              enter image description here



              documentclass[12pt,oneside]book

              usepackageshowframe
              renewcommandShowFrameLinethickness0.15pt
              renewcommand*ShowFrameColorcolorred

              usepackagemakecell,siunitx
              usepackagebooktabs

              begindocument

              begintable
              centering
              begintabular@
              l
              S[table-format=2.2,table-space-text-post=%]
              S[table-format=2.2,table-space-text-post=%] % As @Zarko says, reduce this numer to 1.1 if number 10 is centred, else 2.2
              @
              toprule
              & multicolumn2@c@theadtextbfDescriptive Analysis 1\
              cmidrule2-3
              & multicolumn1ctextbfMM
              & multicolumn1ctextbfCM \
              midrule
              %N & 10 & 10 \ % Enclose in brackets to centre the content
              N & 10 & 10 \
              Mean & 91.45% & 8.55% \
              Median & 94.74% & 5.26% \
              bottomrule
              endtabular
              endtable

              enddocument





              share|improve this answer





























                3














                3










                3









                Here is how I interpret your table. Since you have aligned the table at decimal point, the number without decimal is set to the left. You may overcome this by enclosing the two nunbers 10 in curly brackets (10) or using multicolumn1c10, but this is typographically probably not correct.



                enter image description here



                documentclass[12pt,oneside]book

                usepackageshowframe
                renewcommandShowFrameLinethickness0.15pt
                renewcommand*ShowFrameColorcolorred

                usepackagemakecell,siunitx
                usepackagebooktabs

                begindocument

                begintable
                centering
                begintabular@
                l
                S[table-format=2.2,table-space-text-post=%]
                S[table-format=2.2,table-space-text-post=%] % As @Zarko says, reduce this numer to 1.1 if number 10 is centred, else 2.2
                @
                toprule
                & multicolumn2@c@theadtextbfDescriptive Analysis 1\
                cmidrule2-3
                & multicolumn1ctextbfMM
                & multicolumn1ctextbfCM \
                midrule
                %N & 10 & 10 \ % Enclose in brackets to centre the content
                N & 10 & 10 \
                Mean & 91.45% & 8.55% \
                Median & 94.74% & 5.26% \
                bottomrule
                endtabular
                endtable

                enddocument





                share|improve this answer















                Here is how I interpret your table. Since you have aligned the table at decimal point, the number without decimal is set to the left. You may overcome this by enclosing the two nunbers 10 in curly brackets (10) or using multicolumn1c10, but this is typographically probably not correct.



                enter image description here



                documentclass[12pt,oneside]book

                usepackageshowframe
                renewcommandShowFrameLinethickness0.15pt
                renewcommand*ShowFrameColorcolorred

                usepackagemakecell,siunitx
                usepackagebooktabs

                begindocument

                begintable
                centering
                begintabular@
                l
                S[table-format=2.2,table-space-text-post=%]
                S[table-format=2.2,table-space-text-post=%] % As @Zarko says, reduce this numer to 1.1 if number 10 is centred, else 2.2
                @
                toprule
                & multicolumn2@c@theadtextbfDescriptive Analysis 1\
                cmidrule2-3
                & multicolumn1ctextbfMM
                & multicolumn1ctextbfCM \
                midrule
                %N & 10 & 10 \ % Enclose in brackets to centre the content
                N & 10 & 10 \
                Mean & 91.45% & 8.55% \
                Median & 94.74% & 5.26% \
                bottomrule
                endtabular
                endtable

                enddocument






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 4 hours ago

























                answered 7 hours ago









                SveinungSveinung

                14.1k2 gold badges38 silver badges63 bronze badges




                14.1k2 gold badges38 silver badges63 bronze badges
























                    2















                    You need to override the S column to a c in all places where you don't have a percentage (and the numbers in the first column should be 4.2):



                    begintabular
                    l
                    S[table-format=4.2,table-space-text-post=%]
                    S[table-format=3.2,,table-space-text-post=%]

                    toprule
                    & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
                    cmidrule2-3
                    & multicolumn1ctextbfMM & multicolumn1ctextbfCM \
                    midrule
                    N & multicolumn1c10 & multicolumn1c10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular


                    enter image description here






                    share|improve this answer

























                    • "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

                      – leandriis
                      6 hours ago











                    • @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

                      – Rmano
                      5 hours ago















                    2















                    You need to override the S column to a c in all places where you don't have a percentage (and the numbers in the first column should be 4.2):



                    begintabular
                    l
                    S[table-format=4.2,table-space-text-post=%]
                    S[table-format=3.2,,table-space-text-post=%]

                    toprule
                    & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
                    cmidrule2-3
                    & multicolumn1ctextbfMM & multicolumn1ctextbfCM \
                    midrule
                    N & multicolumn1c10 & multicolumn1c10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular


                    enter image description here






                    share|improve this answer

























                    • "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

                      – leandriis
                      6 hours ago











                    • @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

                      – Rmano
                      5 hours ago













                    2














                    2










                    2









                    You need to override the S column to a c in all places where you don't have a percentage (and the numbers in the first column should be 4.2):



                    begintabular
                    l
                    S[table-format=4.2,table-space-text-post=%]
                    S[table-format=3.2,,table-space-text-post=%]

                    toprule
                    & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
                    cmidrule2-3
                    & multicolumn1ctextbfMM & multicolumn1ctextbfCM \
                    midrule
                    N & multicolumn1c10 & multicolumn1c10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular


                    enter image description here






                    share|improve this answer













                    You need to override the S column to a c in all places where you don't have a percentage (and the numbers in the first column should be 4.2):



                    begintabular
                    l
                    S[table-format=4.2,table-space-text-post=%]
                    S[table-format=3.2,,table-space-text-post=%]

                    toprule
                    & multicolumn2ctheadmakebox[0pt]textbfDescriptive Analysis 1\
                    cmidrule2-3
                    & multicolumn1ctextbfMM & multicolumn1ctextbfCM \
                    midrule
                    N & multicolumn1c10 & multicolumn1c10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular


                    enter image description here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 7 hours ago









                    RmanoRmano

                    10.1k2 gold badges17 silver badges54 bronze badges




                    10.1k2 gold badges17 silver badges54 bronze badges















                    • "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

                      – leandriis
                      6 hours ago











                    • @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

                      – Rmano
                      5 hours ago

















                    • "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

                      – leandriis
                      6 hours ago











                    • @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

                      – Rmano
                      5 hours ago
















                    "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

                    – leandriis
                    6 hours ago





                    "and the numbers in the first column should be 4.2" Could you please explain why? As far as I can see the numbers have only 2 digits before and 2 after the decimal separator. Why use 4.2 which corresponds to four digits before and two after the decimal separator?

                    – leandriis
                    6 hours ago













                    @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

                    – Rmano
                    5 hours ago





                    @leandriis Yep, I was wrong. Thinking too much in C format descriptors...

                    – Rmano
                    5 hours ago











                    2















                    One more variation ...



                    Your problem arise from the fact that text in multicolumn cell is wider than natural width of the spanned columns. Problem is solved, if you make those column has equal wider width, for example with determine their widths enough large as it is done in the following MWE:



                    documentclass[12pt,oneside]book
                    usepackagebooktabs, makecell
                    renewcommandtheadfontsmallbfseries
                    renewcommandtheadgape
                    usepackagesiunitx

                    begindocument
                    begintable
                    centering
                    sisetuptable-format=2.2,
                    table-space-text-post=%,
                    table-column-width=5em % <-----
                    begintabular@ l S S @
                    toprule
                    & multicolumn2@c@theadDescriptive Analysis 1 \
                    cmidrule2-3
                    & theadMM & theadCM \
                    midrule
                    N & 10 & 10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular
                    endtable
                    enddocument


                    enter image description here






                    share|improve this answer



























                    • I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

                      – Sveinung
                      5 hours ago












                    • @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

                      – Zarko
                      5 hours ago











                    • @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

                      – Zarko
                      5 hours ago











                    • Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

                      – Sveinung
                      4 hours ago
















                    2















                    One more variation ...



                    Your problem arise from the fact that text in multicolumn cell is wider than natural width of the spanned columns. Problem is solved, if you make those column has equal wider width, for example with determine their widths enough large as it is done in the following MWE:



                    documentclass[12pt,oneside]book
                    usepackagebooktabs, makecell
                    renewcommandtheadfontsmallbfseries
                    renewcommandtheadgape
                    usepackagesiunitx

                    begindocument
                    begintable
                    centering
                    sisetuptable-format=2.2,
                    table-space-text-post=%,
                    table-column-width=5em % <-----
                    begintabular@ l S S @
                    toprule
                    & multicolumn2@c@theadDescriptive Analysis 1 \
                    cmidrule2-3
                    & theadMM & theadCM \
                    midrule
                    N & 10 & 10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular
                    endtable
                    enddocument


                    enter image description here






                    share|improve this answer



























                    • I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

                      – Sveinung
                      5 hours ago












                    • @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

                      – Zarko
                      5 hours ago











                    • @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

                      – Zarko
                      5 hours ago











                    • Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

                      – Sveinung
                      4 hours ago














                    2














                    2










                    2









                    One more variation ...



                    Your problem arise from the fact that text in multicolumn cell is wider than natural width of the spanned columns. Problem is solved, if you make those column has equal wider width, for example with determine their widths enough large as it is done in the following MWE:



                    documentclass[12pt,oneside]book
                    usepackagebooktabs, makecell
                    renewcommandtheadfontsmallbfseries
                    renewcommandtheadgape
                    usepackagesiunitx

                    begindocument
                    begintable
                    centering
                    sisetuptable-format=2.2,
                    table-space-text-post=%,
                    table-column-width=5em % <-----
                    begintabular@ l S S @
                    toprule
                    & multicolumn2@c@theadDescriptive Analysis 1 \
                    cmidrule2-3
                    & theadMM & theadCM \
                    midrule
                    N & 10 & 10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular
                    endtable
                    enddocument


                    enter image description here






                    share|improve this answer















                    One more variation ...



                    Your problem arise from the fact that text in multicolumn cell is wider than natural width of the spanned columns. Problem is solved, if you make those column has equal wider width, for example with determine their widths enough large as it is done in the following MWE:



                    documentclass[12pt,oneside]book
                    usepackagebooktabs, makecell
                    renewcommandtheadfontsmallbfseries
                    renewcommandtheadgape
                    usepackagesiunitx

                    begindocument
                    begintable
                    centering
                    sisetuptable-format=2.2,
                    table-space-text-post=%,
                    table-column-width=5em % <-----
                    begintabular@ l S S @
                    toprule
                    & multicolumn2@c@theadDescriptive Analysis 1 \
                    cmidrule2-3
                    & theadMM & theadCM \
                    midrule
                    N & 10 & 10 \
                    Mean & 91.45% & 8.55% \
                    Median & 94.74% & 5.26% \
                    bottomrule
                    endtabular
                    endtable
                    enddocument


                    enter image description here







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 5 hours ago

























                    answered 6 hours ago









                    ZarkoZarko

                    146k8 gold badges82 silver badges193 bronze badges




                    146k8 gold badges82 silver badges193 bronze badges















                    • I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

                      – Sveinung
                      5 hours ago












                    • @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

                      – Zarko
                      5 hours ago











                    • @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

                      – Zarko
                      5 hours ago











                    • Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

                      – Sveinung
                      4 hours ago


















                    • I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

                      – Sveinung
                      5 hours ago












                    • @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

                      – Zarko
                      5 hours ago











                    • @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

                      – Zarko
                      5 hours ago











                    • Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

                      – Sveinung
                      4 hours ago

















                    I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

                    – Sveinung
                    5 hours ago






                    I have zero overfull hboxes in my example. And the numbers 10 centre if I enclose them in curly brackets.

                    – Sveinung
                    5 hours ago














                    @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

                    – Zarko
                    5 hours ago





                    @Sveinung, sorry, I didn't test your solution :-(. I will do this asap. However, it has bigger reservation for integers in the last column and consequently work as you said. For this kind of tables number of sample are (usual) centered (since they are different type of data), so doing this is not typographical problematic.

                    – Zarko
                    5 hours ago













                    @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

                    – Zarko
                    5 hours ago





                    @Sveinung, I just test your answer. It also work without any warning , if you for the last column declare S[table-format=1.2,table-space-text-post=%]. In this case you obtain better result, of course if you enclose number of samples in curly braces :-)

                    – Zarko
                    5 hours ago













                    Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

                    – Sveinung
                    4 hours ago






                    Good observation, your are absolutely right, and I should have spotted it myself. Thank you. This assume the the figure 10 is centred. If not, it should be 2.2.

                    – Sveinung
                    4 hours ago


















                    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%2f506590%2ftable-alignment-make-the-content-centre%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

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її