compile TeX from Sage

asked 2012-07-20 09:00:23 +0100

Mathemage gravatar image

updated 2015-01-25 18:07:10 +0100

FrédéricC gravatar image

Hola!

I'm working on a program which should output the results of its computations in form of a typesetted document (ideally pdf from pdflatex).

I'm trying to perfrom the final presentation part via view function, however, that doesn't seem to be the most convenient way (since view is aimed at typesetting LaTeX formulas of elements of a list). A lot of hidden code (headers, turned on math modes etc.) are really unpleasent to get around.

I'm pondering about generating an explicit .tex source code file. How can I call TeX compiler from Sage? I.e. how to compile it automatically in an own program, similarly as view does it?)

ThanX in advance!

Sage 5.1 Kubuntu 12.04

edit retag flag offensive close merge delete

Comments

Why not do it the other way around, using SageTeX? Then you could call Sage code as needed, but do all the real stuff in LaTeX. I'm not quite sure if this would help, as you are a little vague about the precise steps you

kcrisman gravatar imagekcrisman ( 2012-07-20 11:37:56 +0100 )edit

Why not do it the other way around, using SageTeX? Then you could call Sage code as needed, but do all the real stuff in LaTeX. I'm not quite sure if this would help, as you are a little vague about the precise steps you'll need.

kcrisman gravatar imagekcrisman ( 2012-07-20 11:37:58 +0100 )edit

I know what you mean & I did think about this way for quite a long time. But the truth is this my college project - which should be own Sage/Python library, not TeX project. Or maybe I just misunderstood the idea around SageTeX & it can processed via Python/Sage - is it somehow *"doable"*?

Mathemage gravatar imageMathemage ( 2012-07-20 14:50:57 +0100 )edit

Oh, I see, you mean you are making a library and trying to document it. Well, hopefully some combination of something will work.

kcrisman gravatar imagekcrisman ( 2012-07-20 15:01:34 +0100 )edit
1

Or maybe you should only do the final presentation as SageTeX?

kcrisman gravatar imagekcrisman ( 2012-07-20 15:04:22 +0100 )edit