ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 13 Apr 2020 22:43:49 +0200How to show sage code results in LaTeX file and do other computations?https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/Hi!
I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway.
1. am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this?
2. Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same?
I would really appreciate any kind of useful comments or answers.
Thank you.
Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.Mon, 13 Apr 2020 08:19:36 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/Comment by Sébastien for <p>Hi! </p>
<p>I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway. </p>
<ol>
<li>am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this? </li>
<li>Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same? </li>
</ol>
<p>I would really appreciate any kind of useful comments or answers. </p>
<p>Thank you. </p>
<p>Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.</p>
https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50725#post-id-50725At page 67, it is written "*I wrote the following script example.sage inSageMath*:". The lines that follows should allow you to reproduce the results seen at page 68 (I didn't check myself).Mon, 13 Apr 2020 16:35:02 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50725#post-id-50725Comment by Shreya for <p>Hi! </p>
<p>I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway. </p>
<ol>
<li>am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this? </li>
<li>Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same? </li>
</ol>
<p>I would really appreciate any kind of useful comments or answers. </p>
<p>Thank you. </p>
<p>Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.</p>
https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50726#post-id-50726And how do I build this .sage file? In terminal?Mon, 13 Apr 2020 17:21:10 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50726#post-id-50726Comment by Sébastien for <p>Hi! </p>
<p>I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway. </p>
<ol>
<li>am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this? </li>
<li>Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same? </li>
</ol>
<p>I would really appreciate any kind of useful comments or answers. </p>
<p>Thank you. </p>
<p>Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.</p>
https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50727#post-id-50727You don't need to create such a file, you can just copy its content in a cell of the jupyter notebook, for example inside of a function `def f():` that you may call in another cell by doing `f()`Mon, 13 Apr 2020 18:35:53 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50727#post-id-50727Comment by Shreya for <p>Hi! </p>
<p>I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway. </p>
<ol>
<li>am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this? </li>
<li>Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same? </li>
</ol>
<p>I would really appreciate any kind of useful comments or answers. </p>
<p>Thank you. </p>
<p>Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.</p>
https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50729#post-id-50729Doesn't help, sorry! I'm a total noob to this whole sage world. I read some parts of sage tutorial in example.pdf but all I get ?? instead of the sage code output. It's frustrating.Mon, 13 Apr 2020 19:16:24 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50729#post-id-50729Comment by Sébastien for <p>Hi! </p>
<p>I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway. </p>
<ol>
<li>am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this? </li>
<li>Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same? </li>
</ol>
<p>I would really appreciate any kind of useful comments or answers. </p>
<p>Thank you. </p>
<p>Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.</p>
https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50737#post-id-50737Are you able to reproduce the first part in a terminal or in the jupyter notebook?
sage: E = EllipticCurve([0,0,0,17,0])
sage: E
Elliptic Curve defined by y^2 = x^3 + 17*x over Rational Field
sage: d = E.discriminant()
sage: d
-314432
sage: d.factor()
-1 * 2^6 * 17^3
sage: E.is_minimal()
TrueMon, 13 Apr 2020 22:33:42 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50737#post-id-50737Comment by Sébastien for <p>Hi! </p>
<p>I am new to Sage (just installed it a few days ago) so I apologise if this question is too basic for this site. But since I'm really stuck and have no other platform to get help, I'll go ahead with my query anyway. </p>
<ol>
<li>am writing a LaTeX document (on elliptic curves) and I wanted to do some related computations. Now I know how to embed the sage code in Latex file (you use sageblock) but I also want to show the results of those codes (like listing torsion points automatically as sage code output, the way we see it) in my LaTeX file. How do I do this? </li>
<li>Next, I saw someone's thesis here: 1812.10415 (can't post links yet, but googling this number gives that pdf) (page 68). They have shown the results of two descent like, computed the bounds on the ranks of quotients $E'(\mathbb{Q})/\phi(E(\mathbb{Q})$, $E(\mathbb{Q})/2E(\mathbb{Q})$, etc. and I couldn't find the codes to do the same in the Sage manual: Elliptic Curves on Rational Numbers. They have not only shown what sage codes they typed (which I didn't understand) but have also embedded their results in their latex file. How do I go on about doing the same? </li>
</ol>
<p>I would really appreciate any kind of useful comments or answers. </p>
<p>Thank you. </p>
<p>Edit: my system is Ubuntu 14.04 and I use sage either in terminal or jypyter notebook.</p>
https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50738#post-id-50738Ah ok, sorry, you want to do this inside of a latex file using sagetex. I was mislead by the last line of your question. You may write \sage{d.factor()} to print the result in the latex file if `d` was computed beforehand in a sageblock:
\begin{sageblock}
E = EllipticCurve([0,0,0,17,0])
d = E.discriminant()
\end{sageblock}Mon, 13 Apr 2020 22:43:49 +0200https://ask.sagemath.org/question/50716/how-to-show-sage-code-results-in-latex-file-and-do-other-computations/?comment=50738#post-id-50738