How do I create this table?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
6
down vote

favorite












I want to create this table:



Enter image description here



I started with this, but it doesn't work:



documentclass[11pt,a4paper]article
usepackage[latin1]inputenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackagegraphicx
usepackagegraphicx
usepackagesiunitx
usepackagebooktabs
begindocument
begincenter
begintabularc

hello & hello \

toprule
hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
hello hello hello hello hello & hello hello hello hello \

endtabular
endcenter
enddocument}


Enter image description here



How can I fix this?










share|improve this question



















  • 2




    You cannot use vertical lines with booktabs horizontal rules. So you need to either replace toprule with hline or get rid of the vertical line. However toprule is not the correct choice of rule, it should be midrule but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…
    – Au101
    Aug 26 at 16:46






  • 2




    In terms of the too wide table cell, there are various solutions, the most basic of which would be to use something like p2cm (where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of a c column. With c the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. With p2cm you tell it you want a 2cm wide cell and then the line will break to respect that
    – Au101
    Aug 26 at 16:48






  • 1




    You can use specialruleheavyrulewidth0pt0pt: it will have the same thickness as toprule but no vertical padding. An alternative: load boldline , from the shipunov bundle, which defines horizontal and vertical lines with custom thickness.
    – Bernard
    Aug 26 at 16:53














up vote
6
down vote

favorite












I want to create this table:



Enter image description here



I started with this, but it doesn't work:



documentclass[11pt,a4paper]article
usepackage[latin1]inputenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackagegraphicx
usepackagegraphicx
usepackagesiunitx
usepackagebooktabs
begindocument
begincenter
begintabularc

hello & hello \

toprule
hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
hello hello hello hello hello & hello hello hello hello \

endtabular
endcenter
enddocument}


Enter image description here



How can I fix this?










share|improve this question



















  • 2




    You cannot use vertical lines with booktabs horizontal rules. So you need to either replace toprule with hline or get rid of the vertical line. However toprule is not the correct choice of rule, it should be midrule but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…
    – Au101
    Aug 26 at 16:46






  • 2




    In terms of the too wide table cell, there are various solutions, the most basic of which would be to use something like p2cm (where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of a c column. With c the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. With p2cm you tell it you want a 2cm wide cell and then the line will break to respect that
    – Au101
    Aug 26 at 16:48






  • 1




    You can use specialruleheavyrulewidth0pt0pt: it will have the same thickness as toprule but no vertical padding. An alternative: load boldline , from the shipunov bundle, which defines horizontal and vertical lines with custom thickness.
    – Bernard
    Aug 26 at 16:53












up vote
6
down vote

favorite









up vote
6
down vote

favorite











I want to create this table:



Enter image description here



I started with this, but it doesn't work:



documentclass[11pt,a4paper]article
usepackage[latin1]inputenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackagegraphicx
usepackagegraphicx
usepackagesiunitx
usepackagebooktabs
begindocument
begincenter
begintabularc

hello & hello \

toprule
hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
hello hello hello hello hello & hello hello hello hello \

endtabular
endcenter
enddocument}


Enter image description here



How can I fix this?










share|improve this question















I want to create this table:



Enter image description here



I started with this, but it doesn't work:



documentclass[11pt,a4paper]article
usepackage[latin1]inputenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackagegraphicx
usepackagegraphicx
usepackagesiunitx
usepackagebooktabs
begindocument
begincenter
begintabularc

hello & hello \

toprule
hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
hello hello hello hello hello & hello hello hello hello \

endtabular
endcenter
enddocument}


Enter image description here



How can I fix this?







tables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 27 at 4:04









Peter Mortensen

49336




49336










asked Aug 26 at 16:39









Vidal

1166




1166







  • 2




    You cannot use vertical lines with booktabs horizontal rules. So you need to either replace toprule with hline or get rid of the vertical line. However toprule is not the correct choice of rule, it should be midrule but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…
    – Au101
    Aug 26 at 16:46






  • 2




    In terms of the too wide table cell, there are various solutions, the most basic of which would be to use something like p2cm (where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of a c column. With c the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. With p2cm you tell it you want a 2cm wide cell and then the line will break to respect that
    – Au101
    Aug 26 at 16:48






  • 1




    You can use specialruleheavyrulewidth0pt0pt: it will have the same thickness as toprule but no vertical padding. An alternative: load boldline , from the shipunov bundle, which defines horizontal and vertical lines with custom thickness.
    – Bernard
    Aug 26 at 16:53












  • 2




    You cannot use vertical lines with booktabs horizontal rules. So you need to either replace toprule with hline or get rid of the vertical line. However toprule is not the correct choice of rule, it should be midrule but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…
    – Au101
    Aug 26 at 16:46






  • 2




    In terms of the too wide table cell, there are various solutions, the most basic of which would be to use something like p2cm (where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of a c column. With c the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. With p2cm you tell it you want a 2cm wide cell and then the line will break to respect that
    – Au101
    Aug 26 at 16:48






  • 1




    You can use specialruleheavyrulewidth0pt0pt: it will have the same thickness as toprule but no vertical padding. An alternative: load boldline , from the shipunov bundle, which defines horizontal and vertical lines with custom thickness.
    – Bernard
    Aug 26 at 16:53







2




2




You cannot use vertical lines with booktabs horizontal rules. So you need to either replace toprule with hline or get rid of the vertical line. However toprule is not the correct choice of rule, it should be midrule but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…
– Au101
Aug 26 at 16:46




You cannot use vertical lines with booktabs horizontal rules. So you need to either replace toprule with hline or get rid of the vertical line. However toprule is not the correct choice of rule, it should be midrule but I expect what you're really going for is a thicker line, which demands a different solution tex.stackexchange.com/questions/256731/…
– Au101
Aug 26 at 16:46




2




2




In terms of the too wide table cell, there are various solutions, the most basic of which would be to use something like p2cm (where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of a c column. With c the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. With p2cm you tell it you want a 2cm wide cell and then the line will break to respect that
– Au101
Aug 26 at 16:48




In terms of the too wide table cell, there are various solutions, the most basic of which would be to use something like p2cm (where 2cm is a fairly arbitrary length, you will have to select the width that you would like to use) instead of a c column. With c the column will be as wide as its contents, and if that means too wide for the page then unfortunately the table will run off the page, the line won't break, because you haven't told it when to break. With p2cm you tell it you want a 2cm wide cell and then the line will break to respect that
– Au101
Aug 26 at 16:48




1




1




You can use specialruleheavyrulewidth0pt0pt: it will have the same thickness as toprule but no vertical padding. An alternative: load boldline , from the shipunov bundle, which defines horizontal and vertical lines with custom thickness.
– Bernard
Aug 26 at 16:53




You can use specialruleheavyrulewidth0pt0pt: it will have the same thickness as toprule but no vertical padding. An alternative: load boldline , from the shipunov bundle, which defines horizontal and vertical lines with custom thickness.
– Bernard
Aug 26 at 16:53










3 Answers
3






active

oldest

votes

















up vote
4
down vote



accepted










like this:



enter image description here



beside tabularx are used options !<option> and Xhline<width> from the package array (in this case loaded by the package tabularx) and macro makecell from the package of the same name:



documentclass[11pt,a4paper]article
usepackagemakecell, tabularx

begindocument
begincenter
setcellgapes5ptmakegapedcells
begintabularxtextwidthX!vline width 1pt X
makecellhello & makecellhello \
Xhline1pt
hello hello hello hello hello hello hello hello hello hello space infinity
& hello hello hello hello \
hello hello hello hello hello hello hello hello hello hello space infinity
& hello hello hello hello \
endtabularx
endcenter
enddocument





share|improve this answer






















  • perfect! thank you :)
    – Vidal
    Aug 27 at 10:02

















up vote
12
down vote













Don't use booktabs with vertical rules.



And don't load packages twice (you have two usepackagegraphicx).



I have used tabularx, and \[4pt] and rule0pt16pt to add some space before and after the horizontal rule.



documentclass[11pt,a4paper]article
usepackage[latin1]inputenc
usepackagetabularx
begindocument
begincenter
begintabularxtextwidthX
multicolumn1chello &
multicolumn1chello \[4pt]
hline
rule0pt16pthello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
hello hello hello hello hello & hello hello hello hello \
endtabularx
endcenter
enddocument


enter image description here






share|improve this answer



























    up vote
    7
    down vote













    The screenshot that accompanies your query creates the impression that each table column should be just wide enough (but no wider) to typeset three instances of the word "hello", separated by whitespace. If this impression is correct, you should use the p column type for both columns. The p column type takes an argument -- the usable width. In the preamble, be sure to set up a length parameter and measure the width of "hello hello hello" via a settowidth directive.



    Oh, and don't use the booktabs package (and midrule directives) if you employ vertical lines. Instead, use hline.



    enter image description here



    documentclass[11pt,a4paper]article
    usepackagearray % for "extrarowheight" macro
    newlengthmylen
    settowidthmylensffamily hello hello hello % measure width of "hello hello hello"
    begindocument
    begincenter
    sffamily % switch to sans-serif
    setlengthextrarowheight2pt % for a more open "look"
    begintabularpmylen
    multicolumn1chello &
    multicolumn1chello \[2pt]
    hline
    hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
    hello hello hello hello hello & hello hello hello hello \
    endtabular
    endcenter
    enddocument





    share|improve this answer






















      Your Answer







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

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

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      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%2f447812%2fhow-do-i-create-this-table%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      4
      down vote



      accepted










      like this:



      enter image description here



      beside tabularx are used options !<option> and Xhline<width> from the package array (in this case loaded by the package tabularx) and macro makecell from the package of the same name:



      documentclass[11pt,a4paper]article
      usepackagemakecell, tabularx

      begindocument
      begincenter
      setcellgapes5ptmakegapedcells
      begintabularxtextwidthX!vline width 1pt X
      makecellhello & makecellhello \
      Xhline1pt
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      endtabularx
      endcenter
      enddocument





      share|improve this answer






















      • perfect! thank you :)
        – Vidal
        Aug 27 at 10:02














      up vote
      4
      down vote



      accepted










      like this:



      enter image description here



      beside tabularx are used options !<option> and Xhline<width> from the package array (in this case loaded by the package tabularx) and macro makecell from the package of the same name:



      documentclass[11pt,a4paper]article
      usepackagemakecell, tabularx

      begindocument
      begincenter
      setcellgapes5ptmakegapedcells
      begintabularxtextwidthX!vline width 1pt X
      makecellhello & makecellhello \
      Xhline1pt
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      endtabularx
      endcenter
      enddocument





      share|improve this answer






















      • perfect! thank you :)
        – Vidal
        Aug 27 at 10:02












      up vote
      4
      down vote



      accepted







      up vote
      4
      down vote



      accepted






      like this:



      enter image description here



      beside tabularx are used options !<option> and Xhline<width> from the package array (in this case loaded by the package tabularx) and macro makecell from the package of the same name:



      documentclass[11pt,a4paper]article
      usepackagemakecell, tabularx

      begindocument
      begincenter
      setcellgapes5ptmakegapedcells
      begintabularxtextwidthX!vline width 1pt X
      makecellhello & makecellhello \
      Xhline1pt
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      endtabularx
      endcenter
      enddocument





      share|improve this answer














      like this:



      enter image description here



      beside tabularx are used options !<option> and Xhline<width> from the package array (in this case loaded by the package tabularx) and macro makecell from the package of the same name:



      documentclass[11pt,a4paper]article
      usepackagemakecell, tabularx

      begindocument
      begincenter
      setcellgapes5ptmakegapedcells
      begintabularxtextwidthX!vline width 1pt X
      makecellhello & makecellhello \
      Xhline1pt
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      hello hello hello hello hello hello hello hello hello hello space infinity
      & hello hello hello hello \
      endtabularx
      endcenter
      enddocument






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Aug 27 at 11:54

























      answered Aug 26 at 18:46









      Zarko

      113k861150




      113k861150











      • perfect! thank you :)
        – Vidal
        Aug 27 at 10:02
















      • perfect! thank you :)
        – Vidal
        Aug 27 at 10:02















      perfect! thank you :)
      – Vidal
      Aug 27 at 10:02




      perfect! thank you :)
      – Vidal
      Aug 27 at 10:02










      up vote
      12
      down vote













      Don't use booktabs with vertical rules.



      And don't load packages twice (you have two usepackagegraphicx).



      I have used tabularx, and \[4pt] and rule0pt16pt to add some space before and after the horizontal rule.



      documentclass[11pt,a4paper]article
      usepackage[latin1]inputenc
      usepackagetabularx
      begindocument
      begincenter
      begintabularxtextwidthX
      multicolumn1chello &
      multicolumn1chello \[4pt]
      hline
      rule0pt16pthello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
      hello hello hello hello hello & hello hello hello hello \
      endtabularx
      endcenter
      enddocument


      enter image description here






      share|improve this answer
























        up vote
        12
        down vote













        Don't use booktabs with vertical rules.



        And don't load packages twice (you have two usepackagegraphicx).



        I have used tabularx, and \[4pt] and rule0pt16pt to add some space before and after the horizontal rule.



        documentclass[11pt,a4paper]article
        usepackage[latin1]inputenc
        usepackagetabularx
        begindocument
        begincenter
        begintabularxtextwidthX
        multicolumn1chello &
        multicolumn1chello \[4pt]
        hline
        rule0pt16pthello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
        hello hello hello hello hello & hello hello hello hello \
        endtabularx
        endcenter
        enddocument


        enter image description here






        share|improve this answer






















          up vote
          12
          down vote










          up vote
          12
          down vote









          Don't use booktabs with vertical rules.



          And don't load packages twice (you have two usepackagegraphicx).



          I have used tabularx, and \[4pt] and rule0pt16pt to add some space before and after the horizontal rule.



          documentclass[11pt,a4paper]article
          usepackage[latin1]inputenc
          usepackagetabularx
          begindocument
          begincenter
          begintabularxtextwidthX
          multicolumn1chello &
          multicolumn1chello \[4pt]
          hline
          rule0pt16pthello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
          hello hello hello hello hello & hello hello hello hello \
          endtabularx
          endcenter
          enddocument


          enter image description here






          share|improve this answer












          Don't use booktabs with vertical rules.



          And don't load packages twice (you have two usepackagegraphicx).



          I have used tabularx, and \[4pt] and rule0pt16pt to add some space before and after the horizontal rule.



          documentclass[11pt,a4paper]article
          usepackage[latin1]inputenc
          usepackagetabularx
          begindocument
          begincenter
          begintabularxtextwidthX
          multicolumn1chello &
          multicolumn1chello \[4pt]
          hline
          rule0pt16pthello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
          hello hello hello hello hello & hello hello hello hello \
          endtabularx
          endcenter
          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 26 at 16:55









          CarLaTeX

          25.5k443111




          25.5k443111




















              up vote
              7
              down vote













              The screenshot that accompanies your query creates the impression that each table column should be just wide enough (but no wider) to typeset three instances of the word "hello", separated by whitespace. If this impression is correct, you should use the p column type for both columns. The p column type takes an argument -- the usable width. In the preamble, be sure to set up a length parameter and measure the width of "hello hello hello" via a settowidth directive.



              Oh, and don't use the booktabs package (and midrule directives) if you employ vertical lines. Instead, use hline.



              enter image description here



              documentclass[11pt,a4paper]article
              usepackagearray % for "extrarowheight" macro
              newlengthmylen
              settowidthmylensffamily hello hello hello % measure width of "hello hello hello"
              begindocument
              begincenter
              sffamily % switch to sans-serif
              setlengthextrarowheight2pt % for a more open "look"
              begintabularpmylen
              multicolumn1chello &
              multicolumn1chello \[2pt]
              hline
              hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
              hello hello hello hello hello & hello hello hello hello \
              endtabular
              endcenter
              enddocument





              share|improve this answer


























                up vote
                7
                down vote













                The screenshot that accompanies your query creates the impression that each table column should be just wide enough (but no wider) to typeset three instances of the word "hello", separated by whitespace. If this impression is correct, you should use the p column type for both columns. The p column type takes an argument -- the usable width. In the preamble, be sure to set up a length parameter and measure the width of "hello hello hello" via a settowidth directive.



                Oh, and don't use the booktabs package (and midrule directives) if you employ vertical lines. Instead, use hline.



                enter image description here



                documentclass[11pt,a4paper]article
                usepackagearray % for "extrarowheight" macro
                newlengthmylen
                settowidthmylensffamily hello hello hello % measure width of "hello hello hello"
                begindocument
                begincenter
                sffamily % switch to sans-serif
                setlengthextrarowheight2pt % for a more open "look"
                begintabularpmylen
                multicolumn1chello &
                multicolumn1chello \[2pt]
                hline
                hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
                hello hello hello hello hello & hello hello hello hello \
                endtabular
                endcenter
                enddocument





                share|improve this answer
























                  up vote
                  7
                  down vote










                  up vote
                  7
                  down vote









                  The screenshot that accompanies your query creates the impression that each table column should be just wide enough (but no wider) to typeset three instances of the word "hello", separated by whitespace. If this impression is correct, you should use the p column type for both columns. The p column type takes an argument -- the usable width. In the preamble, be sure to set up a length parameter and measure the width of "hello hello hello" via a settowidth directive.



                  Oh, and don't use the booktabs package (and midrule directives) if you employ vertical lines. Instead, use hline.



                  enter image description here



                  documentclass[11pt,a4paper]article
                  usepackagearray % for "extrarowheight" macro
                  newlengthmylen
                  settowidthmylensffamily hello hello hello % measure width of "hello hello hello"
                  begindocument
                  begincenter
                  sffamily % switch to sans-serif
                  setlengthextrarowheight2pt % for a more open "look"
                  begintabularpmylen
                  multicolumn1chello &
                  multicolumn1chello \[2pt]
                  hline
                  hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
                  hello hello hello hello hello & hello hello hello hello \
                  endtabular
                  endcenter
                  enddocument





                  share|improve this answer














                  The screenshot that accompanies your query creates the impression that each table column should be just wide enough (but no wider) to typeset three instances of the word "hello", separated by whitespace. If this impression is correct, you should use the p column type for both columns. The p column type takes an argument -- the usable width. In the preamble, be sure to set up a length parameter and measure the width of "hello hello hello" via a settowidth directive.



                  Oh, and don't use the booktabs package (and midrule directives) if you employ vertical lines. Instead, use hline.



                  enter image description here



                  documentclass[11pt,a4paper]article
                  usepackagearray % for "extrarowheight" macro
                  newlengthmylen
                  settowidthmylensffamily hello hello hello % measure width of "hello hello hello"
                  begindocument
                  begincenter
                  sffamily % switch to sans-serif
                  setlengthextrarowheight2pt % for a more open "look"
                  begintabularpmylen
                  multicolumn1chello &
                  multicolumn1chello \[2pt]
                  hline
                  hello hello hello hello hello hello hello hello hello hello space infinity & hello hello hello hello \
                  hello hello hello hello hello & hello hello hello hello \
                  endtabular
                  endcenter
                  enddocument






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 27 at 13:01

























                  answered Aug 26 at 18:49









                  Mico

                  263k30355731




                  263k30355731



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447812%2fhow-do-i-create-this-table%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?