#14839: Calling latex(...) shouldn't typeset the result
----------------------------------------------+-----------------------------
Reporter: iandrus | Owner: was
Type: enhancement | Status: positive_review
Priority: minor | Milestone:
sage-duplicate/invalid/wontfix
Component: user interface | Resolution:
Keywords: latex notebook typesetting | Work issues:
Report Upstream: N/A | Reviewers: Volker Braun
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------------------------+-----------------------------
Comment (by was):
Replying to [comment:9 novoselt]:
> For a while Sage would show precisely the latex code when typesetting
`LatexExpr`, but people didn't like it and it was changed in #12156.
That is probably the root cause of this issue. So right now we have:
{{{
a = 2/3
latex(a)
# displays \frac{2}{3}
show(a)
# shows a nice fraction
show(latex(a))
# shows a nice fraction... because
latex(a) == latex(latex(a))
}}}
To my mind this behavior is questionable. When I wrote the latex
function, I meant for it to have a docstring like this (evidently, I never
wrote a docstring, or at least the docstring for latex promises nothing
meaningful): "latex(x) returns a chunk of latex, which when typeset in
math mode provides a visual representation of the object x." With this
interpretation, if the object x is a {{{LatexExpr}}} such as
{{{\frac{2}{3}}}}, then a visual representation of that {{{LatexExpr}}}
would be {{{\verb|\frac{2}{3}|}}}.
What do you think?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14839#comment:10>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.