Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\sageexample` inoperative (seems to have trouble finding its output) #49

Open
EmmanuelCharpentier opened this issue Aug 31, 2020 · 0 comments

Comments

@EmmanuelCharpentier
Copy link
Contributor

This :

\begin{sageexample}
  a,b=var("a,b")
  T=[["$f$", "$f(a+b)$", "$f(a-b)$"]]
  T.extend([[f, f(a+b).trig_expand(), f(a-b).trig_expand()] for f in[sin, cos, tan]])
  table(T, header_row=True, header_column=True)
\end{sageexample}

fails with the following output :

Traceback (most recent call last):
  File "Tst5.sagetex.sage.py", line 19, in <module>
    """, globals(), locals(), False)
  File "/usr/local/sage-9/local/lib/python3.7/site-packages/sagetex.py", line 167, in doctest
    splitup = self.split_sage_cmds(s)
  File "/usr/local/sage-9/local/lib/python3.7/site-packages/sagetex.py", line 139, in split_sage_cmds
    starts[0] = re.search(prompt, s).start()
AttributeError: 'NoneType' object has no attribute 'start'
Processing Sage code for Tst5.tex...
Sage example 0 (line 25)

**** Error in Sage code on line 32 of Tst5.tex! Traceback follows.

whereas


\begin{sageblock}
  a,b=var("a,b")
  T=[["$f$", "$f(a+b)$", "$f(a-b)$"]]
  T.extend([[f, f(a+b).trig_expand(), f(a-b).trig_expand()] for f in[sin, cos, tan]])
\end{sageblock}

$$\sage{table(T, header_row=True, header_column=True)}$$

succeeds to the expected result.

Minor booboo, but annoying (contradicts the documentation).

HTH,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant