为什么每当我添加 \usepackage{pstricks} 或 \usepackage{tikz} 时,总是会出现以下错误?
Latex 错误:/usr/local/texlive/2013/texmf-dist/tex/latex/xcolor/xcolor.sty:60 TeX 容量超出,抱歉 [参数堆栈大小=10000]。
Latex 错误:/usr/local/texlive/2013/texmf-dist/tex/latex/xcolor/xcolor.sty:60 ==> 发生致命错误,未生成输出 PDF 文件!
但是,如果我尝试在单独的文件中编译仅包含这些包的文档,那就没问题了!
这些包似乎与我现有的包(如下所列)冲突。
任何想法都将不胜感激!非常感谢。
\usepackage{graphicx}
\usepackage{gb4e}
\usepackage{tipa}
\usepackage{setspace}
\usepackage[T1]{fontenc}
\usepackage{multirow}
\usepackage{lscape}
\usepackage{slashbox}
\usepackage{arydshln}
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage{makeidx}
\usepackage{enumitem}
以下是产生问题的代码(已删除所有其他文本)
\documentclass[11pt,a4paper]{book} \setcounter{secnumdepth}{4}
\usepackage{graphicx} \usepackage{gb4e} \usepackage{tipa} \usepackage{setspace} \usepackage[T1]{fontenc} \usepackage{multirow} \usepackage{lscape} \usepackage{slashbox} \usepackage{arydshln} \usepackage[T1]{fontenc} \usepackage{float} \usepackage{makeidx} \usepackage{enumitem} %\usepackage{pstricks} %\usepackage{tikz} \setcounter{part}{-1} \setcounter{subsection}{0} %%%% LaTeX209: %\documentstyle[a4,11pt,gb4e]{article} %% \def\bs{$\backslash$} \frenchspacing\parskip1.2ex \parindent0pt \def\bit{\vskip.05\baselineskip\hspace*{1em}\hangindent4em\hangafter1} \title{A grammatical description of Muylaq' Aymara} \author{Matt Coler} \date{} \makeindex \begin{document}
%\begin{tikzpicture} %{\usebox{\test}}; %\end{tikzpicture}
\color{white} %\color{black} % activate to see bounding box \fboxsep=0pt
% this figure is 50mm by 50mm
\newsavebox{\gaussians}
\savebox{\gaussians}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\draw (-0.5,1.5) -- (-0.2,0.5);
\draw (-0.2,0.5) -- (-0.6,0);
\end{tikzpicture}
}
\newsavebox{\gaussianss}
\savebox{\gaussianss}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.3,1.5);
\draw (-0.27,1.6) node{$\sigma$};
\draw (-0.3,1.5) -- (-0.2,0.45);
\draw (-0.2,0.45) -- (-0.6,0);
\end{tikzpicture}
}
\newsavebox{\gaussiansss}
\savebox{\gaussiansss}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\draw (-0.5,1.5) -- (-0.2,0.5);
\draw (-0.2,0.5) -- (-0.65,0);
\draw (-0.2,0.5) -- (-0.4,0);
\draw (-0.2,0.5) -- (0.5,0);
\draw (-0.2,0.5) -- (1.8,0);
\draw (-0.2,0.5) -- (2.4,0);
\end{tikzpicture}
}
\newsavebox{\oneline}
\savebox{\oneline}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\end{tikzpicture}
}
%\tikz\draw (1,1) node{$\sigma$} -- (2,2) node{B};
\begin{tikzpicture}
\draw (0,0) node {\usebox{\gaussians}};
\draw (0.7,0) node {\usebox{\gaussians}};
\draw (2.3,0) node {\usebox{\gaussians}};
\draw (3.75,0) node {\usebox{\gaussians}};
\draw (5.2,0) node {\usebox{\oneline}};
\draw (6.35,0) node {\usebox{\gaussianss}};
\draw (9.5,0) node {\usebox{\gaussiansss}};
\end{tikzpicture}
\begin{picture}(100,100)
\color{black} % for text
\put(-3,93){\Large{/mun}(a)}
\put(52,93){\Large{+}}
\put(68,93){\Large{t'(a)}}
\put(95,93){\Large{+}}
\put(110,93){\Large{k(a)}}
\put(137,93){\Large{+}}
\put(153,93){\Large{t}}
\put(165,93){\Large{+}}
\put(183,93){\Large{t(i)/}}
\put(232,93){\Large{[mun + t'+k+t+t]}}
\end{picture}
%\begin{tikzpicture}
%\psset{unit=1mm}
%\color{black} % for text
%\draw (-4.4,1.4) node{/mun};
%%\draw node{/mun(a) + t'(a) + k(a) + t + t(i)/};
%%\draw (7.6,0) node{[mun + t' + k + t + t]};
%\end{tikzpicture}
\end{document}
答案1
尝试将 移动gb4e
为最后调用的包。此外,您有两个 实例\usepackage[T1]{fontenc}
。以下是工作示例:
\documentclass{article}
\usepackage{graphicx}
\usepackage{tipa}
\usepackage{setspace}
\usepackage[T1]{fontenc} % only one instance
\usepackage{multirow}
\usepackage{lscape}
\usepackage{slashbox}
\usepackage{arydshln}
\usepackage{float}
\usepackage{makeidx}
\usepackage{enumitem}
\usepackage{pstricks}
\usepackage{tikz}
\usepackage{gb4e} % put gb4e here
\begin{document}
Hello world.
\end{document}