emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: nicholas.dokos@hp.com
Cc: mailinglists@nawaz.org, emacs-orgmode@gnu.org
Subject: Re: SageTeX in export
Date: Sun, 19 Aug 2012 19:10:11 +0200	[thread overview]
Message-ID: <A609F129-C9A4-47A1-BF15-C4D49F0FF68E@gmail.com> (raw)
In-Reply-To: <21716.1345185018@alphaville>

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

> mailinglists@nawaz.org 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	other threads:[~2012-08-19 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17  4:33 SageTeX in export mailinglists
2012-08-17  6:30 ` Nick Dokos
2012-08-19 17:10   ` Ivan Andrus [this message]
2012-08-23  2:04   ` mailinglists

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A609F129-C9A4-47A1-BF15-C4D49F0FF68E@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mailinglists@nawaz.org \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).