Issues Fitting Generated Table to Width












1















I have reviewed quite a few posts on here, yet everything seems to be breaking my table, so I figured I'd just post my probem and ask for help. I generated a table using https://www.tablesgenerator.com



I am having issues fitting my table to the width of the page without shrinking the text:



documentclass[acmsmall]{acmart}
usepackage{graphicx}
usepackage[table,xcdraw]{xcolor}
begin{table}
resizebox{textwidth}{!}{%
begin{tabular}{lcccccccccccc}
hline
rowcolor[HTML]{EFEFEF}
multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
textit{textbf{Hashtag}} & multicolumn{3}{c}
{textit{textbf{Service1}}} & multicolumn{3}{c}
{textit{textbf{Service2}}} & multicolumn{3}{c}
{textit{textbf{Service3}}} & multicolumn{3}{c}
{textit{textbf{Service4}}} \ hline
rowcolor[HTML]{EFEFEF}
textit{} & textit{True} & textit{False} & textit{Accuracy} &
textit{True} & textit{False} & textit{Accuracy} & textit{True} &
textit{False} & textit{Accuracy} & textit{True} & textit{False} &
textit{Accuracy} \ hline
textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
& n & n% \ hline
begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
n% & n & n & n% & n & n & n% & n & n & n% \ hline
end{tabular}%
}
end{table}









share|improve this question

























  • Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 13 at 22:14
















1















I have reviewed quite a few posts on here, yet everything seems to be breaking my table, so I figured I'd just post my probem and ask for help. I generated a table using https://www.tablesgenerator.com



I am having issues fitting my table to the width of the page without shrinking the text:



documentclass[acmsmall]{acmart}
usepackage{graphicx}
usepackage[table,xcdraw]{xcolor}
begin{table}
resizebox{textwidth}{!}{%
begin{tabular}{lcccccccccccc}
hline
rowcolor[HTML]{EFEFEF}
multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
textit{textbf{Hashtag}} & multicolumn{3}{c}
{textit{textbf{Service1}}} & multicolumn{3}{c}
{textit{textbf{Service2}}} & multicolumn{3}{c}
{textit{textbf{Service3}}} & multicolumn{3}{c}
{textit{textbf{Service4}}} \ hline
rowcolor[HTML]{EFEFEF}
textit{} & textit{True} & textit{False} & textit{Accuracy} &
textit{True} & textit{False} & textit{Accuracy} & textit{True} &
textit{False} & textit{Accuracy} & textit{True} & textit{False} &
textit{Accuracy} \ hline
textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
& n & n% \ hline
begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
n% & n & n & n% & n & n & n% & n & n & n% \ hline
end{tabular}%
}
end{table}









share|improve this question

























  • Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 13 at 22:14














1












1








1


0






I have reviewed quite a few posts on here, yet everything seems to be breaking my table, so I figured I'd just post my probem and ask for help. I generated a table using https://www.tablesgenerator.com



I am having issues fitting my table to the width of the page without shrinking the text:



documentclass[acmsmall]{acmart}
usepackage{graphicx}
usepackage[table,xcdraw]{xcolor}
begin{table}
resizebox{textwidth}{!}{%
begin{tabular}{lcccccccccccc}
hline
rowcolor[HTML]{EFEFEF}
multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
textit{textbf{Hashtag}} & multicolumn{3}{c}
{textit{textbf{Service1}}} & multicolumn{3}{c}
{textit{textbf{Service2}}} & multicolumn{3}{c}
{textit{textbf{Service3}}} & multicolumn{3}{c}
{textit{textbf{Service4}}} \ hline
rowcolor[HTML]{EFEFEF}
textit{} & textit{True} & textit{False} & textit{Accuracy} &
textit{True} & textit{False} & textit{Accuracy} & textit{True} &
textit{False} & textit{Accuracy} & textit{True} & textit{False} &
textit{Accuracy} \ hline
textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
& n & n% \ hline
begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
n% & n & n & n% & n & n & n% & n & n & n% \ hline
end{tabular}%
}
end{table}









share|improve this question
















I have reviewed quite a few posts on here, yet everything seems to be breaking my table, so I figured I'd just post my probem and ask for help. I generated a table using https://www.tablesgenerator.com



I am having issues fitting my table to the width of the page without shrinking the text:



documentclass[acmsmall]{acmart}
usepackage{graphicx}
usepackage[table,xcdraw]{xcolor}
begin{table}
resizebox{textwidth}{!}{%
begin{tabular}{lcccccccccccc}
hline
rowcolor[HTML]{EFEFEF}
multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
textit{textbf{Hashtag}} & multicolumn{3}{c}
{textit{textbf{Service1}}} & multicolumn{3}{c}
{textit{textbf{Service2}}} & multicolumn{3}{c}
{textit{textbf{Service3}}} & multicolumn{3}{c}
{textit{textbf{Service4}}} \ hline
rowcolor[HTML]{EFEFEF}
textit{} & textit{True} & textit{False} & textit{Accuracy} &
textit{True} & textit{False} & textit{Accuracy} & textit{True} &
textit{False} & textit{Accuracy} & textit{True} & textit{False} &
textit{Accuracy} \ hline
textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
& n & n% \ hline
begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
n% & n & n & n% & n & n & n% & n & n & n% \ hline
end{tabular}%
}
end{table}






tables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 13 at 22:21







cranbarrier

















asked Mar 13 at 22:13









cranbarriercranbarrier

62




62













  • Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 13 at 22:14



















  • Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 13 at 22:14

















Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

– samcarter
Mar 13 at 22:14





Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

– samcarter
Mar 13 at 22:14










2 Answers
2






active

oldest

votes


















3














Here are two more possible solutions using a smaller tabcolsep or abbreviated column headers:



enter image description here



documentclass[acmsmall]{acmart}
usepackage{graphicx}
usepackage{colortbl}

begin{document}

begin{table}
setlength{tabcolsep}{4pt}
begin{tabular}{lcccccccccccc}
hline
rowcolor[HTML]{EFEFEF}
multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
textit{textbf{Hashtag}} & multicolumn{3}{c}
{textit{textbf{Service1}}} & multicolumn{3}{c}
{textit{textbf{Service2}}} & multicolumn{3}{c}
{textit{textbf{Service3}}} & multicolumn{3}{c}
{textit{textbf{Service4}}} \ hline
rowcolor[HTML]{EFEFEF}
textit{} & textit{True} & textit{False} & textit{Acc.} &
textit{True} & textit{False} & textit{Acc.} & textit{True} &
textit{False} & textit{Accuracy} & textit{True} & textit{False} &
textit{Acc.} \ hline
textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
& n & n% \ hline
#5 &&&&&&&&&&&&\
#6, & n & n &
n% & n & n & n% & n & n & n% & n & n & n% \
#7 &&&&&&&&&&&&\
hline
end{tabular}
end{table}


begin{table}
begin{tabular}{lcccccccccccc}
hline
rowcolor[HTML]{EFEFEF}
multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
textit{textbf{Hashtag}} & multicolumn{3}{c}
{textit{textbf{Service1}}} & multicolumn{3}{c}
{textit{textbf{Service2}}} & multicolumn{3}{c}
{textit{textbf{Service3}}} & multicolumn{3}{c}
{textit{textbf{Service4}}} \ hline
rowcolor[HTML]{EFEFEF}
textit{} & textit{T} & textit{F} & textit{Acc.} &
textit{T} & textit{F} & textit{Acc.} & textit{T} &
textit{F} & textit{Acc.} & textit{T} & textit{F} &
textit{Acc.} \ hline
textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
n & n% \ hline
rowcolor[HTML]{EFEFEF}
textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
& n & n% \ hline
begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
n% & n & n & n% & n & n & n% & n & n & n% \ hline
multicolumn{13}{l}{T: True, F: False, Acc.: Accuracy}
end{tabular}%
end{table}

end{document}





share|improve this answer































    2














    The table has too many columns to fit in the available text width at its normal size, but instead of using resizebox you could manually select a smaller font size, e.g. small, this will give you more appropriate letter shapes for the font size.



    In addition you could safe some space by abbreviating some of the long words in the header.



    PassOptionsToPackage{table,xcdraw}{xcolor}
    PassOptionsToPackage{showframe}{geometry}
    documentclass[acmsmall]{acmart}
    usepackage{graphicx}


    % usepackage[table,xcdraw]{xcolor}

    begin{document}

    begin{table}
    % resizebox{textwidth}{!}{%
    small
    begin{tabular}{lcccccccccccc}
    hline
    rowcolor[HTML]{EFEFEF}
    multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
    textit{textbf{Hashtag}} & multicolumn{3}{c}
    {textit{textbf{Service1}}} & multicolumn{3}{c}
    {textit{textbf{Service2}}} & multicolumn{3}{c}
    {textit{textbf{Service3}}} & multicolumn{3}{c}
    {textit{textbf{Service4}}} \ hline
    rowcolor[HTML]{EFEFEF}
    textit{} & textit{True} & textit{False} & textit{Acc.} &
    textit{True} & textit{False} & textit{Acc.} & textit{True} &
    textit{False} & textit{Accuracy} & textit{True} & textit{False} &
    textit{Acc.} \ hline
    textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
    n & n% \ hline
    rowcolor[HTML]{EFEFEF}
    textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
    n & n% \ hline
    textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
    n & n% \ hline
    rowcolor[HTML]{EFEFEF}
    textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
    & n & n% \ hline
    #5 &&&&&&&&&&&&\
    #6, & n & n &
    n% & n & n & n% & n & n & n% & n & n & n% \
    #7 &&&&&&&&&&&&\
    hline
    end{tabular}%
    % }
    end{table}

    end{document}





    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%2f479368%2fissues-fitting-generated-table-to-width%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      Here are two more possible solutions using a smaller tabcolsep or abbreviated column headers:



      enter image description here



      documentclass[acmsmall]{acmart}
      usepackage{graphicx}
      usepackage{colortbl}

      begin{document}

      begin{table}
      setlength{tabcolsep}{4pt}
      begin{tabular}{lcccccccccccc}
      hline
      rowcolor[HTML]{EFEFEF}
      multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
      textit{textbf{Hashtag}} & multicolumn{3}{c}
      {textit{textbf{Service1}}} & multicolumn{3}{c}
      {textit{textbf{Service2}}} & multicolumn{3}{c}
      {textit{textbf{Service3}}} & multicolumn{3}{c}
      {textit{textbf{Service4}}} \ hline
      rowcolor[HTML]{EFEFEF}
      textit{} & textit{True} & textit{False} & textit{Acc.} &
      textit{True} & textit{False} & textit{Acc.} & textit{True} &
      textit{False} & textit{Accuracy} & textit{True} & textit{False} &
      textit{Acc.} \ hline
      textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
      n & n% \ hline
      rowcolor[HTML]{EFEFEF}
      textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
      n & n% \ hline
      textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
      n & n% \ hline
      rowcolor[HTML]{EFEFEF}
      textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
      & n & n% \ hline
      #5 &&&&&&&&&&&&\
      #6, & n & n &
      n% & n & n & n% & n & n & n% & n & n & n% \
      #7 &&&&&&&&&&&&\
      hline
      end{tabular}
      end{table}


      begin{table}
      begin{tabular}{lcccccccccccc}
      hline
      rowcolor[HTML]{EFEFEF}
      multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
      textit{textbf{Hashtag}} & multicolumn{3}{c}
      {textit{textbf{Service1}}} & multicolumn{3}{c}
      {textit{textbf{Service2}}} & multicolumn{3}{c}
      {textit{textbf{Service3}}} & multicolumn{3}{c}
      {textit{textbf{Service4}}} \ hline
      rowcolor[HTML]{EFEFEF}
      textit{} & textit{T} & textit{F} & textit{Acc.} &
      textit{T} & textit{F} & textit{Acc.} & textit{T} &
      textit{F} & textit{Acc.} & textit{T} & textit{F} &
      textit{Acc.} \ hline
      textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
      n & n% \ hline
      rowcolor[HTML]{EFEFEF}
      textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
      n & n% \ hline
      textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
      n & n% \ hline
      rowcolor[HTML]{EFEFEF}
      textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
      & n & n% \ hline
      begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
      n% & n & n & n% & n & n & n% & n & n & n% \ hline
      multicolumn{13}{l}{T: True, F: False, Acc.: Accuracy}
      end{tabular}%
      end{table}

      end{document}





      share|improve this answer




























        3














        Here are two more possible solutions using a smaller tabcolsep or abbreviated column headers:



        enter image description here



        documentclass[acmsmall]{acmart}
        usepackage{graphicx}
        usepackage{colortbl}

        begin{document}

        begin{table}
        setlength{tabcolsep}{4pt}
        begin{tabular}{lcccccccccccc}
        hline
        rowcolor[HTML]{EFEFEF}
        multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
        textit{textbf{Hashtag}} & multicolumn{3}{c}
        {textit{textbf{Service1}}} & multicolumn{3}{c}
        {textit{textbf{Service2}}} & multicolumn{3}{c}
        {textit{textbf{Service3}}} & multicolumn{3}{c}
        {textit{textbf{Service4}}} \ hline
        rowcolor[HTML]{EFEFEF}
        textit{} & textit{True} & textit{False} & textit{Acc.} &
        textit{True} & textit{False} & textit{Acc.} & textit{True} &
        textit{False} & textit{Accuracy} & textit{True} & textit{False} &
        textit{Acc.} \ hline
        textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
        n & n% \ hline
        rowcolor[HTML]{EFEFEF}
        textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
        n & n% \ hline
        textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
        n & n% \ hline
        rowcolor[HTML]{EFEFEF}
        textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
        & n & n% \ hline
        #5 &&&&&&&&&&&&\
        #6, & n & n &
        n% & n & n & n% & n & n & n% & n & n & n% \
        #7 &&&&&&&&&&&&\
        hline
        end{tabular}
        end{table}


        begin{table}
        begin{tabular}{lcccccccccccc}
        hline
        rowcolor[HTML]{EFEFEF}
        multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
        textit{textbf{Hashtag}} & multicolumn{3}{c}
        {textit{textbf{Service1}}} & multicolumn{3}{c}
        {textit{textbf{Service2}}} & multicolumn{3}{c}
        {textit{textbf{Service3}}} & multicolumn{3}{c}
        {textit{textbf{Service4}}} \ hline
        rowcolor[HTML]{EFEFEF}
        textit{} & textit{T} & textit{F} & textit{Acc.} &
        textit{T} & textit{F} & textit{Acc.} & textit{T} &
        textit{F} & textit{Acc.} & textit{T} & textit{F} &
        textit{Acc.} \ hline
        textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
        n & n% \ hline
        rowcolor[HTML]{EFEFEF}
        textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
        n & n% \ hline
        textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
        n & n% \ hline
        rowcolor[HTML]{EFEFEF}
        textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
        & n & n% \ hline
        begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
        n% & n & n & n% & n & n & n% & n & n & n% \ hline
        multicolumn{13}{l}{T: True, F: False, Acc.: Accuracy}
        end{tabular}%
        end{table}

        end{document}





        share|improve this answer


























          3












          3








          3







          Here are two more possible solutions using a smaller tabcolsep or abbreviated column headers:



          enter image description here



          documentclass[acmsmall]{acmart}
          usepackage{graphicx}
          usepackage{colortbl}

          begin{document}

          begin{table}
          setlength{tabcolsep}{4pt}
          begin{tabular}{lcccccccccccc}
          hline
          rowcolor[HTML]{EFEFEF}
          multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
          textit{textbf{Hashtag}} & multicolumn{3}{c}
          {textit{textbf{Service1}}} & multicolumn{3}{c}
          {textit{textbf{Service2}}} & multicolumn{3}{c}
          {textit{textbf{Service3}}} & multicolumn{3}{c}
          {textit{textbf{Service4}}} \ hline
          rowcolor[HTML]{EFEFEF}
          textit{} & textit{True} & textit{False} & textit{Acc.} &
          textit{True} & textit{False} & textit{Acc.} & textit{True} &
          textit{False} & textit{Accuracy} & textit{True} & textit{False} &
          textit{Acc.} \ hline
          textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
          & n & n% \ hline
          #5 &&&&&&&&&&&&\
          #6, & n & n &
          n% & n & n & n% & n & n & n% & n & n & n% \
          #7 &&&&&&&&&&&&\
          hline
          end{tabular}
          end{table}


          begin{table}
          begin{tabular}{lcccccccccccc}
          hline
          rowcolor[HTML]{EFEFEF}
          multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
          textit{textbf{Hashtag}} & multicolumn{3}{c}
          {textit{textbf{Service1}}} & multicolumn{3}{c}
          {textit{textbf{Service2}}} & multicolumn{3}{c}
          {textit{textbf{Service3}}} & multicolumn{3}{c}
          {textit{textbf{Service4}}} \ hline
          rowcolor[HTML]{EFEFEF}
          textit{} & textit{T} & textit{F} & textit{Acc.} &
          textit{T} & textit{F} & textit{Acc.} & textit{T} &
          textit{F} & textit{Acc.} & textit{T} & textit{F} &
          textit{Acc.} \ hline
          textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
          & n & n% \ hline
          begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
          n% & n & n & n% & n & n & n% & n & n & n% \ hline
          multicolumn{13}{l}{T: True, F: False, Acc.: Accuracy}
          end{tabular}%
          end{table}

          end{document}





          share|improve this answer













          Here are two more possible solutions using a smaller tabcolsep or abbreviated column headers:



          enter image description here



          documentclass[acmsmall]{acmart}
          usepackage{graphicx}
          usepackage{colortbl}

          begin{document}

          begin{table}
          setlength{tabcolsep}{4pt}
          begin{tabular}{lcccccccccccc}
          hline
          rowcolor[HTML]{EFEFEF}
          multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
          textit{textbf{Hashtag}} & multicolumn{3}{c}
          {textit{textbf{Service1}}} & multicolumn{3}{c}
          {textit{textbf{Service2}}} & multicolumn{3}{c}
          {textit{textbf{Service3}}} & multicolumn{3}{c}
          {textit{textbf{Service4}}} \ hline
          rowcolor[HTML]{EFEFEF}
          textit{} & textit{True} & textit{False} & textit{Acc.} &
          textit{True} & textit{False} & textit{Acc.} & textit{True} &
          textit{False} & textit{Accuracy} & textit{True} & textit{False} &
          textit{Acc.} \ hline
          textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
          & n & n% \ hline
          #5 &&&&&&&&&&&&\
          #6, & n & n &
          n% & n & n & n% & n & n & n% & n & n & n% \
          #7 &&&&&&&&&&&&\
          hline
          end{tabular}
          end{table}


          begin{table}
          begin{tabular}{lcccccccccccc}
          hline
          rowcolor[HTML]{EFEFEF}
          multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
          textit{textbf{Hashtag}} & multicolumn{3}{c}
          {textit{textbf{Service1}}} & multicolumn{3}{c}
          {textit{textbf{Service2}}} & multicolumn{3}{c}
          {textit{textbf{Service3}}} & multicolumn{3}{c}
          {textit{textbf{Service4}}} \ hline
          rowcolor[HTML]{EFEFEF}
          textit{} & textit{T} & textit{F} & textit{Acc.} &
          textit{T} & textit{F} & textit{Acc.} & textit{T} &
          textit{F} & textit{Acc.} & textit{T} & textit{F} &
          textit{Acc.} \ hline
          textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
          n & n% \ hline
          rowcolor[HTML]{EFEFEF}
          textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
          & n & n% \ hline
          begin{tabular}[c]{@{}l@{}}#5, \ #6, \ #7end{tabular} & n & n &
          n% & n & n & n% & n & n & n% & n & n & n% \ hline
          multicolumn{13}{l}{T: True, F: False, Acc.: Accuracy}
          end{tabular}%
          end{table}

          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 13 at 22:48









          leandriisleandriis

          10.5k1732




          10.5k1732























              2














              The table has too many columns to fit in the available text width at its normal size, but instead of using resizebox you could manually select a smaller font size, e.g. small, this will give you more appropriate letter shapes for the font size.



              In addition you could safe some space by abbreviating some of the long words in the header.



              PassOptionsToPackage{table,xcdraw}{xcolor}
              PassOptionsToPackage{showframe}{geometry}
              documentclass[acmsmall]{acmart}
              usepackage{graphicx}


              % usepackage[table,xcdraw]{xcolor}

              begin{document}

              begin{table}
              % resizebox{textwidth}{!}{%
              small
              begin{tabular}{lcccccccccccc}
              hline
              rowcolor[HTML]{EFEFEF}
              multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
              textit{textbf{Hashtag}} & multicolumn{3}{c}
              {textit{textbf{Service1}}} & multicolumn{3}{c}
              {textit{textbf{Service2}}} & multicolumn{3}{c}
              {textit{textbf{Service3}}} & multicolumn{3}{c}
              {textit{textbf{Service4}}} \ hline
              rowcolor[HTML]{EFEFEF}
              textit{} & textit{True} & textit{False} & textit{Acc.} &
              textit{True} & textit{False} & textit{Acc.} & textit{True} &
              textit{False} & textit{Accuracy} & textit{True} & textit{False} &
              textit{Acc.} \ hline
              textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
              n & n% \ hline
              rowcolor[HTML]{EFEFEF}
              textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
              n & n% \ hline
              textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
              n & n% \ hline
              rowcolor[HTML]{EFEFEF}
              textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
              & n & n% \ hline
              #5 &&&&&&&&&&&&\
              #6, & n & n &
              n% & n & n & n% & n & n & n% & n & n & n% \
              #7 &&&&&&&&&&&&\
              hline
              end{tabular}%
              % }
              end{table}

              end{document}





              share|improve this answer




























                2














                The table has too many columns to fit in the available text width at its normal size, but instead of using resizebox you could manually select a smaller font size, e.g. small, this will give you more appropriate letter shapes for the font size.



                In addition you could safe some space by abbreviating some of the long words in the header.



                PassOptionsToPackage{table,xcdraw}{xcolor}
                PassOptionsToPackage{showframe}{geometry}
                documentclass[acmsmall]{acmart}
                usepackage{graphicx}


                % usepackage[table,xcdraw]{xcolor}

                begin{document}

                begin{table}
                % resizebox{textwidth}{!}{%
                small
                begin{tabular}{lcccccccccccc}
                hline
                rowcolor[HTML]{EFEFEF}
                multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
                textit{textbf{Hashtag}} & multicolumn{3}{c}
                {textit{textbf{Service1}}} & multicolumn{3}{c}
                {textit{textbf{Service2}}} & multicolumn{3}{c}
                {textit{textbf{Service3}}} & multicolumn{3}{c}
                {textit{textbf{Service4}}} \ hline
                rowcolor[HTML]{EFEFEF}
                textit{} & textit{True} & textit{False} & textit{Acc.} &
                textit{True} & textit{False} & textit{Acc.} & textit{True} &
                textit{False} & textit{Accuracy} & textit{True} & textit{False} &
                textit{Acc.} \ hline
                textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
                n & n% \ hline
                rowcolor[HTML]{EFEFEF}
                textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
                n & n% \ hline
                textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
                n & n% \ hline
                rowcolor[HTML]{EFEFEF}
                textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
                & n & n% \ hline
                #5 &&&&&&&&&&&&\
                #6, & n & n &
                n% & n & n & n% & n & n & n% & n & n & n% \
                #7 &&&&&&&&&&&&\
                hline
                end{tabular}%
                % }
                end{table}

                end{document}





                share|improve this answer


























                  2












                  2








                  2







                  The table has too many columns to fit in the available text width at its normal size, but instead of using resizebox you could manually select a smaller font size, e.g. small, this will give you more appropriate letter shapes for the font size.



                  In addition you could safe some space by abbreviating some of the long words in the header.



                  PassOptionsToPackage{table,xcdraw}{xcolor}
                  PassOptionsToPackage{showframe}{geometry}
                  documentclass[acmsmall]{acmart}
                  usepackage{graphicx}


                  % usepackage[table,xcdraw]{xcolor}

                  begin{document}

                  begin{table}
                  % resizebox{textwidth}{!}{%
                  small
                  begin{tabular}{lcccccccccccc}
                  hline
                  rowcolor[HTML]{EFEFEF}
                  multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
                  textit{textbf{Hashtag}} & multicolumn{3}{c}
                  {textit{textbf{Service1}}} & multicolumn{3}{c}
                  {textit{textbf{Service2}}} & multicolumn{3}{c}
                  {textit{textbf{Service3}}} & multicolumn{3}{c}
                  {textit{textbf{Service4}}} \ hline
                  rowcolor[HTML]{EFEFEF}
                  textit{} & textit{True} & textit{False} & textit{Acc.} &
                  textit{True} & textit{False} & textit{Acc.} & textit{True} &
                  textit{False} & textit{Accuracy} & textit{True} & textit{False} &
                  textit{Acc.} \ hline
                  textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
                  n & n% \ hline
                  rowcolor[HTML]{EFEFEF}
                  textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
                  n & n% \ hline
                  textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
                  n & n% \ hline
                  rowcolor[HTML]{EFEFEF}
                  textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
                  & n & n% \ hline
                  #5 &&&&&&&&&&&&\
                  #6, & n & n &
                  n% & n & n & n% & n & n & n% & n & n & n% \
                  #7 &&&&&&&&&&&&\
                  hline
                  end{tabular}%
                  % }
                  end{table}

                  end{document}





                  share|improve this answer













                  The table has too many columns to fit in the available text width at its normal size, but instead of using resizebox you could manually select a smaller font size, e.g. small, this will give you more appropriate letter shapes for the font size.



                  In addition you could safe some space by abbreviating some of the long words in the header.



                  PassOptionsToPackage{table,xcdraw}{xcolor}
                  PassOptionsToPackage{showframe}{geometry}
                  documentclass[acmsmall]{acmart}
                  usepackage{graphicx}


                  % usepackage[table,xcdraw]{xcolor}

                  begin{document}

                  begin{table}
                  % resizebox{textwidth}{!}{%
                  small
                  begin{tabular}{lcccccccccccc}
                  hline
                  rowcolor[HTML]{EFEFEF}
                  multicolumn{13}{c}{cellcolor[HTML]{EFEFEF}textbf{Title}} \ hline
                  textit{textbf{Hashtag}} & multicolumn{3}{c}
                  {textit{textbf{Service1}}} & multicolumn{3}{c}
                  {textit{textbf{Service2}}} & multicolumn{3}{c}
                  {textit{textbf{Service3}}} & multicolumn{3}{c}
                  {textit{textbf{Service4}}} \ hline
                  rowcolor[HTML]{EFEFEF}
                  textit{} & textit{True} & textit{False} & textit{Acc.} &
                  textit{True} & textit{False} & textit{Acc.} & textit{True} &
                  textit{False} & textit{Accuracy} & textit{True} & textit{False} &
                  textit{Acc.} \ hline
                  textit{#1} & n & n & n% & x & x & x & n & n & n% & n &
                  n & n% \ hline
                  rowcolor[HTML]{EFEFEF}
                  textit{#2} & n & n & n% & x & x & x & n & n & n% & n &
                  n & n% \ hline
                  textit{#3} & n & n & n% & x & x & x & n & n & n% & n &
                  n & n% \ hline
                  rowcolor[HTML]{EFEFEF}
                  textit{#4} & n & n & n% & x & x & x & n& 100 & n% & n
                  & n & n% \ hline
                  #5 &&&&&&&&&&&&\
                  #6, & n & n &
                  n% & n & n & n% & n & n & n% & n & n & n% \
                  #7 &&&&&&&&&&&&\
                  hline
                  end{tabular}%
                  % }
                  end{table}

                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 13 at 22:42









                  samcartersamcarter

                  92.6k7105299




                  92.6k7105299






























                      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%2f479368%2fissues-fitting-generated-table-to-width%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

                      How to change which sound is reproduced for terminal bell?

                      Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                      Can I use Tabulator js library in my java Spring + Thymeleaf project?