Tabularx environment












3















I have problems translating this table (from Online table generator) to tabularx environment so it would be coherent with the rest of Tables of my document. Could you kindly help me? Thanks!



documentclass{article}
usepackage{multirow}
usepackage{graphicx}

begin{document}
begin{table}
centering
caption{My caption}
resizebox{textwidth}{!}{%
begin{tabular}{cccccc}
hline
1 & 2 & 3 & 4 & 5 & 6 \
hline
multirow{2}{*}{Pepe} & multirow{2}{*}{a} & multirow{2}{*}{b} & multirow{2}{*}{c} & multirow{2}{*}{d} & e \
& & & & & f \
hline
multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} \
hline
end{tabular}%
}
end{table}
end{document}


That is, the table should start by:



documentclass{article}
usepackage{multirow}
usepackage{graphicx}
usepackage{tabularx}

begin{document}
begin{table}
begin{tabularx}{textwidth}
end{tabularx}
BLA, BLA, BLA.
end{table}
end{document}









share|improve this question

























  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – Tiuri
    yesterday











  • Remember, tabularx takes two arguments, you only listed one

    – daleif
    yesterday






  • 1





    Centering a box of textwidth? Resize a a small table ? Multicolumns of 1 column? Another suggestion: Do no use table generators, the resulting code is garbage.

    – Fran
    yesterday
















3















I have problems translating this table (from Online table generator) to tabularx environment so it would be coherent with the rest of Tables of my document. Could you kindly help me? Thanks!



documentclass{article}
usepackage{multirow}
usepackage{graphicx}

begin{document}
begin{table}
centering
caption{My caption}
resizebox{textwidth}{!}{%
begin{tabular}{cccccc}
hline
1 & 2 & 3 & 4 & 5 & 6 \
hline
multirow{2}{*}{Pepe} & multirow{2}{*}{a} & multirow{2}{*}{b} & multirow{2}{*}{c} & multirow{2}{*}{d} & e \
& & & & & f \
hline
multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} \
hline
end{tabular}%
}
end{table}
end{document}


That is, the table should start by:



documentclass{article}
usepackage{multirow}
usepackage{graphicx}
usepackage{tabularx}

begin{document}
begin{table}
begin{tabularx}{textwidth}
end{tabularx}
BLA, BLA, BLA.
end{table}
end{document}









share|improve this question

























  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – Tiuri
    yesterday











  • Remember, tabularx takes two arguments, you only listed one

    – daleif
    yesterday






  • 1





    Centering a box of textwidth? Resize a a small table ? Multicolumns of 1 column? Another suggestion: Do no use table generators, the resulting code is garbage.

    – Fran
    yesterday














3












3








3








I have problems translating this table (from Online table generator) to tabularx environment so it would be coherent with the rest of Tables of my document. Could you kindly help me? Thanks!



documentclass{article}
usepackage{multirow}
usepackage{graphicx}

begin{document}
begin{table}
centering
caption{My caption}
resizebox{textwidth}{!}{%
begin{tabular}{cccccc}
hline
1 & 2 & 3 & 4 & 5 & 6 \
hline
multirow{2}{*}{Pepe} & multirow{2}{*}{a} & multirow{2}{*}{b} & multirow{2}{*}{c} & multirow{2}{*}{d} & e \
& & & & & f \
hline
multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} \
hline
end{tabular}%
}
end{table}
end{document}


That is, the table should start by:



documentclass{article}
usepackage{multirow}
usepackage{graphicx}
usepackage{tabularx}

begin{document}
begin{table}
begin{tabularx}{textwidth}
end{tabularx}
BLA, BLA, BLA.
end{table}
end{document}









share|improve this question
















I have problems translating this table (from Online table generator) to tabularx environment so it would be coherent with the rest of Tables of my document. Could you kindly help me? Thanks!



documentclass{article}
usepackage{multirow}
usepackage{graphicx}

begin{document}
begin{table}
centering
caption{My caption}
resizebox{textwidth}{!}{%
begin{tabular}{cccccc}
hline
1 & 2 & 3 & 4 & 5 & 6 \
hline
multirow{2}{*}{Pepe} & multirow{2}{*}{a} & multirow{2}{*}{b} & multirow{2}{*}{c} & multirow{2}{*}{d} & e \
& & & & & f \
hline
multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{1}{l}{} \
hline
end{tabular}%
}
end{table}
end{document}


That is, the table should start by:



documentclass{article}
usepackage{multirow}
usepackage{graphicx}
usepackage{tabularx}

begin{document}
begin{table}
begin{tabularx}{textwidth}
end{tabularx}
BLA, BLA, BLA.
end{table}
end{document}






tables tabularx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









peterdelarue

335




335










asked yesterday









SantiSanti

232




232













  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – Tiuri
    yesterday











  • Remember, tabularx takes two arguments, you only listed one

    – daleif
    yesterday






  • 1





    Centering a box of textwidth? Resize a a small table ? Multicolumns of 1 column? Another suggestion: Do no use table generators, the resulting code is garbage.

    – Fran
    yesterday



















  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – Tiuri
    yesterday











  • Remember, tabularx takes two arguments, you only listed one

    – daleif
    yesterday






  • 1





    Centering a box of textwidth? Resize a a small table ? Multicolumns of 1 column? Another suggestion: Do no use table generators, the resulting code is garbage.

    – Fran
    yesterday

















A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

– Tiuri
yesterday





A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

– Tiuri
yesterday













Remember, tabularx takes two arguments, you only listed one

– daleif
yesterday





Remember, tabularx takes two arguments, you only listed one

– daleif
yesterday




1




1





Centering a box of textwidth? Resize a a small table ? Multicolumns of 1 column? Another suggestion: Do no use table generators, the resulting code is garbage.

– Fran
yesterday





Centering a box of textwidth? Resize a a small table ? Multicolumns of 1 column? Another suggestion: Do no use table generators, the resulting code is garbage.

– Fran
yesterday










3 Answers
3






active

oldest

votes


















4














Here are two solutions. The first uses a tabularx environment, with all six columns using a centered version of the X column type. The second uses a tabular* environment, with all six columns using the c column type. Both solutions occupy the full width of the textblock.



Since multicolumn{1}{l}{} does nothing at all, you might as well omit those instructions.



enter image description here



documentclass{article}
usepackage{multirow,tabularx,booktabs}
newcommand{mr}[1]{multirow{2}{*}{#1}} % handy shortcut macro
% centered version of X column type:
newcolumntype{C}{>{centeringarraybackslash}X}

usepackage[skip=0.333baselineskip]{caption} % optional

begin{document}
begin{table}
%%centering % <-- redundant
caption{tabularx}
begin{tabularx}{textwidth}{@{} *{6}{C} @{}}
toprule
1 & 2 & 3 & 4 & 5 & 6 \
midrule
mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
& & & & & f \
midrule
& & & & & \ % no need for "multicolumn{1}{l}{}" stuff
bottomrule
end{tabularx}

vspace{1cm} %
setlengthtabcolsep{0pt}
caption{tabular*}
begin{tabular*}{textwidth}{@{extracolsep{fill}} *{6}{c} }
toprule
1 & 2 & 3 & 4 & 5 & 6 \
midrule
mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
& & & & & f \
midrule
& & & & & \ % no need for "multicolumn{1}{l}{}" stuff
bottomrule
end{tabular*}
end{table}
end{document}





share|improve this answer

































    3














    As @daleif mentioned you forgot to add the second bracket with your columns' specification {cccccc}.
    I give you a MWE:



    documentclass{article}
    usepackage{tabularx}

    begin{document}
    begin{table}
    caption{BLA, BLA, BLA.}
    centering
    begin{tabularx}{.3textwidth}{c}
    hlinehline
    My table header\
    hline
    My table contents\
    hlinehline
    end{tabularx}
    end{table}
    end{document}


    Supplement



    Additionally, keep in mind that there is a package called tabu, which is more powerful than tabularx.






    share|improve this answer








    New contributor




    peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
















    • 3





      It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

      – daleif
      yesterday











    • I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

      – peterdelarue
      yesterday











    • Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

      – Mico
      yesterday





















    3














    You do not need multicolumns in every cell, nor multirow{2}{*}{...}, nor tabularx or tabular* to extend the text width, nor empty rows. Here you have enough with m columns (of array package) and, of course, with booktabs: :)



    mwe



    documentclass{article}
    usepackage{graphicx,array,booktabs}
    begin{document}
    begin{table}
    caption{My caption}
    newcolumntype{C}{>{centeringarraybackslash}m{dimexprlinewidth/6-2tabcolsep}}
    begin{tabular}{CCCCCC}toprule
    1 & 2 & 3 & 4 & 5 & 6 \midrule
    Pepe & a & b & c & d &epar f\bottomrule
    end{tabular}
    end{table}
    end{document}


    By the way, I would not use columns of more two-three em here. Widening the table as much as possible instead of a small centered table does not make it more beautiful, but ugly scattered.






    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%2f472188%2ftabularx-environment%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      Here are two solutions. The first uses a tabularx environment, with all six columns using a centered version of the X column type. The second uses a tabular* environment, with all six columns using the c column type. Both solutions occupy the full width of the textblock.



      Since multicolumn{1}{l}{} does nothing at all, you might as well omit those instructions.



      enter image description here



      documentclass{article}
      usepackage{multirow,tabularx,booktabs}
      newcommand{mr}[1]{multirow{2}{*}{#1}} % handy shortcut macro
      % centered version of X column type:
      newcolumntype{C}{>{centeringarraybackslash}X}

      usepackage[skip=0.333baselineskip]{caption} % optional

      begin{document}
      begin{table}
      %%centering % <-- redundant
      caption{tabularx}
      begin{tabularx}{textwidth}{@{} *{6}{C} @{}}
      toprule
      1 & 2 & 3 & 4 & 5 & 6 \
      midrule
      mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
      & & & & & f \
      midrule
      & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
      bottomrule
      end{tabularx}

      vspace{1cm} %
      setlengthtabcolsep{0pt}
      caption{tabular*}
      begin{tabular*}{textwidth}{@{extracolsep{fill}} *{6}{c} }
      toprule
      1 & 2 & 3 & 4 & 5 & 6 \
      midrule
      mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
      & & & & & f \
      midrule
      & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
      bottomrule
      end{tabular*}
      end{table}
      end{document}





      share|improve this answer






























        4














        Here are two solutions. The first uses a tabularx environment, with all six columns using a centered version of the X column type. The second uses a tabular* environment, with all six columns using the c column type. Both solutions occupy the full width of the textblock.



        Since multicolumn{1}{l}{} does nothing at all, you might as well omit those instructions.



        enter image description here



        documentclass{article}
        usepackage{multirow,tabularx,booktabs}
        newcommand{mr}[1]{multirow{2}{*}{#1}} % handy shortcut macro
        % centered version of X column type:
        newcolumntype{C}{>{centeringarraybackslash}X}

        usepackage[skip=0.333baselineskip]{caption} % optional

        begin{document}
        begin{table}
        %%centering % <-- redundant
        caption{tabularx}
        begin{tabularx}{textwidth}{@{} *{6}{C} @{}}
        toprule
        1 & 2 & 3 & 4 & 5 & 6 \
        midrule
        mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
        & & & & & f \
        midrule
        & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
        bottomrule
        end{tabularx}

        vspace{1cm} %
        setlengthtabcolsep{0pt}
        caption{tabular*}
        begin{tabular*}{textwidth}{@{extracolsep{fill}} *{6}{c} }
        toprule
        1 & 2 & 3 & 4 & 5 & 6 \
        midrule
        mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
        & & & & & f \
        midrule
        & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
        bottomrule
        end{tabular*}
        end{table}
        end{document}





        share|improve this answer




























          4












          4








          4







          Here are two solutions. The first uses a tabularx environment, with all six columns using a centered version of the X column type. The second uses a tabular* environment, with all six columns using the c column type. Both solutions occupy the full width of the textblock.



          Since multicolumn{1}{l}{} does nothing at all, you might as well omit those instructions.



          enter image description here



          documentclass{article}
          usepackage{multirow,tabularx,booktabs}
          newcommand{mr}[1]{multirow{2}{*}{#1}} % handy shortcut macro
          % centered version of X column type:
          newcolumntype{C}{>{centeringarraybackslash}X}

          usepackage[skip=0.333baselineskip]{caption} % optional

          begin{document}
          begin{table}
          %%centering % <-- redundant
          caption{tabularx}
          begin{tabularx}{textwidth}{@{} *{6}{C} @{}}
          toprule
          1 & 2 & 3 & 4 & 5 & 6 \
          midrule
          mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
          & & & & & f \
          midrule
          & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
          bottomrule
          end{tabularx}

          vspace{1cm} %
          setlengthtabcolsep{0pt}
          caption{tabular*}
          begin{tabular*}{textwidth}{@{extracolsep{fill}} *{6}{c} }
          toprule
          1 & 2 & 3 & 4 & 5 & 6 \
          midrule
          mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
          & & & & & f \
          midrule
          & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
          bottomrule
          end{tabular*}
          end{table}
          end{document}





          share|improve this answer















          Here are two solutions. The first uses a tabularx environment, with all six columns using a centered version of the X column type. The second uses a tabular* environment, with all six columns using the c column type. Both solutions occupy the full width of the textblock.



          Since multicolumn{1}{l}{} does nothing at all, you might as well omit those instructions.



          enter image description here



          documentclass{article}
          usepackage{multirow,tabularx,booktabs}
          newcommand{mr}[1]{multirow{2}{*}{#1}} % handy shortcut macro
          % centered version of X column type:
          newcolumntype{C}{>{centeringarraybackslash}X}

          usepackage[skip=0.333baselineskip]{caption} % optional

          begin{document}
          begin{table}
          %%centering % <-- redundant
          caption{tabularx}
          begin{tabularx}{textwidth}{@{} *{6}{C} @{}}
          toprule
          1 & 2 & 3 & 4 & 5 & 6 \
          midrule
          mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
          & & & & & f \
          midrule
          & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
          bottomrule
          end{tabularx}

          vspace{1cm} %
          setlengthtabcolsep{0pt}
          caption{tabular*}
          begin{tabular*}{textwidth}{@{extracolsep{fill}} *{6}{c} }
          toprule
          1 & 2 & 3 & 4 & 5 & 6 \
          midrule
          mr{Pepe} & mr{a} & mr{b} & mr{c} & mr{d} & e \
          & & & & & f \
          midrule
          & & & & & \ % no need for "multicolumn{1}{l}{}" stuff
          bottomrule
          end{tabular*}
          end{table}
          end{document}






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered yesterday









          MicoMico

          277k30379767




          277k30379767























              3














              As @daleif mentioned you forgot to add the second bracket with your columns' specification {cccccc}.
              I give you a MWE:



              documentclass{article}
              usepackage{tabularx}

              begin{document}
              begin{table}
              caption{BLA, BLA, BLA.}
              centering
              begin{tabularx}{.3textwidth}{c}
              hlinehline
              My table header\
              hline
              My table contents\
              hlinehline
              end{tabularx}
              end{table}
              end{document}


              Supplement



              Additionally, keep in mind that there is a package called tabu, which is more powerful than tabularx.






              share|improve this answer








              New contributor




              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
















              • 3





                It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

                – daleif
                yesterday











              • I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

                – peterdelarue
                yesterday











              • Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

                – Mico
                yesterday


















              3














              As @daleif mentioned you forgot to add the second bracket with your columns' specification {cccccc}.
              I give you a MWE:



              documentclass{article}
              usepackage{tabularx}

              begin{document}
              begin{table}
              caption{BLA, BLA, BLA.}
              centering
              begin{tabularx}{.3textwidth}{c}
              hlinehline
              My table header\
              hline
              My table contents\
              hlinehline
              end{tabularx}
              end{table}
              end{document}


              Supplement



              Additionally, keep in mind that there is a package called tabu, which is more powerful than tabularx.






              share|improve this answer








              New contributor




              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
















              • 3





                It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

                – daleif
                yesterday











              • I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

                – peterdelarue
                yesterday











              • Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

                – Mico
                yesterday
















              3












              3








              3







              As @daleif mentioned you forgot to add the second bracket with your columns' specification {cccccc}.
              I give you a MWE:



              documentclass{article}
              usepackage{tabularx}

              begin{document}
              begin{table}
              caption{BLA, BLA, BLA.}
              centering
              begin{tabularx}{.3textwidth}{c}
              hlinehline
              My table header\
              hline
              My table contents\
              hlinehline
              end{tabularx}
              end{table}
              end{document}


              Supplement



              Additionally, keep in mind that there is a package called tabu, which is more powerful than tabularx.






              share|improve this answer








              New contributor




              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.










              As @daleif mentioned you forgot to add the second bracket with your columns' specification {cccccc}.
              I give you a MWE:



              documentclass{article}
              usepackage{tabularx}

              begin{document}
              begin{table}
              caption{BLA, BLA, BLA.}
              centering
              begin{tabularx}{.3textwidth}{c}
              hlinehline
              My table header\
              hline
              My table contents\
              hlinehline
              end{tabularx}
              end{table}
              end{document}


              Supplement



              Additionally, keep in mind that there is a package called tabu, which is more powerful than tabularx.







              share|improve this answer








              New contributor




              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.









              share|improve this answer



              share|improve this answer






              New contributor




              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.









              answered yesterday









              peterdelaruepeterdelarue

              335




              335




              New contributor




              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





              New contributor





              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






              peterdelarue is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.








              • 3





                It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

                – daleif
                yesterday











              • I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

                – peterdelarue
                yesterday











              • Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

                – Mico
                yesterday
















              • 3





                It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

                – daleif
                yesterday











              • I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

                – peterdelarue
                yesterday











              • Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

                – Mico
                yesterday










              3




              3





              It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

              – daleif
              yesterday





              It does not make any sense to use tabularx with no X columns, then you could just as well have used tabular

              – daleif
              yesterday













              I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

              – peterdelarue
              yesterday





              I agree with you, the package aim is to adapt the space between columns, e.g. begin{tabularx}{250pt}{|c|X|c|X|}...

              – peterdelarue
              yesterday













              Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

              – Mico
              yesterday







              Your MWE, which contains a tabularx column with a single column of type c, does not really solved the OP's question, which was about a table with six [6] columns. Please consider editing your LaTeX code so that it more directly addresses the OP's needs.

              – Mico
              yesterday













              3














              You do not need multicolumns in every cell, nor multirow{2}{*}{...}, nor tabularx or tabular* to extend the text width, nor empty rows. Here you have enough with m columns (of array package) and, of course, with booktabs: :)



              mwe



              documentclass{article}
              usepackage{graphicx,array,booktabs}
              begin{document}
              begin{table}
              caption{My caption}
              newcolumntype{C}{>{centeringarraybackslash}m{dimexprlinewidth/6-2tabcolsep}}
              begin{tabular}{CCCCCC}toprule
              1 & 2 & 3 & 4 & 5 & 6 \midrule
              Pepe & a & b & c & d &epar f\bottomrule
              end{tabular}
              end{table}
              end{document}


              By the way, I would not use columns of more two-three em here. Widening the table as much as possible instead of a small centered table does not make it more beautiful, but ugly scattered.






              share|improve this answer




























                3














                You do not need multicolumns in every cell, nor multirow{2}{*}{...}, nor tabularx or tabular* to extend the text width, nor empty rows. Here you have enough with m columns (of array package) and, of course, with booktabs: :)



                mwe



                documentclass{article}
                usepackage{graphicx,array,booktabs}
                begin{document}
                begin{table}
                caption{My caption}
                newcolumntype{C}{>{centeringarraybackslash}m{dimexprlinewidth/6-2tabcolsep}}
                begin{tabular}{CCCCCC}toprule
                1 & 2 & 3 & 4 & 5 & 6 \midrule
                Pepe & a & b & c & d &epar f\bottomrule
                end{tabular}
                end{table}
                end{document}


                By the way, I would not use columns of more two-three em here. Widening the table as much as possible instead of a small centered table does not make it more beautiful, but ugly scattered.






                share|improve this answer


























                  3












                  3








                  3







                  You do not need multicolumns in every cell, nor multirow{2}{*}{...}, nor tabularx or tabular* to extend the text width, nor empty rows. Here you have enough with m columns (of array package) and, of course, with booktabs: :)



                  mwe



                  documentclass{article}
                  usepackage{graphicx,array,booktabs}
                  begin{document}
                  begin{table}
                  caption{My caption}
                  newcolumntype{C}{>{centeringarraybackslash}m{dimexprlinewidth/6-2tabcolsep}}
                  begin{tabular}{CCCCCC}toprule
                  1 & 2 & 3 & 4 & 5 & 6 \midrule
                  Pepe & a & b & c & d &epar f\bottomrule
                  end{tabular}
                  end{table}
                  end{document}


                  By the way, I would not use columns of more two-three em here. Widening the table as much as possible instead of a small centered table does not make it more beautiful, but ugly scattered.






                  share|improve this answer













                  You do not need multicolumns in every cell, nor multirow{2}{*}{...}, nor tabularx or tabular* to extend the text width, nor empty rows. Here you have enough with m columns (of array package) and, of course, with booktabs: :)



                  mwe



                  documentclass{article}
                  usepackage{graphicx,array,booktabs}
                  begin{document}
                  begin{table}
                  caption{My caption}
                  newcolumntype{C}{>{centeringarraybackslash}m{dimexprlinewidth/6-2tabcolsep}}
                  begin{tabular}{CCCCCC}toprule
                  1 & 2 & 3 & 4 & 5 & 6 \midrule
                  Pepe & a & b & c & d &epar f\bottomrule
                  end{tabular}
                  end{table}
                  end{document}


                  By the way, I would not use columns of more two-three em here. Widening the table as much as possible instead of a small centered table does not make it more beautiful, but ugly scattered.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered yesterday









                  FranFran

                  52.2k6115178




                  52.2k6115178






























                      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%2f472188%2ftabularx-environment%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

                      "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                      Alcedinidae

                      Origin of the phrase “under your belt”?