Help to fix a table












2















I tried using a template that is working well for a more numerical table but I created a monster trying to adapt it to new needs. Here it is the mwe:



documentclass[a4paper, 11pt]{scrreprt}
usepackage{amsmath,booktabs,siunitx}
usepackage[version=4]{mhchem}
sisetup{separate-uncertainty}

newcommand{tabhead}[1]{%
smash[b]{%
begin{tabular}[t]{@{}c@{}}#1end{tabular}%
}%
}

begin{document}

begin{table}[h]

caption{Caption here.}label{whatever}

setlength{tabcolsep}{0pt}

begin{tabular*}{linewidth}{
@{extracolsep{fill}}
r
S[table-format=2.1]
r
S[table-format=1.2]
r
S[table-format=4.0]
r
r
}
toprule
{textbf{Material} } &
{tabhead{ textbf{Mean Pore Radius} \ textbf{(si{nanometer})}}} &
{ textbf{Model}} &
{tabhead{textbf{Salt Concentration} \ textbf{({M} ce{NaCl})}}} &
{textbf{pH}} &
{textbf{Buffer}} &
{tabhead{Range of Dextrans \ textbf{(kDa)}}} &
{tabhead{Reference \ textbf{(--)}}} \
&&& \
midrule
LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2]\

bottomrule
end{tabular*}
label{}

end{table}

end{document}


It compiles without error but on the one hand it doesn't fit in the page so I cannot see the whole table, and there are other many wrong things like:




  • headers overlap. No proper distance between the titles.

  • How to arrange the elements right-justified but centering the header?

  • should I use tabularx in this situation?


Any help is appreciated!










share|improve this question



























    2















    I tried using a template that is working well for a more numerical table but I created a monster trying to adapt it to new needs. Here it is the mwe:



    documentclass[a4paper, 11pt]{scrreprt}
    usepackage{amsmath,booktabs,siunitx}
    usepackage[version=4]{mhchem}
    sisetup{separate-uncertainty}

    newcommand{tabhead}[1]{%
    smash[b]{%
    begin{tabular}[t]{@{}c@{}}#1end{tabular}%
    }%
    }

    begin{document}

    begin{table}[h]

    caption{Caption here.}label{whatever}

    setlength{tabcolsep}{0pt}

    begin{tabular*}{linewidth}{
    @{extracolsep{fill}}
    r
    S[table-format=2.1]
    r
    S[table-format=1.2]
    r
    S[table-format=4.0]
    r
    r
    }
    toprule
    {textbf{Material} } &
    {tabhead{ textbf{Mean Pore Radius} \ textbf{(si{nanometer})}}} &
    { textbf{Model}} &
    {tabhead{textbf{Salt Concentration} \ textbf{({M} ce{NaCl})}}} &
    {textbf{pH}} &
    {textbf{Buffer}} &
    {tabhead{Range of Dextrans \ textbf{(kDa)}}} &
    {tabhead{Reference \ textbf{(--)}}} \
    &&& \
    midrule
    LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
    LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
    AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2]\

    bottomrule
    end{tabular*}
    label{}

    end{table}

    end{document}


    It compiles without error but on the one hand it doesn't fit in the page so I cannot see the whole table, and there are other many wrong things like:




    • headers overlap. No proper distance between the titles.

    • How to arrange the elements right-justified but centering the header?

    • should I use tabularx in this situation?


    Any help is appreciated!










    share|improve this question

























      2












      2








      2








      I tried using a template that is working well for a more numerical table but I created a monster trying to adapt it to new needs. Here it is the mwe:



      documentclass[a4paper, 11pt]{scrreprt}
      usepackage{amsmath,booktabs,siunitx}
      usepackage[version=4]{mhchem}
      sisetup{separate-uncertainty}

      newcommand{tabhead}[1]{%
      smash[b]{%
      begin{tabular}[t]{@{}c@{}}#1end{tabular}%
      }%
      }

      begin{document}

      begin{table}[h]

      caption{Caption here.}label{whatever}

      setlength{tabcolsep}{0pt}

      begin{tabular*}{linewidth}{
      @{extracolsep{fill}}
      r
      S[table-format=2.1]
      r
      S[table-format=1.2]
      r
      S[table-format=4.0]
      r
      r
      }
      toprule
      {textbf{Material} } &
      {tabhead{ textbf{Mean Pore Radius} \ textbf{(si{nanometer})}}} &
      { textbf{Model}} &
      {tabhead{textbf{Salt Concentration} \ textbf{({M} ce{NaCl})}}} &
      {textbf{pH}} &
      {textbf{Buffer}} &
      {tabhead{Range of Dextrans \ textbf{(kDa)}}} &
      {tabhead{Reference \ textbf{(--)}}} \
      &&& \
      midrule
      LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
      LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
      AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2]\

      bottomrule
      end{tabular*}
      label{}

      end{table}

      end{document}


      It compiles without error but on the one hand it doesn't fit in the page so I cannot see the whole table, and there are other many wrong things like:




      • headers overlap. No proper distance between the titles.

      • How to arrange the elements right-justified but centering the header?

      • should I use tabularx in this situation?


      Any help is appreciated!










      share|improve this question














      I tried using a template that is working well for a more numerical table but I created a monster trying to adapt it to new needs. Here it is the mwe:



      documentclass[a4paper, 11pt]{scrreprt}
      usepackage{amsmath,booktabs,siunitx}
      usepackage[version=4]{mhchem}
      sisetup{separate-uncertainty}

      newcommand{tabhead}[1]{%
      smash[b]{%
      begin{tabular}[t]{@{}c@{}}#1end{tabular}%
      }%
      }

      begin{document}

      begin{table}[h]

      caption{Caption here.}label{whatever}

      setlength{tabcolsep}{0pt}

      begin{tabular*}{linewidth}{
      @{extracolsep{fill}}
      r
      S[table-format=2.1]
      r
      S[table-format=1.2]
      r
      S[table-format=4.0]
      r
      r
      }
      toprule
      {textbf{Material} } &
      {tabhead{ textbf{Mean Pore Radius} \ textbf{(si{nanometer})}}} &
      { textbf{Model}} &
      {tabhead{textbf{Salt Concentration} \ textbf{({M} ce{NaCl})}}} &
      {textbf{pH}} &
      {textbf{Buffer}} &
      {tabhead{Range of Dextrans \ textbf{(kDa)}}} &
      {tabhead{Reference \ textbf{(--)}}} \
      &&& \
      midrule
      LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
      LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
      AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2]\

      bottomrule
      end{tabular*}
      label{}

      end{table}

      end{document}


      It compiles without error but on the one hand it doesn't fit in the page so I cannot see the whole table, and there are other many wrong things like:




      • headers overlap. No proper distance between the titles.

      • How to arrange the elements right-justified but centering the header?

      • should I use tabularx in this situation?


      Any help is appreciated!







      tables






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 hours ago









      egil137egil137

      565




      565






















          1 Answer
          1






          active

          oldest

          votes


















          6














          There's little hope to make those long headers to fit in the page limit. I suggest to use acronyms that are explained just below the table (or in the caption, perhaps).



          documentclass[a4paper, 11pt]{scrreprt}
          usepackage{amsmath,booktabs,siunitx}
          usepackage[version=4]{mhchem}
          sisetup{separate-uncertainty}

          begin{document}

          begin{table}[htp]

          caption{Caption here.}label{whatever}

          setlength{tabcolsep}{0pt}

          footnotesize

          begin{tabular*}{linewidth}{
          @{extracolsep{fill}}
          l
          S[table-format=2.1]
          l
          S[table-format=1.2]
          l
          S[table-format=1.1]
          l
          r
          }
          toprule
          textbf{Material} & {textbf{MPR}} & multicolumn{1}{c}{textbf{Model}} & {textbf{SC}} &
          multicolumn{1}{c}{textbf{pH}} & {textbf{B}} & textbf{RD} & textbf{Ref.} \
          midrule
          LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
          LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
          AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2] \
          midrule[heavyrulewidth]
          end{tabular*}
          begin{tabular*}{textwidth}[t]{@{extracolsep{fill}}lll}
          MPR: Mean Pore Radius (si{nanometer}) &
          SC: Salt Concentration (M ce{NaCl}) &
          B: Buffer \
          RD: Range of Dextrans (kDa) & Ref.: Reference
          end{tabular*}

          end{table}

          end{document}


          Without footnotesize the columns would be too squeezed. Depending on your text width, small could do.



          enter image description here






          share|improve this answer
























          • how about three part table?

            – subham soni
            12 hours ago













          • Maybe it's not necessary to add model three times? The column head should be enough.

            – Bernard
            11 hours ago











          • Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

            – egil137
            11 hours ago











          • @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

            – egil137
            11 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477863%2fhelp-to-fix-a-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          6














          There's little hope to make those long headers to fit in the page limit. I suggest to use acronyms that are explained just below the table (or in the caption, perhaps).



          documentclass[a4paper, 11pt]{scrreprt}
          usepackage{amsmath,booktabs,siunitx}
          usepackage[version=4]{mhchem}
          sisetup{separate-uncertainty}

          begin{document}

          begin{table}[htp]

          caption{Caption here.}label{whatever}

          setlength{tabcolsep}{0pt}

          footnotesize

          begin{tabular*}{linewidth}{
          @{extracolsep{fill}}
          l
          S[table-format=2.1]
          l
          S[table-format=1.2]
          l
          S[table-format=1.1]
          l
          r
          }
          toprule
          textbf{Material} & {textbf{MPR}} & multicolumn{1}{c}{textbf{Model}} & {textbf{SC}} &
          multicolumn{1}{c}{textbf{pH}} & {textbf{B}} & textbf{RD} & textbf{Ref.} \
          midrule
          LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
          LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
          AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2] \
          midrule[heavyrulewidth]
          end{tabular*}
          begin{tabular*}{textwidth}[t]{@{extracolsep{fill}}lll}
          MPR: Mean Pore Radius (si{nanometer}) &
          SC: Salt Concentration (M ce{NaCl}) &
          B: Buffer \
          RD: Range of Dextrans (kDa) & Ref.: Reference
          end{tabular*}

          end{table}

          end{document}


          Without footnotesize the columns would be too squeezed. Depending on your text width, small could do.



          enter image description here






          share|improve this answer
























          • how about three part table?

            – subham soni
            12 hours ago













          • Maybe it's not necessary to add model three times? The column head should be enough.

            – Bernard
            11 hours ago











          • Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

            – egil137
            11 hours ago











          • @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

            – egil137
            11 hours ago
















          6














          There's little hope to make those long headers to fit in the page limit. I suggest to use acronyms that are explained just below the table (or in the caption, perhaps).



          documentclass[a4paper, 11pt]{scrreprt}
          usepackage{amsmath,booktabs,siunitx}
          usepackage[version=4]{mhchem}
          sisetup{separate-uncertainty}

          begin{document}

          begin{table}[htp]

          caption{Caption here.}label{whatever}

          setlength{tabcolsep}{0pt}

          footnotesize

          begin{tabular*}{linewidth}{
          @{extracolsep{fill}}
          l
          S[table-format=2.1]
          l
          S[table-format=1.2]
          l
          S[table-format=1.1]
          l
          r
          }
          toprule
          textbf{Material} & {textbf{MPR}} & multicolumn{1}{c}{textbf{Model}} & {textbf{SC}} &
          multicolumn{1}{c}{textbf{pH}} & {textbf{B}} & textbf{RD} & textbf{Ref.} \
          midrule
          LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
          LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
          AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2] \
          midrule[heavyrulewidth]
          end{tabular*}
          begin{tabular*}{textwidth}[t]{@{extracolsep{fill}}lll}
          MPR: Mean Pore Radius (si{nanometer}) &
          SC: Salt Concentration (M ce{NaCl}) &
          B: Buffer \
          RD: Range of Dextrans (kDa) & Ref.: Reference
          end{tabular*}

          end{table}

          end{document}


          Without footnotesize the columns would be too squeezed. Depending on your text width, small could do.



          enter image description here






          share|improve this answer
























          • how about three part table?

            – subham soni
            12 hours ago













          • Maybe it's not necessary to add model three times? The column head should be enough.

            – Bernard
            11 hours ago











          • Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

            – egil137
            11 hours ago











          • @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

            – egil137
            11 hours ago














          6












          6








          6







          There's little hope to make those long headers to fit in the page limit. I suggest to use acronyms that are explained just below the table (or in the caption, perhaps).



          documentclass[a4paper, 11pt]{scrreprt}
          usepackage{amsmath,booktabs,siunitx}
          usepackage[version=4]{mhchem}
          sisetup{separate-uncertainty}

          begin{document}

          begin{table}[htp]

          caption{Caption here.}label{whatever}

          setlength{tabcolsep}{0pt}

          footnotesize

          begin{tabular*}{linewidth}{
          @{extracolsep{fill}}
          l
          S[table-format=2.1]
          l
          S[table-format=1.2]
          l
          S[table-format=1.1]
          l
          r
          }
          toprule
          textbf{Material} & {textbf{MPR}} & multicolumn{1}{c}{textbf{Model}} & {textbf{SC}} &
          multicolumn{1}{c}{textbf{pH}} & {textbf{B}} & textbf{RD} & textbf{Ref.} \
          midrule
          LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
          LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
          AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2] \
          midrule[heavyrulewidth]
          end{tabular*}
          begin{tabular*}{textwidth}[t]{@{extracolsep{fill}}lll}
          MPR: Mean Pore Radius (si{nanometer}) &
          SC: Salt Concentration (M ce{NaCl}) &
          B: Buffer \
          RD: Range of Dextrans (kDa) & Ref.: Reference
          end{tabular*}

          end{table}

          end{document}


          Without footnotesize the columns would be too squeezed. Depending on your text width, small could do.



          enter image description here






          share|improve this answer













          There's little hope to make those long headers to fit in the page limit. I suggest to use acronyms that are explained just below the table (or in the caption, perhaps).



          documentclass[a4paper, 11pt]{scrreprt}
          usepackage{amsmath,booktabs,siunitx}
          usepackage[version=4]{mhchem}
          sisetup{separate-uncertainty}

          begin{document}

          begin{table}[htp]

          caption{Caption here.}label{whatever}

          setlength{tabcolsep}{0pt}

          footnotesize

          begin{tabular*}{linewidth}{
          @{extracolsep{fill}}
          l
          S[table-format=2.1]
          l
          S[table-format=1.2]
          l
          S[table-format=1.1]
          l
          r
          }
          toprule
          textbf{Material} & {textbf{MPR}} & multicolumn{1}{c}{textbf{Model}} & {textbf{SC}} &
          multicolumn{1}{c}{textbf{pH}} & {textbf{B}} & textbf{RD} & textbf{Ref.} \
          midrule
          LongName AA & 18.4 & Simple model & 0 & 20 mM Bis-Tris & 6.5 & 0.18 to 500 & [1,2] \
          LongName AA & 25.8 & complex model & 0.12 & 10 mM Tris-ce{HCl} & 7.2 & 0.18 to 20000 & [3] \
          AA LongName AA & 15.0 & complex model & 1 & 10 mM phosphate & 8.0 & 4 to 400 & [4,2] \
          midrule[heavyrulewidth]
          end{tabular*}
          begin{tabular*}{textwidth}[t]{@{extracolsep{fill}}lll}
          MPR: Mean Pore Radius (si{nanometer}) &
          SC: Salt Concentration (M ce{NaCl}) &
          B: Buffer \
          RD: Range of Dextrans (kDa) & Ref.: Reference
          end{tabular*}

          end{table}

          end{document}


          Without footnotesize the columns would be too squeezed. Depending on your text width, small could do.



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 12 hours ago









          egregegreg

          724k8819173222




          724k8819173222













          • how about three part table?

            – subham soni
            12 hours ago













          • Maybe it's not necessary to add model three times? The column head should be enough.

            – Bernard
            11 hours ago











          • Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

            – egil137
            11 hours ago











          • @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

            – egil137
            11 hours ago



















          • how about three part table?

            – subham soni
            12 hours ago













          • Maybe it's not necessary to add model three times? The column head should be enough.

            – Bernard
            11 hours ago











          • Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

            – egil137
            11 hours ago











          • @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

            – egil137
            11 hours ago

















          how about three part table?

          – subham soni
          12 hours ago







          how about three part table?

          – subham soni
          12 hours ago















          Maybe it's not necessary to add model three times? The column head should be enough.

          – Bernard
          11 hours ago





          Maybe it's not necessary to add model three times? The column head should be enough.

          – Bernard
          11 hours ago













          Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

          – egil137
          11 hours ago





          Thanks for the suggestions! I like the way to display the acronyms. I might use it for the text inside the table and keep some headers.

          – egil137
          11 hours ago













          @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

          – egil137
          11 hours ago





          @Bernard totally. This was just a sample text I added to get an idea. I think I´ll actually use acronyms for the name of the models and add them at the bottom as suggested.

          – egil137
          11 hours ago


















          draft saved

          draft discarded




















































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


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

          But avoid



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

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


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




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477863%2fhelp-to-fix-a-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]