# TeX capacity exceeded Error

I've seen a couple of posts of this error being reported but the solutions tend to be very specific. Because I am using a template from here (https://github.com/mlouhivu/prace-latex-whitepaper) I am having a very hard time finding this error as I did nothin but try to run the template as is. I would be very appreciative if anyone could point me in the right direction.

Thank you.

%%% Partnership for Advanced Computing in Europe
%%%   www.prace-ri.eu
%%%
%%% LaTeX template for a PRACE-RI whitepaper.
%%%
%%% (c) CSC - IT Center for Science Ltd.
%%%   author: Martti Louhivuori (martti.louhivuori@csc.fi)
%%%
%%% Generic instructions:
%%%   - follow the point-by-point instructions
%%%   - fill in the required author information, title, and abstract
%%%   - write your paper using the general format outlined below
%%%   - do NOT touch the generic layout between the following tags:
%%%       %%% PRACE GENERIC LAYOUT; DO NOT CHANGE %%%
%%%       %%% END OF PRACE GENERIC LAYOUT %%%
%%%   - the paper should be 3-6 pages long
%%%   - refer to 'example.tex' and 'example.pdf' for a practical example
%%%
%%% PRACE GENERIC LAYOUT; DO NOT CHANGE %%%
\documentclass{prace}
%%% END OF PRACE GENERIC LAYOUT %%%

% TITLE
%   - use the name of your project
%   - capitalise the first letter
\title{}

% AUTHORS
%   - include all people involved in the effort
%     - depending on their contribution, include PRACE experts as authors
%       or mention them in acknowledgements
%   - give affiliations in the option field as a list of numbers
%     corresponding to the order of \affiliation definitions, i.e.
%     [1] -> 1st \affiliation, [2] -> 2nd, [1,2] -> 1st & 2nd
%   - mark one of the authors as the corresponding author using
%     \corresponding before the \author, i.e.
%       \corresponding\author[1]{N.N.}
%
% example:
%   \author[1]{First Author}
%   \corresponding\author[2]{Second Author}
%   \author[1,2]{Third Author}
\author[]{}
\corresponding\author[]{}

% AFFILIATIONS
%   - define affiliations in the same order you used for in the author
%     definitions
%   - include: name, address, city, postcode, and country
%
% example:
%   \affiliation{First affiliation, Address, City and Postcode, Country}
%   \affiliation{Second affiliation, Address, City and Postcode, Country}
\affiliation{}

% PROJECT ID
%   - use the ID of your project
\project{}

% CONTACT INFORMATION
%   - give the email address of the corresponding author
%
% example:
%   \email{second.author@example.com}
\email{}

%%% PRACE GENERIC LAYOUT; DO NOT CHANGE %%%
\begin{document}
\maketitle
%%% END OF PRACE GENERIC LAYOUT %%%

% ABSTRACT
%   - write a concise abstract that outlines the approach / methods, main
%     results, and relevance of your project
\begin{abstract}
\end{abstract}

% MAIN BODY
%
% Write the report in the style of a journal article (i.e. Introduction,
% Methods, Results, Conclusions). The appropriate length of the paper
% is 3-6 pages (although there is no upper limit).
%
% In the report please describe:
%   - goals of the project
%     - scientific case and goals related to the project
%     - technical goals (performance, parallel scalability, ...)
%   - work done in the project, including
%     - technical and algorithmic methods and programming techniques employed
%     - use of profiling tools when applicable
%     - use of  numerical libraries when applicable
%     - machine(s) used for the work
%   - results obtained
%     - give quantitative measurements of the achieved performance
%       enhancements and the scaling behaviour
%     - discuss how the results compare with the goals
%   - summary
%     - relevance of the obtained results for the stated scientific goals
%     - outlook on possible future work
%
% instructions:
%   - use only \sections and \subsections to divide the paper into logical
%     segments
%   - capitalise only the first letter of headings
%   - symbols denoting vectors and matrices should be in bold type
%   - scalar variables should be in italics, i.e. enclosed within  in text
%   - weights and measures should be expressed in SI units
%   - avoid footnotes if at all possible
%   - collate acknowledgements in a separate section at the end of the
%     article; do NOT include them on the title page, as a footnote etc.
%
% example:
%   \section{Introduction}
%     Introductory text...
%   \section{Methods}
%     General description...
%   \subsection{Specific method A}
%     Method A in detail...
%   ...
%   \section{Acknowledgements}
%     The results in this paper have been achieved using the PRACE Research
%     Infrastructure.
%
\section{}
\subsection{}

% FIGURES
%   - all photographs, schemas, graphs, and diagrams are to be referred to
%     as figures
%   - line drawings should be goo quality scans or true electronic ouput
%   - low-quality scans are not acceptable
%   - lettering and symbols should be clearly defined either in the caption
%     or in a legend provided as part of the figure
%   - figures should be placed at the top or the bottom of a page whenever
%     possible
%   - if two images fit next to each other, they may be placed so to save
%     space
%   - refer to figures in the text as Fig.~\ref{fig: foo} (with the correct
%     reference labels of course)
%
% examples:
%   - single image:
%     \begin{figure}
%       \includegraphics[width=0.4\textwidth]{example}\hfill{}
%       \caption{singlepicture}
%       \label{fig: single-example}
%     \end{figure}
%
%   - two images side-by-side:
%     \begin{figure}
%       \includegraphics[width=0.4\textwidth]{example}\hfill{}
%       \includegraphics[width=0.4\textwidth]{example}\hfill{}
%       \caption{(a) first picture; (b) second picture}
%       \label{fig: double-example}
%     \end{figure}
\begin{figure}
\includegraphics[]{}\hfill{}
\caption{}$$\label{}$$\end{figure}

% TABLES
%   - tables must be embedded into the text and not supplied separately
%   - caption before tabular
%   - left-justified columns
%   - only horisontal lines within a table:
%       - \toprule at the beginning of the table
%       - \midrule after the column headings but before the body
%       - \bottomrule at the end of the table
%   - \cmidrule can also be used for partial lines within the column headings
%     (see the booktabs package documentation for further details:
%      http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/ )
%   - refer to tables in the text as Table~\ref{tab: foo} (with the correct
%     reference labels of course)
%
% example:
%   \begin{table}
%     \caption{An example of a table}
%     \label{tab: example}
%     \begin{tabular}{lll}
%       \toprule
%       An example of a column heading & Column A (t) & Column B (T) \\
%       \midrule
%       An entry & 1 & 2 \\
%       and another entry & 3 & 4 \\
%       yet another entry & 5 & 6 \\
%       \bottomrule
%     \end{tabular}
%   \end{table}
\begin{table}
\caption{}$$\label{}$$    \begin{tabular}{}
\toprule
\midrule
\bottomrule
\end{tabular}
\end{table}

% LISTS
%   - use \itemize for bulleted lists and \enumerate for numbered lists
%
% example:
%   \begin{itemize}
%     \item First point
%     \item Second point
%   \end{itemize}
\begin{itemize}
\item
\end{itemize}

% REFERENCES
%   - use \cite for references
%   - always include \cite even when referring to the authors by name
%
% example:
%   Example citation to a paper\cite{scholes-DiscussFaradaySoc-70} and to
%   another paper by Someone \emph{et al.}\cite{someone-SomeJournal-00}.
\cite{}

% EQUATIONS
%   - use the equation environment for all equations
%   - short in-line notation may also be used, but should be avoided if
%     possible
%   - use bold type face (\mathbf) for vectors and matrices
%   - refer to equations in the text as Eq.~\ref{eq: foo} (with the correct
%     reference labels of course)
%
% example:
%   $$% Rt = K EP = 93.02 (\pm 9.62) – 13.45 % \label{eq: example} %$$
$$\label{}$$

% ACKNOWLEDGEMENTS
%   - names of PRACE machines and the corresponding sites and countries
%     should be inserted to end of the general PRACE acknowledgement
\section*{Acknowledgements}
This work was financially supported by the PRACE project funded in part
by the EUs 7th Framework Programme (FP7/2007-2013) under grant agreement
no. RI-283493. The work was achieved using the PRACE Research Infrastructure
resources at [insert here machine names and the corresponding sites and
countries].

% REFERENCE LIST
%   - use \thebibliography and \bibitems to enter references, no separate .bib
%     files
%   - use normal font for *everything* (no bold typefaces etc.)
%   - shorten the last page number, i.e. 51--9 for pages 51--59
%   - for more than 6 authors the first 6 should be listed followed by et al.
%     - use \emph{et al.} for the et al.
%   - end each reference with a period
%
% example:
%   \begin{thebibliography}{99}
%       S. Scholes, Discuss. Faraday Soc. No. 50 (1970) 222.
%     \bibitem{mazurin-Phase-Separation-in-Glass-84}
%       O.V. Mazurin and E.A. Porai-Koshits (eds.),
%       Phase Separation in Glass, North-Holland, Amsterdam, 1984.
%     \bibitem{dimitriev-JMaterSci-75}
%       Y. Dimitriev and E. Kashchieva, J.Mater. Sci. 10 (1975) 1419.
%     \bibitem{eaton-Porous-Glass-Support-Material-75}
%       D.L. Eaton, Porous Glass Support Material, US Patent No. 3 904 422
%       (1975).
%   \end{thebibliography}
\begin{thebibliography}{99}
\bibitem{}
\end{thebibliography}

%%% PRACE GENERIC LAYOUT; DO NOT CHANGE %%%
\end{document}
%%% END OF PRACE GENERIC LAYOUT %%%


Below is the prace.cls file:

%%% Partnership for Advanced Computing in Europe
%%%   www.prace-ri.eu
%%%
%%% LaTeX document class for a PRACE-RI whitepaper.
%%%
%%% (c) CSC - IT Center for Science Ltd.
%%%   author: Martti Louhivuori (martti.louhivuori@csc.fi)
%%%
%%% Requires: LaTeX2e
%%%           geometry, graphicx, ifthen, booktabs
%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{prace}[2013/03/26 PRACE-RI Whitepaper class]

\DeclareOption{onecolumn}{\OptionNotUsed}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax

% A4: 210x297mm - 20mm margins
\RequirePackage{geometry}
\geometry{text={170mm,257mm}, centering}
\RequirePackage{graphicx}
\RequirePackage{ifthen}
\RequirePackage{booktabs}

% page numbering
\pagenumbering{arabic}
%\pagestyle{empty}
% default font
\renewcommand{\normalsize}{\fontsize{10}{11}\selectfont}

% default values
\def\projectname{}
\def\authortel{+0-000-000-0000}
\def\authorfax{+0-000-000-0000}
\def\authoremail{author@example.com}

% internal counters
\newcounter{praceauth}
\setcounter{praceauth}{0}
\renewcommand\thepraceauth{\alph{praceauth}}
\newcounter{praceaffi}
\setcounter{praceaffi}{0}
\renewcommand\thepraceaffi{\alph{praceaffi}}
\newcounter{pracetmp}
\setcounter{pracetmp}{0}
\renewcommand\thepracetmp{\alph{pracetmp}}

% project ID & author contact details

% tag corresponding author
\newif\if@iscorresponding
\@iscorrespondingfalse
\newif\if@hascorresponding
\@hascorrespondingfalse
\newcommand\corresponding[0]{\@iscorrespondingtrue\@hascorrespondingtrue}
% corresponding author footnote
\long\def\authorfootnote{%
\def\thefootnote{\fnsymbol{footnote}}%
\csname c@\@mpfn\endcsname 1\relax%
\xdef\@thefnmark{\thempfn}%
\@footnotetext}
% corresponding author contact detail footnote
\def\authorcontact{%
\authorfootnote{Corresponding author.\\%
\indent\hspace{1ex}
tel. \authortel{}\hspace{1ex}
fax. \authorfax{}\hspace{1ex}
e-mail. \authoremail{}}
}

% tmp flag
\newif\if@praceflag
\@praceflagfalse

% convert integers to letters
\def\csvitoalist{}
\newcommand\csvitoa[1]{
\def\csvitoalist{}
\@for\name:=#1\do{
\setcounter{pracetmp}{\name}
\if@praceflag
\edef\csvitoalist{\csvitoalist,\thepracetmp}
\else
\edef\csvitoalist{\thepracetmp}
\@praceflagtrue
\fi}
\@praceflagfalse
\csvitoalist
}

% store author definitions for later use
\def\authorlist{}
\def\tmpname{}
\renewcommand\author[2][a]{%
%
\def\alfalist{}
\@for\name:=#1\do{
\setcounter{pracetmp}{\name}
\if@praceflag
\edef\alfalist{\alfalist,\thepracetmp}
\else
\edef\alfalist{\thepracetmp}
\@praceflagtrue
\fi}
\@praceflagfalse
%
%   \def\alfalist{\csvitoa{#1}}
%
\def\tmpname{#2}
\if@iscorresponding
\edef\tmpname{\tmpname{}${}^{\alfalist{},*}$}
\else
\edef\tmpname{\tmpname{}${}^{\alfalist}$}
\fi
\ifnum \c@praceauth >\z@
\edef\authorlist{\authorlist{}, \tmpname{}}
\else
\edef\authorlist{\tmpname{}}
\fi
\@iscorrespondingfalse
}
% store affiliation definitions for later use
\def\affiliationlist{}
\newcommand\affiliation[2][a]{%
\def\tmpname{{${}^{\thepraceaffi}$#2}}
\ifnum \c@praceaffi >\@ne
\edef\affiliationlist{\affiliationlist{},\tmpname{}}
\else
\edef\affiliationlist{\tmpname{}}
\fi%
}
% output affiliation list
\newcommand\affiliationblock[0]{%
\@for\name:=\affiliationlist\do{\name\\}}

% title block
\renewcommand{\maketitle}{%
\newpage
\noindent\begin{minipage}{3cm}
\includegraphics[width=3cm]{prace-logo}
\end{minipage}
\begin{minipage}{11cm}
\centering%
Available on-line at www.prace-ri.eu\\\vspace{1em}
{\large\bfseries Partnership for Advanced Computing in Europe}
\end{minipage}
\begin{minipage}{3cm}
\end{minipage}\\
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\authorlist
\end{tabular}\par}%
\vskip 1em%
\affiliationblock
\if@hascorresponding
\authorcontact
\else
\@latex@warning{Corresponding author is undefined}
\fi
\end{center}%
\par
\vskip 1.5em%
}

\def\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\normalsize\bfseries}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\itshape}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\itshape}}
% redefine section, figure etc. format
\def\thesection       {\arabic{section}.}
\def\thesubsection    {\thesection\arabic{subsection}.}
\def\thesubsubsection {\thesubsection\arabic{subsection}.}
\def\figurename{Fig.}
\def\tablename{Table}

% add horisontal lines before and after the abstract
\renewenvironment{abstract}%
{\noindent\rule{\textwidth}{0.1pt}
\small
\noindent{\bfseries \abstractname}
\quotation}%
{\vspace{1em}\\{\small Project ID: \projectname}\\
\noindent\rule{\textwidth}{0.1pt}}
% no indentation for quotations
\renewenvironment{quotation}%
{\list{}{%
\listparindent 0.0em
\itemindent    \listparindent
\rightmargin   \leftmargin
\parsep        \z@ \@plus\p@}%
\item\relax}
{\endlist}

% add space either after table caption or before figure caption
\newif\if@withintable
\@withintablefalse
\newif\if@withinfigure
\@withinfigurefalse
\renewenvironment{figure}
{\@withinfiguretrue\@float{figure}}
{\end@float\@withinfigurefalse}
\renewenvironment{figure*}
{\@withinfiguretrue\@dblfloat{figure}}
{\end@dblfloat\@withinfigurefalse}
\renewenvironment{table}
{\@withintabletrue\@float{table}}
{\end@float\@withintablefalse}
\renewenvironment{table*}
{\@withintabletrue\@dblfloat{table}}
{\end@dblfloat\@withintablefalse}
\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{10\p@}
\long\def\@makecaption#1#2{%
\if@withinfigure
\vskip\abovecaptionskip
\fi
{\small #1. #2\par}
\if@withintable
\vskip\belowcaptionskip
\fi}

% ref.number in References
\def\@biblabel#1{\indent#1.}


• If you fill the input stack in the first few lines of the document then almost certainly you have defined an infinote loop and so it will run out of stack however big you build tex. there is probably an error in the class or package defining \maketitle but inpossible to see from the image you provided (and i don't folow the external links) please try to make a small example and post here in a code section so peopel can debug – David Carlisle Oct 10 '17 at 20:34
• please paste your compilable code (even if it doesn't compile) directly into the question to give us something to test with. you can highlight the code and then click on the {} icon above the question box. – barbara beeton Oct 10 '17 at 20:36
• @barbarabeeton Thank you very much for your comments, I have edited my post with the compilable code. – user8728930 Oct 11 '17 at 14:20
• @DavidCarlisle Thank you David, I'm not sure if you also get the notification if I only reply to Barbara, but I have edited my comment with the code, do you require any other files? The template included a .cls file as well, which I can provide if that may be the source of the problem. – user8728930 Oct 11 '17 at 14:21
• the prace.cls file isn't on ctan, and that may well be part of the problem, so we'd need access to that too. – barbara beeton Oct 11 '17 at 14:30

It's a bug in the class file, add a fix immediately after the documentclass line, so it looks like:

\documentclass{prace}
\makeatletter
\long\def\authorfootnote{%
\def\thefootnote{\fnsymbol{footnote}}%
\csname c@\@mpfn\endcsname 1\relax%
\protected@xdef\@thefnmark{\thempfn}%this was xdef, which is a bad idea.
\@footnotetext}
\makeatother

• Thank you very much David, may I ask how you knew to do this and what exactly you did? I would love to be able to handle this on my own next time. Thanks again! – user8728930 Oct 12 '17 at 13:41
• I added \tracingall just before \maketitle and looked where it was looping in the log, that together with the fact that I could have guessed it was a non-robust command in a raw \edef or \write just from the title without even looking at the question, just because that's how TeX is:-) – David Carlisle Oct 12 '17 at 13:45
• @user8728930: If this answer is what you have looked for (and most likely it is, since it is written by DPC), consider to accept it please – user31729 Oct 31 '17 at 20:34