#8209: make docstring processing available for introspection, and fix mathtt
-----------------------------+----------------------------------------------
   Reporter:  jhpalmieri     |       Owner:  mvngu     
       Type:  defect         |      Status:  new       
   Priority:  major          |   Milestone:  sage-4.3.3
  Component:  documentation  |    Keywords:            
     Author:  John Palmieri  |    Upstream:  N/A       
   Reviewer:                 |      Merged:            
Work_issues:                 |  
-----------------------------+----------------------------------------------
 Two issues: several docstrings contain {{{\mathtt{self}}}}, and jsMath
 doesn't recognize this command, so it's not typeset correctly, either with
 introspection from the notebook or in the reference manual.  Do this in
 the notebook, for example:
 {{{
 sage: a = 5
 sage: a.is_power_of?
 }}}
 Or look at the docstring for {{{is_power_of}}} in sage.rings.integer in
 the reference manual (assuming you've built the ref manual with the '--
 jsmath' option).

 Second, several docstrings use dollar signs, and while these are processed
 correctly for the reference manual (turning {{{$x=y$}}} into {{{`x=y`}}}),
 they are not dealt with in introspection in the notebook.  Evaluate
 {{{sage.categories.g_sets.GSets?}}}, for example: you'll see {{{$G$}}}
 rather than ''G''.

 The attached patch therefore does these things:

  - moves the function {{{process_dollars}}} from
 SAGE_ROOT/devel/sage/doc/common/conf.py to
 SAGE_ROOT/devel/sage/sage/misc/sagedoc.py, where it can be used to format
 each docstring before displaying it.

  - implements a similar function {{{process_mathtt}}} which converts
 {{{\mathtt{blah}}}} to {{{\verb|blah|}}}, which jsMath can handle.  Oh,
 except on the command line, it just turns {{{\mathtt{blah}}}} to
 {{{blah}}}, which I think is easier to read.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8209>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to