I have the following stub document:


% packages used in this MS:
\usepackage{amsmath, amssymb, amsthm}
\usepackage{calc}                             % to allow duplicate page
%                                               number 1
\usepackage{mathtools}                        % for absolute value sign
\usepackage{tabularx}                         % auto-calculates column %                                               widths
\usepackage{verbatim}                         % for comment environment

% personally-written macros in file:
\include{macros} % none of these get called in what follows

%%%%%%%%%%%%%%%%%%%% ACTUAL TEXT BEGINS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%

    \setlength{\footskip}{10.15pt}                    % no footer at all
    % set up running header---text part defined just below
    \newcounter{alteredpagenum} % this will equal true page number minus 1
    %                             to allow two "Page 1"s---needed for blind
    %                             review

    \noindent Running head:  \runninghead

        MAXCOV:  When is it a dependable admixture method?


        Author Note



    The author is on the emeritus faculty of Psychology at the University
    of Minnesota---Twin Cities.

    The author would like to acknowledge the generous assistance of Leslie
    J. Yonce and Paul E. Meehl, as well as the stimulating article by
    Maraun and Slaney.

    Correspondence concerning this article should be addressed to:

    William M. Grove

    767 Meadowood Dr.

    Woodbury, MN \hspace{.25in} 55125--1177

    E-mail:  [email protected]

% says at this point (line 68), ``TeX capacity exceeded, sorry [main memory size=5000000].''


Note the comment about TeX complaining about capacity exceeded. I have tried and tried to simplify this file, checking & rechecking, and still always get the same error message. While I'm no LaTeX tyro I'm not a complete novice either, and it just escapes me what I'm doing wrong. Any ideas would be appreciated.

Sincerely, Will Grove

  • 2
    Note that \include before \begin{document} is wrong, use \input or better rename the file to macros.sty and use \usepackage{macros} (unrelated to the error in this case) Jan 16, 2017 at 22:42
  • 1
    If you want “double spacing”, use the features of setspace, which you are even loading.
    – egreg
    Jan 16, 2017 at 23:34
  • Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. Jan 17, 2017 at 8:55

3 Answers 3


sets up an infinite loop.

\baselineskip is a primitive register which should not be redefined.


Multiplication with keeping \baselineskip as rubber length

\baselineskip is a "rubber length" with optional stretch and shrink components. Values are usually assigned with \setlength. Multiplication is supported by package calc:

\setlength{\baselineskip}{\baselineskip * 2}

Example: If \baselineskip is 10.0pt plus 2.0pt minus 0.5pt, then all three components are multiplied: 20.0pt plus 4.0pt minus 1.0pt.

A simple low level alternative is given in Ian Thompson's answer:

\multiply\baselineskip by 2

Also e-TeX can be used:

\baselineskip=\glueexpr\baselineskip * 2\relax

Multiplication with stripping stretch and shrink components

However, using 2 as direct factor for \baselineskip results in a simple dimension without stretch and shrink components. With 10.0pt plus 2.0 pt minus 0.5pt as value for \baselineskip, the result of




is 20.0pt.


If you do \renewcommand\command{whatever}, then whatever doesn't get expanded until the command is used. So, after


\baselineskip will expand to 2\baselineskip, after which \baselineskip is expanded again, and TeX becomes stuck in an infinite loop. A simple way to avoid this is to multiply the value by two instead:

\multiply\baselineskip by 2
  • 1
    note that even without the loop the renewcommand would be wrong \renewcommand\baselineskip{5cm} would not loop but would not affect the baseline as it would just redefine the \baselineskip token not to refer to the baselineskip primitive. Jan 16, 2017 at 23:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .