A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [sagetex]

SageTeX is a package enabling Sage mathematics software to be used from within LaTeX documents in a wide variety of ways, similar to Sweave in R.

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
333 views

How to use sagesilent (or verbatim) environment in pgffor loops?

I want to create different versions of an exam paper and corresponding sample solutions using sagetex. I need to assign variables for more involved computations, so I am reliant on the sagesilent ...
1
vote
0answers
72 views

Simplifying fractions in SageTEX

I'm new to SageTex. Here's my code: \documentclass[10pt]{article} \usepackage{sagetex} \begin{document} \begin{sageblock} var('a,b') a = 3 \end{sageblock}\\ $\sage{(a-6)/(b-1)}$ \end{...
1
vote
0answers
167 views

Change the output of the sage function latex() on a string

Currently if you run the sage command latex('a string') using sage (or sagetex) the latex output looks like: \text{\texttt{a{ }string}}. I would like to eliminate either of these (preferably the \...
1
vote
0answers
198 views

Create new command python

I want create a new command in python, in https://tex.stackexchange.com/a/234232/153360 add the command sage to pythontex. How can I change or add a command which output a string instead of a latex ...
1
vote
0answers
263 views

Integrating SageTex and Kile/TexStudio in Linux

I had followed the instructions given in the answer to a similar question, but it seems that sage never gets launched once pdf is created in that integration. I am attaching screenshot of log and ...
1
vote
0answers
46 views

Bug with optional arguments in sagetex?

I can't seem to find where to report this bug, and I wanted to see if it was either known about, or repeatable by others. When you compile sage code using the sagetex package it is suppose to ...
1
vote
0answers
56 views

Using sagetex with preamble

I want to use Sage via sagetex in my TeX files. It works. But if I use a precompiled preamble and use it in the tex document with %&preamble in the first line, the already computed sageoutputs ...
1
vote
0answers
275 views

\sagestr(output) does not insert “output” in the LaTeX code.

This question is related to "Using sageTeX to define a variable for a TikZ picture" . To simplify the answer I want to introduce in my LaTeX code the new command "\def \crt{6.00000000000000}" where ...
1
vote
0answers
106 views

A \newcommand type option that runs all subarguments and saves static text

I am trying to write code that uses sage in it, and have a bit of a problem with randomizing stuff around the code. The sagetex part isn't too important (I don't think), what is important is that if I ...
1
vote
0answers
319 views

How to make a package using sagetex and sage-commands

I am trying to make my own package building on sagetex. It starts with \RequirePackage{sagetex} and I want it to execute some 'sagesilent' code as for instance \newcommand{\loadsagefunction}{ \...
0
votes
0answers
23 views

SageTex on PC MikTeX issue

I am trying to run the LaTeX/SageTeX code presented in John Palmieri answer. The file compiles, but the output PDF is missing all mathematical Sage answers and yet there are no error messages (e.g, no ...
0
votes
1answer
40 views

Directly input a sage file in a sagetex block

Is there a command similar to \lstinputlisting with sagetex, which would import directly a .sage file in the relevant block, and have it evaluated by sagetex? If not, how would one write such a ...
0
votes
0answers
72 views

SageTex installed, but not compiling

I've installed SageTex in my texmf tree. Latex is running using WinEdt and appears to see the style file, as I have the output files example.sagetex.sage from example.tex. My issue is the second ...
0
votes
0answers
72 views

VimLatex-suite SageTex compile shortcut

I am using LaTeX in Vim with VimLaTeX-Suite and i just started using Sage and i want to implement SageTex in my documents, but everytime i want to compile a have to follow this process in the terminal ...
0
votes
0answers
45 views

Relaxing a command's requirement to be run in mathmode (specifically \sage in tikz \draw command)

I would like to be able to build a dynamic tikz picture using some random numbers generated via sage. Presently this seems to fail because tikz doesn't like the mathmode that sage has to be run inside ...