1

When I try to use the Microtype package, I get an error when trying to compile my file using pdflatex. The erros states: TeX capacity exceeded, sorry [input stack size=5000]. \end{titlepage}.

When I exclude the Microtype package from my preamble, everything is fine. Does anaybody know what the problem is here? I have tried it both on MikeTex and TeXstudio.

My preamble:

    \documentclass[11pt]{article}
 \linespread{1}
\usepackage[textwidth=155mm,top=23.5mm,bottom=23.5mm,footskip=40pt]   {geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xparse}
\usepackage{tabularx}
\usepackage{numprint}
\usepackage{rotating}
 \usepackage{rotfloat}
\usepackage{rccol}
\usepackage[authoryear,round]{natbib}
\usepackage{apalike}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{dcolumn}
\newcolumntype{d}{D{.}{.}{3}}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage[table,xcdraw]{xcolor}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{float}
\usepackage{bigfoot}
\usepackage{mathtools}
\usepackage[table,xcdraw]{xcolor}
\usepackage{longtable}
\usepackage{grffile}
\usepackage{array}
\usepackage{pdflscape}
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{geometry}
\usepackage{epstopdf}
\usepackage{caption}
\usepackage{lscape}
\usepackage{xcolor,colortbl}
\newcommand{\done}{\cellcolor{teal}done}  %{0.9}
\newcommand{\hcyan}[1]{{\color{teal} #1}}
 \def\Item$#1${\item $\displaystyle#1$
\hfill\refstepcounter{equation}(\theequation)}
 \usepackage{natbib}
 \setlength{\bibsep}{5ex}
 \usepackage{url}
 \setlength{\parskip}{0.1 em}
 \usepackage{setspace}
 \setstretch{1.1}
 \usepackage{microtype}
 \NewDocumentCommand{\sym}{m}{#1}
    \usepackage[english]{babel} 

Thank you for your help.

Yannick

  • without a test example it will be impossible to say, but why is your preamble like that??? you load array twice (not counting loading it via tabularx), xcolor three times etc... do you really use all those packages in this document? – David Carlisle Oct 17 '16 at 16:17
  • since the error is at \end{titlepage} it surely would not be that difficult to extend your example so that it is actually an example of the problem by including the titlepage and \end{document} so that people can reproduce the error. – David Carlisle Oct 17 '16 at 16:19
  • with your preamble I get the error ! No room for a new \count . do you not get that? – David Carlisle Oct 17 '16 at 16:21
  • To avoid the no room error move bigfoot to the end of the preamble, sadly it has not yet been updated for latex 2015. – David Carlisle Oct 17 '16 at 16:23
  • Your preamble loads several packages more than once, and other packages are loaded in suboptimal ways. With still other package pairs, you should one or the other, but not both. Case in point: The lscape and pdflscape packages. – Mico Oct 17 '16 at 16:43
1

Do yourself a favor: try and organize your preamble in a more sensible way. I commented out several packages, because their job is already done by siunitx in a better way.

I also removed duplicates and changed a couple of definitions.

\documentclass[11pt]{article}

% page setup
\usepackage[
  textwidth=155mm,
  top=23.5mm,
  bottom=23.5mm,
  footskip=40pt,
  heightrounded, % <--- recommended
]{geometry}

% input and output
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

% fonts
\usepackage{microtype}
%\usepackage{lmodern} % or other font package

% math
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amssymb}

% general packages
\usepackage{xparse}
\usepackage[table,xcdraw]{xcolor}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{rotating}
\usepackage{float}
\usepackage{rotfloat}
\usepackage{pdflscape}
\usepackage{caption}
\usepackage{url}
\usepackage{setspace}

% tables and numbers
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{longtable}
%\usepackage{numprint} % siunitx does better
%\usepackage{rccol} % siunitx does better
%\usepackage{dcolumn} % siunitx does better

% bibliography
\usepackage[authoryear,round]{natbib}
\usepackage{apalike}

% footnotes
\usepackage{bigfoot}

% for filler text
\usepackage{blindtext}

% personal commands
\newcolumntype{d}{D{.}{.}{3}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}

\NewDocumentCommand{\sym}{m}{#1}
\newcommand{\done}{\cellcolor{teal}done}%{0.9}
\newcommand{\hcyan}[1]{\textcolor{teal}{#1}} % better \textcolor
\def\Item$#1${%
  \item $\displaystyle#1$\hfill\refstepcounter{equation}(\theequation)%
}

% final settings
\setlength{\bibsep}{5ex}
%\setlength{\parskip}{0.1 em}% not if you have \setstretch
\setstretch{1.1}

\begin{document}

\section{Test}

A footnote\footnote{Abc}

\blinddocument

\end{document}

This document has been tested with TeX Live from 2012 to 2016 and gives no error.

  • Thank you @egreg ! As you constructed the preamble, I have a question regarding the font size: when I want to change it to 11.5pt the font is getting smaller instead of larger? (I can say this as a fact as the total amount of pages is getting shorter.) – peter Oct 17 '16 at 19:08
  • @peter There is no 11.5pt option, only 10pt, 11pt and 12pt – egreg Oct 17 '16 at 19:28
3

The preamble as posted will give an error

! No room for a new \count .

in latex releases from 2015 onwards, until bigfoot is updated you can move it to the end of the preamble after which it works with a warning from etex package which you can ignore in this context.

The following complete document runs without error

\documentclass[11pt]{article}
 \linespread{1}
\usepackage[textwidth=155mm,top=23.5mm,bottom=23.5mm,footskip=40pt]   {geometry}
% \usepackage{geometry} already loaded

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xparse}

\usepackage{numprint}
\usepackage{rotating}
 \usepackage{rotfloat}
\usepackage{rccol}
\usepackage[authoryear,round]{natbib}
% \usepackage{natbib} already loaded

\usepackage{apalike}
\usepackage{mathtools}
%\usepackage{amsmath} loaded by mathtools

\usepackage{siunitx}

\usepackage{dcolumn}
\usepackage{tabularx}
% \usepackage{array} loaded by dcolumn and tabularx
% \usepackage{array} loaded by array

\newcolumntype{d}{D{.}{.}{3}}
\usepackage{booktabs}
% \usepackage{booktabs} already loaded


\usepackage[table,xcdraw]{xcolor}
%\usepackage[table,xcdraw]{xcolor} already loaded
%\usepackage{xcolor,colortbl} xcolor already loaded
\usepackage{colortbl}

\usepackage{amssymb}
\usepackage{float}


\usepackage{longtable}
\usepackage{grffile}
% \usepackage{graphicx} loaded by grffile

\usepackage{pdflscape}
% \usepackage{lscape} loaded by pdflscape

\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}

% \usepackage{epstopdf} probably not needed (done automatically)

\usepackage{caption}

\newcommand{\done}{\cellcolor{teal}done}  %{0.9}
\newcommand{\hcyan}[1]{{\color{teal} #1}}
 \def\Item$#1${\item $\displaystyle#1$
\hfill\refstepcounter{equation}(\theequation)}

 \setlength{\bibsep}{5ex}
 \usepackage{url}
 \setlength{\parskip}{0.1 em}
 \usepackage{setspace}
 \setstretch{1.1}
 \usepackage{microtype}% doesn't cause any error in this example
 \NewDocumentCommand{\sym}{m}{#1}
\usepackage[english]{babel} 


\usepackage{bigfoot}%needs to be late to avoid the no room for a new count error

\begin{document}

\begin{titlepage}
hello
\end{titlepage}
\end{document}
  • Thank you very much! The weird thing is, I did not get the ''! No room for a new \count .'' error, but the: eX capacity exceeded, sorry [input stack size=5000]. However, the problem has been solved after the move of \bigfoot. – peter Oct 17 '16 at 16:49
  • The colortbl package needn't be loaded either, as it's loaded b/c of the table option passed to the xcolor package. – Mico Oct 17 '16 at 16:50
  • @peter I would guess that it is the same issue on an older latex release just falling out a different way. – David Carlisle Oct 17 '16 at 16:53

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.