Ask Your Question

Latex comment

asked 2019-09-20 18:37:14 +0200

Cyrille gravatar image

I would like to distribute some worksheet to student and collegue to show how SageMath is versatile. But I need to inlcude comments. I would prefer to typeset them in LaTeX, because the notebooks will be more pleasant. I have tried

show(LatexExpr("Hello world!))

but on my computer this doen't works. Is there a way to do that ?

edit retag flag offensive close merge delete


A $\LaTeX$ file can be compiled as a PDF, readable with almost anything. A worksheet needs a running Sage installation to be used... unless you export it to PDF.

So where is the point of the worksheet ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-09-21 00:37:24 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-20 20:51:36 +0200

tmonteil gravatar image

On a code cell, show(LatexExpr("\sqrt{2}")) just works. Perhaps did you forget the closing quotes.

Note that you can add longer text by changing the type of a cell to "markdown" (instead of "code"), there, you can just add latex code as $\sqrt{2}$.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-09-20 18:37:14 +0200

Seen: 419 times

Last updated: Sep 20 '19