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!

  • Could you please add the error messages to the question? – Caramdir Aug 31 '10 at 20:01
  • 2
    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
  • 4
    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

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 don't 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 its old definition and then redefine it. For example:

  • 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
  • 1
    The \bgroup and \egroup are redundant, as any environment forms a group by itself. – egreg Dec 27 '11 at 22:07
  • Thanks for noting that. I've just edited the answer accordingly – Juan A. Navarro Dec 29 '11 at 16:38
  • 3
    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:

  • 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
  • 3
    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.)

  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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