簡體   English   中英

Flymake pdflatex ubuntu 12.04 emacs 23.3.1配置錯誤

[英]Flymake pdflatex ubuntu 12.04 emacs 23.3.1 Configuration Error

我試圖在我的系統上運行pdflatex的flymake。 .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)

錯誤:

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

我在尋找解決方案,但找不到。 希望有人可以幫助我。

提前致謝

我猜這是由於換行引起的。 如下調用包裝器腳本而不是pdflatex至少對我來說解決了這個問題:

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

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

從flymake 手冊

下列錯誤導致警告消息,並關閉flyfly模式為緩沖區。

CFGERR:語法檢查過程返回了非零退出代碼,但未報告任何錯誤/警告。 這表明可能存在配置錯誤(例如,語法檢查工具沒有合適的錯誤消息模式)

所以我的猜測是,將調用pdflatex,解析您的.tex文件,然后給出一個非零的退出代碼,而不會“報告”任何錯誤或警告。

要對此進行測試,請在您的shell中運行:

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

現在,鍵入:

echo $?

查看退出代碼。 如果它不是零並且沒有錯誤或警告的跡象,那么這將解釋您所看到的行為。

我只是在這里問了一個針對這種情況的問題: 將Emacs與Flymake一起用於.tex文件-大括號不平衡錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM