不要让我手动中止LaTeX的编译时有错误 [英] Don't make me manually abort a LaTeX compile when there's an error

查看:1034
本文介绍了不要让我手动中止LaTeX的编译时有错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的建议这里 latexmk 是不断编译每当文档中的源变化的便捷方法。但往往当你在一个文档工作,你会最终有错误,然后乳胶将恐慌,继续前等待用户输入。这可以得到非常恼人,尤其是最近,当我砍死了一些编译乳胶直接从 EtherPad的文件,键入时连续存储。

As suggested here, latexmk is a handy way to continually compile your document whenever the source changes. But often when you're working on a document you'll end up with errors and then latex will panic and wait for user input before continuing. That can get very annoying, especially recently when I hacked up something to compile latex directly from an etherpad document, which saves continuously as you type.

有没有设置乳胶 latexmk 来使,如果它可以它只是一个错误信息中止Ť编译?或者,如果有必要,我将如何建立某种期待脚本来自动解雇的LaTeX的投诉呢?

Is there a setting for latex or latexmk to make it just abort with an error message if it can't compile? Or, if necessary, how would I set up some kind of Expect script to auto-dismiss LaTeX's complaints?

(我原以为的 pdflatex 选项 -halt上错误会做的伎俩,但显然不是。)

(I had thought pdflatex's option -halt-on-error would do the trick but apparently not.)

奖金问题:脱脂在Mac OSX是一个很好的PDF阅读器,autorefreshes当PDF变化(不像preVIEW)的除了的,每当有一个乳胶的错误也会让你再次确认要autorefreshing。 Texniscope没有这个问题,但我不得不抛弃Texniscope为其他原因。有没有一种方法,使脱脂总是自动刷新,或者是有,获取这种权利的另一个浏览器?

Bonus question: Skim on Mac OSX is a nice pdf viewer that autorefreshes when the pdf changes (unlike Preview), except that whenever there's a latex error it makes you reconfirm that you want autorefreshing. Texniscope doesn't have this problem, but I had to ditch Texniscope for other reasons. Is there a way to make Skim always autorefresh, or is there another viewer that gets this right?



  1. 获取 latexmk 这里:<一href=\"http://www.phys.psu.edu/~collins/software/latexmk-jcc/\">http://www.phys.psu.edu/~collins/software/latexmk-jcc/

以下内容添加到您的〜/ .latexmkrc 文件:

Add the following to your ~/.latexmkrc file:

$pdflatex = 'pdflatex -interaction=nonstopmode';

(对于OS X脱脂)

(For OS X with Skim)

$pdf_previewer = "open -a /Applications/Skim.app";


  • 在编辑您的源文件, foo.tex ,运行在终端如下:

    latexmk -pvc -pdf foo.tex
    


  • 使用脱脂或另一种实时的PDF查看器来查看foo.pdf。脱脂,只是看在脱脂的preferences同步选项卡,并设置它为你的编辑器。

  • Use Skim or another realtime pdf viewer to view foo.pdf. For Skim, just look at the "Sync" tab in Skim’s preferences and set it up for your editor.

    瞧!在 foo.tex 敲击保存,现在事业 foo.pdf 刷新没有做不到的事情。

    Voila! Hitting save on foo.tex will now cause foo.pdf to refresh without touching a thing.

    推荐答案

    通过MIKTEX, pdflatex 有这个命令行选项:

    With MikTeX, pdflatex has this command-line option:

      -interaction=MODE               Set the interaction mode; MODE must be one
                                      of: batchmode, nonstopmode, scrollmode,
                                      errorstopmode.
    

    这篇关于不要让我手动中止LaTeX的编译时有错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆