This is a css issue. These cells have a clean css stylesheet so you will need to add your own styling.<div><br></div><div>Cheers,</div><div><br></div><div>Brian<br><div><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 1:55 PM, Krishna Kumar <span dir="ltr"><<a href="mailto:krishnakumar85@gmail.com">krishnakumar85@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>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:</div>
<div><br>
</div><div>[code]</div><div><div>from IPython.core.display import HTML</div><div><br></div><div>class A(HTML):</div><div> def __init__(self):</div><div> self.wrong = 3</div><div> self.correct = 5</div><div>
</div><div> def calc(self):</div><div> self.wrong += 2</div><div> self.correct -= 1</div><div> </div><div> def _repr_html_(self):</div><div> return "<i>wrong</i><b>%i</b><i>correct</i><b>%i</b>"%(self.wrong, self.correct)</div>
</div><div><br></div><div>A()</div><div>[/code]</div><div><br></div><div>When the code is executed, the output is not html, it displays as "wrong3correct5"<b> </b>(But when the same is pasted in this email, it displays properly...<b> </b><i>wrong</i><b>3</b><i>correct</i><b>5</b>, which indicates that the browser is not rendering the italics and the bold properly).</div>
<div><br></div><div>When I tried with:</div><div>[code]</div><div>return "<table><tr><td>wrong</td><td>%i</td></tr><tr><td>correct</td><td>%i</td></tr></table></b>"%(self.wrong, self.correct)</div>
<div>[/code]</div><div>It shows:</div><div><div><div><div><div>
Out[4]: (in table)</div><div><table><tbody><tr><td>wrong</td><td>3</td></tr><tr><td>correct</td><td>5</td></tr></tbody></table></div></div></div></div><div>
<div><div><br></div><div><div><div style="overflow:hidden;width:3px;min-height:0px"><textarea style="padding-top:0px;padding-left:0px;width:1px;min-height:1em"></textarea></div>
</div></div></div></div></div><div>What could be the issue?</div>
<br>_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Brian E. Granger<br>Cal Poly State University, San Luis Obispo<br><a href="mailto:bgranger@calpoly.edu" target="_blank">bgranger@calpoly.edu</a> and <a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a><br>
<br>
</div></div>