Graphics, Figures & Tables ⇒ adjust table width to full page width
adjust table width to full page width
Recently I started working with Latex and created some beautiful tables, but now I want to create a table with same width as a page has (6.5inch). My table is too small how can I adjust the width. I tried to use p{6.5in} or specified it to each column but it didn't work.
My current table is this;
\begin{tabular}{l c c} \hline\hline
& Market Leverage & Book Leverage \\[-0.5ex]
\hline
$OverallTangibles$ &0.251***& 0.190*** \\[-1.5ex]
&(0.055) & (0.073) \\[-1.5ex]
&[25.34] &[15.15] \\[-1.5ex]
$Size$ &0.004 & 0.014 \\[-1.5ex]
&(0.006) &(0.073)\\[-1.5ex]
&[5.24] &[14.03]\\[-1.5ex]
$Profitability$ &-0.115*** &-0.118***\\[-1.5ex]
&(0.020) &(0.040)\\[-1.5ex]
&[-6.56] &[-5.30]\\[-1.5ex]
$Q$ &-0.047*** &-0.014** \\[-1.5ex]
&(0.004) &(0.007)\\[-1.5ex]
&[-17.78] &[-4.27]\\[-1.5ex]
$EarningsVolatility$ &-0.024 &-0.231 \\[-1.5ex]
&(0.067) &(0.296)\\[-1.5ex]
&[-0.79] &[-5.98]\\[-1.5ex]
$MarginalTaxRate$ & -0.158*** &-0.211***\\[-1.5ex]
&(0.027) &(0.037)\\[-1.5ex]
&[-4.26] &[-4.46]\\[-1.5ex]
$RatingDummy$ &0.044*** &0.069***\\[-1.5ex]
&(0.009) &(0.013)\\[-1.5ex]
&[0.04] &[0.07]\\[-0.5ex]
\hline
Obs. &8,645 &8,645\\[-1.5ex]
Adj.R2 &0.214 &0.088 \\[-0.5ex]
\hline\hline
\end{tabular}
Can anybody help me? Thanks in advance!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
adjust table width to full page width
seems like a job for the tabularx package: Take a look at the following example:
Code: Select all
\documentclass{article}\usepackage{tabularx}\newcolumntype{A}{>{\centering\arraybackslash}X}\begin{document}\noindent\begin{tabularx}{\linewidth}{XAA} \hline\hline& Market Leverage & Book Leverage \\[-0.5ex]\hline$OverallTangibles$ &0.251***& 0.190*** \\[-1.5ex]&(0.055) & (0.073) \\[-1.5ex]&[25.34] &[15.15] \\[-1.5ex]$Size$ &0.004 & 0.014 \\[-1.5ex]&(0.006) &(0.073)\\[-1.5ex]&[5.24] &[14.03]\\[-1.5ex]$Profitability$ &-0.115*** &-0.118***\\[-1.5ex]&(0.020) &(0.040)\\[-1.5ex]&[-6.56] &[-5.30]\\[-1.5ex]$Q$ &-0.047*** &-0.014** \\[-1.5ex]&(0.004) &(0.007)\\[-1.5ex]&[-17.78] &[-4.27]\\[-1.5ex]$EarningsVolatility$ &-0.024 &-0.231 \\[-1.5ex]&(0.067) &(0.296)\\[-1.5ex]&[-0.79] &[-5.98]\\[-1.5ex]$MarginalTaxRate$ & -0.158*** &-0.211***\\[-1.5ex]&(0.027) &(0.037)\\[-1.5ex]&[-4.26] &[-4.46]\\[-1.5ex]$RatingDummy$ &0.044*** &0.069***\\[-1.5ex]&(0.009) &(0.013)\\[-1.5ex]&[0.04] &[0.07]\\[-0.5ex]\hlineObs. &8,645 &8,645\\[-1.5ex]Adj.R2 &0.214 &0.088 \\[-0.5ex]\hline\hline\end{tabularx}\end{document}
Edit: on a side note, since you are interested in high quality tables, the booktabs package could be useful for you.