Graphics, Figures & TablesDifferent fontsize for different rows

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
spramanik
Posts: 1
Joined: Tue Oct 26, 2010 5:25 pm

Different fontsize for different rows

Post by spramanik »

Hi Latex users,

How can I change the font size for different rows within a table? When I use commands like \scriptsize at the beginning of a particular row, it just changes the first entry of the row (not the whole row and my table has 10 columns in it).

Also, is it possible to right justify a column while using p{width} feature?

Thanks,
Santanu

Recommended reading 2024:

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

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

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

Different fontsize for different rows

Post by gmedina »

Hi,

for the ragged right text, you can use the >{...} construct provided by the array package:

Code: Select all

\documentclass{book}
\usepackage{array}
\usepackage{lipsum}% just to generate filler text

\begin{document}

\begin{tabular}{c>{\raggedright\arraybackslash}p{7cm}}
  text & \lipsum[1] 
\end{tabular}

\end{document}
For the font size issue, I think that you'll have to use the font-size changing commands in every cell; of course, one could define a command with ten arguments to facilitate a little the job, but I am not sure that it's worth it.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply