-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
sagecommandline echo all terminal output #52
Comments
The whole terminal output of a Sage command run at |
Could you provide few more details: would you like to be able to include the output of a Sage command in a terminal session? Something else? |
Hi Dima,
sorry for not getting back to you earlier …
Could you provide few more details: would you like to be able to include the output of a Sage command in a terminal session? Something else?
If this were possible, we could avoid a lot of workaround work in a typesetting project I’m working on, i.e. the coming new release of the cryptool book (I wrote you from that twitter account). See https://www.cryptool.org/en/documentation/ctbook for the *old* version.
What also would be cool is if the same would be possible if a command is returning one or more pictures, i.e. having them put into the texfile via includegraphics, but this is not really important, though it would be cool ;-)
I attached two screenshots where you can see how we did it >>before<< and how we are doing it >>now<<.
The before-version doesn’t need the print-statements and looks better for people who want to read, follow and understand the code, the now-version has the advantage that it’s ready to run, so we can offer downloads of the examples. We wanted to avoid having to maintain two sagecode versions, one runnable and another for the tex listings;
we could not use sagetex because of this terminal issue, i.e. statements and expressions handled differently; but if we could in some future, we would appreciate it; at the moment we use listings and include the sagecode from external files;
by the way, since this is not only a sagemath issue but also a tex issue: perhaps you know Dante, the german speaking TeX User Group (www.dante.de); I am a board member and the treasurer of this group and we could offer funding, if someone from the community applied for it; but mind we cannot pay man hours, but only e.g. hardware or travelling expenses; so please let me know if we could help!
Doris
… On 14. Oct 2021, at 13:26, Dima Pasechnik ***@***.***> wrote:
Could you provide few more details: would you like to be able to include the output of a Sage command in a terminal session? Something else?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
How about using \begin{sagecommandline}
sage: factor(x^2 + 2*x + 1)
\end{sagecommandline} will generate, in the final document, something like (colours might be off): sage: factor(x^2 + 2*x + 1) 42
(x + 1)^2 43 i.e. with line numbers (here start from |
Hi Doris, |
just like other non-graphics SageTeX commands, puts the Sage output into Regarding pictures: the generated plots (in |
I understand that >>Because of the way the environment is implemented, not everything is ...<< included because of the >>distinction between statements and expressions<<, as the sagetex docu tells me. I am not a good programmer and don't understand this. But I wanted to let you know that this is something that I would really appreciate, being able to automatically include the whole terminal output.
The text was updated successfully, but these errors were encountered: