简体   繁体   English

Flymake pdflatex ubuntu 12.04 emacs 23.3.1配置错误

[英]Flymake pdflatex ubuntu 12.04 emacs 23.3.1 Configuration Error

i tried to get flymake for pdflatex running on my system. 我试图在我的系统上运行pdflatex的flymake。 The following code is included in my .emacs file: .emacs文件中包含以下代码:

(require 'flymake)
(defun flymake-get-tex-args (file-name)
(list "pdflatex"
(list "-file-line-error" "-draftmode" "-interaction=nonstopmode" file-name)))
(add-hook 'LaTeX-mode-hook 'flymake-mode)

Error: 错误:

Flymake: Configuration error has occurred while running(pdflatex -file-line-error -draftmode -interaction=nonstopmode /home/.../myfile_flymake.tex).Flymake will be switched OFF

I was searching for a solution but was not able find one. 我在寻找解决方案,但找不到。 Hopefully someone may help me. 希望有人可以帮助我。

Thanks in advance 提前致谢

I guess it was due to a line break. 我猜这是由于换行引起的。 Calling a wrapper script instead of pdflatex as follows solved the problem for me at least: 如下调用包装器脚本而不是pdflatex至少对我来说解决了这个问题:

----------[pdflatex_nobreak]---------- ---------- [pdflatex_nobreak] ----------

#!/bin/bash
export max_print_line=1000
export error_line=254
export half_error_line=238
pdflatex "$@"

From the flymake manual : 从flymake 手册

The following errors cause a warning message and switch flymake mode OFF for the buffer. 下列错误导致警告消息,并关闭flyfly模式为缓冲区。

CFGERR : Syntax check process returned nonzero exit code, but no errors/warnings were reported. CFGERR:语法检查过程返回了非零退出代码,但未报告任何错误/警告。 This indicates a possible configuration error (for example, no suitable error message patterns for the syntax check tool) 这表明可能存在配置错误(例如,语法检查工具没有合适的错误消息模式)

So my guess is that pdflatex is getting called, parsing your .tex file, and then giving a non-zero exit code without "reporting" any errors or warnings. 所以我的猜测是,将调用pdflatex,解析您的.tex文件,然后给出一个非零的退出代码,而不会“报告”任何错误或警告。

To test this, run this in your shell: 要对此进行测试,请在您的shell中运行:

pdflatex -file-line-error -draftmode -interaction=nonstopmode /home/.../myfile.tex

Now, type: 现在,键入:

echo $?

to see the exit code. 查看退出代码。 If it's non-zero and there was no indication of an error or warning, then that will explain the behavior you're seeing. 如果它不是零并且没有错误或警告的迹象,那么这将解释您所看到的行为。

I just asked a question focused on this exact situation here: Using emacs for .tex files with Flymake - error with unbalanced braces 我只是在这里问了一个针对这种情况的问题: 将Emacs与Flymake一起用于.tex文件-大括号不平衡错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM