TeX 容量超出,抱歉

TeX 容量超出,抱歉

我使用的是 Mac OS X Lion 最新版本,在尝试编译大型多页项目时出现错误。这是在添加另一个代码清单(如下所示)后发生的。完整错误如下:

 TeX capacity exceeded, sorry [save size=50000]. ^^Imoreemph={}] (followed by: )    implementation.tex  /report_root    line 1642   Texlipse Build Error

我正在使用的代码清单如下(没有什么根本错误......)只是试图解释自动矢量化代码的样子:

    {\assemblycode
\begin{lstlisting}[
    caption={Generated assembly auto-vectorized code},
    label={lst:givens4autovectass},
    moreemph={}]
L..LN52641:
        jbe       L_B221.22     # Prob 10%                      #419.29
L..LN52642:
L_B221.19:                      # Preds L_B221.18
        movl      %r13d, (%rsp)                                 #
        movsd     %xmm4, 696(%rsp)                              #
        movsd     %xmm1, 688(%rsp)                              #
        movsd     %xmm6, 680(%rsp)                              #
        movsd     %xmm7, 672(%rsp)                              #
        movsd     %xmm8, 616(%rsp)                              #
        movq      152(%rsp), %r11                               #
        movq      168(%rsp), %r13                               #
        movq      160(%rsp), %r14                               #
L..LN52643:
                                # LOE rax rdx rcx rbx rsi rdi r8 r9 r10 r11 r12 r13 r14 r15 xmm3 xmm9 xmm10
L_B221.20:                      # Preds L_B221.19 L_B221.20
L..LN52644:
        movsd     (%r8,%r11,8), %xmm7                           #420.11
L..LN52645:
        movaps    %xmm9, %xmm11                                 #427.14
L..LN52646:
        movsd     -32(%r14,%r11,8), %xmm8                       #421.11
L..LN52647:
        movaps    %xmm10, %xmm13                                #427.23
L..LN52648:
        mulsd     %xmm8, %xmm11                                 #427.14
L..LN52649:
        mulsd     %xmm7, %xmm13                                 #427.23
L..LN52650:
        mulsd     %xmm10, %xmm8                                 #426.23
L..LN52651:
        mulsd     %xmm9, %xmm7                                  #426.14
L..LN52652:
        subsd     %xmm13, %xmm11                                #427.23
L..LN52653:
        addsd     %xmm7, %xmm8                                  #426.23
L..LN52654:
        movsd     616(%rsp), %xmm1                              #431.14
L..LN52655:
        movsd     672(%rsp), %xmm4                              #431.23
L..LN52656:
        movaps    %xmm1, %xmm2                                  #431.14
L..LN52657:
        movsd     -64(%rcx,%r11,8), %xmm12                      #422.11
\end{lstlisting}}
\

在这里我找到了配置文件,但我究竟要做什么才能增加这个限制?

/$ find . -name "texmf.cnf"
find: ./dev/fd/3: Not a directory
find: ./dev/fd/4: Not a directory
./opt/local/etc/texmf/texmf.cnf
./opt/local/share/texmf/doc/generic/pgf/text-en/texmf.cnf
./opt/local/share/texmf/web2c/texmf.cnf
./usr/local/texlive/2011/texmf/web2c/texmf.cnf
./usr/local/texlive/2011/texmf-dist/doc/generic/pgf/text-en/texmf.cnf
./usr/local/texlive/2011/texmf-dist/doc/latex/pgfplots/texmf.cnf
./usr/local/texlive/2011/texmf.cnf

更新:汇编代码脚本:

\lstdefinelanguage{myAssembly}{
keywords={movl,movsd,movsd,movsd,movq,movaps,mulsd,subsd,addsd},
    emph={xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15,xmm16},
sensitive=true,
morecomment=[l]{\#},
morecomment=[s]{}{},
morestring=[b]",
}

\newcommand{\assemblyemph}{\lstset{
    language=myAssembly,
    keywordstyle=\color[HTML]{333399}\textbf,
    identifierstyle=,
    stringstyle=\color[HTML]{008888},
    commentstyle=\color[HTML]{880000},
    emphstyle=\color[HTML]{3333FF},
    mathescape=false
}}

  % This is the command to use when including assembly Code 
  \newcommand{\assemblycode}{\bigcodecommon\assemblyemph}

答案1

错误是由于morecomment=[s]{}{}字符必需的在论点中。

不过我不会使用这种输入方式。也许像下面这样更好。

\documentclass{article}
\usepackage{listings,xcolor}

\lstdefinelanguage{myAssembly}{
keywords={movl,movsd,movsd,movsd,movq,movaps,mulsd,subsd,addsd},
    emph={xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15,xmm16},
sensitive=true,
morecomment=[l]{\#},
morestring=[b]",
}

\definecolor{assemblykeyword}{HTML}{333399}
\definecolor{assemblystring}{HTML}{008888}
\definecolor{assemblycomment}{HTML}{880000}
\definecolor{assemblyemph}{HTML}{3333FF}

\lstnewenvironment{assembly}[1][]
  {\lstset{
    language=myAssembly,
    keywordstyle=\color{assemblykeyword}\bfseries,
    identifierstyle=,
    stringstyle=\color{assemblystring},
    commentstyle=\color{assemblycomment},
    emphstyle=\color{assemblyemph},
    mathescape=false,
    #1,
  }}
  {}

\begin{document}
\begin{assembly}[%
  caption={Generated assembly auto-vectorized code},%
  label={lst:givens4autovectass}]
L..LN52641:
        jbe       L_B221.22     # Prob 10%                      #419.29
L..LN52642:
L_B221.19:                      # Preds L_B221.18
        movl      %r13d, (%rsp)                                 #
        movsd     %xmm4, 696(%rsp)                              #
        movsd     %xmm1, 688(%rsp)                              #
        movsd     %xmm6, 680(%rsp)                              #
        movsd     %xmm7, 672(%rsp)                              #
        movsd     %xmm8, 616(%rsp)                              #
        movq      152(%rsp), %r11                               #
        movq      168(%rsp), %r13                               #
        movq      160(%rsp), %r14                               #
L..LN52643:
                                # LOE rax rdx rcx rbx rsi rdi r8 r9 r10 r11 r12 r13 r14 r15 xmm3 xmm9 xmm10
L_B221.20:                      # Preds L_B221.19 L_B221.20
L..LN52644:
        movsd     (%r8,%r11,8), %xmm7                           #420.11
L..LN52645:
        movaps    %xmm9, %xmm11                                 #427.14
L..LN52646:
        movsd     -32(%r14,%r11,8), %xmm8                       #421.11
L..LN52647:
        movaps    %xmm10, %xmm13                                #427.23
L..LN52648:
        mulsd     %xmm8, %xmm11                                 #427.14
L..LN52649:
        mulsd     %xmm7, %xmm13                                 #427.23
L..LN52650:
        mulsd     %xmm10, %xmm8                                 #426.23
L..LN52651:
        mulsd     %xmm9, %xmm7                                  #426.14
L..LN52652:
        subsd     %xmm13, %xmm11                                #427.23
L..LN52653:
        addsd     %xmm7, %xmm8                                  #426.23
L..LN52654:
        movsd     616(%rsp), %xmm1                              #431.14
L..LN52655:
        movsd     672(%rsp), %xmm4                              #431.23
L..LN52656:
        movaps    %xmm1, %xmm2                                  #431.14
L..LN52657:
        movsd     -64(%rcx,%r11,8), %xmm12                      #422.11
\end{assembly}

\end{document}

但请注意,在 的可选参数中,必须屏蔽行尾assembly

相关内容