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, 29 Jan 2018 15:58:25 +0100Printing latexhttps://ask.sagemath.org/question/40849/printing-latex/I am using sage and would like to implement a function that prints a variable in latex, so I can copy and paste it directly into my latex file. However I am unsure how to do this. This is what I have attempted:
def printlatex(a):
return '$', latex(a), '$'
a = 1*2
printlatex(a)
This returns the tuple `('$', 2, '$')`, which I don't want.
How would I implement the function so it returns `$2$`pytonnoobMon, 29 Jan 2018 15:58:25 +0100https://ask.sagemath.org/question/40849/