sagemath / sagetex

Embed code, results of computations, and plots from the Sage mathematics software suite (https://www.sagemath.org) into LaTeX documents. Source repository for https://pypi.org/project/sagetex/ and https://ctan.org/pkg/sagetex
https://ctan.org/pkg/sagetex
Other
58 stars 22 forks source link

Sage cannot compile, when there is an empty sagesilent or sageblock #48

Open Alexnortung opened 4 years ago

Alexnortung commented 4 years ago

The following latex code will fail with the following fail.

\begin{sagesilent}

\end{sagesilent}
File "main.sagetex.sage.py", line 32
    except:
    ^
IndentationError: expected an indented block

To reproduce: Create a .tex document and include the sagetex package. Then add the codeblock above and run

pdflatex main.tex
sage main.sagetex.sage
dimpase commented 4 years ago

thanks for the report, and please feel free to provide a PR to fix this issue.