TeX 容量超出

TeX 容量超出

我有以下存根文件:

\documentclass[12pt]{article}

% packages used in this MS:
\usepackage{amsmath, amssymb, amsthm}
\usepackage{calc}                             % to allow duplicate page
%                                               number 1
\usepackage{endnotes}
\usepackage{fancyhdr}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{mathtools}                        % for absolute value sign
\usepackage[pdftex]{hyperref}
\usepackage{setspace}
\usepackage{tabularx}                         % auto-calculates column %                                               widths
\usepackage{textcomp}
\usepackage{url}
\usepackage{verbatim}                         % for comment environment


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

%%%%%%%%%%%%%%%%%%%% ACTUAL TEXT BEGINS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

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

    \newcommand\runninghead{MAXCOV-HITMAX}
    \noindent Running head:  \runninghead

    \begin{center}
        MAXCOV:  When is it a dependable admixture method?
    \end{center}

    \vspace*{1.5in}

    \begin{center}
        Author Note
    \end{center}

    \renewcommand\baselineskip{2\baselineskip}

    \setlength{\parindent}{0pt}

    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]
    \pagebreak

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

\end{document}

请注意关于 TeX 抱怨容量超出的评论。我试过一次又一次地简化这个文件,检查和重新检查,但仍然总是收到相同的错误消息。虽然我不是 LaTeX 新手,但我也不是完全的新手,我只是不知道我做错了什么。任何想法都将不胜感激。

威尔·格罗夫

答案1

    \renewcommand\baselineskip{2\baselineskip}

建立一个无限循环。

\baselineskip是一个不应重新定义的原始寄存器。

\setlength\baselineskip{2\baselineskip}

答案2

乘以保持\baselineskip橡胶长度

\baselineskip是带有可选拉伸和收缩分量的“橡胶长度”。值通常用 指定\setlength。包支持乘法calc

\usepackage{calc}
\setlength{\baselineskip}{\baselineskip * 2}

例如:如果\baselineskip10.0pt plus 2.0pt minus 0.5pt则所有三个分量相乘:20.0pt plus 4.0pt minus 1.0pt

Ian Thompson 的回答

\multiply\baselineskip by 2

也可以使用 e-TeX:

\baselineskip=\glueexpr\baselineskip * 2\relax

与剥离拉伸和收缩组件相乘

但是,使用2作为 的直接因子会\baselineskip导致简单的尺寸,没有拉伸和收缩分量。使用10.0pt plus 2.0 pt minus 0.5pt作为 的值\baselineskip,结果是

\baselineskip=2\baselineskip

或者

\setlength{\baselineskip}{2\baselineskip}

20.0pt

答案3

如果你这样做\renewcommand\command{whatever},那么whatever直到使用该命令后才会展开。因此,之后

\renewcommand\baselineskip{2\baselineskip},

\baselineskip将扩展为2\baselineskip,之后\baselineskip再次扩展,TeX 会陷入无限循环。避免这种情况的一个简单方法是将值乘以二:

\multiply\baselineskip by 2

相关内容