代码之家  ›  专栏  ›  技术社区  ›  Yacoby

乳胶目录中的数学

  •  5
  • Yacoby  · 技术社区  · 15 年前

        \subsubsection{The expectation of \(X^2\)}
    

    导致包含目录的文件出错

    \contentsline {subsubsection}{\numberline {1.2.3}
    The expectation of \relax $X^2\relax \GenericError { }{
    LaTeX Error: Bad math environment delimiter}{
        See the LaTeX manual or LaTeX Companion for explanation.}
    {Your command was ignored.\MessageBreak Type I <command> <return> 
    to replace it with another command,\MessageBreak or <return> to 
    continue without it.}}{5}
    

    这会导致不生成文档。

    有人有办法在保留目录的情况下进行数学分区吗

    3 回复  |  直到 15 年前
        1
  •  7
  •   Stephan202 Alex Martelli    15 年前

    您应该使用Amsmath内联数学分隔符 $ 而不是 \( \)

    \subsubsection{The expectation of $X^2$}
    

    注: .toc

        2
  •  5
  •   Will Robertson    15 年前

    如果您希望继续使用 \( ... \) 作为数学分隔符,可以加载(官方支持) fixltx2e

    \( \)

        3
  •  1
  •   bandi    15 年前

    你能在表达式周围加上$符号再试一次吗?你有什么错误?