From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Andrus Subject: Re: SageTeX in export Date: Sun, 19 Aug 2012 19:10:11 +0200 Message-ID: References: <87a9xuqgr8.fsf@fester.com> <21716.1345185018@alphaville> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T390x-0004LR-TU for emacs-orgmode@gnu.org; Sun, 19 Aug 2012 13:10:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T390w-0005Fz-Mw for emacs-orgmode@gnu.org; Sun, 19 Aug 2012 13:10:15 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:58696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T390w-0005Fv-GJ for emacs-orgmode@gnu.org; Sun, 19 Aug 2012 13:10:14 -0400 Received: by weys10 with SMTP id s10so3955828wey.0 for ; Sun, 19 Aug 2012 10:10:13 -0700 (PDT) In-Reply-To: <21716.1345185018@alphaville> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: mailinglists@nawaz.org, emacs-orgmode@gnu.org On Aug 17, 2012, at 8:30 AM, Nick Dokos wrote: > mailinglists@nawaz.org wrote: >=20 >> Hi, >>=20 >> All I need is a way for the export to: >>=20 >> 1. After running pdflatex, check if there is a file called >> ".sagetex.sage". >> 2. If it's present, run sage on it, and then rerun pdflatex. >> 3. If it's not, nothing more is left to do. >>=20 >> I'd really appreciate if someone could tell me how to enable this = with >> Org mode's export. >=20 > All you have to do is set the variable org-latex-to-pdf-process, > something like this [fn:1] >=20 > (setq org-latex-to-pdf-process=20 > '("pdflatex %f" > "if [ -f %b.sagetex.sage ] ;then sage %b.sagetex.sage ;fi" > "pdflatex %f" > "pdflatex %f")) >=20 > although as Achim Gratz pointed out in this thread: >=20 > http://thread.gmane.org/gmane.emacs.orgmode/58928 >=20 > it's probably better to use the Customization interface, particularly = if > one is an elisp beginner - do C-h v org-latex-to-pdf-process RET, read = the > documentation for the variable and then click the customize link at = the bottom > to get to the customization page. >=20 > Nick >=20 > Footnotes: >=20 > [fn:1] Note that the default setting for this variable is three = invocations of > pdflatex, so I'm just interpolating a call to sage. This is cool. I've opened a ticket [1] on sage-mode to add support for = this automatically. Hopefully, I'll get around to it fairly soon, but = if not feel free to bug me. I'll obviously have to make it a little = more robust than a simple setq, or I would do it right now. =20 -Ivan [1] = https://bitbucket.org/gvol/sage-mode/issue/10/add-support-for-sagetex-in-o= rg-latex=