Graphics, Figures & Tableshow to change the font size in table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
imdadullah

how to change the font size in table

Post by imdadullah »

Dears

I need to have a table with different font size compared to whole document.
how can I do this.

Cells in table also contains math formulas.

Plz guide me.

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
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

how to change the font size in table

Post by frabjous »

There's no trick to it... just use the regular sizing commands, e.g.:

Code: Select all

\documentclass{article}
\begin{document}
Regular text

\begin{small}% or footnotesize, scriptsize, tiny, etc.
\begin{tabular}{rl}
some text & $a^2 + b^2 = c^2$ 
\end{tabular}
\end{small}

Regular text
\end{document}

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

how to change the font size in table

Post by Stefan Kottwitz »

Hi,

another possibility, similar to frabjous' suggestion: if you use table environments, you can use \small etc. instead of \begin{small} ... \end{small}, because the effect will be local to the surrounding environment:

Code: Select all

\documentclass{article}
\begin{document}
Regular text

\begin{table}[ht]
  \small% or footnotesize, scriptsize, tiny, etc.
  \begin{tabular}{rl}
    some text & $a^2 + b^2 = c^2$
  \end{tabular}
\end{table}

Regular text
\end{document}
Stefan
LaTeX.org admin
imdadullah

Re: how to change the font size in table

Post by imdadullah »

thanks for quick and best possible guidance. It works.

My other question is
Is there any command for font size to change.
I want to change the size of text block in points not by tiny, footnote size or any other option.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

how to change the font size in table

Post by Stefan Kottwitz »

You can use \fontsize, such as

Code: Select all

\fontsize{6}{8}\selectfont text in size 8 pt
Stefan
LaTeX.org admin
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

how to change the font size in table

Post by Montag »

With a little bit of googling, here you go:
http://superuser.com/questions/227039/l ... point-size
Do read all the answers. :)
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
Post Reply