emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] SageTeX in export


From: Ivan Andrus
Subject: Re: [O] SageTeX in export
Date: Sun, 19 Aug 2012 19:10:11 +0200

On Aug 17, 2012, at 8:30 AM, Nick Dokos wrote:

> address@hidden wrote:
> 
>> Hi,
>> 
>> All I need is a way for the export to:
>> 
>> 1. After running pdflatex, check if there is a file called
>>   "<org_file_name>.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.
>> 
>> I'd really appreciate if someone could tell me how to enable this with
>> Org mode's export.
> 
> All you have to do is set the variable org-latex-to-pdf-process,
> something like this [fn:1]
> 
> (setq org-latex-to-pdf-process 
>      '("pdflatex %f"
>        "if [ -f %b.sagetex.sage ] ;then sage %b.sagetex.sage ;fi"
>       "pdflatex %f"
>       "pdflatex %f"))
> 
> although as Achim Gratz pointed out in this thread:
> 
>  http://thread.gmane.org/gmane.emacs.orgmode/58928
> 
> 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.
> 
> Nick
> 
> Footnotes:
> 
> [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.  

-Ivan

[1] 
https://bitbucket.org/gvol/sage-mode/issue/10/add-support-for-sagetex-in-org-latex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]