2

When I run my code using the modification to the structure.tex file for the legrand-orange book as per the the link Legrand Orange Book Mod, I get the error ! No room for a new \write. \alloc@ ...else \errmessage {No room for a new #2}\fi\fi

Here is my code:

\documentclass[11pt,fleqn]{book} 
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}

\usepackage{lipsum}

\usepackage{etex}
\reserveinserts{28}

\usepackage[svgnames]{xcolor} 
\definecolor{ocre}{RGB}{243,102,25} 
\definecolor{mygray}{RGB}{243,243,244}

\usepackage{avant} 
\usepackage{mathptmx} 
\usepackage{microtype} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}

\usepackage{calc} 

\usepackage{textcomp}

\usepackage[refsection=chapter,defernumbers=true,sorting=none,sortcites=true,autopunct=true,babel=hyphen,abbreviate=false,backref=true,backend=biber]{biblatex}
 \defbibheading{bibempty}{}

\usepackage{empheq}
\usepackage[font={color=ocre,bf},figurename=Fig.,labelfont={it}]{caption}
\usepackage[framemethod=default]{mdframed}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}
\tcbset{myformula/.style={
  arc=0pt,
  outer arc=0pt,
  %colback=ocre!10,
  colback=mygray,
  colframe=ocre,
  boxrule=0.8pt,
  left=2pt,
  right=2pt,
  highlight math style={
    arc=0pt,
    outer arc=0pt,
    colback=mygray,
    colframe=red.
    }
  }
}

\newenvironment{spread}[1]{%
  \advance\jot#1% indeed
  }{%
\ignorespacesafterend
}

%========================================================================================
%   MatLab Code
%========================================================================================

%\usepackage{fontspec}
\usepackage[numbered,framed]{matlab-prettifier}
\newcommand\ph\mlplaceholder
\makeatletter
\renewcommand\phOpDelim@mlpr{$\langle$}
\renewcommand\phClDelim@mlpr{$\rangle$}
\makeatother

%========================================================================================
%   Python and C++ Code Environment
%========================================================================================

\usepackage[pygopt={texcomments=true,style=emacs}]{pythontex}
\setpythontexlistingenv{listing}

\newcounter{sublisting}[listing]
\newcommand{\codeline}[1]{%
  \addcontentsline{lopytx}{listing}%
    {\protect\numberline{\hspace{0.5in}\thelisting.\arabic{FancyVerbLine}}\hspace{0.5in}#1}%
}

\usepackage{listings}
\usepackage{color}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
  language=Java,
  aboveskip=3mm,
  belowskip=3mm,
  showstringspaces=false,
  columns=flexible,
  basicstyle={\small\ttfamily},
  numbers=none,
  numberstyle=\tiny\color{gray},
  keywordstyle=\color{blue},
  commentstyle=\color{dkgreen},
  stringstyle=\color{mauve},
  breaklines=true,
  breakatwhitespace=true,
  tabsize=3
}

\usepackage{graphicx}
\usepackage{python}

\renewcommand{\listingname}{C++ Code}

\usepackage{caption}
\usepackage[font={color=ocre,bf,it},figurename=Fig.,labelfont={it}]{caption}
\newcommand{\figref}[2][]{% \figref[<sub-figref>]{<figref>}
  \textcolor{ocre}{\bfseries\emph{\figurename\,\ref{#2}#1}}}

\usepackage{calc} 
\usepackage{makeidx}
\makeindex

\input{structure_nofrtmatter}
%\input{structure}

\newcommand*{\refname}{Bibliography}

\begin{document}
\setcounter{secnumdepth}{3}

\frontmatter
\begingroup
\thispagestyle{empty}
\centering
\vspace*{9cm}
\par\normalfont\fontsize{35}{35}\sffamily\selectfont
Book 1\par 
\vspace*{1cm}
{\Huge Authorize}\par 
\endgroup

\noindent \textit{First printing, June 2015}

\chapterimage{chapter_head_1}

\pagestyle{empty} 

\tableofcontents 

\chapter{Chapter One}
\lipsum

\end{document} 

If I run with the original structure.tex file associate with the Legrand Orange Book , I do not get the error, however, when I run with the modified structure.tex file as per the link above, I get the error. Can you tell me how to get rid of this error so that I can complie my file with the modified structure.tex file?

8
  • 1
    The number of files which can be written (at the same time) is limited normally. Use \usepackage{morewrites} to bypass this. And as a general rule: Your documents are not compilable due to a lot of unavailable code/files. Please learn how to make a MWE.
    – user31729
    Jun 19, 2015 at 15:05
  • @ChristianHupfer, in this case, how to also include the modifed structure.tex file also, as I assume that that is the only file missing? Thanks.
    – Joe
    Jun 19, 2015 at 15:11
  • 2
    Each time you post a code we have to comment out the some \input statements and a command \chapter_image which is unknown. This gets tedious and annoying and you're repelling people wanting to help you. Sorry, but I have to be that explicit this time
    – user31729
    Jun 19, 2015 at 15:15
  • @ChristianHupfer, understood. My sincerest apologies. I will be more cognizant and try to delete the unnecessary verbiage. Thank you for helping me out! I sincerely appreciate it!
    – Joe
    Jun 19, 2015 at 15:30
  • Alright... I hope I can help you later on too
    – user31729
    Jun 19, 2015 at 16:01

1 Answer 1

1

ChristianHupfer offered the solution of using \usepackage{morewrites}. By including this package in my ME, I got the code to work. Thanks.

You must log in to answer this question.

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