First time here? Check out the FAQ!

Ask Your Question
1

how to enter comments?

asked 11 years ago

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?

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
4

answered 11 years ago

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.

Preview: (hide)
link

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 ( 11 years ago )

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

niles gravatar imageniles ( 11 years ago )

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 ( 11 years ago )

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

kcrisman gravatar imagekcrisman ( 10 years ago )
0

answered 11 years ago

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?

Preview: (hide)
link

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 ( 11 years ago )
0

answered 7 years ago

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 #

Preview: (hide)
link

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: 11 years ago

Seen: 20,506 times

Last updated: Feb 13 '18