[Tex/LaTex] How to make the table caption look smaller

captionsfontsize

I am new to the world of LaTeX and I am trying make my correlation table look nice.

My LaTeX code is below:

\documentclass{article}     
\usepackage{geometry}                       
\geometry{letterpaper}                          
\geometry{landscape}                        
\usepackage[parfill]{parskip}            
\usepackage{graphicx}               
\usepackage{amssymb}

\begin{document}
\begin{table}
\centering
\caption{ Correlation Table}
\def\x{%
\begin{tabular}{rlllllllllllllllllllllllllll}
%blah blah blah
\end{tabular}
} 

\scalebox{0.12}{\x}
\end{document}  

The scale box is to reduce the scale, in order to prevent the table from cutting off. I want to change the font size of the caption because otherwise the caption looks huge compared to the table (especially after the rescaling).
How can I make my table look nice with the caption?

Best Answer

\def\x{%
\begin{tabular}{rlllllllllllllllllllllllllll}
%blah blah blah
\end{tabular}%<<<<
} 

It is better to use \newcommand rather than the TeX primitive \def in LaTeX, also you are missing a % as shown. However you don't need to use a command definition here at all, you could just put the tabular directly in the argument to \scalebox. Or it is probably easier to use \resizebox. if you want the caption to scale similarly, include that in the scale.

Please always post complete documents that show the problem (and without spurious errors such as missing \end{table}

\documentclass{article}     
\usepackage{geometry}                       
\geometry{letterpaper}                          
\geometry{landscape}                        
\usepackage[parfill]{parskip}            
\usepackage{graphicx}               
\usepackage{amssymb}

\begin{document}
\begin{table}
\savebox{0}{%
\begin{tabular}{rlllllllllllllllllllllllllll}
blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&blah&
blah&blah&blah&blah&blah&blah&blah&blah&blah
\end{tabular}}

\resizebox{\textwidth}{!}{\parbox{\wd0}{%
\caption{ Correlation Table}

\usebox{0}

}}
\end{table}
\end{document} 

This answers the question, but scaling text is generally a bad idea, it produces inconsistent font sizes, and here arbitrarily small text. It's normally better to use a standard font size such as \small and then choose a table format with an appropriate number of columns for that size.