How to make this table prettier?
Clash 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.
tables
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.
add a comment |Â
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.
tables
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 aboutrenewcommandarraystretch1.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
add a comment |Â
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.
tables
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
tables
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.
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 aboutrenewcommandarraystretch1.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
add a comment |Â
2
Welcome to TeX.SE! How aboutrenewcommandarraystretch1.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
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
3
down vote
- Use
toprule
andbottomrule
frombooktabs
at the beginning and end of your table - Remove rules among columns and rows except the first one
- Use
tabularx
with typeX
column instead oftabular
(it is better since you force columns with similar contents to be of equal size, at least in my opinion) - Stretch your array
renewcommandarraystretch1.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
add a comment |Â
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 macrogapedcells
: note:
mathtools
loadamsmath
, 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
add a comment |Â
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.
add a comment |Â
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:
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
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
- Use
toprule
andbottomrule
frombooktabs
at the beginning and end of your table - Remove rules among columns and rows except the first one
- Use
tabularx
with typeX
column instead oftabular
(it is better since you force columns with similar contents to be of equal size, at least in my opinion) - Stretch your array
renewcommandarraystretch1.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
add a comment |Â
up vote
3
down vote
- Use
toprule
andbottomrule
frombooktabs
at the beginning and end of your table - Remove rules among columns and rows except the first one
- Use
tabularx
with typeX
column instead oftabular
(it is better since you force columns with similar contents to be of equal size, at least in my opinion) - Stretch your array
renewcommandarraystretch1.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
add a comment |Â
up vote
3
down vote
up vote
3
down vote
- Use
toprule
andbottomrule
frombooktabs
at the beginning and end of your table - Remove rules among columns and rows except the first one
- Use
tabularx
with typeX
column instead oftabular
(it is better since you force columns with similar contents to be of equal size, at least in my opinion) - Stretch your array
renewcommandarraystretch1.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
- Use
toprule
andbottomrule
frombooktabs
at the beginning and end of your table - Remove rules among columns and rows except the first one
- Use
tabularx
with typeX
column instead oftabular
(it is better since you force columns with similar contents to be of equal size, at least in my opinion) - Stretch your array
renewcommandarraystretch1.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
answered 7 hours ago
Al-Motasem Aldaoudeyeh
1,309211
1,309211
add a comment |Â
add a comment |Â
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 macrogapedcells
: note:
mathtools
loadamsmath
, 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
add a comment |Â
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 macrogapedcells
: note:
mathtools
loadamsmath
, 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
add a comment |Â
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 macrogapedcells
: note:
mathtools
loadamsmath
, 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
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 macrogapedcells
: note:
mathtools
loadamsmath
, 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
answered 2 hours ago
Zarko
113k861150
113k861150
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered 34 mins ago


egreg
685k8418253070
685k8418253070
add a comment |Â
add a comment |Â
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:
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
add a comment |Â
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:
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
add a comment |Â
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:
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
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:
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
answered 4 hours ago
J Leon V.
6,890528
6,890528
add a comment |Â
add a comment |Â
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.
Ilyankor is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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