From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: Auctex: Configure the cases when recompile is necessary Date: Mon, 13 May 2013 10:58:35 +0200 Message-ID: <87txm7w91g.fsf@yahoo.fr> References: <877gj6t0gy.fsf@mithlond.arda> <1FCC17EE-D4C2-4AF9-9ECF-E7EDDAF3C8C9@Web.DE> <8738ttu7f5.fsf@mithlond.arda> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1368459781 12602 80.91.229.3 (13 May 2013 15:43:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 May 2013 15:43:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Teemu Likonen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 13 17:42:59 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ubutt-0002eu-3V for geh-help-gnu-emacs@m.gmane.org; Mon, 13 May 2013 17:42:57 +0200 Original-Received: from localhost ([::1]:48612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubuts-0003mp-Oz for geh-help-gnu-emacs@m.gmane.org; Mon, 13 May 2013 11:42:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UboZT-0006iG-DU for help-gnu-emacs@gnu.org; Mon, 13 May 2013 04:57:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UboZS-0006C1-3X for help-gnu-emacs@gnu.org; Mon, 13 May 2013 04:57:27 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:36622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UboZR-0006Af-UV for help-gnu-emacs@gnu.org; Mon, 13 May 2013 04:57:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAKipkFGkD4Nx/2dsb2JhbABaw2SBGHSCIAEFeRAIAw4TJQ8BBEkTh3kBEqtuhlIBiH+PKAeDVQOXLIYDizKDETo Original-Received: from geodiff-mac3.ulb.ac.be (HELO geodiff-mac3) ([164.15.131.113]) by smtp.ulb.ac.be with ESMTP; 13 May 2013 10:58:50 +0200 In-Reply-To: <8738ttu7f5.fsf@mithlond.arda> (Teemu Likonen's message of "Sat, 11 May 2013 13:39:42 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 X-Mailman-Approved-At: Mon, 13 May 2013 11:42:40 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90693 Archived-At: Teemu Likonen writes: > I've been trying various things and I can get it mostly work with my own > scripts too. Then I realized that I almost always need to run the > xelatex compiler twice, so why not just write a script that simply runs > the command twice? There is probably no need for complicated magic. :-) Sometimes it requires three or more compilation, or it might require to call an external (non-latex) process between two latex passes (e.g. bibtex). Latexmk takes care of many cases automagically by using a make-like dependency system and using a list of files provided by latex (.fls file, obtained by adding the -recorder option to latex on any recent latex installation). Also Latexmk tries hard to not run latex if the target file is already up to date, thus saving your much time when compiling the whole document (another huge time saver is to compile only the region within auctex.) Using Latexmk is usually as simple as calling "latexmk yourfile.tex" (options such as -pdf or -xelatex can be used and a have an obvious meaning). If you use specific extensions that are yet unknown to latexmk (such as sagetex or asymptote) you need to create a config file to tell latexmk about it (to do once, then forget about it) ; refer to the doc if that's your case. Similar (or complementary) tools exist, such as rubber already mentionned, but I don't know anything about them. Really, using these tools will save your time in most classical situations, including multifile documents with multiple bibliographies (at least when they're all in one folder ; subfolders are a bit more complicated in my experience). -- N.