Ask Your Question
2

Typesetting environment in notebook

asked 2012-04-15 19:09:11 +0100

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 20:42:17 +0100

dazedANDconfused gravatar image

updated 2013-07-26 12:47:43 +0100

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-18 00:01:11 +0100 )edit

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

d3banjan gravatar imaged3banjan ( 2012-04-18 09:26:22 +0100 )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 09:59:05 +0100 )edit
2

answered 2012-04-15 19:41:59 +0100

Shashank gravatar image

updated 2012-04-15 20:06:05 +0100

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-16 01:41:42 +0100 )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-16 01:56:44 +0100 )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 09:28:58 +0100 )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 09:58:37 +0100 )edit

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

Shashank gravatar imageShashank ( 2012-04-18 17:07:11 +0100 )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 19:09:11 +0100

Seen: 1,415 times

Last updated: Jul 26 '13