Positive review, thank you!

Andrey


On Feb 8, 9:52 pm, William Stein <[email protected]> wrote:
> On Mon, Feb 8, 2010 at 8:21 PM, Andrey Novoseltsev <[email protected]> wrote:
> > Hello,
>
> > As of now show and view seem to do the same thing, yet show used to
> > produce displayed equations and I liked it mainly for bigger size of
> > fractions, but also for centering the output. Is there still a
> > possibility to get the old-style behaviour? There was some discussion
> > that show does not work in general as good as view, but at least for
> > matrices/rational functions it was just fine.
>
> > Also, if it is written somewhere in help how to do it, it is not easy
> > to find. Perhaps such functions deserve a mention on the notebook help
> > page? (It does have a note about typesetting everything via the
> > checkbox, it could also say something about other methods of output.)
>
> > Thank you!
> > Andrey
>
> Huge +1.    I just tried "show(...)" in the notebook, and looked at
> the generated HTML.  Indeed it is
>
>   <span class="math">
>
> when it should be
>
>   <div class="math">
>
> which means "display math".
>
> Here's the relevant code in sage/misc/functional.py that now gets
> called by show:
>
> def _do_show(x):
>     if sage.plot.plot.DOCTEST_MODE:
>         return sage.misc.latex.latex(x)
>     from latex import view
>     view(x)
>     #raise AttributeError, "object %s does not support show."%(x, )
>
> Note the call to view :-(
>
> Here is the guilty patch:
>
> wst...@ubuntu:~/sage/devel/sage/sage/misc$ hg export 13803|more
> # HG changeset patch
> # User J. H. Palmieri <[email protected]>
> # Date 1264540865 28800
> # Node ID a597eec982bcd7dfc7252355bb7a526819564006
> # Parent  6b139f7a44512b9f7e0883c45d229d337b086649
> #8084: fix show for strings, etc.
>
> diff -r 6b139f7a4451 -r a597eec982bc sage/misc/functional.py
> --- a/sage/misc/functional.py   Tue Jan 26 22:25:59 2010 +0100
> +++ b/sage/misc/functional.py   Tue Jan 26 13:21:05 2010 -0800
> @@ -1361,9 +1361,6 @@
>      _do_show(x)
>
>  def _do_show(x):
> -    if sage.server.support.EMBEDDED_MODE:
> -        print '<html><div
> class="math">%s</div></html>'%sage.misc.latex.latex(x)
> -        return sage.misc.latex.LatexExpr('') # so no visible output
>      if sage.plot.plot.DOCTEST_MODE:
>          return sage.misc.latex.latex(x)
>
> So this looks like an accidental regression that was introduced in the course 
> of
> fixing another bug.     This is now trac  8219:
>
>      http://trac.sagemath.org/sage_trac/ticket/8219
>
> I've posted a patch there.  Somebody please review it.
>
>  -- William

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to