Ask Your Question

how to enter comments?

asked 2014-01-08 20:02:13 +0200

anonymous user


I'm making an assumption that this is even possible, as I cannot find anything about it in the documentation. How does one enter comments (eg just text that is not to be evaluated) into a worksheet?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2014-01-08 20:08:05 +0200

calc314 gravatar image

You can enter comments in an execution cell by beginning the line with a #.

You can open a text cell by hovering your mouse between cells until you see a blue line and shift-clicking.

In Sage Math Cloud, you can use markdown commands by starting the cell with %md and then using markdown commands.

edit flag offensive delete link more


Thank you! Can you point out to me where this is documented so I can see where I went wrong in missing it?

draeath gravatar imagedraeath ( 2014-01-08 20:35:11 +0200 )edit

Sage is based on Python, and # is the comment character in Python.

niles gravatar imageniles ( 2014-01-09 08:47:40 +0200 )edit

SageMathCloud is extremely new (first basic release was 8 months ago) and many things aren't documented yet. In particular, I don't think %md mode is documented yet. You didn't go wrong by any fault of your own.

William Stein gravatar imageWilliam Stein ( 2014-01-10 06:19:29 +0200 )edit

It is more documented now. But there should be some icon to click at the top too.

kcrisman gravatar imagekcrisman ( 2014-08-02 04:26:16 +0200 )edit

answered 2014-01-24 16:25:43 +0200

Ken Levasseur gravatar image

I interpret the answer above for SageMathCloud to be that you evaluate the expression

%md This is a comment.

To get a "text cell" containing "This is a comment"

That doesn't work for me. Is there something similar to Sage where you shift-click for formatted text?

edit flag offensive delete link more


Never mind! I just realized that the file I had imported into my project didn't have the .sagews extension. When I added it, %md worked fine.

Ken Levasseur gravatar imageKen Levasseur ( 2014-01-25 09:14:53 +0200 )edit

answered 2018-02-13 14:58:49 +0200

vikram gravatar image

How to add a multi line comment in sage?


It is as follows. First begin a line with # and go to next line start typing by giving a space or more spaces than the # character kept at the beginning .Then ,after finishing comment go to next line giving one or more spaces type #


# Vector Decomposition o lol .etc #

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


Asked: 2014-01-08 20:02:13 +0200

Seen: 18,949 times

Last updated: Feb 13 '18