TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a book I'm typesetting, I want the tabular environment to be in footnote size and the other body of the book to be in normalsize font. To do this, I've tried something like the following:


But I get the following error:

! TeX capacity exceeded, sorry [save size=50000]. 
 <to be read again> 
 l.72 \centering\begin{tabular}{

By the way, I'm using the tabular as below:


Have I done something wrong here?

Edit on December 28th (another question):

In the following code, if I want also to add a \centering command, where should I put it? I have put it before and after the \footnotesize but it doesn't work!

share|improve this question
Could you please add the error messages to the question? – Caramdir Aug 31 '10 at 20:01
Don't do such adjustments: you'll be sorry when you'll need a plain tabular environment. The \centering and \footnotesize commands belong to the table environment and not to tabular. Use a new environment, if you prefer. – egreg Dec 28 '11 at 0:23
Please don't use edits to ask a follow-up question; instead, ask a new question and provide a link to the original question for the context. – lockstep Dec 28 '11 at 0:29
up vote 18 down vote accepted

A better approach is to define a new tabular environment with your own customizations


And then use smalltabular instead of tabular. A few things to note:

  • In the definition of a new environment, instead of \begin{tabular} and \end{tabular} it's enough to say \tabular and \endtabular.
  • You dont need to register any arguments for smalltabular, because the last command in it's definition (i.e. \tabular) will already look for and process any arguments appropriately.

If for some reason you really want to redefine the tabular environment, you first need to save it's old definition and then redefine it. For example

share|improve this answer
Thanks Juan, your reply is completely understandable. Thanks everybody. – Vahid Damanafshan Aug 31 '10 at 21:35
Your method for redefining the tabular environment is cleaner than my suggestion. As for "some reason" to redefine: I like to implement general changes (changing the fontsize for tabular) in the preamble rather than to replace every "tabular" with "smalltabular" in the document body. – lockstep Aug 31 '10 at 21:59
@Vahid, if you like the answer feel free to mark it as accepted ;) – Juan A. Navarro Aug 31 '10 at 22:51
The \bgroup and \egroup are redundant, as any environment forms a group by itself. – egreg Dec 27 '11 at 22:07
And \usepackage{etoolbox} followed by \preto\tabular{\footnotesize} is even easier. :) – egreg Dec 29 '11 at 16:45

Using the \tabular macro inside a redefinition of the same macro will produce an infinite loop. Try the following:

share|improve this answer
What a interesting method! can u please explain more about that? what is the role of @halignto and @empty? – Vahid Damanafshan Aug 31 '10 at 21:01
I don't know their roles. ;-) I simply looked up the original definition of \tabular in the article class (using \show\tabular), added \footnotesize in a location that seemed plausible and tested the resulting code. – lockstep Aug 31 '10 at 21:08

When you use \renewenvironment, it doesn't expand the new definition until it is used. So in your case, when you call it, it tries to expand the new tabular environment and substitutes the \begin{tabular}, you've included in that one, leading to another one, and so on, leading to an infinite loop.

In general you cannot define an environment or command in terms of itself, unless you're very very careful to ensure that's its recursively well-grounded.

(EDIT: Sorry to duplicate lockstep; we were answering at the same time.)

share|improve this answer
Thanks for your complete reply. What do you mean exactly by "unless you're very very careful to ensure that's its recursively well-grounded."? – Vahid Damanafshan Aug 31 '10 at 21:05

Your Answer


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.