Ask Your Question
1

how to enter comments?

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

anonymous user

Anonymous

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
4

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

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

Comments

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 +0100 )edit

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

niles gravatar imageniles ( 2014-01-09 08:47:40 +0100 )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 +0100 )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 +0100 )edit
0

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

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

Comments

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 +0100 )edit
0

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

vikram gravatar image

How to add a multi line comment in sage?

ans:

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 #

illustration

# 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

Stats

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

Seen: 19,897 times

Last updated: Feb 13 '18