I am running Windows 10 or 11 (I don't know), have WSL2 running on my system - Ubuntu distribution, and have SageMath downloaded on my computer. I have successfully established contact between all three softwares, and have been able to run .tex files containing Sage code.
From the Ubuntu terminal, I run:
cd /mnt/c/users/mynamepdflatex filename.texsage filename.sagetex.sagepdflatex filename.tex
I would like to make a TikZ (or asymptote, but that's more complicated and I believe it probably legitimately requires the python method mentioned below) animation which is based on math that is beyond TeX's capabilities, using the sagetex package. I am having trouble getting this to work and would like some advice. Worst case scenario would be making a Python script to rewrite the whole document for each frame - without using the animate package, then append them together using ImageMagick or something - which is okay if I need to. All I care about is the product; I do not care how long it takes for my computer to make it.
Here is a Minimal non-Working Example:
\documentclass{beamer}
\usepackage{sagetex,animate,tikz}
\begin{document}
\begin{sageblock}
f(x) = x
\end{sageblock}
\begin{animateinline}[palindrome]{1}
\multiframe{10}{x=0+1}{
\begin{tikzpicture}
\draw (0,0) -- (\sage{f(\x)},0);
\end{tikzpicture}}
\end{animateinline}
\end{document}
Please tell me; can I make this work for tikz, or is the Python script option the better way to go? I don't think I need to ask about whether this would work for asymptote, lol :)
Thanks!


animate. – Feb 03 '24 at 01:10