102

I have a table and it appears I only have two options when it comes to font size: large and small. There should be a medium option, correct? I get an error when I replace small or large with medium.

The beginning of my table looks like this:

\begin{table*}[ht]
{\small
\hfill{}
\small
\begin{tabular}{|p{3.5cm}|p{8cm}|p{5cm}|}

How do I get a universal font size for the table that is not huge or too small to read?

lockstep
  • 250,273
ngramsky
  • 2,363

2 Answers2

194

There's no \medium font size between \small and \large; you have \normalsize (which is the default font size). The standard font size switches are: \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, and \Huge.

By the way, you only need one font switch command inside the table and braces are not required since table forms a group, so you can simply say something like this:

\begin{table}
\small
\begin{tabular}{p{3.5cm}p{8cm}p{5cm}}
text & text & text
\end{tabular}
\end{table}
AboAmmar
  • 46,352
  • 4
  • 58
  • 127
Gonzalo Medina
  • 505,128
  • 2
    @sphere: yes: \scriptsize, and \footnotesize. Also, for even finer control, as long as the current font supports the desired size, you can use \fontsize{<size>}{<baseline>}\selectfont (in a group); as in {\fontsize{6}{7.2}\selectfont text here}. – Gonzalo Medina Aug 13 '13 at 00:21
  • Can I put that wrapper around an entire table? – Veridian Aug 13 '13 at 00:40
  • @sphere environments create a group, so inside a table environment you can say, for example \begin{table}\fontsize{6}{7.2}\selectfont...\end{table}. – Gonzalo Medina Aug 13 '13 at 00:43
  • I tried your last comment and only some of my text got resized. – Veridian Aug 14 '13 at 00:53
  • Edit: I got the text resized by copy and pasting the command in more locations, but now the horizontal bars hit the text. Any ideas? Do I need to make blank lines now? – Veridian Aug 14 '13 at 01:17
  • @sphere you need to provide the actual code you are using. Feel free to open a new question. – Gonzalo Medina Aug 14 '13 at 01:21
7

If you need to fine tune the size of a table, you can include it in a scaleboxfrom the graphicx- or graphics-package and scale the table to fit. If you need more options, you can use the adjustbox-package.

A warning: Arbitrary adjustments of different tables will result in different font sizes. This may look ugly.

Sveinung
  • 20,355