我遇到了一个相当大的项目的问题。目录是空的,并No room for a new \write.
抛出Bad number (16).
了错误消息。
笔记:我已在该问题末尾附上了代码。
一些背景信息:
- 在 OverLeaf 中书写
- 版本 2022
- 编译器:pdfLaTeX
- 文献类别:回忆录
问题:
我已经大大缩小了问题的范围并发现,如果我删除以下任一代码块,问题就不会出现。
该tikz
块(在序言的开头):
\usepackage{tikz}
\usepackage{tikz-cd}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
命令glossary
(在序言末尾):
\newglossary{introduktion}{sym1}{sbl1}{Faglig Introduktion}
\newglossary{ssh}{sym2}{sbl2}{Sandsynlighedsteori}
\newglossary{gruppe}{sym3}{sbl3}{Gruppeteori}
\newglossary{knudeteori}{sym5}{sbl5}{Knudeteori}
\newglossary{spil}{sym4}{sbl4}{Kombinatorisk Spilteori}
事实上,只需删除其中一个命令\newglossary
即可解决该问题。
这让我相信这可能是某种内存问题?如果是这样,我该如何解决?
我的代码
Symboler.tex
这是我的代码。我的目录中还有一个名为的空文件setup
。我已将整个前言包含在内,因为我认为如果这实际上是一个内存问题,它可能与此有关。
\documentclass[b5paper,twoside,12pt]{memoir}
\usepackage[utf8]{inputenc}%Nødvendig for danske bogstaver
\usepackage[danish]{babel}%Sørger for at ting LaTeX gør automatisk er på dansk
\usepackage[twoside, inner=38mm, outer=38mm, top=30mm, bottom=30mm]{geometry}
\usepackage{lipsum}%Fyldtekst, til brug under test af layoutet
\usepackage{float}
\usepackage{graphicx}
\usepackage{epstopdf}%Tillader eps filer
\interfootnotelinepenalty=10000 %undgår at fodnoter bliver spilittet op.
\usepackage{color}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{wrapfig} % til at få figurer i tekst
\usepackage{forloop}
\usepackage{pdfpages} % til at importere/sammensætte pdf-filer
\usepackage{icomma}
%Fonts:
\usepackage{anyfontsize}
\usepackage[T1]{fontenc}
%Tikz:
\usepackage{tikz}
\usepackage{tikz-cd}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
% Matematik ting
\usepackage{amsthm}% til theorems, definitions osv. i matematik
\usepackage{amssymb} % til visse matematik-symboler såsom \blacksquare
\usepackage{amsmath,amsfonts,mathtools,wasysym}
\usepackage{mathrsfs} %For mathscr font
\usepackage{bm} % bold math
\usepackage{pifont}
\providecommand{\parbreak}{\\[10pt]}
\newcommand\lcm{\text{lcm}}
\renewcommand{\gcd}{\text{sfd}}
\renewcommand{\lcm}{\text{mfm}}
\renewcommand{\varnothing}{\emptyset}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\renewcommand{\qedsymbol}{$\blacksquare$}
\let\modstrid\lightning%Modstridslyn
\let\oldphi\phi
\let\oldepsilon\epsilon
\renewcommand{\epsilon}{\varepsilon}
\renewcommand{\phi}{\varphi}
\providecommand{\abs}[1]{\lvert#1\rvert}
\renewcommand{\abs}[1]{\left|#1\right|}
\renewcommand{\bar}{\overline}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
%disjoint union start
\makeatletter
\providecommand*{\cupdot}{%
\mathbin{%
\mathpalette\@cupdot{}%
}%
}
\newcommand*{\@cupdot}[2]{%
\ooalign{%
$\m@th#1\cup$\cr
\sbox0{$#1\cup$}%
\dimen@=\ht0 %
\sbox0{$\m@th#1\cdot$}%
\advance\dimen@ by -\ht0 %
\dimen@=.5\dimen@
\hidewidth\raise\dimen@\box0\hidewidth
}%
}
\providecommand*{\bigcupdot}{%
\mathop{%
\vphantom{\bigcup}%
\mathpalette\@bigcupdot{}%
}%
}
\newcommand*{\@bigcupdot}[2]{%
\ooalign{%
$\m@th#1\bigcup$\cr
\sbox0{$#1\bigcup$}%
\dimen@=\ht0 %
\advance\dimen@ by -\dp0 %
\sbox0{\scalebox{2}{$\m@th#1\cdot$}}%
\advance\dimen@ by -\ht0 %
\dimen@=.5\dimen@
\hidewidth\raise\dimen@\box0\hidewidth
}%
}
\makeatother
%disjoint union en
%Referencer
\usepackage{csquotes}
\usepackage[hidelinks]{hyperref}%Tillader links
\usepackage{memhfixc}
\usepackage[danish]{cleveref}
%\renewcommand{\ref}[1]{\cref{#1}}
% Sætter format af resultatet af \cref
\creflabelformat{equation}{#2(#1)#3}
\crefrangelabelformat{equation}{#3(#1)#4 to #5(#2)#6}
\crefname{equation}{ligning}{ligningerne}
\Crefname{equation}{Ligning}{Ligningerne}
\crefname{section}{afsnit}{afsnitene}
\Crefname{section}{Afsnit}{Afsnitene}
\crefname{figure}{figur}{figurene}
\Crefname{figure}{Figur}{Figurene}
\crefname{table}{tabel}{tabellerne}
\Crefname{table}{Tabel}{Tabellerne}
\crefname{opgave}{opgave}{opgaverne}
\Crefname{opgave}{Opgave}{Opgaverne}
\crefname{delopgave}{delopgave}{delopgaverne}
\Crefname{delopgave}{Delopgave}{Delopgaverne}
% definition af matematiske environments
\usepackage{aliascnt}
\theoremstyle{definition}
\newtheorem{theorem}{Sætning}[section]
\newtheorem*{theorem*}{Sætning}
\crefname{theorem}{sætning}{sætninger}
\newaliascnt{lemma}{theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem*{lemma*}{Lemma}
\aliascntresetthe{lemma}
\crefname{lemma}{lemma}{lemmaer}
\newaliascnt{proposition}{theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem*{proposition*}{Proposition}
\aliascntresetthe{proposition}
\crefname{proposition}{proposition}{propositioner}
\newaliascnt{corollary}{theorem}
\newtheorem{corollary}[theorem]{Korollar}
\newtheorem*{corollary*}{Korollar}
\aliascntresetthe{corollary}
\crefname{corollary}{korollar}{korollarer}
\theoremstyle{definition}
\newaliascnt{definition}{theorem}
\newtheorem{definition}[theorem]{Definition}
\newtheorem*{definition*}{Definition}
\aliascntresetthe{definition}
\crefname{definition}{definition}{definitioner}
\newaliascnt{example}{theorem}
\newtheorem{example}[theorem]{Eksempel}
\newtheorem*{example*}{Eksempel}
\aliascntresetthe{example}
\crefname{example}{eksempel}{eksempler}
\let\Oldendexample\endexample%
\def\endexample{\hfill$\circ$\Oldendexample}%
\newtheorem{remark}[theorem]{Bemærkning}
\newtheorem*{remark*}{Bemærkning}
\newtheorem{metode}{Metode}
% definition af matematiske environments SLUT
%Headings
\makepsmarks{headings}{%
\createmark{chapter}{right}{nonumber}{\chaptername\ }{. \ }
\createmark{section}{right}{shownumber}{}{. \space}}
\makeoddhead{headings}{}{}{\rightmark}
\makeevenhead{headings}{\leftmark}{}{}
\makeoddfoot{headings}{}{}{\thepage}
\makeevenfoot{headings}{\thepage}{}{}
\copypagestyle{chapter}{plain}
\makeoddfoot{chapter}{}{}{\thepage}
\makeevenfoot{chapter}{\thepage}{}{}
\numberwithin{equation}{chapter}
%Fjerner kapitelnummerering fra sektioner
\renewcommand*\thesection{\arabic{section}}
%Pagestyles:
\makepagestyle{mainpagestyle}
\makeheadrule{mainpagestyle}{\textwidth}{\normalrulethickness}
\makeevenhead{mainpagestyle}{\thepage}{}{\itshape\leftmark}
\makeoddhead{mainpagestyle}{\itshape\rightmark}{}{\thepage}
\makeatletter
\makepsmarks{mainpagestyle}{
\createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ }
\createmark{section}{right}{shownumber}{}{. \ }
}
\makeatother
\makepagestyle{refpagestyle}
\makeheadrule{refpagestyle}{\textwidth}{\normalrulethickness}
\makeevenhead{refpagestyle}{\thepage}{}{}
\makeoddhead{refpagestyle}{}{}{\thepage}
%SLUT pagestyles
%Litteraturliste, index og symbolliste
\usepackage[backend=biber,sorting=none]{biblatex}
\addbibresource{Kilder.bib}
\usepackage{makeidx}
\usepackage{imakeidx}
\makeindex[intoc]
%Så der ikke er konflikt mellem glossaries og memoir
\let\printglossary\relax
\let\theglossary\relax
\let\endtheglossary\relax
%
\usepackage[acronym,nonumberlist]{glossaries}
\usepackage[automake]{glossaries-extra}
\newglossary{introduktion}{sym1}{sbl1}{Faglig Introduktion}
\newglossary{ssh}{sym2}{sbl2}{Sandsynlighedsteori}
\newglossary{gruppe}{sym3}{sbl3}{Gruppeteori}
\newglossary{knudeteori}{sym5}{sbl5}{Knudeteori}
\newglossary{spil}{sym4}{sbl4}{Kombinatorisk Spilteori}
\setglossarysection{section}
\renewcommand*{\glsclearpage}{}
\renewcommand*{\glspostdescription}{}
\newglossarystyle{symbolliste}{%
\glossarystyle{list}%
\renewcommand*{\glossaryentryfield}[5]{%
\item[\glsentryitem{##1}\glstarget{##1}{##2}]%
\hspace{1cm}##3\glspostdescription\space ##5}%
}
\makeglossaries
\loadglsentries{setup/Symboler}
\begin{document}
\tableofcontents
\chapter{One}\label{cha:One}
test
\end{document}
由 daleif 添加:这是一个更简短的例子
\documentclass{memoir}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}%Tillader links
\usepackage[danish]{cleveref}
\usepackage[backend=biber,sorting=none]{biblatex}
\usepackage{imakeidx}
\makeindex[intoc]
\usepackage[acronym,nonumberlist]{glossaries}
\usepackage[automake]{glossaries-extra}
\newglossary{introduktion}{sym1}{sbl1}{Faglig Introduktion}
\newglossary{ssh}{sym2}{sbl2}{Sandsynlighedsteori}
\newglossary{gruppe}{sym3}{sbl3}{Gruppeteori}
\newglossary{knudeteori}{sym5}{sbl5}{Knudeteori}
\newglossary{spil}{sym4}{sbl4}{Kombinatorisk Spilteori}
\makeglossaries
\begin{document}
\tableofcontents*
test
\end{document}