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

Three possibilities for the TODO #38

Open
jimhefferon opened this issue Jul 30, 2019 · 2 comments
Open

Three possibilities for the TODO #38

jimhefferon opened this issue Jul 30, 2019 · 2 comments

Comments

@jimhefferon
Copy link

Thank you for the software, and especially the latest release, which solved a problem I did not know how to otherwise solve.

Three suggestions to consider putting in the TODO:

  1. In the documentation, at least in the sagecommandline part, you note that you can write sage: as the prefix to have Sage run it. You might give an example to show that you use ....: for multiline commands.

  2. When running sage test.sagetex.sage it would be great if in addition to the line number, it also noted the current file. I have include files and it can sometimes be confusing where the error lies. (I tried to add this myself using the currfile package but got lost in the internals of the TeXProcessor somehow.)

  3. Finally, perhaps not possible: it would be great if sagecommandline also captured the traceback that gets printed on exceptions. (As to the reason that is of interest: I have a lab manual that shows students what appears, and sometimes tracebacks appear.)

Regards, Jim

@dimpase
Copy link
Member

dimpase commented Nov 13, 2019

For 1., could you suggest a concrete example? (feel free to put into a PR, but if this sounds too hard, just post it here).

Thanks!

@jimhefferon
Copy link
Author

What I had in mind is illustrated by this file, which I just this minute tested and it compiles. I at least did not see what to do when I first tried multi-line lines so including it may prevent some user confusion.

% -*- coding: utf-8 -*-
\documentclass{article}
\usepackage{sagetex}

\usepackage{lipsum}
\begin{document}
% Text under Sage
\lipsum[1]
\begin{sagecommandline}
sage: total = 0
sage: for i in range(101):
....:    total = total + i

sage: total
\end{sagecommandline}
\lipsum[2]
\end{document}

dimpase added a commit that referenced this issue Nov 14, 2019
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

2 participants