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.Wed, 14 Aug 2013 09:51:50 +0200Is it possible to call a Sage command from within a text cell in the Sage Notebook and display the output inline as latex?https://ask.sagemath.org/question/10065/is-it-possible-to-call-a-sage-command-from-within-a-text-cell-in-the-sage-notebook-and-display-the-output-inline-as-latex/I know it is possible to insert latex inline within a text cell in the Sage Notebook, but is it possible to have that being the output of a Sage command? Thanks!Wed, 14 Aug 2013 05:37:07 +0200https://ask.sagemath.org/question/10065/is-it-possible-to-call-a-sage-command-from-within-a-text-cell-in-the-sage-notebook-and-display-the-output-inline-as-latex/Answer by ppurka for <p>I know it is possible to insert latex inline within a text cell in the Sage Notebook, but is it possible to have that being the output of a Sage command? Thanks!</p>
https://ask.sagemath.org/question/10065/is-it-possible-to-call-a-sage-command-from-within-a-text-cell-in-the-sage-notebook-and-display-the-output-inline-as-latex/?answer=15343#post-id-15343No you can't. But you can take the output of a sage command and get the latex out of it. To do so right click on the output and then select `Show math as` -> `tex command`.
You can then paste that latex into the text cell, enclosed within `$` symbols.
Edit: I forgot to add. You need to either use `view()` or `pretty_print()` or enable the Typeset check box to get a typeset output.Wed, 14 Aug 2013 09:51:50 +0200https://ask.sagemath.org/question/10065/is-it-possible-to-call-a-sage-command-from-within-a-text-cell-in-the-sage-notebook-and-display-the-output-inline-as-latex/?answer=15343#post-id-15343