xelatex 内存问题

xelatex 内存问题

我在运行时遇到问题赛莱特

TeX capacity exceeded, sorry [main memory size=1500000].

我尝试增加内存限制texmf配置文件(还跑了fmtutil-sys),但我达到了允许的最大值并且它仍然因相同的错误而崩溃(只是内存量不同)。

除了上面提到的(崩溃时)之外,没有其他警告或错误。

我使用以下包:巴别塔丰滕克输入图形如果那么多色字体规格繁體中文繁體中文彩色

我使用 True Type 字体:

\setmainfont{LiberationSansNarrow}

文档以命令开始和结束:

\newcommand{\stardoc}[0]
{
  \begin{multicols}{4}
}


\newcommand{\donedoc}[0]
{
 \end{multicols}
}

(只是包装器(放入自定义类中,因此可以更改许多文档)。

在多列之间我包括(\包括)“大”文件(~3MB),由以下命令组成:

\newcommand{\myrow}[4]
{
 \noindent
 \vbox to 15pt {\vfil
    \hbox to \columnwidth {
      \parbox{0.97\columnwidth}{
        \tiny
        \textbf{#1}\dotfill#3\\
        \emph{#2}\hfill{#4}}%\vspace{6pt}
      }
      \vfil
     }
 }

\newcommand{\myblock}[1]
{
 \noindent
 \colorbox{gray}{
    \vbox to 15pt {\vfil
      \hbox to 0.913\columnwidth {
        \hfill\textbf{{\small #1}}\hfill
      }
      \vfil
    }
  }
}

这也是结束。日志文件:

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

Here is how much of TeX's memory you used:
 6293 strings out of 191470
 96261 string characters out of 1925444
 1500000 words of memory out of 1500000
 9402 multiletter control sequences out of 10000+200000
 6692 words of font info for 33 fonts, out of 1200000 for 2000
 605 hyphenation exceptions out of 8191
 35i,5n,37p,320b,232s stack positions out of 5000i,500n,6000p,200000b,15000s
No pages of output.

如果我将输入文件剪切至约 30% (约 1MB),那么一切都会正常并生成 pdf。

由于我不是专家,我认为自定义命令的某个地方存在错误 - 请帮助我。

编辑

根据评论中的请求,输入文件只是一系列\myrow\我的区块从数据库生成的命令。

如果我添加它就会起作用\par\不缩进在任何命令中,但这会产生空格......有没有办法让\par不产生额外的间距 - 我在添加之前的布局\par命令非常完美。

答案1

因此,找到了解决方案 - 感谢评论中的人们。

记忆力的问题在于,正如我所说的,我试图在一个段落中咀嚼太多东西,所以它中断了。首先,我尝试插入\预之前\不缩进,但这会造成框和行之间空间过大的问题。

通过在末尾插入换行符解决了该问题\myrow命令,因此它看起来像这样:

\newcommand{\myrow}[4]
{
 \noindent
 \vbox to 15pt {\vfil
    \hbox to \columnwidth {
      \parbox{0.97\columnwidth}{
        \tiny
        \textbf{#1}\dotfill#3\\
        \emph{#2}\hfill{#4}}%\vspace{6pt}
      }
      \vfil
     }

 }

这会创建段落(或允许在内存中处理所有内容之前创建页面的内容),但也不会在框和行之间创建空格。

谢谢大家

相关内容