Ask Your Question
2

Typesetting environment in notebook

asked 2012-04-15 12:09:11 -0600

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?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
4

answered 2012-04-17 13:42:17 -0600

dazedANDconfused gravatar image

updated 2013-07-26 05:47:43 -0600

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

edit flag offensive delete link more

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 ( 2012-04-17 17:01:11 -0600 )edit

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

d3banjan gravatar imaged3banjan ( 2012-04-18 02:26:22 -0600 )edit

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

kcrisman gravatar imagekcrisman ( 2012-04-18 02:59:05 -0600 )edit
2

answered 2012-04-15 12:41:59 -0600

Shashank gravatar image

updated 2012-04-15 13:06:05 -0600

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|

///
}}}
edit flag offensive delete link more

Comments

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

d3banjan gravatar imaged3banjan ( 2012-04-15 18:41:42 -0600 )edit

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 ( 2012-04-15 18:56:44 -0600 )edit

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

d3banjan gravatar imaged3banjan ( 2012-04-18 02:28:58 -0600 )edit

@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 ( 2012-04-18 02:58:37 -0600 )edit

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

Shashank gravatar imageShashank ( 2012-04-18 10:07:11 -0600 )edit

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: 2012-04-15 12:09:11 -0600

Seen: 870 times

Last updated: Jul 26 '13