Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a long table and I want to fit it in one page. Table has number and symbol entries. The size to the table can be reduced if I can reduce the font size. How can I reduce the font size in this case? I tried:

\begin{tabular}{|{\small}c|c|c|c} \end{tabular}

but it does not work for math.

share|improve this question
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  diabonas Sep 26 '12 at 18:09
    
You could just wrap the entire table within a \scalebox{0.6}{\begin{tabular}...\end{tabular}} using the graphicx pacakge. –  Peter Grill Sep 26 '12 at 18:11
    
It is not clear what you want because you don't provide an example. Scaling the font is not ideal. Have you thought of rotating the table or spreading the table over several pages? If not, have a look at the rotating and longtable packages. –  Marc van Dongen Sep 26 '12 at 20:09
add comment

3 Answers

rather than trying to shrink each element of the table separately, you might consider setting the table to its "normal" size with attractive spacing, then using \scalebox{<scaling factor>}{<table content>} to shrink the whole thing at one go. this requires the graphicx package and works equally well for all manner of items that need to be resized.

enter image description here

Code:

\documentclass{article}
\usepackage{graphicx}

\newcommand*{\MyTable}{%
\begin{tabular}{|c c|} \hline
    foo & a  \\
    $\sum = mc^2$ & $\int_0^1 f(x)$ \\\hline
\end{tabular}%
}%

\begin{document}
\MyTable
\hspace{0.5cm}
\scalebox{0.8}{\MyTable}
\end{document}
share|improve this answer
    
7 seconds!! You mind if I add my example (now deleted) to your answer? –  Peter Grill Sep 26 '12 at 18:16
    
@PeterGrill -- what a generous offer! of course i don't mind. (i was about to delete my answer because yours is nicer.) (i really love \scalebox; it's as close to a panacea as i've found for this kind of problem.) –  barbara beeton Sep 26 '12 at 18:19
    
\scalebox works. But, \bgroup\small does not work. I have put \tabular inside \table –  Manojg Sep 26 '12 at 19:02
    
Hi guys, longtable looks better approach, to break the table into multi-pages. I tried but instead of breaking the table, it reduces the row size to fit in one page. Any ideas to fix this? –  Manojg Sep 26 '12 at 21:09
    
@Manojg longtable does nothing about row sizing it just calls the underlying tabular code. –  David Carlisle Sep 27 '12 at 15:07
add comment

Put \small outside tabular. Here, \bgroup and \egroup are included to limit the scope of the size change to the table.

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

\bgroup\small
\begin{tabular}{c|c}
goat & $a=b$ \\
$c=d$& pig
\end{tabular}
\egroup
\end{document}

Using \tiny in place of \small to emphasise the effect, the result is as shown.

enter image description here

share|improve this answer
    
I will try and back soon with results. –  Manojg Sep 26 '12 at 18:42
add comment

You may try the relsize package. It has commands \smaller, \larger and etc. that can be used inside many environments, or with braces in the document body, like: \smaller{your table}. The command accepts an argument for different sizes, e.g. \smaller[2]

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.