On Sun, Mar 29, 2009 at 5:07 PM, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
> On Mar 29, 4:46 pm, William Stein <wst...@gmail.com> wrote:
>> On Sun, Mar 29, 2009 at 4:14 PM, John H Palmieri <jhpalmier...@gmail.com> 
>> wrote:
>>
>>
>>
>> > In the notebook, would it be at all feasible to have the math in
>> > docstrings (that is, text in backquotes like `n \times n`) run through
>> > jsmath?
>>
>> Yes, that's definitely possible.  Also, something like pygments (?) I
>> guess could make it nicely highlighted.   Doing what you request has
>> been on "the" todo list ever since the notebook was written.
>
> Where in the code is the docstring (and its shaded box, etc.)
> constructed?

In sage/server/support.py the function "docstring" constructs the
docstring for an object.

The reason the introspection (docstring) output appears in a pre
environment is this line in sage/server/notebook/cell.py:

            self.__introspect_html = '<pre class="introspection">'+html+'</pre>'

I think if you replace that by

            self.__introspect_html = '<div class="introspection">'+html+'</div>'

and were to make the function "docstring" output nice HTML, then that
nice HTML would appear in the notebook.

Note that there is also some introspection css in the file
server/notebook/css.py which is relevant to say changing background
colors, transparency, etc.

 -- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to