How to make this table prettier?

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











up vote
3
down vote

favorite












Self-explanatory title. I'm new to LaTeX and this table looks pretty ugly.



documentclass[letterpaper]article
specialpapersize=8.5in,11in
usepackageindentfirst
usepackagemathtools
usepackageamssymb
usepackageamsmath

usepackagegensymb
usepackage[margin=1in]geometry
setlengthparskip1em

begindocument

begintable
centering
begintabular
hline
& $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
& $fracpi2$ \
hline
$sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
$fracsqrt32$ & $1$ \
$cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$ \
$tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ & \
hline
endtabular
endtable

enddocument


Thank you.










share|improve this question







New contributor




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















  • 2




    Welcome to TeX.SE! How about renewcommandarraystretch1.57? I'd also like to encourage you to be a bit more specific, i.e. to tell us what you wish to achieve. Otherwise there is a danger that this question could be closed as "primarly opinion based".
    – marmot
    8 hours ago







  • 1




    The booktabs package (and documentation) has some strongly held opinions about making tables pretty. #1 is no vertical lines. But I do agree with marmot that it's not clear what you want to achieve.
    – Teepeemm
    8 hours ago










  • That helps! Thank you, @marmot.
    – Ilyankor
    7 hours ago














up vote
3
down vote

favorite












Self-explanatory title. I'm new to LaTeX and this table looks pretty ugly.



documentclass[letterpaper]article
specialpapersize=8.5in,11in
usepackageindentfirst
usepackagemathtools
usepackageamssymb
usepackageamsmath

usepackagegensymb
usepackage[margin=1in]geometry
setlengthparskip1em

begindocument

begintable
centering
begintabular
hline
& $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
& $fracpi2$ \
hline
$sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
$fracsqrt32$ & $1$ \
$cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$ \
$tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ & \
hline
endtabular
endtable

enddocument


Thank you.










share|improve this question







New contributor




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















  • 2




    Welcome to TeX.SE! How about renewcommandarraystretch1.57? I'd also like to encourage you to be a bit more specific, i.e. to tell us what you wish to achieve. Otherwise there is a danger that this question could be closed as "primarly opinion based".
    – marmot
    8 hours ago







  • 1




    The booktabs package (and documentation) has some strongly held opinions about making tables pretty. #1 is no vertical lines. But I do agree with marmot that it's not clear what you want to achieve.
    – Teepeemm
    8 hours ago










  • That helps! Thank you, @marmot.
    – Ilyankor
    7 hours ago












up vote
3
down vote

favorite









up vote
3
down vote

favorite











Self-explanatory title. I'm new to LaTeX and this table looks pretty ugly.



documentclass[letterpaper]article
specialpapersize=8.5in,11in
usepackageindentfirst
usepackagemathtools
usepackageamssymb
usepackageamsmath

usepackagegensymb
usepackage[margin=1in]geometry
setlengthparskip1em

begindocument

begintable
centering
begintabular
hline
& $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
& $fracpi2$ \
hline
$sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
$fracsqrt32$ & $1$ \
$cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$ \
$tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ & \
hline
endtabular
endtable

enddocument


Thank you.










share|improve this question







New contributor




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











Self-explanatory title. I'm new to LaTeX and this table looks pretty ugly.



documentclass[letterpaper]article
specialpapersize=8.5in,11in
usepackageindentfirst
usepackagemathtools
usepackageamssymb
usepackageamsmath

usepackagegensymb
usepackage[margin=1in]geometry
setlengthparskip1em

begindocument

begintable
centering
begintabular
hline
& $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
& $fracpi2$ \
hline
$sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
$fracsqrt32$ & $1$ \
$cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$ \
$tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ & \
hline
endtabular
endtable

enddocument


Thank you.







tables






share|improve this question







New contributor




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











share|improve this question







New contributor




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









share|improve this question




share|improve this question






New contributor




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









asked 8 hours ago









Ilyankor

212




212




New contributor




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





New contributor





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






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







  • 2




    Welcome to TeX.SE! How about renewcommandarraystretch1.57? I'd also like to encourage you to be a bit more specific, i.e. to tell us what you wish to achieve. Otherwise there is a danger that this question could be closed as "primarly opinion based".
    – marmot
    8 hours ago







  • 1




    The booktabs package (and documentation) has some strongly held opinions about making tables pretty. #1 is no vertical lines. But I do agree with marmot that it's not clear what you want to achieve.
    – Teepeemm
    8 hours ago










  • That helps! Thank you, @marmot.
    – Ilyankor
    7 hours ago












  • 2




    Welcome to TeX.SE! How about renewcommandarraystretch1.57? I'd also like to encourage you to be a bit more specific, i.e. to tell us what you wish to achieve. Otherwise there is a danger that this question could be closed as "primarly opinion based".
    – marmot
    8 hours ago







  • 1




    The booktabs package (and documentation) has some strongly held opinions about making tables pretty. #1 is no vertical lines. But I do agree with marmot that it's not clear what you want to achieve.
    – Teepeemm
    8 hours ago










  • That helps! Thank you, @marmot.
    – Ilyankor
    7 hours ago







2




2




Welcome to TeX.SE! How about renewcommandarraystretch1.57? I'd also like to encourage you to be a bit more specific, i.e. to tell us what you wish to achieve. Otherwise there is a danger that this question could be closed as "primarly opinion based".
– marmot
8 hours ago





Welcome to TeX.SE! How about renewcommandarraystretch1.57? I'd also like to encourage you to be a bit more specific, i.e. to tell us what you wish to achieve. Otherwise there is a danger that this question could be closed as "primarly opinion based".
– marmot
8 hours ago





1




1




The booktabs package (and documentation) has some strongly held opinions about making tables pretty. #1 is no vertical lines. But I do agree with marmot that it's not clear what you want to achieve.
– Teepeemm
8 hours ago




The booktabs package (and documentation) has some strongly held opinions about making tables pretty. #1 is no vertical lines. But I do agree with marmot that it's not clear what you want to achieve.
– Teepeemm
8 hours ago












That helps! Thank you, @marmot.
– Ilyankor
7 hours ago




That helps! Thank you, @marmot.
– Ilyankor
7 hours ago










4 Answers
4






active

oldest

votes

















up vote
3
down vote













enter image description here



  1. Use toprule and bottomrule from booktabs at the beginning and end of your table

  2. Remove rules among columns and rows except the first one

  3. Use tabularx with type X column instead of tabular (it is better since you force columns with similar contents to be of equal size, at least in my opinion)

  4. Stretch your array renewcommandarraystretch1.5

  5. Use 'tab' to indent nested contents (this is to make debugging and revisions easier)

Code



documentclass[letterpaper]article
specialpapersize=8.5in,11in
usepackageindentfirst
usepackagemathtools
usepackageamssymb
usepackageamsmath
setlengthparskip1em
usepackagegensymb
usepackage[margin=1in]geometry

usepackageragged2e
usepackagetabularx
newcolumntypeC > arraybackslash Centering X
usepackagebooktabs

renewcommandarraystretch1.5
setlengthparskip1em

begindocument

begintable

centering

begintabularx0.35textwidthc
toprule
& $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
& $fracpi2$
\
hline
$sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
$fracsqrt32$ & $1$
\
$cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$
\
$tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ &
\
bottomrule
endtabularx

endtable

enddocument





share|improve this answer



























    up vote
    3
    down vote













    my primary concern is to simplify your code. other is opinion based ...



    • instead tabular i would use array and than remove all $ in table code

    • for more vertical space i would employ the makecell package, i.e. use its macro gapedcells:


    • note: mathtools load amsmath, so there is no need to load it again (loading packages more than once is not always innocuous...)



      documentclass[letterpaper]article
      usepackage[margin=1in]geometry
      usepackageindentfirst
      usepackagemathtools
      usepackageamssymb
      %usepackagegensymb % <--- do you really need?
      usepackagemakecell % <--- new

      setlengthparskip1em

      begindocument

      [setcellgapes3pt
      makegapedcells
      beginarrayc
      & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
      hline
      sin x & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
      cos x & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
      tan x & 0 & fracsqrt33 & 1 & sqrt3 & infty \
      endarray
      ]

      enddocument


    enter image description here






    share|improve this answer



























      up vote
      3
      down vote













      I'd keep it as simple as possible.



      documentclassarticle
      usepackageamsmath
      usepackagemathtools
      usepackageamssymb

      usepackagebooktabs
      usepackagearray
      usepackagecaption % optional

      begindocument

      begintable

      centering

      captionTable of trigonometric functions for common angles

      $
      setlengtharraycolsep12pt % for this particular table
      beginarray@ l *5>displaystylec @
      toprule
      & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
      midrule
      sin x
      & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
      addlinespace
      cos x
      & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
      addlinespace
      tan x
      & 0 & fracsqrt33 & 1 & sqrt3 & \
      bottomrule
      endarray
      $

      endtable

      enddocument


      I use array to simplify the input (no $ necessary except around the array). With addlinespace we can easily separate the lines. With a larger value of arraycolsep we better separate the columns for ease of reading in this particular case.



      enter image description here






      share|improve this answer



























        up vote
        2
        down vote













        A workaround in tabu, an extension of tabularx; the most important thing to better presentations for fractions in math is to preserve the size of the numbers for this reason you must use dfrac instead frac; in the MWE some colors and rules modifications with tabu.



        RESULT:
        enter image description here



        MWE:



        % arara: pdflatex: synctex: yes, action: nonstopmode
        documentclass[letterpaper]article
        specialpapersize=8.5in,11in
        usepackageindentfirst
        usepackagemathtools
        usepackageamssymb
        usepackageamsmath
        usepackagegensymb
        usepackage[margin=1in]geometry
        setlengthparskip1em
        usepackage[table]xcolor
        usepackagetabularx
        usepackagelongtable
        usepackagetabu


        begindocument

        begintable[!h]
        centering
        tabulinesep=5pt
        tabulinestyle1pt,blue
        begintabu to 0.5linewidth [0.75pt]X[c]
        rowfontleavevmodecolorwhite
        multicolumn1c
        &cellcolorblue!30$0$
        &cellcolorblue!40$dfracpi6$
        &cellcolorblue!50$dfracpi4$
        &cellcolorblue!60$dfracpi6$
        &multicolumn1ccellcolorblue!70$dfracpi2$
        \ tabucline -

        %row2
        $sin x$
        &$0$
        &$dfrac12$
        &$dfracsqrt22$
        &$dfracsqrt32$
        &$1$
        \[-0.5pt] tabucline [0.5pt on 3pt blue] -

        %row3
        $cos x$
        &$1$
        &$dfracsqrt32$
        &$dfracsqrt22$
        &$dfrac12$
        &$0$
        \[-0.5pt] tabucline [0.5pt on 3pt blue] -

        %row4
        $tan x$
        & $0$
        & $dfracsqrt33$
        & $1$
        & $sqrt3$
        &
        \ tabucline -

        endtabu
        endtable

        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
          );



          );






          Ilyankor is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452537%2fhow-to-make-this-table-prettier%23new-answer', 'question_page');

          );

          Post as a guest






























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          enter image description here



          1. Use toprule and bottomrule from booktabs at the beginning and end of your table

          2. Remove rules among columns and rows except the first one

          3. Use tabularx with type X column instead of tabular (it is better since you force columns with similar contents to be of equal size, at least in my opinion)

          4. Stretch your array renewcommandarraystretch1.5

          5. Use 'tab' to indent nested contents (this is to make debugging and revisions easier)

          Code



          documentclass[letterpaper]article
          specialpapersize=8.5in,11in
          usepackageindentfirst
          usepackagemathtools
          usepackageamssymb
          usepackageamsmath
          setlengthparskip1em
          usepackagegensymb
          usepackage[margin=1in]geometry

          usepackageragged2e
          usepackagetabularx
          newcolumntypeC > arraybackslash Centering X
          usepackagebooktabs

          renewcommandarraystretch1.5
          setlengthparskip1em

          begindocument

          begintable

          centering

          begintabularx0.35textwidthc
          toprule
          & $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
          & $fracpi2$
          \
          hline
          $sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
          $fracsqrt32$ & $1$
          \
          $cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$
          \
          $tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ &
          \
          bottomrule
          endtabularx

          endtable

          enddocument





          share|improve this answer
























            up vote
            3
            down vote













            enter image description here



            1. Use toprule and bottomrule from booktabs at the beginning and end of your table

            2. Remove rules among columns and rows except the first one

            3. Use tabularx with type X column instead of tabular (it is better since you force columns with similar contents to be of equal size, at least in my opinion)

            4. Stretch your array renewcommandarraystretch1.5

            5. Use 'tab' to indent nested contents (this is to make debugging and revisions easier)

            Code



            documentclass[letterpaper]article
            specialpapersize=8.5in,11in
            usepackageindentfirst
            usepackagemathtools
            usepackageamssymb
            usepackageamsmath
            setlengthparskip1em
            usepackagegensymb
            usepackage[margin=1in]geometry

            usepackageragged2e
            usepackagetabularx
            newcolumntypeC > arraybackslash Centering X
            usepackagebooktabs

            renewcommandarraystretch1.5
            setlengthparskip1em

            begindocument

            begintable

            centering

            begintabularx0.35textwidthc
            toprule
            & $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
            & $fracpi2$
            \
            hline
            $sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
            $fracsqrt32$ & $1$
            \
            $cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$
            \
            $tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ &
            \
            bottomrule
            endtabularx

            endtable

            enddocument





            share|improve this answer






















              up vote
              3
              down vote










              up vote
              3
              down vote









              enter image description here



              1. Use toprule and bottomrule from booktabs at the beginning and end of your table

              2. Remove rules among columns and rows except the first one

              3. Use tabularx with type X column instead of tabular (it is better since you force columns with similar contents to be of equal size, at least in my opinion)

              4. Stretch your array renewcommandarraystretch1.5

              5. Use 'tab' to indent nested contents (this is to make debugging and revisions easier)

              Code



              documentclass[letterpaper]article
              specialpapersize=8.5in,11in
              usepackageindentfirst
              usepackagemathtools
              usepackageamssymb
              usepackageamsmath
              setlengthparskip1em
              usepackagegensymb
              usepackage[margin=1in]geometry

              usepackageragged2e
              usepackagetabularx
              newcolumntypeC > arraybackslash Centering X
              usepackagebooktabs

              renewcommandarraystretch1.5
              setlengthparskip1em

              begindocument

              begintable

              centering

              begintabularx0.35textwidthc
              toprule
              & $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
              & $fracpi2$
              \
              hline
              $sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
              $fracsqrt32$ & $1$
              \
              $cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$
              \
              $tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ &
              \
              bottomrule
              endtabularx

              endtable

              enddocument





              share|improve this answer












              enter image description here



              1. Use toprule and bottomrule from booktabs at the beginning and end of your table

              2. Remove rules among columns and rows except the first one

              3. Use tabularx with type X column instead of tabular (it is better since you force columns with similar contents to be of equal size, at least in my opinion)

              4. Stretch your array renewcommandarraystretch1.5

              5. Use 'tab' to indent nested contents (this is to make debugging and revisions easier)

              Code



              documentclass[letterpaper]article
              specialpapersize=8.5in,11in
              usepackageindentfirst
              usepackagemathtools
              usepackageamssymb
              usepackageamsmath
              setlengthparskip1em
              usepackagegensymb
              usepackage[margin=1in]geometry

              usepackageragged2e
              usepackagetabularx
              newcolumntypeC > arraybackslash Centering X
              usepackagebooktabs

              renewcommandarraystretch1.5
              setlengthparskip1em

              begindocument

              begintable

              centering

              begintabularx0.35textwidthc
              toprule
              & $0$ & $fracpi6$ & $fracpi4$ & $fracpi6$
              & $fracpi2$
              \
              hline
              $sin x$ & $0$ & $frac12$ & $fracsqrt22$ &
              $fracsqrt32$ & $1$
              \
              $cos x$ & $1$ & $fracsqrt32$ & $fracsqrt22$ & $frac12$ & $0$
              \
              $tan x$ & $0$ & $fracsqrt33$ & $1$ & $sqrt3$ &
              \
              bottomrule
              endtabularx

              endtable

              enddocument






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 7 hours ago









              Al-Motasem Aldaoudeyeh

              1,309211




              1,309211




















                  up vote
                  3
                  down vote













                  my primary concern is to simplify your code. other is opinion based ...



                  • instead tabular i would use array and than remove all $ in table code

                  • for more vertical space i would employ the makecell package, i.e. use its macro gapedcells:


                  • note: mathtools load amsmath, so there is no need to load it again (loading packages more than once is not always innocuous...)



                    documentclass[letterpaper]article
                    usepackage[margin=1in]geometry
                    usepackageindentfirst
                    usepackagemathtools
                    usepackageamssymb
                    %usepackagegensymb % <--- do you really need?
                    usepackagemakecell % <--- new

                    setlengthparskip1em

                    begindocument

                    [setcellgapes3pt
                    makegapedcells
                    beginarrayc
                    & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                    hline
                    sin x & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                    cos x & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                    tan x & 0 & fracsqrt33 & 1 & sqrt3 & infty \
                    endarray
                    ]

                    enddocument


                  enter image description here






                  share|improve this answer
























                    up vote
                    3
                    down vote













                    my primary concern is to simplify your code. other is opinion based ...



                    • instead tabular i would use array and than remove all $ in table code

                    • for more vertical space i would employ the makecell package, i.e. use its macro gapedcells:


                    • note: mathtools load amsmath, so there is no need to load it again (loading packages more than once is not always innocuous...)



                      documentclass[letterpaper]article
                      usepackage[margin=1in]geometry
                      usepackageindentfirst
                      usepackagemathtools
                      usepackageamssymb
                      %usepackagegensymb % <--- do you really need?
                      usepackagemakecell % <--- new

                      setlengthparskip1em

                      begindocument

                      [setcellgapes3pt
                      makegapedcells
                      beginarrayc
                      & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                      hline
                      sin x & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                      cos x & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                      tan x & 0 & fracsqrt33 & 1 & sqrt3 & infty \
                      endarray
                      ]

                      enddocument


                    enter image description here






                    share|improve this answer






















                      up vote
                      3
                      down vote










                      up vote
                      3
                      down vote









                      my primary concern is to simplify your code. other is opinion based ...



                      • instead tabular i would use array and than remove all $ in table code

                      • for more vertical space i would employ the makecell package, i.e. use its macro gapedcells:


                      • note: mathtools load amsmath, so there is no need to load it again (loading packages more than once is not always innocuous...)



                        documentclass[letterpaper]article
                        usepackage[margin=1in]geometry
                        usepackageindentfirst
                        usepackagemathtools
                        usepackageamssymb
                        %usepackagegensymb % <--- do you really need?
                        usepackagemakecell % <--- new

                        setlengthparskip1em

                        begindocument

                        [setcellgapes3pt
                        makegapedcells
                        beginarrayc
                        & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                        hline
                        sin x & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                        cos x & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                        tan x & 0 & fracsqrt33 & 1 & sqrt3 & infty \
                        endarray
                        ]

                        enddocument


                      enter image description here






                      share|improve this answer












                      my primary concern is to simplify your code. other is opinion based ...



                      • instead tabular i would use array and than remove all $ in table code

                      • for more vertical space i would employ the makecell package, i.e. use its macro gapedcells:


                      • note: mathtools load amsmath, so there is no need to load it again (loading packages more than once is not always innocuous...)



                        documentclass[letterpaper]article
                        usepackage[margin=1in]geometry
                        usepackageindentfirst
                        usepackagemathtools
                        usepackageamssymb
                        %usepackagegensymb % <--- do you really need?
                        usepackagemakecell % <--- new

                        setlengthparskip1em

                        begindocument

                        [setcellgapes3pt
                        makegapedcells
                        beginarrayc
                        & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                        hline
                        sin x & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                        cos x & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                        tan x & 0 & fracsqrt33 & 1 & sqrt3 & infty \
                        endarray
                        ]

                        enddocument


                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered 2 hours ago









                      Zarko

                      113k861150




                      113k861150




















                          up vote
                          3
                          down vote













                          I'd keep it as simple as possible.



                          documentclassarticle
                          usepackageamsmath
                          usepackagemathtools
                          usepackageamssymb

                          usepackagebooktabs
                          usepackagearray
                          usepackagecaption % optional

                          begindocument

                          begintable

                          centering

                          captionTable of trigonometric functions for common angles

                          $
                          setlengtharraycolsep12pt % for this particular table
                          beginarray@ l *5>displaystylec @
                          toprule
                          & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                          midrule
                          sin x
                          & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                          addlinespace
                          cos x
                          & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                          addlinespace
                          tan x
                          & 0 & fracsqrt33 & 1 & sqrt3 & \
                          bottomrule
                          endarray
                          $

                          endtable

                          enddocument


                          I use array to simplify the input (no $ necessary except around the array). With addlinespace we can easily separate the lines. With a larger value of arraycolsep we better separate the columns for ease of reading in this particular case.



                          enter image description here






                          share|improve this answer
























                            up vote
                            3
                            down vote













                            I'd keep it as simple as possible.



                            documentclassarticle
                            usepackageamsmath
                            usepackagemathtools
                            usepackageamssymb

                            usepackagebooktabs
                            usepackagearray
                            usepackagecaption % optional

                            begindocument

                            begintable

                            centering

                            captionTable of trigonometric functions for common angles

                            $
                            setlengtharraycolsep12pt % for this particular table
                            beginarray@ l *5>displaystylec @
                            toprule
                            & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                            midrule
                            sin x
                            & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                            addlinespace
                            cos x
                            & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                            addlinespace
                            tan x
                            & 0 & fracsqrt33 & 1 & sqrt3 & \
                            bottomrule
                            endarray
                            $

                            endtable

                            enddocument


                            I use array to simplify the input (no $ necessary except around the array). With addlinespace we can easily separate the lines. With a larger value of arraycolsep we better separate the columns for ease of reading in this particular case.



                            enter image description here






                            share|improve this answer






















                              up vote
                              3
                              down vote










                              up vote
                              3
                              down vote









                              I'd keep it as simple as possible.



                              documentclassarticle
                              usepackageamsmath
                              usepackagemathtools
                              usepackageamssymb

                              usepackagebooktabs
                              usepackagearray
                              usepackagecaption % optional

                              begindocument

                              begintable

                              centering

                              captionTable of trigonometric functions for common angles

                              $
                              setlengtharraycolsep12pt % for this particular table
                              beginarray@ l *5>displaystylec @
                              toprule
                              & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                              midrule
                              sin x
                              & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                              addlinespace
                              cos x
                              & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                              addlinespace
                              tan x
                              & 0 & fracsqrt33 & 1 & sqrt3 & \
                              bottomrule
                              endarray
                              $

                              endtable

                              enddocument


                              I use array to simplify the input (no $ necessary except around the array). With addlinespace we can easily separate the lines. With a larger value of arraycolsep we better separate the columns for ease of reading in this particular case.



                              enter image description here






                              share|improve this answer












                              I'd keep it as simple as possible.



                              documentclassarticle
                              usepackageamsmath
                              usepackagemathtools
                              usepackageamssymb

                              usepackagebooktabs
                              usepackagearray
                              usepackagecaption % optional

                              begindocument

                              begintable

                              centering

                              captionTable of trigonometric functions for common angles

                              $
                              setlengtharraycolsep12pt % for this particular table
                              beginarray@ l *5>displaystylec @
                              toprule
                              & 0 & fracpi6 & fracpi4 & fracpi6 & fracpi2 \
                              midrule
                              sin x
                              & 0 & frac12 & fracsqrt22 & fracsqrt32 & 1 \
                              addlinespace
                              cos x
                              & 1 & fracsqrt32 & fracsqrt22 & frac12 & 0 \
                              addlinespace
                              tan x
                              & 0 & fracsqrt33 & 1 & sqrt3 & \
                              bottomrule
                              endarray
                              $

                              endtable

                              enddocument


                              I use array to simplify the input (no $ necessary except around the array). With addlinespace we can easily separate the lines. With a larger value of arraycolsep we better separate the columns for ease of reading in this particular case.



                              enter image description here







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered 34 mins ago









                              egreg

                              685k8418253070




                              685k8418253070




















                                  up vote
                                  2
                                  down vote













                                  A workaround in tabu, an extension of tabularx; the most important thing to better presentations for fractions in math is to preserve the size of the numbers for this reason you must use dfrac instead frac; in the MWE some colors and rules modifications with tabu.



                                  RESULT:
                                  enter image description here



                                  MWE:



                                  % arara: pdflatex: synctex: yes, action: nonstopmode
                                  documentclass[letterpaper]article
                                  specialpapersize=8.5in,11in
                                  usepackageindentfirst
                                  usepackagemathtools
                                  usepackageamssymb
                                  usepackageamsmath
                                  usepackagegensymb
                                  usepackage[margin=1in]geometry
                                  setlengthparskip1em
                                  usepackage[table]xcolor
                                  usepackagetabularx
                                  usepackagelongtable
                                  usepackagetabu


                                  begindocument

                                  begintable[!h]
                                  centering
                                  tabulinesep=5pt
                                  tabulinestyle1pt,blue
                                  begintabu to 0.5linewidth [0.75pt]X[c]
                                  rowfontleavevmodecolorwhite
                                  multicolumn1c
                                  &cellcolorblue!30$0$
                                  &cellcolorblue!40$dfracpi6$
                                  &cellcolorblue!50$dfracpi4$
                                  &cellcolorblue!60$dfracpi6$
                                  &multicolumn1ccellcolorblue!70$dfracpi2$
                                  \ tabucline -

                                  %row2
                                  $sin x$
                                  &$0$
                                  &$dfrac12$
                                  &$dfracsqrt22$
                                  &$dfracsqrt32$
                                  &$1$
                                  \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                  %row3
                                  $cos x$
                                  &$1$
                                  &$dfracsqrt32$
                                  &$dfracsqrt22$
                                  &$dfrac12$
                                  &$0$
                                  \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                  %row4
                                  $tan x$
                                  & $0$
                                  & $dfracsqrt33$
                                  & $1$
                                  & $sqrt3$
                                  &
                                  \ tabucline -

                                  endtabu
                                  endtable

                                  enddocument





                                  share|improve this answer
























                                    up vote
                                    2
                                    down vote













                                    A workaround in tabu, an extension of tabularx; the most important thing to better presentations for fractions in math is to preserve the size of the numbers for this reason you must use dfrac instead frac; in the MWE some colors and rules modifications with tabu.



                                    RESULT:
                                    enter image description here



                                    MWE:



                                    % arara: pdflatex: synctex: yes, action: nonstopmode
                                    documentclass[letterpaper]article
                                    specialpapersize=8.5in,11in
                                    usepackageindentfirst
                                    usepackagemathtools
                                    usepackageamssymb
                                    usepackageamsmath
                                    usepackagegensymb
                                    usepackage[margin=1in]geometry
                                    setlengthparskip1em
                                    usepackage[table]xcolor
                                    usepackagetabularx
                                    usepackagelongtable
                                    usepackagetabu


                                    begindocument

                                    begintable[!h]
                                    centering
                                    tabulinesep=5pt
                                    tabulinestyle1pt,blue
                                    begintabu to 0.5linewidth [0.75pt]X[c]
                                    rowfontleavevmodecolorwhite
                                    multicolumn1c
                                    &cellcolorblue!30$0$
                                    &cellcolorblue!40$dfracpi6$
                                    &cellcolorblue!50$dfracpi4$
                                    &cellcolorblue!60$dfracpi6$
                                    &multicolumn1ccellcolorblue!70$dfracpi2$
                                    \ tabucline -

                                    %row2
                                    $sin x$
                                    &$0$
                                    &$dfrac12$
                                    &$dfracsqrt22$
                                    &$dfracsqrt32$
                                    &$1$
                                    \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                    %row3
                                    $cos x$
                                    &$1$
                                    &$dfracsqrt32$
                                    &$dfracsqrt22$
                                    &$dfrac12$
                                    &$0$
                                    \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                    %row4
                                    $tan x$
                                    & $0$
                                    & $dfracsqrt33$
                                    & $1$
                                    & $sqrt3$
                                    &
                                    \ tabucline -

                                    endtabu
                                    endtable

                                    enddocument





                                    share|improve this answer






















                                      up vote
                                      2
                                      down vote










                                      up vote
                                      2
                                      down vote









                                      A workaround in tabu, an extension of tabularx; the most important thing to better presentations for fractions in math is to preserve the size of the numbers for this reason you must use dfrac instead frac; in the MWE some colors and rules modifications with tabu.



                                      RESULT:
                                      enter image description here



                                      MWE:



                                      % arara: pdflatex: synctex: yes, action: nonstopmode
                                      documentclass[letterpaper]article
                                      specialpapersize=8.5in,11in
                                      usepackageindentfirst
                                      usepackagemathtools
                                      usepackageamssymb
                                      usepackageamsmath
                                      usepackagegensymb
                                      usepackage[margin=1in]geometry
                                      setlengthparskip1em
                                      usepackage[table]xcolor
                                      usepackagetabularx
                                      usepackagelongtable
                                      usepackagetabu


                                      begindocument

                                      begintable[!h]
                                      centering
                                      tabulinesep=5pt
                                      tabulinestyle1pt,blue
                                      begintabu to 0.5linewidth [0.75pt]X[c]
                                      rowfontleavevmodecolorwhite
                                      multicolumn1c
                                      &cellcolorblue!30$0$
                                      &cellcolorblue!40$dfracpi6$
                                      &cellcolorblue!50$dfracpi4$
                                      &cellcolorblue!60$dfracpi6$
                                      &multicolumn1ccellcolorblue!70$dfracpi2$
                                      \ tabucline -

                                      %row2
                                      $sin x$
                                      &$0$
                                      &$dfrac12$
                                      &$dfracsqrt22$
                                      &$dfracsqrt32$
                                      &$1$
                                      \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                      %row3
                                      $cos x$
                                      &$1$
                                      &$dfracsqrt32$
                                      &$dfracsqrt22$
                                      &$dfrac12$
                                      &$0$
                                      \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                      %row4
                                      $tan x$
                                      & $0$
                                      & $dfracsqrt33$
                                      & $1$
                                      & $sqrt3$
                                      &
                                      \ tabucline -

                                      endtabu
                                      endtable

                                      enddocument





                                      share|improve this answer












                                      A workaround in tabu, an extension of tabularx; the most important thing to better presentations for fractions in math is to preserve the size of the numbers for this reason you must use dfrac instead frac; in the MWE some colors and rules modifications with tabu.



                                      RESULT:
                                      enter image description here



                                      MWE:



                                      % arara: pdflatex: synctex: yes, action: nonstopmode
                                      documentclass[letterpaper]article
                                      specialpapersize=8.5in,11in
                                      usepackageindentfirst
                                      usepackagemathtools
                                      usepackageamssymb
                                      usepackageamsmath
                                      usepackagegensymb
                                      usepackage[margin=1in]geometry
                                      setlengthparskip1em
                                      usepackage[table]xcolor
                                      usepackagetabularx
                                      usepackagelongtable
                                      usepackagetabu


                                      begindocument

                                      begintable[!h]
                                      centering
                                      tabulinesep=5pt
                                      tabulinestyle1pt,blue
                                      begintabu to 0.5linewidth [0.75pt]X[c]
                                      rowfontleavevmodecolorwhite
                                      multicolumn1c
                                      &cellcolorblue!30$0$
                                      &cellcolorblue!40$dfracpi6$
                                      &cellcolorblue!50$dfracpi4$
                                      &cellcolorblue!60$dfracpi6$
                                      &multicolumn1ccellcolorblue!70$dfracpi2$
                                      \ tabucline -

                                      %row2
                                      $sin x$
                                      &$0$
                                      &$dfrac12$
                                      &$dfracsqrt22$
                                      &$dfracsqrt32$
                                      &$1$
                                      \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                      %row3
                                      $cos x$
                                      &$1$
                                      &$dfracsqrt32$
                                      &$dfracsqrt22$
                                      &$dfrac12$
                                      &$0$
                                      \[-0.5pt] tabucline [0.5pt on 3pt blue] -

                                      %row4
                                      $tan x$
                                      & $0$
                                      & $dfracsqrt33$
                                      & $1$
                                      & $sqrt3$
                                      &
                                      \ tabucline -

                                      endtabu
                                      endtable

                                      enddocument






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 4 hours ago









                                      J Leon V.

                                      6,890528




                                      6,890528




















                                          Ilyankor is a new contributor. Be nice, and check out our Code of Conduct.









                                           

                                          draft saved


                                          draft discarded


















                                          Ilyankor is a new contributor. Be nice, and check out our Code of Conduct.












                                          Ilyankor is a new contributor. Be nice, and check out our Code of Conduct.











                                          Ilyankor is a new contributor. Be nice, and check out our Code of Conduct.













                                           


                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452537%2fhow-to-make-this-table-prettier%23new-answer', 'question_page');

                                          );

                                          Post as a guest













































































                                          Comments

                                          Popular posts from this blog

                                          What does second last employer means? [closed]

                                          List of Gilmore Girls characters

                                          Confectionery