当我按照链接使用对 legrand-orange 书籍的 structure.tex 文件的修改来运行我的代码时罗格朗橙皮书模组,我收到错误! No room for a new \write. \alloc@ ...else \errmessage {No room for a new #2}\fi\fi
这是我的代码:
\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}
如果我使用与 Legrand Orange Book 关联的原始 structure.tex 文件运行,则不会出现错误,但是,当我按照上面的链接使用修改后的 structure.tex 文件运行时,会出现错误。您能告诉我如何消除此错误,以便我可以使用修改后的 structure.tex 文件编译我的文件吗?
答案1
ChristianHupfer 提供了使用 的解决方案\usepackage{morewrites}
。通过将此包包含在我的 ME 中,我让代码运行起来。谢谢。