Skip to content

Sage9.7 & Sagetex3.6: Runaway argument for "Draw polytopes in LaTeX using TikZ" #64

@kiryph

Description

@kiryph

Consider following minimal LaTeX file:

\documentclass{article}
\usepackage{sagetex} 
\usepackage{tikz} 

\begin{document}

\sagestr{(polytopes.great_rhombicuboctahedron()).tikz([4,5,6],45,scale=0.75)}

\end{document}

It is derived from

Compiling with

$ pdflatex minimal-sagetex-issue-tikz.tex
...
(/usr/local/texlive/texmf-local/tex/latex/local/sagetex.sty
...

$ /usr/local/bin/sage minimal-sagetex-issue-tikz.sagetex.sage
Processing Sage code for minimal-sagetex-issue-tikz.tex...
Inline formula 0 (line 10)
Sage processing complete. Run LaTeX on minimal-sagetex-issue-tikz.tex again.

$ pdflatex minimal-sagetex-issue-tikz.tex

gives me follwoing error:

...
(./minimal-sagetex-issue-tikz.sagetex.sout
Runaway argument?
{{\begin {tikzpicture}[x={(0.767968cm, 0.559570cm)}, y={(-0.407418cm,\ETC.
! Paragraph ended before \@newl@bel was complete.
<to be read again>
                   \par
l.25

Manually expanding content within \newlabel{@sageinline0}{{ from .sout into the LaTeX file allows me to have the result:

Screenshot 2023-01-05 at 08 13 44

Also the example given on https://doc.sagemath.org/html/en/tutorial/sagetex.html works. It seems only a tikz related issue.

Possibly related issues:

Environment

  • macOS 12.6.1
  • MacTeX 2022
  • Sage 9.7 v1.5.3 from https://github.com/3-manifolds/Sage_macOS
    ❯ /usr/local/bin/sage --version
    SageMath version 9.7, Release Date: 2022-09-19
    
  • SageTex 3.6 installed via helper script in dmg from https://github.com/3-manifolds/Sage_macOS into /usr/local/texlive/texmf-local:
    ❯ grep -A 1 \ProvidesPackage  /usr/local/texlive/texmf-local/tex/latex/local/sagetex.sty
    \ProvidesPackage{sagetex}
      [2021/10/16 v3.6 embedding Sage into LaTeX documents]
    

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions