In my special package combination I get the error No room for new \write. \tablecontents and Bad number (16). \tablecontents.
The following MWE throws this error in pdflatex and lualatex with TeX Live 2015.
As you can see, I add the own content register loi.
I can delete nearly every package separately and the error directly vanishes.
Does anyone have an idea what is wrong with this package combination?
\documentclass{scrartcl}
% load packages
\usepackage{ifluatex}
\ifluatex
\usepackage{fontspec}
\fi
\usepackage{adjustbox, amsmath, blindtext, datatool, fancybox, fixme, graphicx, marginnote, pgfplots}
\usepackage{imakeidx}
\usepackage{biblatex}
\usepackage{glossaries}
\usepackage{hyperref}
% load package for code code highlighting
\usepackage{minted}
% define Open Issue and corresponding List of Open Issues
\newcommand{\openissue}[2][Unlabeled]{%
\par%
{\refstepcounter{loicounter}%
\phantomsection% comment out if hyperref is noy used
\addcontentsline{loi}{figure}{%
\protect\numberline{%
\ifcsname c@chapter\endcsname%
\thechapter.%
\fi%
\theloicounter%
}{#1: #2}%
}%
\textbf{Open Issue -- #1:} #2}%
\par%
}
% define counter
\makeatletter
\ifcsname c@chapter\endcsname%
\newcounter{loicounter}[chapter]%
\else
\newcounter{loicounter}%
\fi%
\newcommand*{\listopenissuesname}{List of Open Issues}
\newcommand{\listofopenissues}{%
\ifcsname chapter\endcsname%
\chapter*{\listopenissuesname}%
\else%
\section*{\listopenissuesname}%
\fi%
\@starttoc{loi}%
}
\makeatother
\fxsetup{status = draft}
\makeglossaries
\makeindex
\begin{document}
% include open issues
\listofopenissues
% include list of corrections
\listoffixmes
% include indicies
\tableofcontents % Inhaltsverzeichnis einbinden
\end{document}
\usepackage{morewrites}– egreg Jan 27 '16 at 22:33