Opened 12 years ago

Closed 11 years ago

#6211 closed defect (fixed)

[with patch, positive review] typesetting exp sometimes broken

Reported by: burcin Owned by:
Priority: major Milestone: sage-4.0.2
Component: symbolics Keywords:
Cc: mhansen Merged in: 4.0.2.alpha0
Authors: Burcin Erocal Reviewers: Nick Alexander
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by kcrisman)

Typesetting e.g. esqrt(kappa) doesn't currently work.

Attachments (1)

trac_6211-exp_latex.patch (6.0 KB) - added by burcin 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 follow-up: Changed 11 years ago by burcin

Latex typesetting of sub expressions also seem to be broken. This is probably caused by pynac not passing on the printing context when it calls the print function on the subexpression, though I haven't looked at any code yet.

Here is an example:

sage: var('kappa')
sage: x = sqrt(kappa)
sage: latex(x)
sage: F = exp(x)
sage: F
sage: latex(F)

comment:2 in reply to: ↑ 1 Changed 11 years ago by gmhossain

Burcin: It seems the problem of sub-expression not getting typeset properly is specific to exp function. I could get it working by adding the _latex_composition method to class Function_exp (sage.functions.log) as

    def _latex_composition(self, x):
        from sage.misc.latex import latex
        return "e^{%s}"%(latex(x))

Note: My sage copy has patch #5711 applied on it.

comment:3 Changed 11 years ago by kcrisman

  • Description modified (diff)
  • Summary changed from typesetting symbolic integrals broken to typesetting exp sometimes broken

This was about typesetting integrals, but since a description of exp not typesetting properly was added to this and #5711 is now largely about the typesetting of integrals etc., it seemed wise to change the description and summary. The commentary above seems pretty useful!

Changed 11 years ago by burcin

comment:4 Changed 11 years ago by ncalexan

  • Authors set to Burcin Erocal
  • Merged in set to 4.0.2.alpha0
  • Resolution set to fixed
  • Reviewers set to Nick Alexander
  • Status changed from new to closed
  • Summary changed from typesetting exp sometimes broken to [with patch, positive review] typesetting exp sometimes broken

Fine by me.

Note: See TracTickets for help on using tickets.