How do I change the font size in my table?
I have tried the \normalsize
and \small
commands, but it doesnt make any difference. I needed to specify column length to get the design I wanted, does this have something to do with it?
Here is a part of my code:
\documentclass[a4paper,11pt,twoside]{report}
\begin{document}
\begin{table}[h]
\caption[text}
\label{Tsomething}
\centering
\renewcommand\arraystretch{2}
\resizebox{\textwidth}{!}
{% \begin{tabular}{@{}|c|p{15cm}|p{15cm}|c|@{}}
\toprule
\textbf{Resource} & \textbf{Type} & \textbf{Application} & \textbf{Comment} \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule bla. & bla & bla & \\
\midrule bla. & bla & bla & \\
\bottomrule \end{tabular}% }
\end{table}
\end{document}
I have some long sentences in the table, and i want latex to put these in several lines, instead of minimizing the font size to put it all in the same line. This is why i dont use the following code (then i can barely see the text).
\documentclass[a4paper,11pt,twoside]{report}
\begin{document}
\begin{table}[h]
\caption[text}
\label{Tsomething}
\centering
\renewcommand\arraystretch{2}
\resizebox{\textwidth}{!}
{% \begin{tabular}{@{}|c|c|c|c|@{}}
\toprule
\textbf{Resource} & \textbf{Type} & \textbf{Application} & \textbf{Comment} \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule
bla. & bla & bla & \\
\midrule bla. & bla & bla & \\
\midrule bla. & bla & bla & \\
\bottomrule \end{tabular}% }
\end{table}
\end{document}
Thank you for any help.
p{...}
columns type (iii) vertical lines and rules frombooktabs
should not be used together, (why you need so big stretch of table , ... etc. please provide complete small document (mwe: minimal working example) beginning with\documentclass
and ending with\end{document}
.with example of one or two real rows (simulated by dummy, but equal long text).