Fonts & Character SetsChange font size for tables

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
pnemeth1981
Posts: 5
Joined: Mon Mar 08, 2010 3:06 am

Change font size for tables

Post by pnemeth1981 »

Hello Latex Community,

I am typing a dissertation and came across a problem. I started the whole thing with 10pt fonts and have many sideways tables which fit to the page only with the \tiny size. Now I must change the font size to 11pt globally, this automatically scales up my tables, off the page. The 11pt \tiny font is larger than the 10pt \tiny. Is it possible to keep font size at the original 10pt for tables locally while the global font size is 11pt? Any help is appreciated!

I tried:

Code: Select all

\fontsize{10pt}{20pt}
\selectfont

...table...

\fontsize{11pt}{21pt}
\selectfont
for a table, but did not help.

cheers
Peter

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Change font size for tables

Post by gmedina »

Hi,
pnemeth1981 wrote:...Is it possible to keep font size at the original 10pt for tables locally while the global font size is 11pt?..
you could try something like the following:

Code: Select all

\documentclass[11pt]{book}
\usepackage{lipsum}% just to generate some text

\begin{document}

\lipsum[1]
\begin{table}[!ht]
  \small
  \centering
  \begin{tabular}{p{7cm}}
    \hline
    \lipsum[1]\\\hline
  \end{tabular}
  \caption{A test table.}
  \label{tab:test}
\end{table} 
\lipsum[1]

\end{document}
You could also use \fontsize{10}{12}\selectfont instead of \small in the code above.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
pnemeth1981
Posts: 5
Joined: Mon Mar 08, 2010 3:06 am

Re: Change font size for tables

Post by pnemeth1981 »

Hi Gmedina,

Thanks for the quick answer. My document class is report:
\documentclass[11pt]{report}
and I don't want to change that. I would like to keep the template in its original form and avoid the Grad School's notices. "book" compiles with some error messages, but apparently returns the same thing.

\fontsize{10}{12}\selectfont did not do what I expected, actually I haven't seen any change. But tweaking with \small, \tiny and by shortening some long lines I could squeeze my tables in the margin.

Thanks,
Peter
Post Reply