报错如下:

chevron_right
Incomplete \iffalse; all text was ignored after line 187.

意思是 \iffalse 没有被正确闭合,导致从第 187 行开始的所有内容都被忽略了。\iffalse 是一个 条件判断命令,通常和 \fi 配对使用。它的作用是:“从这里开始忽略内容,直到遇到 \fi 为止”。

原文如下:

\begin{figure}[htb]
\centering
\begin{subfigure}[b]{0.225\textwidth}
    \centering
    \includegraphics[width=\textwidth]{figures/chapter6/RATIO_WHY_sssp.pdf}
    \caption{SSSP。}
    \label{fig:sssp_AP}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.225\textwidth}
    \centering
    \includegraphics[width=\textwidth]{figures/chapter6/RATIO_WHY_cc.pdf}
    \caption{CC。}
    \label{fig:cc_AP}
\end{subfigure}
\capvspace
\caption{由 DAMON~\upcite{DAMON1,DAMON2,DAMONweb} 工具测得的两种工作负载的内存访问模式,解释了图 \ref{fig:dram_acs_ratio} 中 DRAM 访问比例的不同趋势。}
\label{fig:acs_pattern}
\figvspace
\end{figure}

显然,这段代码 本身没有 \iffalse,也没有未闭合的 \if… 结构。

报错log:

)
! Incomplete \iffalse; all text was ignored after line 187.
<inserted text> 
                \fi 
l.138 \input{chapters/chapter6}
                               
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

)
! Incomplete \iffalse; all text was ignored after line 187.
<inserted text> 
                \fi 
<*> demo
        
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

! Emergency stop.
<*> demo
        
*** (job aborted, no legal \end found)

没办法,笔者只好将这段代码注释、增量修改来定位错误。发现这段代码注释掉就能正常编译了:\caption{由 DAMON~\upcite{DAMON1,DAMON2,DAMONweb} 工具测得的两种工作负载的内存访问模式,解释了图 \ref{fig:dram_acs_ratio} 中 DRAM 访问比例的不同趋势。}

原因:
\upcite 很多中文模板自定义,内部可能用 \if... 判断中英文;导致展开的时候出现了bug。


文章作者: 易百分
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 易百分 !
  目录