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.

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.

111 questions
7
votes
4 answers

How to use sagetex package

I'm trying to use sagetex package, but then I found this kind of problem when running the code, may anyone help? Here is the code: \documentclass{article} \usepackage{sagetex} \begin{document} Using Sage\TeX, one can use Sage to compute things and…
4
votes
2 answers

How to store values in variables in sagetex?

The sagetex documentation (S. 5) says Also keep in mind that everything you send to Sage is done within one Sage session. This means you can define variables and reuse them throughout your LaTeX document; if you tell Sage that `foo` is 12, then…
3
votes
1 answer

Layout of Sagetex in Tex (using Kile)

If you have something like: \begin{sagesilent} G=Graphics() H=Graphics() var('x') G+=plot(cos(x),(x,0,pi)) H+= text("$\cos(x)$", (1, 1), fontsize=16, color='black') \end{sagesilent} \[ \sageplot{G+H}\] into a tex file, how can you place it on the…
2
votes
1 answer

How to display the output of a loop in SageTex

I am preparing a class on Sage, and i want the following code on my document. \documentclass{article} \usepackage{sagetex} \begin{document} \begin{sagecommandline} sage: for i in range(0,4): ....: …
2
votes
1 answer

Is there a TeX/LaTeX maths workbook like Sympy live shell?

I am looking for a mathematics workbook like Sympy live shell that you can do plots in, that has a TeX or LaTeX output.
Anon
  • 23
2
votes
1 answer

How can i compare values from sagetex with ifthenelse?

I do some calculations in my LaTeX document with sage. I want to include the results and do some comparisons. But to do that with \ifthenelse command, I need the value which is saved in the sage file. How can I get the result or is there another way…
typ42
  • 23
2
votes
1 answer

How do I write a custom command to enable Sage in Texmaker?

Asking by request to get a screenshot answer to figure out how to enable Sage in Texmaker as I apparently can't figure it out on my own.
Jason
  • 939
2
votes
1 answer

Strange result when trying to use sagetex

As a result of another question I'm trying to use Sagetex. I performed the install as directed, and even got the compile to succeed, insofar as there are no fatal errors, but it appears that sagetex isn't actually parsing anything in sage like it…
Jason
  • 939
1
vote
1 answer

Issue in sagetex with \sagestr

I'm trying to create some maths exercises with SageTeX. Here's my code: \documentclass{article} \usepackage{sagetex} \begin{document} \begin{sagesilent} x=var("x") A(x)=(x-2)^2-36 B(x)=1-(2*x-3)^2 formules=[] for k in [A,B]: …
1
vote
0 answers

%time inside sagecommandline environment

I want to show how to measure time with sage, sagetex and the environment sagecommandline. Here is a minimal example: \documentclass[a6paper,DIV=16]{scrartcl} \pagestyle{empty} \usepackage{sagetex} % arara: lualatex % arara: sagetex % arara:…
1
vote
0 answers

How to plot graphs in Latex using sagetex

Now I have got the file sage-plots-for-example.tex in sage that contains all the plots. Do I also have to put all these .eps and .png into the same folder as the tex file?
1
vote
1 answer

\sagestr does not produce plots and sabotages others

For the sake of illustration, I want to plot three functions: linear with direct \sageplot invocation, quadratic with \sagestr and sinusoidal with \sageplot However, it seems that the \sagestr does not produce any output. Morever, it sabotages the…
Display Name
  • 46,933
1
vote
1 answer

sagetex not drawing pictures

Maybe someone aldready asked this, but I have the following problem. I tried to compile an example I found here https://tex.stackexchange.com/a/483113/217249. I don't get any errors. I have sage installed and apparently sagetex.sty is known to…
1
vote
2 answers

passing mathematical function to sage function in sagetex

Would some body please help me in getting the plots, I have tried many things, like creating function('f') and then passing it like Q1 = question(1, f(x+1)) but the thing that only works is: output += r"\sageplot{plot(x+1, figsize = 2)} \\\\" which…
Sohail
  • 115
  • 3
1
vote
2 answers

SageTeX for posets

One can use SAGE to get a LaTeX output for posets. For example entering u=posets.BooleanLattice(4) print(display(u),print(latex(u))) in the sage cell (https://sagecell.sagemath.org/) will display the poset u and then give a TikZ output to obtain…
Mare
  • 291
  • 1
  • 7
1
2 3