How to adjust this table to keep the text from going to the next cell











up vote
6
down vote

favorite












begin{table}[htbp]

caption{Experimental Set}
label{par1}
centering
begin{adjustbox}{width=1textwidth}

begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
hline
{Experiments} & {No. Of Activities} & {No. Of Resources} &
{No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
{Max.Resources per Skill} & {Max.Resources per Task} \
hline
{Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
{Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
{Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
{Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
{Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
{Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

end{tabular}
end{adjustbox}
end{table}









share|improve this question




















  • 3




    Just out of idle curiosity: Why did you encase all entries in the header row and most of the entries in the left-hand column in curly braces?
    – Mico
    Nov 28 at 21:10















up vote
6
down vote

favorite












begin{table}[htbp]

caption{Experimental Set}
label{par1}
centering
begin{adjustbox}{width=1textwidth}

begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
hline
{Experiments} & {No. Of Activities} & {No. Of Resources} &
{No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
{Max.Resources per Skill} & {Max.Resources per Task} \
hline
{Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
{Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
{Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
{Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
{Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
{Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

end{tabular}
end{adjustbox}
end{table}









share|improve this question




















  • 3




    Just out of idle curiosity: Why did you encase all entries in the header row and most of the entries in the left-hand column in curly braces?
    – Mico
    Nov 28 at 21:10













up vote
6
down vote

favorite









up vote
6
down vote

favorite











begin{table}[htbp]

caption{Experimental Set}
label{par1}
centering
begin{adjustbox}{width=1textwidth}

begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
hline
{Experiments} & {No. Of Activities} & {No. Of Resources} &
{No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
{Max.Resources per Skill} & {Max.Resources per Task} \
hline
{Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
{Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
{Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
{Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
{Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
{Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

end{tabular}
end{adjustbox}
end{table}









share|improve this question















begin{table}[htbp]

caption{Experimental Set}
label{par1}
centering
begin{adjustbox}{width=1textwidth}

begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
hline
{Experiments} & {No. Of Activities} & {No. Of Resources} &
{No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
{Max.Resources per Skill} & {Max.Resources per Task} \
hline
{Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
{Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
{Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
{Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
{Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
{Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

end{tabular}
end{adjustbox}
end{table}






tables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 at 18:06









Mico

271k30367755




271k30367755










asked Nov 28 at 15:44









Iftikhar Ahmad

1196




1196








  • 3




    Just out of idle curiosity: Why did you encase all entries in the header row and most of the entries in the left-hand column in curly braces?
    – Mico
    Nov 28 at 21:10














  • 3




    Just out of idle curiosity: Why did you encase all entries in the header row and most of the entries in the left-hand column in curly braces?
    – Mico
    Nov 28 at 21:10








3




3




Just out of idle curiosity: Why did you encase all entries in the header row and most of the entries in the left-hand column in curly braces?
– Mico
Nov 28 at 21:10




Just out of idle curiosity: Why did you encase all entries in the header row and most of the entries in the left-hand column in curly braces?
– Mico
Nov 28 at 21:10










3 Answers
3






active

oldest

votes

















up vote
12
down vote













Your table is far too big. Really. Take a look at this thread for some options.



It's a really bad idea to use adjustbox or resizebox or something similar to make the table fit in the page, the whole thing will look weird because the font will be far too small. Usually you'll find a better approach than rescaling the table.



For this answer I modified your table completely. I noticed that you have something like a “reference” experiment, then you change one parameter in each experiment. Sorry to say this, but your table wasn't showing this to the reader, it was just throwing a bunch of apparently random numbers.



First I transposed your table so that the parameters, which are what make your table so wide, are in one single columns, using about 7 times (!) less space.



Then I removed all the parameters which are kept constant and replaced them by a same command, which I defined as ---, but you can change it to whatever you like.



Finally, I removed the vertical rules of your table because they looked strange.



The table now looks like this:




enter image description here




Code:



documentclass{article}

usepackage{booktabs}

newcommandsame{---}

begin{document}

begin{table}
caption{Experimental Set}
label{par1}
centering
begin{tabular}{l *{8}{c}}
toprule
& multicolumn{8}{c}{Experiment}\
cmidrule{2-9}
& 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \
midrule
No. of Activities & 15 & 30 & same & same & same & same & same & same \
No. of Resources & 10 & same & 15 & same & same & same & same & same \
No. of Skills & 4 & same & same & 2 & same & same & same & same \
Max. No. of Pred. & Succ. & 3,3 & same & same & same & 2,2 & same & same & same \
Task Duration & 1--10 & same & same & same & same & 1--15 & same & same \
Max. Resources per Skill & 3 & same & same & same & same & same & 1 & same \
Max. Resources per Task & 10 & same & same & same & same & same & same & 5 \
bottomrule
end{tabular}
end{table}

end{document}





share|improve this answer




























    up vote
    10
    down vote













    You can rotate the headers:



    documentclass{scrartcl}
    usepackage{graphicx,booktabs}
    newcommandRB[1]{rotatebox{90}{#1}}
    begin{document}

    begin{table}[!htbp]
    caption{Experimental Set}label{par1}
    centering
    begin{tabular}{@{} l *7c @{}} toprule
    Experiments & RB{No. Of Activities} & RB{No. Of Resources} &
    RB{No. Of Skills } &RB{Max. No. of Pred. & Succ.} &RB{Task Duration} &
    RB{Max.Resources per Skill} & RB{Max.Resources per Task} \midrule
    Experiment 1 & {15} & 10& 4& 3,3&1-10&3&10 \
    Experiment 2 & 30 &10&4&3,3&1-10&3&10 \
    Experiment 3 & 15 &15&4&3,3&1-10&3&10 \
    Experiment 4 & {15} & 10& 2& 3,3&1-10&3&10 \
    Experiment 5 & {15} & 10& 4& 2,2&1-10&3&10 \
    Experiment 6 & {15} & 10& 4& 3,3&1-15&3&10 \
    Experiment 7 & {15} & 10& 4& 3,3&1-10&1&10 \
    Experiment 8 & {15} & 10& 4& 3,3&1-10&3&5 \
    bottomrule
    end{tabular}
    end{table}

    end{document}


    enter image description here






    share|improve this answer




























      up vote
      8
      down vote













      Here are two solutions that do not employ an adjustbox environment. Instead, they employ a tabularx environment or a tabular* environment. In both cases, the width of the table is set to textwidth. Observe that simplifying and structuring the header material makes it possible to make the material fit inside the width of the text block without having resort to adjustbox. For material at hand, the tabularx and tabular* based solutions provide very similar output; your pick as to which one you should prefer



      As the following screenshot shows, I would also like to recommend that you give the table a much more open "look", mainly by getting rid of all vertical lines and most horizontal lines and by using the line-drawing macros of the booktabs package for the remaining, essential horizontal lines.



      enter image description here



      documentclass{article}
      usepackage[a4paper,margin=2.5cm]{geometry} % choose page parameters suitably
      usepackage[skip=0.333baselineskip]{caption} % optional
      usepackage{tabularx,booktabs,ragged2e,adjustbox}
      newcolumntype{C}{>{Centeringarraybackslash}X}
      newcommandmytab[1]{%
      smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}}
      begin{document}

      begin{table}[htbp]

      caption{OP's original, texttt{adjustbox}-based solution}
      label{par1}
      centering
      begin{adjustbox}{width=1textwidth}

      begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
      p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
      hline
      {Experiments} & {No. Of Activities} & {No. Of Resources} &
      {No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
      {Max.Resources per Skill} & {Max.Resources per Task} \
      hline
      {Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
      Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
      Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
      {Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
      {Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
      {Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
      {Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
      {Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

      end{tabular}
      end{adjustbox}
      end{table}

      begin{table}[htbp]
      caption{Solution based on texttt{tabularx}} label{par2}
      begin{tabularx}{textwidth}{@{} l CCC cc CC @{}}
      toprule
      Experiment
      & multicolumn{3}{c}{Number of}
      & mytab{Max. No. of\ Pred. & Succ.}
      & mytab{Task\ Duration}
      & multicolumn{2}{c@{}}{Max. Resources} \
      cmidrule(lr){2-4} cmidrule(l){7-8}
      & Activities & Resources & Skills &&& per skill & per task\
      midrule
      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
      bottomrule
      end{tabularx}

      vspace{0.25in}
      %% Now for the tabular*-based solution.
      %% Let LaTeX figure out optimal amount of intercolumn whitespace:
      setlengthtabcolsep{0pt}
      caption{Solution based on texttt{tabular*}} label{par3}
      begin{tabular*}{textwidth}{@{extracolsep{fill}} l *{7}{c} }
      toprule
      Experiment
      & multicolumn{3}{c}{Number of}
      & mytab{Max. No. of\ Pred. & Succ.}
      & mytab{Task\ Duration}
      & multicolumn{2}{c@{}}{Max. Resources} \
      cmidrule{2-4} cmidrule{7-8}
      & Activities & Resources & Skills &&& per skill & per task\
      midrule
      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
      bottomrule
      end{tabular*}
      end{table}

      end{document}





      share|improve this answer



















      • 2




        Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
        – Mico
        Nov 29 at 8:16













      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%2f462192%2fhow-to-adjust-this-table-to-keep-the-text-from-going-to-the-next-cell%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








      up vote
      12
      down vote













      Your table is far too big. Really. Take a look at this thread for some options.



      It's a really bad idea to use adjustbox or resizebox or something similar to make the table fit in the page, the whole thing will look weird because the font will be far too small. Usually you'll find a better approach than rescaling the table.



      For this answer I modified your table completely. I noticed that you have something like a “reference” experiment, then you change one parameter in each experiment. Sorry to say this, but your table wasn't showing this to the reader, it was just throwing a bunch of apparently random numbers.



      First I transposed your table so that the parameters, which are what make your table so wide, are in one single columns, using about 7 times (!) less space.



      Then I removed all the parameters which are kept constant and replaced them by a same command, which I defined as ---, but you can change it to whatever you like.



      Finally, I removed the vertical rules of your table because they looked strange.



      The table now looks like this:




      enter image description here




      Code:



      documentclass{article}

      usepackage{booktabs}

      newcommandsame{---}

      begin{document}

      begin{table}
      caption{Experimental Set}
      label{par1}
      centering
      begin{tabular}{l *{8}{c}}
      toprule
      & multicolumn{8}{c}{Experiment}\
      cmidrule{2-9}
      & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \
      midrule
      No. of Activities & 15 & 30 & same & same & same & same & same & same \
      No. of Resources & 10 & same & 15 & same & same & same & same & same \
      No. of Skills & 4 & same & same & 2 & same & same & same & same \
      Max. No. of Pred. & Succ. & 3,3 & same & same & same & 2,2 & same & same & same \
      Task Duration & 1--10 & same & same & same & same & 1--15 & same & same \
      Max. Resources per Skill & 3 & same & same & same & same & same & 1 & same \
      Max. Resources per Task & 10 & same & same & same & same & same & same & 5 \
      bottomrule
      end{tabular}
      end{table}

      end{document}





      share|improve this answer

























        up vote
        12
        down vote













        Your table is far too big. Really. Take a look at this thread for some options.



        It's a really bad idea to use adjustbox or resizebox or something similar to make the table fit in the page, the whole thing will look weird because the font will be far too small. Usually you'll find a better approach than rescaling the table.



        For this answer I modified your table completely. I noticed that you have something like a “reference” experiment, then you change one parameter in each experiment. Sorry to say this, but your table wasn't showing this to the reader, it was just throwing a bunch of apparently random numbers.



        First I transposed your table so that the parameters, which are what make your table so wide, are in one single columns, using about 7 times (!) less space.



        Then I removed all the parameters which are kept constant and replaced them by a same command, which I defined as ---, but you can change it to whatever you like.



        Finally, I removed the vertical rules of your table because they looked strange.



        The table now looks like this:




        enter image description here




        Code:



        documentclass{article}

        usepackage{booktabs}

        newcommandsame{---}

        begin{document}

        begin{table}
        caption{Experimental Set}
        label{par1}
        centering
        begin{tabular}{l *{8}{c}}
        toprule
        & multicolumn{8}{c}{Experiment}\
        cmidrule{2-9}
        & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \
        midrule
        No. of Activities & 15 & 30 & same & same & same & same & same & same \
        No. of Resources & 10 & same & 15 & same & same & same & same & same \
        No. of Skills & 4 & same & same & 2 & same & same & same & same \
        Max. No. of Pred. & Succ. & 3,3 & same & same & same & 2,2 & same & same & same \
        Task Duration & 1--10 & same & same & same & same & 1--15 & same & same \
        Max. Resources per Skill & 3 & same & same & same & same & same & 1 & same \
        Max. Resources per Task & 10 & same & same & same & same & same & same & 5 \
        bottomrule
        end{tabular}
        end{table}

        end{document}





        share|improve this answer























          up vote
          12
          down vote










          up vote
          12
          down vote









          Your table is far too big. Really. Take a look at this thread for some options.



          It's a really bad idea to use adjustbox or resizebox or something similar to make the table fit in the page, the whole thing will look weird because the font will be far too small. Usually you'll find a better approach than rescaling the table.



          For this answer I modified your table completely. I noticed that you have something like a “reference” experiment, then you change one parameter in each experiment. Sorry to say this, but your table wasn't showing this to the reader, it was just throwing a bunch of apparently random numbers.



          First I transposed your table so that the parameters, which are what make your table so wide, are in one single columns, using about 7 times (!) less space.



          Then I removed all the parameters which are kept constant and replaced them by a same command, which I defined as ---, but you can change it to whatever you like.



          Finally, I removed the vertical rules of your table because they looked strange.



          The table now looks like this:




          enter image description here




          Code:



          documentclass{article}

          usepackage{booktabs}

          newcommandsame{---}

          begin{document}

          begin{table}
          caption{Experimental Set}
          label{par1}
          centering
          begin{tabular}{l *{8}{c}}
          toprule
          & multicolumn{8}{c}{Experiment}\
          cmidrule{2-9}
          & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \
          midrule
          No. of Activities & 15 & 30 & same & same & same & same & same & same \
          No. of Resources & 10 & same & 15 & same & same & same & same & same \
          No. of Skills & 4 & same & same & 2 & same & same & same & same \
          Max. No. of Pred. & Succ. & 3,3 & same & same & same & 2,2 & same & same & same \
          Task Duration & 1--10 & same & same & same & same & 1--15 & same & same \
          Max. Resources per Skill & 3 & same & same & same & same & same & 1 & same \
          Max. Resources per Task & 10 & same & same & same & same & same & same & 5 \
          bottomrule
          end{tabular}
          end{table}

          end{document}





          share|improve this answer












          Your table is far too big. Really. Take a look at this thread for some options.



          It's a really bad idea to use adjustbox or resizebox or something similar to make the table fit in the page, the whole thing will look weird because the font will be far too small. Usually you'll find a better approach than rescaling the table.



          For this answer I modified your table completely. I noticed that you have something like a “reference” experiment, then you change one parameter in each experiment. Sorry to say this, but your table wasn't showing this to the reader, it was just throwing a bunch of apparently random numbers.



          First I transposed your table so that the parameters, which are what make your table so wide, are in one single columns, using about 7 times (!) less space.



          Then I removed all the parameters which are kept constant and replaced them by a same command, which I defined as ---, but you can change it to whatever you like.



          Finally, I removed the vertical rules of your table because they looked strange.



          The table now looks like this:




          enter image description here




          Code:



          documentclass{article}

          usepackage{booktabs}

          newcommandsame{---}

          begin{document}

          begin{table}
          caption{Experimental Set}
          label{par1}
          centering
          begin{tabular}{l *{8}{c}}
          toprule
          & multicolumn{8}{c}{Experiment}\
          cmidrule{2-9}
          & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \
          midrule
          No. of Activities & 15 & 30 & same & same & same & same & same & same \
          No. of Resources & 10 & same & 15 & same & same & same & same & same \
          No. of Skills & 4 & same & same & 2 & same & same & same & same \
          Max. No. of Pred. & Succ. & 3,3 & same & same & same & 2,2 & same & same & same \
          Task Duration & 1--10 & same & same & same & same & 1--15 & same & same \
          Max. Resources per Skill & 3 & same & same & same & same & same & 1 & same \
          Max. Resources per Task & 10 & same & same & same & same & same & same & 5 \
          bottomrule
          end{tabular}
          end{table}

          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 28 at 16:24









          Phelype Oleinik

          20.9k54380




          20.9k54380






















              up vote
              10
              down vote













              You can rotate the headers:



              documentclass{scrartcl}
              usepackage{graphicx,booktabs}
              newcommandRB[1]{rotatebox{90}{#1}}
              begin{document}

              begin{table}[!htbp]
              caption{Experimental Set}label{par1}
              centering
              begin{tabular}{@{} l *7c @{}} toprule
              Experiments & RB{No. Of Activities} & RB{No. Of Resources} &
              RB{No. Of Skills } &RB{Max. No. of Pred. & Succ.} &RB{Task Duration} &
              RB{Max.Resources per Skill} & RB{Max.Resources per Task} \midrule
              Experiment 1 & {15} & 10& 4& 3,3&1-10&3&10 \
              Experiment 2 & 30 &10&4&3,3&1-10&3&10 \
              Experiment 3 & 15 &15&4&3,3&1-10&3&10 \
              Experiment 4 & {15} & 10& 2& 3,3&1-10&3&10 \
              Experiment 5 & {15} & 10& 4& 2,2&1-10&3&10 \
              Experiment 6 & {15} & 10& 4& 3,3&1-15&3&10 \
              Experiment 7 & {15} & 10& 4& 3,3&1-10&1&10 \
              Experiment 8 & {15} & 10& 4& 3,3&1-10&3&5 \
              bottomrule
              end{tabular}
              end{table}

              end{document}


              enter image description here






              share|improve this answer

























                up vote
                10
                down vote













                You can rotate the headers:



                documentclass{scrartcl}
                usepackage{graphicx,booktabs}
                newcommandRB[1]{rotatebox{90}{#1}}
                begin{document}

                begin{table}[!htbp]
                caption{Experimental Set}label{par1}
                centering
                begin{tabular}{@{} l *7c @{}} toprule
                Experiments & RB{No. Of Activities} & RB{No. Of Resources} &
                RB{No. Of Skills } &RB{Max. No. of Pred. & Succ.} &RB{Task Duration} &
                RB{Max.Resources per Skill} & RB{Max.Resources per Task} \midrule
                Experiment 1 & {15} & 10& 4& 3,3&1-10&3&10 \
                Experiment 2 & 30 &10&4&3,3&1-10&3&10 \
                Experiment 3 & 15 &15&4&3,3&1-10&3&10 \
                Experiment 4 & {15} & 10& 2& 3,3&1-10&3&10 \
                Experiment 5 & {15} & 10& 4& 2,2&1-10&3&10 \
                Experiment 6 & {15} & 10& 4& 3,3&1-15&3&10 \
                Experiment 7 & {15} & 10& 4& 3,3&1-10&1&10 \
                Experiment 8 & {15} & 10& 4& 3,3&1-10&3&5 \
                bottomrule
                end{tabular}
                end{table}

                end{document}


                enter image description here






                share|improve this answer























                  up vote
                  10
                  down vote










                  up vote
                  10
                  down vote









                  You can rotate the headers:



                  documentclass{scrartcl}
                  usepackage{graphicx,booktabs}
                  newcommandRB[1]{rotatebox{90}{#1}}
                  begin{document}

                  begin{table}[!htbp]
                  caption{Experimental Set}label{par1}
                  centering
                  begin{tabular}{@{} l *7c @{}} toprule
                  Experiments & RB{No. Of Activities} & RB{No. Of Resources} &
                  RB{No. Of Skills } &RB{Max. No. of Pred. & Succ.} &RB{Task Duration} &
                  RB{Max.Resources per Skill} & RB{Max.Resources per Task} \midrule
                  Experiment 1 & {15} & 10& 4& 3,3&1-10&3&10 \
                  Experiment 2 & 30 &10&4&3,3&1-10&3&10 \
                  Experiment 3 & 15 &15&4&3,3&1-10&3&10 \
                  Experiment 4 & {15} & 10& 2& 3,3&1-10&3&10 \
                  Experiment 5 & {15} & 10& 4& 2,2&1-10&3&10 \
                  Experiment 6 & {15} & 10& 4& 3,3&1-15&3&10 \
                  Experiment 7 & {15} & 10& 4& 3,3&1-10&1&10 \
                  Experiment 8 & {15} & 10& 4& 3,3&1-10&3&5 \
                  bottomrule
                  end{tabular}
                  end{table}

                  end{document}


                  enter image description here






                  share|improve this answer












                  You can rotate the headers:



                  documentclass{scrartcl}
                  usepackage{graphicx,booktabs}
                  newcommandRB[1]{rotatebox{90}{#1}}
                  begin{document}

                  begin{table}[!htbp]
                  caption{Experimental Set}label{par1}
                  centering
                  begin{tabular}{@{} l *7c @{}} toprule
                  Experiments & RB{No. Of Activities} & RB{No. Of Resources} &
                  RB{No. Of Skills } &RB{Max. No. of Pred. & Succ.} &RB{Task Duration} &
                  RB{Max.Resources per Skill} & RB{Max.Resources per Task} \midrule
                  Experiment 1 & {15} & 10& 4& 3,3&1-10&3&10 \
                  Experiment 2 & 30 &10&4&3,3&1-10&3&10 \
                  Experiment 3 & 15 &15&4&3,3&1-10&3&10 \
                  Experiment 4 & {15} & 10& 2& 3,3&1-10&3&10 \
                  Experiment 5 & {15} & 10& 4& 2,2&1-10&3&10 \
                  Experiment 6 & {15} & 10& 4& 3,3&1-15&3&10 \
                  Experiment 7 & {15} & 10& 4& 3,3&1-10&1&10 \
                  Experiment 8 & {15} & 10& 4& 3,3&1-10&3&5 \
                  bottomrule
                  end{tabular}
                  end{table}

                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 28 at 16:33









                  Herbert

                  266k23405716




                  266k23405716






















                      up vote
                      8
                      down vote













                      Here are two solutions that do not employ an adjustbox environment. Instead, they employ a tabularx environment or a tabular* environment. In both cases, the width of the table is set to textwidth. Observe that simplifying and structuring the header material makes it possible to make the material fit inside the width of the text block without having resort to adjustbox. For material at hand, the tabularx and tabular* based solutions provide very similar output; your pick as to which one you should prefer



                      As the following screenshot shows, I would also like to recommend that you give the table a much more open "look", mainly by getting rid of all vertical lines and most horizontal lines and by using the line-drawing macros of the booktabs package for the remaining, essential horizontal lines.



                      enter image description here



                      documentclass{article}
                      usepackage[a4paper,margin=2.5cm]{geometry} % choose page parameters suitably
                      usepackage[skip=0.333baselineskip]{caption} % optional
                      usepackage{tabularx,booktabs,ragged2e,adjustbox}
                      newcolumntype{C}{>{Centeringarraybackslash}X}
                      newcommandmytab[1]{%
                      smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}}
                      begin{document}

                      begin{table}[htbp]

                      caption{OP's original, texttt{adjustbox}-based solution}
                      label{par1}
                      centering
                      begin{adjustbox}{width=1textwidth}

                      begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
                      p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
                      hline
                      {Experiments} & {No. Of Activities} & {No. Of Resources} &
                      {No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
                      {Max.Resources per Skill} & {Max.Resources per Task} \
                      hline
                      {Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
                      Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
                      Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
                      {Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
                      {Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
                      {Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
                      {Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
                      {Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

                      end{tabular}
                      end{adjustbox}
                      end{table}

                      begin{table}[htbp]
                      caption{Solution based on texttt{tabularx}} label{par2}
                      begin{tabularx}{textwidth}{@{} l CCC cc CC @{}}
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule(lr){2-4} cmidrule(l){7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabularx}

                      vspace{0.25in}
                      %% Now for the tabular*-based solution.
                      %% Let LaTeX figure out optimal amount of intercolumn whitespace:
                      setlengthtabcolsep{0pt}
                      caption{Solution based on texttt{tabular*}} label{par3}
                      begin{tabular*}{textwidth}{@{extracolsep{fill}} l *{7}{c} }
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule{2-4} cmidrule{7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabular*}
                      end{table}

                      end{document}





                      share|improve this answer



















                      • 2




                        Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
                        – Mico
                        Nov 29 at 8:16

















                      up vote
                      8
                      down vote













                      Here are two solutions that do not employ an adjustbox environment. Instead, they employ a tabularx environment or a tabular* environment. In both cases, the width of the table is set to textwidth. Observe that simplifying and structuring the header material makes it possible to make the material fit inside the width of the text block without having resort to adjustbox. For material at hand, the tabularx and tabular* based solutions provide very similar output; your pick as to which one you should prefer



                      As the following screenshot shows, I would also like to recommend that you give the table a much more open "look", mainly by getting rid of all vertical lines and most horizontal lines and by using the line-drawing macros of the booktabs package for the remaining, essential horizontal lines.



                      enter image description here



                      documentclass{article}
                      usepackage[a4paper,margin=2.5cm]{geometry} % choose page parameters suitably
                      usepackage[skip=0.333baselineskip]{caption} % optional
                      usepackage{tabularx,booktabs,ragged2e,adjustbox}
                      newcolumntype{C}{>{Centeringarraybackslash}X}
                      newcommandmytab[1]{%
                      smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}}
                      begin{document}

                      begin{table}[htbp]

                      caption{OP's original, texttt{adjustbox}-based solution}
                      label{par1}
                      centering
                      begin{adjustbox}{width=1textwidth}

                      begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
                      p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
                      hline
                      {Experiments} & {No. Of Activities} & {No. Of Resources} &
                      {No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
                      {Max.Resources per Skill} & {Max.Resources per Task} \
                      hline
                      {Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
                      Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
                      Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
                      {Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
                      {Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
                      {Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
                      {Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
                      {Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

                      end{tabular}
                      end{adjustbox}
                      end{table}

                      begin{table}[htbp]
                      caption{Solution based on texttt{tabularx}} label{par2}
                      begin{tabularx}{textwidth}{@{} l CCC cc CC @{}}
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule(lr){2-4} cmidrule(l){7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabularx}

                      vspace{0.25in}
                      %% Now for the tabular*-based solution.
                      %% Let LaTeX figure out optimal amount of intercolumn whitespace:
                      setlengthtabcolsep{0pt}
                      caption{Solution based on texttt{tabular*}} label{par3}
                      begin{tabular*}{textwidth}{@{extracolsep{fill}} l *{7}{c} }
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule{2-4} cmidrule{7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabular*}
                      end{table}

                      end{document}





                      share|improve this answer



















                      • 2




                        Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
                        – Mico
                        Nov 29 at 8:16















                      up vote
                      8
                      down vote










                      up vote
                      8
                      down vote









                      Here are two solutions that do not employ an adjustbox environment. Instead, they employ a tabularx environment or a tabular* environment. In both cases, the width of the table is set to textwidth. Observe that simplifying and structuring the header material makes it possible to make the material fit inside the width of the text block without having resort to adjustbox. For material at hand, the tabularx and tabular* based solutions provide very similar output; your pick as to which one you should prefer



                      As the following screenshot shows, I would also like to recommend that you give the table a much more open "look", mainly by getting rid of all vertical lines and most horizontal lines and by using the line-drawing macros of the booktabs package for the remaining, essential horizontal lines.



                      enter image description here



                      documentclass{article}
                      usepackage[a4paper,margin=2.5cm]{geometry} % choose page parameters suitably
                      usepackage[skip=0.333baselineskip]{caption} % optional
                      usepackage{tabularx,booktabs,ragged2e,adjustbox}
                      newcolumntype{C}{>{Centeringarraybackslash}X}
                      newcommandmytab[1]{%
                      smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}}
                      begin{document}

                      begin{table}[htbp]

                      caption{OP's original, texttt{adjustbox}-based solution}
                      label{par1}
                      centering
                      begin{adjustbox}{width=1textwidth}

                      begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
                      p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
                      hline
                      {Experiments} & {No. Of Activities} & {No. Of Resources} &
                      {No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
                      {Max.Resources per Skill} & {Max.Resources per Task} \
                      hline
                      {Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
                      Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
                      Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
                      {Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
                      {Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
                      {Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
                      {Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
                      {Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

                      end{tabular}
                      end{adjustbox}
                      end{table}

                      begin{table}[htbp]
                      caption{Solution based on texttt{tabularx}} label{par2}
                      begin{tabularx}{textwidth}{@{} l CCC cc CC @{}}
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule(lr){2-4} cmidrule(l){7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabularx}

                      vspace{0.25in}
                      %% Now for the tabular*-based solution.
                      %% Let LaTeX figure out optimal amount of intercolumn whitespace:
                      setlengthtabcolsep{0pt}
                      caption{Solution based on texttt{tabular*}} label{par3}
                      begin{tabular*}{textwidth}{@{extracolsep{fill}} l *{7}{c} }
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule{2-4} cmidrule{7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabular*}
                      end{table}

                      end{document}





                      share|improve this answer














                      Here are two solutions that do not employ an adjustbox environment. Instead, they employ a tabularx environment or a tabular* environment. In both cases, the width of the table is set to textwidth. Observe that simplifying and structuring the header material makes it possible to make the material fit inside the width of the text block without having resort to adjustbox. For material at hand, the tabularx and tabular* based solutions provide very similar output; your pick as to which one you should prefer



                      As the following screenshot shows, I would also like to recommend that you give the table a much more open "look", mainly by getting rid of all vertical lines and most horizontal lines and by using the line-drawing macros of the booktabs package for the remaining, essential horizontal lines.



                      enter image description here



                      documentclass{article}
                      usepackage[a4paper,margin=2.5cm]{geometry} % choose page parameters suitably
                      usepackage[skip=0.333baselineskip]{caption} % optional
                      usepackage{tabularx,booktabs,ragged2e,adjustbox}
                      newcolumntype{C}{>{Centeringarraybackslash}X}
                      newcommandmytab[1]{%
                      smash{begin{tabular}[t]{@{}c@{}} #1 end{tabular}}}
                      begin{document}

                      begin{table}[htbp]

                      caption{OP's original, texttt{adjustbox}-based solution}
                      label{par1}
                      centering
                      begin{adjustbox}{width=1textwidth}

                      begin{tabular}{ |p{2.5cm}|p{3cm}|p{2cm}|p{3cm}|
                      p{2cm}|p{3cm}|p{2cm}|p{2cm}|}
                      hline
                      {Experiments} & {No. Of Activities} & {No. Of Resources} &
                      {No. Of Skills } &{Max. No. of Pred. & Succ.} &{Task Duration} &
                      {Max.Resources per Skill} & {Max.Resources per Task} \
                      hline
                      {Experiment 1} & {15} & 10& 4& 3,3&1-10&3&10 \ hline
                      Experiment 2 & 30 &10&4&3,3&1-10&3&10 \ hline
                      Experiment 3& 15 &15&4&3,3&1-10&3&10 \ hline
                      {Experiment 4} & {15} & 10& 2& 3,3&1-10&3&10 \ hline
                      {Experiment 5} & {15} & 10& 4& 2,2&1-10&3&10 \ hline
                      {Experiment 6} & {15} & 10& 4& 3,3&1-15&3&10 \ hline
                      {Experiment 7} & {15} & 10& 4& 3,3&1-10&1&10 \ hline
                      {Experiment 8} & {15} & 10& 4& 3,3&1-10&3&5 \ hline

                      end{tabular}
                      end{adjustbox}
                      end{table}

                      begin{table}[htbp]
                      caption{Solution based on texttt{tabularx}} label{par2}
                      begin{tabularx}{textwidth}{@{} l CCC cc CC @{}}
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule(lr){2-4} cmidrule(l){7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabularx}

                      vspace{0.25in}
                      %% Now for the tabular*-based solution.
                      %% Let LaTeX figure out optimal amount of intercolumn whitespace:
                      setlengthtabcolsep{0pt}
                      caption{Solution based on texttt{tabular*}} label{par3}
                      begin{tabular*}{textwidth}{@{extracolsep{fill}} l *{7}{c} }
                      toprule
                      Experiment
                      & multicolumn{3}{c}{Number of}
                      & mytab{Max. No. of\ Pred. & Succ.}
                      & mytab{Task\ Duration}
                      & multicolumn{2}{c@{}}{Max. Resources} \
                      cmidrule{2-4} cmidrule{7-8}
                      & Activities & Resources & Skills &&& per skill & per task\
                      midrule
                      1 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      2 & 30 & 10 & 4 & 3,3 & 1--10 & 3 & 10 \
                      3 & 15 & 15 & 4 & 3,3 & 1--10 & 3 & 10 \
                      4 & 15 & 10 & 2 & 3,3 & 1--10 & 3 & 10 \ addlinespace
                      5 & 15 & 10 & 4 & 2,2 & 1--10 & 3 & 10 \
                      6 & 15 & 10 & 4 & 3,3 & 1--15 & 3 & 10 \
                      7 & 15 & 10 & 4 & 3,3 & 1--10 & 1 & 10 \
                      8 & 15 & 10 & 4 & 3,3 & 1--10 & 3 & 5 \
                      bottomrule
                      end{tabular*}
                      end{table}

                      end{document}






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 29 at 17:48

























                      answered Nov 28 at 17:35









                      Mico

                      271k30367755




                      271k30367755








                      • 2




                        Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
                        – Mico
                        Nov 29 at 8:16
















                      • 2




                        Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
                        – Mico
                        Nov 29 at 8:16










                      2




                      2




                      Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
                      – Mico
                      Nov 29 at 8:16






                      Ah yes, the good old driveby-shooting approach to expressing disagreement: Post a downvote anonymously but don't indicate what provoked the displeasure. To whoever executes these anonymous downvotes: Your influence on my behavior -- or on that of anyone else! -- is negligible. If you want to make the world a better place, don't act anonymously.
                      – Mico
                      Nov 29 at 8:16




















                      draft saved

                      draft discarded




















































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


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

                      But avoid



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

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


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





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


                      Please pay close attention to the following guidance:


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

                      But avoid



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

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


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




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462192%2fhow-to-adjust-this-table-to-keep-the-text-from-going-to-the-next-cell%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

                      數位音樂下載

                      When can things happen in Etherscan, such as the picture below?

                      格利澤436b