[Tex/LaTex] How to increase font size and change table column width

formattingtables

I want a table to fit in only column of a page. For that I'm using resizebox:

\begin{table}[!t]
\renewcommand{\arraystretch}{1.3}
\caption{Sample table}
\label{table_example}
\centering
\resizebox{\columnwidth}{!}{%
\begin{tabular}{|c|c|c|}
\hline
Sr & Hypothesis & Result \\
\hline\hline
1 & May indulgence difficulty ham can put especially. Bringing remember & Proved \\
\hline
2 & Manor we shall merit by chief wound no or would. Oh towards between & Proved \\
\hline
3 & Style never met and those among great. At no or september sportsmen & Level1 Proved, Level2 Not Proved \\
\hline
4 & Cottage out enabled was entered greatly prevent message. No procured unlocked an likewise. & Level1 Proved, Level2 Not Proved \\
\hline
\end{tabular}
}
\end{table}

This gives me following output:

enter image description here

The font size of the contents in the table becomes shrinked? How do I increase this font size?

Also I want to increase size of second column and reduce the size of third column after increasing font size. How do I do it?

Best Answer

your table is wider than page width. consequently your attempt to fit it in column width with \resizebox also reduce font size ... only reasonable solution is redesign table such, that the text in cells is broken onto more linens and for table use font size \small for better fitting text in cells:

enter image description here

\documentclass[twocolumn]{article}
\usepackage{ragged2e}
\usepackage{tabularx}
\newcolumntype{L}{>{\RaggedRight}X}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
    \begin{table}[htb]
\renewcommand{\arraystretch}{1.3}
\setlength\tabcolsep{4pt}
\caption{Sample table}
    \label{table_example}
\centering
\small
%\resizebox{\columnwidth}{!}{%
\begin{tabularx}{\linewidth}{|c|>{\hsize=1.2\hsize}L
                               |>{\hsize=0.8\hsize}L|}
\hline
Sr & Hypothesis & Result \\
\hline\hline
1 & May indulgence difficulty ham can put especially. Bringing remember & Proved \\
\hline
2 & Manor we shall merit by chief wound no or would. Oh towards between & Proved \\
\hline
3 & Style never met and those among great. At no or september sportsmen & Level1 Proved, Level2 Not Proved \\
\hline
4 & Cottage out enabled was entered greatly prevent message. No procured unlocked an likewise. & Level1 Proved, Level2 Not Proved \\
\hline
\end{tabularx}
%}
\end{table}
\lipsum
\end{document}

in above mwe is for table environment used tabularx for which you had prescribed table width. for columns is defined new column type L by help of macro \RaggedRight from ragged2e package. with this the multi line text formatting in cells is better than with centering (according to my taste). columns width ratio is also changed. if you like to have in table the same font size as it is in text, just remove \small., but hen the table be less nice (again to my taste).