[Tex/LaTex] Selecting font size in a table

fontsizetables

I have the following table decleration:

\begin{table}[H] 
\caption{Tree construction table for subsample 1}
\centerline{
\scriptsize
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
 %%%%%VALUES%%%
\hline
\end{tabular}
}
\end{table}

However, I need to choose a size between \superscript and \tiny since the former is too large for my page while the latter is too small. How can this be done (selecting font size)

Best Answer

Font size, with the New Font Selection System, can be selected in the following way:

\fontsize{size}{leading}\selectfont

where size is the point size you want (say, 10pt) and leading is the leading (space between lines) you want (say, 12pt).

This does, as mentioned, require scalable fonts, or at least font definition files which permit dynamic generation of the appropriately-sized bitmap fonts. If you say \usepackage{lmodern} you'll get the fully-scalable Latin Modern fonts, which are near-duplicates of Computer Modern; if you really want to use Computer Modern, you can say \RequirePackage{fix-cm} before your \documentclass command to get better font definition files for Computer Modern.

As David Carlisle says, though, shrinking your table to such small sizes to make it fit is generally a bad idea, as it impedes readability and clashes with your normal-size text. Better options are reduce spacing between columns, or even setting the table in landscape mode on its own page; see the lscape package.

If you're not already using it, look at the booktabs package, as well, which makes tables created in LaTeX worlds better.