Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
2

Typesetting environment in notebook

asked 12 years ago

d3banjan gravatar image

I tried to edit the following notebook here. On editing it seems to have a rich text formatting environment of its own - how do i get it?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
4

answered 12 years ago

dazedANDconfused gravatar image

updated 11 years ago

Actually, there's a lot more available than the HTML you mentioned. Move your cursor until it's a little bit above the Sage cell. You'll see a purple line/bar appear. Press Shift at the same time you click the mouse and you'll get an extensive array of options including inserting pictures and highlighting. I don't have the karma to upload the picture. Here's a screenshot: image description

Preview: (hide)
link

Comments

Yes, for a more WYSIWYG experience. Really, both of these ways have complementary uses. People should try them both out and see what meets their needs better.

kcrisman gravatar imagekcrisman ( 12 years ago )

this is nice! this actually IS what I meant! thanks!

d3banjan gravatar imaged3banjan ( 12 years ago )

Oh, and if you put math inside of dollar signs here, it will turn into nicely typeset LaTeX. Like x2.

kcrisman gravatar imagekcrisman ( 12 years ago )
2

answered 12 years ago

Shashank gravatar image

updated 12 years ago

I never noticed that this was possible thanks for bringing it to my attention.

Here is how you can do it. Go to the top of the notebook and click edit. Then above the cell you wish to put the html text. Just write the text in html format. Here is a example, I made a plot of sin(x). When I click edit I see the following code

{{{id=1|
plot(sin(x),(x,0,10))
///
<html> 
<font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=2|

///
}}}

I change it to the following

<p style="text-align: center;"><strong><span style="font-size: xx-large;">Rich text description</span></strong></p>

{{{id=1|
plot(sin(x),(x,0,10))
///
<html> 
<font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=2|

///
}}}
Preview: (hide)
link

Comments

@Shashank wow! could you refer me to the sage reference page that deals with this?

d3banjan gravatar imaged3banjan ( 12 years ago )

Sorry. I just figured it out by going to the "view source" in the browser. But I agree that this should be a part of sage documentation.

Shashank gravatar imageShashank ( 12 years ago )

i am sorry @Shashank, but @dazedANDconfused answer is easier to access - and a better answer for the AskSage community at large!

d3banjan gravatar imaged3banjan ( 12 years ago )

@d3banjan: Well, they are each useful for different things. It's hard to use TinyMCE (the editor in the other answer) for some of the detail HTML work some folks might want. Good luck and have fun marking things up!

kcrisman gravatar imagekcrisman ( 12 years ago )

@d3banjan: I agree. I did not know that it was possible.

Shashank gravatar imageShashank ( 12 years ago )

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

Seen: 1,481 times

Last updated: Jul 26 '13