How Can I Center the Text in my Table?











up vote
0
down vote

favorite












I want to center the text in each entry of my table:



usepackage{array}
documentclass[11pt, a4paper]{article}
begin{document}
begin{table}[h]
centering
begin{tabular*}{0.80textwidth}{| @{extracolsep{fill} } c||c|c|}
hline
& textbf{Monday} & textbf{Wednesday}\
hline
Week 1 & August 27 & August 29\
& 1.1, 1.2 & 1.3, 1.4\
hline
Week 2 & September 3 & September 5\
& color{darkred}NO CLASScolor{black}& 2.1, 2.2\
& & Chapter 1 Quiz\
hline
Week 3 & September 10 & September 12\
& 2.3, 2.4 & 2.5\
hline
Week 4 & September 17 & September 19\
& 3.1, 3.2 & 3.3, 3.4\
& & Chapter 2 Quiz\
hline
Week 5 & September 24 & September 26\
& 4.1, 4.2 & 4.3, 4.4, 4.5\
& & Chapter 3 Quiz\
hline
Week 6 & October 1 & October 3\
& 5.1, 5.2 & 5.3, 5.4\
& & Chapter 4 Quiz\
hline
Week 7 & October 8 & October 10\
& 5.5 & 5.6\
hline
Week 8 & October 15 & October 17\
& 6.1 & 6.2\
& & Chapter 5 Quiz\
hline
Week 9 & October 22 & October 24\
& Midterm Review & Midterm\
hline
end{tabular*}
end{table}
end{document}









share|improve this question














bumped to the homepage by Community 23 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Do you mean vertically centred?
    – Bernard
    Aug 27 at 0:30















up vote
0
down vote

favorite












I want to center the text in each entry of my table:



usepackage{array}
documentclass[11pt, a4paper]{article}
begin{document}
begin{table}[h]
centering
begin{tabular*}{0.80textwidth}{| @{extracolsep{fill} } c||c|c|}
hline
& textbf{Monday} & textbf{Wednesday}\
hline
Week 1 & August 27 & August 29\
& 1.1, 1.2 & 1.3, 1.4\
hline
Week 2 & September 3 & September 5\
& color{darkred}NO CLASScolor{black}& 2.1, 2.2\
& & Chapter 1 Quiz\
hline
Week 3 & September 10 & September 12\
& 2.3, 2.4 & 2.5\
hline
Week 4 & September 17 & September 19\
& 3.1, 3.2 & 3.3, 3.4\
& & Chapter 2 Quiz\
hline
Week 5 & September 24 & September 26\
& 4.1, 4.2 & 4.3, 4.4, 4.5\
& & Chapter 3 Quiz\
hline
Week 6 & October 1 & October 3\
& 5.1, 5.2 & 5.3, 5.4\
& & Chapter 4 Quiz\
hline
Week 7 & October 8 & October 10\
& 5.5 & 5.6\
hline
Week 8 & October 15 & October 17\
& 6.1 & 6.2\
& & Chapter 5 Quiz\
hline
Week 9 & October 22 & October 24\
& Midterm Review & Midterm\
hline
end{tabular*}
end{table}
end{document}









share|improve this question














bumped to the homepage by Community 23 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Do you mean vertically centred?
    – Bernard
    Aug 27 at 0:30













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to center the text in each entry of my table:



usepackage{array}
documentclass[11pt, a4paper]{article}
begin{document}
begin{table}[h]
centering
begin{tabular*}{0.80textwidth}{| @{extracolsep{fill} } c||c|c|}
hline
& textbf{Monday} & textbf{Wednesday}\
hline
Week 1 & August 27 & August 29\
& 1.1, 1.2 & 1.3, 1.4\
hline
Week 2 & September 3 & September 5\
& color{darkred}NO CLASScolor{black}& 2.1, 2.2\
& & Chapter 1 Quiz\
hline
Week 3 & September 10 & September 12\
& 2.3, 2.4 & 2.5\
hline
Week 4 & September 17 & September 19\
& 3.1, 3.2 & 3.3, 3.4\
& & Chapter 2 Quiz\
hline
Week 5 & September 24 & September 26\
& 4.1, 4.2 & 4.3, 4.4, 4.5\
& & Chapter 3 Quiz\
hline
Week 6 & October 1 & October 3\
& 5.1, 5.2 & 5.3, 5.4\
& & Chapter 4 Quiz\
hline
Week 7 & October 8 & October 10\
& 5.5 & 5.6\
hline
Week 8 & October 15 & October 17\
& 6.1 & 6.2\
& & Chapter 5 Quiz\
hline
Week 9 & October 22 & October 24\
& Midterm Review & Midterm\
hline
end{tabular*}
end{table}
end{document}









share|improve this question













I want to center the text in each entry of my table:



usepackage{array}
documentclass[11pt, a4paper]{article}
begin{document}
begin{table}[h]
centering
begin{tabular*}{0.80textwidth}{| @{extracolsep{fill} } c||c|c|}
hline
& textbf{Monday} & textbf{Wednesday}\
hline
Week 1 & August 27 & August 29\
& 1.1, 1.2 & 1.3, 1.4\
hline
Week 2 & September 3 & September 5\
& color{darkred}NO CLASScolor{black}& 2.1, 2.2\
& & Chapter 1 Quiz\
hline
Week 3 & September 10 & September 12\
& 2.3, 2.4 & 2.5\
hline
Week 4 & September 17 & September 19\
& 3.1, 3.2 & 3.3, 3.4\
& & Chapter 2 Quiz\
hline
Week 5 & September 24 & September 26\
& 4.1, 4.2 & 4.3, 4.4, 4.5\
& & Chapter 3 Quiz\
hline
Week 6 & October 1 & October 3\
& 5.1, 5.2 & 5.3, 5.4\
& & Chapter 4 Quiz\
hline
Week 7 & October 8 & October 10\
& 5.5 & 5.6\
hline
Week 8 & October 15 & October 17\
& 6.1 & 6.2\
& & Chapter 5 Quiz\
hline
Week 9 & October 22 & October 24\
& Midterm Review & Midterm\
hline
end{tabular*}
end{table}
end{document}






tables horizontal-alignment vertical-alignment






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 27 at 0:03









MathStudent1324

1032




1032





bumped to the homepage by Community 23 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 23 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Do you mean vertically centred?
    – Bernard
    Aug 27 at 0:30


















  • Do you mean vertically centred?
    – Bernard
    Aug 27 at 0:30
















Do you mean vertically centred?
– Bernard
Aug 27 at 0:30




Do you mean vertically centred?
– Bernard
Aug 27 at 0:30










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Maybe this is what you want? I replaced tabular* with tabularx and added an improvement with package hhline:



documentclass[11pt, a4paper]{article}
usepackage[svgnames]{xcolor}
usepackage{tabularx, multirow}
usepackage{hhline}

begin{document}

begin{table}[h]
centeringsetlength{extrarowheight}{2pt}
begin{tabularx}{0.80textwidth}{|l||*{2}{>{centeringarraybackslash}X|}}
hhline{~--}
multicolumn{1}{c}{} & multicolumn{1}{|c}{textbf{Monday}} & textbf{Wednesday}\
hhline{~--}
noalign{vspace{doublerulesep}}
hhline{-||--|}
Week 1 & August 27 & August 29\
& 1.1, 1.2 & 1.3, 1.4\
hhline{-||--|}
Week 2 & September 3 & September 5\
&multirow{2}{=}{centeringtextcolor{DarkRed}{NO CLASS}}& 2.1, 2.2\
& & Chapter 1 Quiz\
hhline{-||--|}
Week 3 & September 10 & September 12\
& 2.3, 2.4 & 2.5\
hhline{-||--|}
Week 4 & September 17 & September 19\
& 3.1, 3.2 & 3.3, 3.4\
& & Chapter 2 Quiz\
hhline{-||--|}
Week 5 & September 24 & September 26\
& 4.1, 4.2 & 4.3, 4.4, 4.5\
& & Chapter 3 Quiz\
hhline{-||--|}
Week 6 & October 1 & October 3\
& 5.1, 5.2 & 5.3, 5.4\
& & Chapter 4 Quiz\
hhline{-||--|}
Week 7 & October 8 & October 10\
& 5.5 & 5.6\
hhline{-||--|}
Week 8 & October 15 & October 17\
& 6.1 & 6.2\
& & Chapter 5 Quiz\
hhline{-||--|}
Week 9 & October 22 & October 24\
& Midterm Review & Midterm\
hhline{-||--|}
end{tabularx}
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',
    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%2f447879%2fhow-can-i-center-the-text-in-my-table%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Maybe this is what you want? I replaced tabular* with tabularx and added an improvement with package hhline:



    documentclass[11pt, a4paper]{article}
    usepackage[svgnames]{xcolor}
    usepackage{tabularx, multirow}
    usepackage{hhline}

    begin{document}

    begin{table}[h]
    centeringsetlength{extrarowheight}{2pt}
    begin{tabularx}{0.80textwidth}{|l||*{2}{>{centeringarraybackslash}X|}}
    hhline{~--}
    multicolumn{1}{c}{} & multicolumn{1}{|c}{textbf{Monday}} & textbf{Wednesday}\
    hhline{~--}
    noalign{vspace{doublerulesep}}
    hhline{-||--|}
    Week 1 & August 27 & August 29\
    & 1.1, 1.2 & 1.3, 1.4\
    hhline{-||--|}
    Week 2 & September 3 & September 5\
    &multirow{2}{=}{centeringtextcolor{DarkRed}{NO CLASS}}& 2.1, 2.2\
    & & Chapter 1 Quiz\
    hhline{-||--|}
    Week 3 & September 10 & September 12\
    & 2.3, 2.4 & 2.5\
    hhline{-||--|}
    Week 4 & September 17 & September 19\
    & 3.1, 3.2 & 3.3, 3.4\
    & & Chapter 2 Quiz\
    hhline{-||--|}
    Week 5 & September 24 & September 26\
    & 4.1, 4.2 & 4.3, 4.4, 4.5\
    & & Chapter 3 Quiz\
    hhline{-||--|}
    Week 6 & October 1 & October 3\
    & 5.1, 5.2 & 5.3, 5.4\
    & & Chapter 4 Quiz\
    hhline{-||--|}
    Week 7 & October 8 & October 10\
    & 5.5 & 5.6\
    hhline{-||--|}
    Week 8 & October 15 & October 17\
    & 6.1 & 6.2\
    & & Chapter 5 Quiz\
    hhline{-||--|}
    Week 9 & October 22 & October 24\
    & Midterm Review & Midterm\
    hhline{-||--|}
    end{tabularx}
    end{table}

    end{document}


    enter image description here






    share|improve this answer

























      up vote
      0
      down vote













      Maybe this is what you want? I replaced tabular* with tabularx and added an improvement with package hhline:



      documentclass[11pt, a4paper]{article}
      usepackage[svgnames]{xcolor}
      usepackage{tabularx, multirow}
      usepackage{hhline}

      begin{document}

      begin{table}[h]
      centeringsetlength{extrarowheight}{2pt}
      begin{tabularx}{0.80textwidth}{|l||*{2}{>{centeringarraybackslash}X|}}
      hhline{~--}
      multicolumn{1}{c}{} & multicolumn{1}{|c}{textbf{Monday}} & textbf{Wednesday}\
      hhline{~--}
      noalign{vspace{doublerulesep}}
      hhline{-||--|}
      Week 1 & August 27 & August 29\
      & 1.1, 1.2 & 1.3, 1.4\
      hhline{-||--|}
      Week 2 & September 3 & September 5\
      &multirow{2}{=}{centeringtextcolor{DarkRed}{NO CLASS}}& 2.1, 2.2\
      & & Chapter 1 Quiz\
      hhline{-||--|}
      Week 3 & September 10 & September 12\
      & 2.3, 2.4 & 2.5\
      hhline{-||--|}
      Week 4 & September 17 & September 19\
      & 3.1, 3.2 & 3.3, 3.4\
      & & Chapter 2 Quiz\
      hhline{-||--|}
      Week 5 & September 24 & September 26\
      & 4.1, 4.2 & 4.3, 4.4, 4.5\
      & & Chapter 3 Quiz\
      hhline{-||--|}
      Week 6 & October 1 & October 3\
      & 5.1, 5.2 & 5.3, 5.4\
      & & Chapter 4 Quiz\
      hhline{-||--|}
      Week 7 & October 8 & October 10\
      & 5.5 & 5.6\
      hhline{-||--|}
      Week 8 & October 15 & October 17\
      & 6.1 & 6.2\
      & & Chapter 5 Quiz\
      hhline{-||--|}
      Week 9 & October 22 & October 24\
      & Midterm Review & Midterm\
      hhline{-||--|}
      end{tabularx}
      end{table}

      end{document}


      enter image description here






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Maybe this is what you want? I replaced tabular* with tabularx and added an improvement with package hhline:



        documentclass[11pt, a4paper]{article}
        usepackage[svgnames]{xcolor}
        usepackage{tabularx, multirow}
        usepackage{hhline}

        begin{document}

        begin{table}[h]
        centeringsetlength{extrarowheight}{2pt}
        begin{tabularx}{0.80textwidth}{|l||*{2}{>{centeringarraybackslash}X|}}
        hhline{~--}
        multicolumn{1}{c}{} & multicolumn{1}{|c}{textbf{Monday}} & textbf{Wednesday}\
        hhline{~--}
        noalign{vspace{doublerulesep}}
        hhline{-||--|}
        Week 1 & August 27 & August 29\
        & 1.1, 1.2 & 1.3, 1.4\
        hhline{-||--|}
        Week 2 & September 3 & September 5\
        &multirow{2}{=}{centeringtextcolor{DarkRed}{NO CLASS}}& 2.1, 2.2\
        & & Chapter 1 Quiz\
        hhline{-||--|}
        Week 3 & September 10 & September 12\
        & 2.3, 2.4 & 2.5\
        hhline{-||--|}
        Week 4 & September 17 & September 19\
        & 3.1, 3.2 & 3.3, 3.4\
        & & Chapter 2 Quiz\
        hhline{-||--|}
        Week 5 & September 24 & September 26\
        & 4.1, 4.2 & 4.3, 4.4, 4.5\
        & & Chapter 3 Quiz\
        hhline{-||--|}
        Week 6 & October 1 & October 3\
        & 5.1, 5.2 & 5.3, 5.4\
        & & Chapter 4 Quiz\
        hhline{-||--|}
        Week 7 & October 8 & October 10\
        & 5.5 & 5.6\
        hhline{-||--|}
        Week 8 & October 15 & October 17\
        & 6.1 & 6.2\
        & & Chapter 5 Quiz\
        hhline{-||--|}
        Week 9 & October 22 & October 24\
        & Midterm Review & Midterm\
        hhline{-||--|}
        end{tabularx}
        end{table}

        end{document}


        enter image description here






        share|improve this answer












        Maybe this is what you want? I replaced tabular* with tabularx and added an improvement with package hhline:



        documentclass[11pt, a4paper]{article}
        usepackage[svgnames]{xcolor}
        usepackage{tabularx, multirow}
        usepackage{hhline}

        begin{document}

        begin{table}[h]
        centeringsetlength{extrarowheight}{2pt}
        begin{tabularx}{0.80textwidth}{|l||*{2}{>{centeringarraybackslash}X|}}
        hhline{~--}
        multicolumn{1}{c}{} & multicolumn{1}{|c}{textbf{Monday}} & textbf{Wednesday}\
        hhline{~--}
        noalign{vspace{doublerulesep}}
        hhline{-||--|}
        Week 1 & August 27 & August 29\
        & 1.1, 1.2 & 1.3, 1.4\
        hhline{-||--|}
        Week 2 & September 3 & September 5\
        &multirow{2}{=}{centeringtextcolor{DarkRed}{NO CLASS}}& 2.1, 2.2\
        & & Chapter 1 Quiz\
        hhline{-||--|}
        Week 3 & September 10 & September 12\
        & 2.3, 2.4 & 2.5\
        hhline{-||--|}
        Week 4 & September 17 & September 19\
        & 3.1, 3.2 & 3.3, 3.4\
        & & Chapter 2 Quiz\
        hhline{-||--|}
        Week 5 & September 24 & September 26\
        & 4.1, 4.2 & 4.3, 4.4, 4.5\
        & & Chapter 3 Quiz\
        hhline{-||--|}
        Week 6 & October 1 & October 3\
        & 5.1, 5.2 & 5.3, 5.4\
        & & Chapter 4 Quiz\
        hhline{-||--|}
        Week 7 & October 8 & October 10\
        & 5.5 & 5.6\
        hhline{-||--|}
        Week 8 & October 15 & October 17\
        & 6.1 & 6.2\
        & & Chapter 5 Quiz\
        hhline{-||--|}
        Week 9 & October 22 & October 24\
        & Midterm Review & Midterm\
        hhline{-||--|}
        end{tabularx}
        end{table}

        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 27 at 2:03









        Bernard

        162k767192




        162k767192






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447879%2fhow-can-i-center-the-text-in-my-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

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt