[IPython-User] ipython Notebook html issue
Perumalla, Krishna Kumar
krishna.perumalla@capgemini....
Mon Apr 16 08:49:17 CDT 2012
Thanks. How will have to add custom styling? Also, is it possible to add hyperlinks which would act as a pipe to another cell reference and execute? (execution can be done via the js maybe)
the html styling "<b>hello</b><i>world</i>" does not need any stylesheets.
Using firebug, I figured that the class used to encapsulate the "<b>hello</b><i>world</i>" is "box_flex1 output_subarea output_html rendered_html"
I tried to remove the classes dynamically using firebug, but not of much use!
Could you please suggest? (I am very poor with css) :(.
~Krishna
From: ipython-user-bounces@scipy.org [mailto:ipython-user-bounces@scipy.org] On Behalf Of Brian Granger
Sent: Thursday, April 12, 2012 11:58 PM
To: Discussions about using IPython. http://ipython.org
Subject: Re: [IPython-User] ipython Notebook html issue
This is a css issue. These cells have a clean css stylesheet so you will need to add your own styling.
Cheers,
Brian
On Wed, Apr 11, 2012 at 1:55 PM, Krishna Kumar <krishnakumar85@gmail.com<mailto:krishnakumar85@gmail.com>> wrote:
Hi,
I have been working on ipython for around a week and it is very nice. I have installed the ipython 0.13b (dev). The new notebook interface is very cool and impressive. I tried this out:
[code]
from IPython.core.display import HTML
class A(HTML):
def __init__(self):
self.wrong = 3
self.correct = 5
def calc(self):
self.wrong += 2
self.correct -= 1
def _repr_html_(self):
return "<i>wrong</i><b>%i</b><i>correct</i><b>%i</b>"%(self.wrong, self.correct)
A()
[/code]
When the code is executed, the output is not html, it displays as "wrong3correct5" (But when the same is pasted in this email, it displays properly... wrong3correct5, which indicates that the browser is not rendering the italics and the bold properly).
When I tried with:
[code]
return "<table><tr><td>wrong</td><td>%i</td></tr><tr><td>correct</td><td>%i</td></tr></table></b>"%(self.wrong, self.correct)
[/code]
It shows:
Out[4]: (in table)
wrong
3
correct
5
What could be the issue?
_______________________________________________
IPython-User mailing list
IPython-User@scipy.org<mailto:IPython-User@scipy.org>
http://mail.scipy.org/mailman/listinfo/ipython-user
--
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu<mailto:bgranger@calpoly.edu> and ellisonbg@gmail.com<mailto:ellisonbg@gmail.com>
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120416/39b6daa7/attachment-0001.html
More information about the IPython-User
mailing list