【发布时间】:2011-05-04 05:59:52
【问题描述】:
我正在使用 Vim Latex 套件,我喜欢它。但是在某些方面它并没有达到我想要的效果。
来自.vim/compiler/tex.vim 文件:
" Depending on the 'ignore-level', the following kinds of messages are
" ignored. An ignore level of 3 for instance means that messages 1-3 will be
" ignored. By default, the ignore level is set to 4.
"
" 1. LaTeX Warning: Specifier 'h' changed to 't'.
" This errors occurs when TeX is not able to correctly place a floating
" object at a specified location, because of which it defaulted to the
" top of the page.
" 2. LaTeX Warning: Underfull box ...
" 3. LaTeX Warning: Overfull box ...
" both these warnings (very common) are due to \hbox settings not being
" satisfied nicely.
" 4. LaTeX Warning: You have requested ...,
" This warning occurs in slitex when using the xypic package.
" 5. Missing number error:
" Usually, when the name of an included eps file is spelled incorrectly,
" then the \bb-error message is accompanied by a bunch of "missing
" number, treated as zero" error messages. This level ignores these
" warnings.
" NOTE: number 5 is actually a latex error, not a warning!
此列表未提及任何有关丢失包的信息。编译具有\usepackage 的 Tex 文件不在系统上时会注意到这一点。
通常会出现错误(添加 `\usepackage{notapackage} 时:
! LaTeX Error: File `notapackage.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
但在 vim 中,由于不支持这种类型的错误,我得到:
正如您所见,关于丢失的包裹没有任何说法,只是一个神秘的emergency stop
另一个问题是,当一个未知的选项被传递给一个包时,Vim 会打开那个包的.sty 文件,这可能会很烦人。
如何让 vim 识别这个错误?
【问题讨论】:
标签: latex compiler-errors vim