Opened 3 years ago

Closed 13 months ago

#26606 closed defect (fixed)

Bug in latex for power series with greek variable names

Reported by: roed Owned by:
Priority: minor Milestone: sage-9.3
Component: algebra Keywords:
Cc: slelievre Merged in:
Authors: Hoa Nguyen Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: c98e706 (Commits, GitHub, GitLab) Commit: c98e706666ffefd1f110e10829015c8e0b4b3bc2
Dependencies: #29892 Stopgaps:

Status badges

Description (last modified by mkoeppe)

sage: R.<beta> = QQ[]
sage: S.<x> = R[[]]
sage: latex(beta*x)
\betax

See also:

  • #14509 Fix LaTeX of free algebras (and repr_lincomb)

Change History (13)

comment:1 Changed 18 months ago by gh-DaveWitteMorris

  • Keywords beginner added
  • Milestone changed from sage-8.5 to sage-9.2

The bug will probably be easy to fix if its location in the source code can be found. Presumably, the latex string for a power series is constructed by concatenating the latex strings of its parts. To kill the bug, add a space in between: change latex(a) + latex(b) to latex(a) + ' ' + latex(b). This is safe, because latex ignores extraneous spaces in math formulas.

(For anyone who does not know latex: \betax should be \beta x.)

comment:2 Changed 18 months ago by mkoeppe

  • Dependencies set to #29869

comment:3 Changed 18 months ago by gh-DaveWitteMorris

  • Keywords beginner removed

comment:4 Changed 17 months ago by mkoeppe

  • Dependencies changed from #29869 to #29892
  • Description modified (diff)

comment:5 Changed 17 months ago by mkoeppe

  • Cc slelievre added

comment:6 Changed 14 months ago by hoanguyen

  • Branch set to u/hoanguyen/bug_in_latex_for_power_series_with_greek_variable_names

comment:7 Changed 14 months ago by git

  • Commit set to dd4e4d359dd033c3888bc95c3cdcf22b2f04bb35

Branch pushed to git repo; I updated commit sha1. New commits:

dd4e4d3Add a space between x and var in PowerSeries._latex_()

comment:8 Changed 14 months ago by chapoton

Hello, please

  • add your full real name here above in the Authors: field of the trac page
  • add a doctest for your fix in the modified method documentation
  • set the status to "needs_review" once done

comment:9 Changed 14 months ago by git

  • Commit changed from dd4e4d359dd033c3888bc95c3cdcf22b2f04bb35 to 2823ab427a0d16d346718e6cedcc40baf23dabd9

Branch pushed to git repo; I updated commit sha1. New commits:

2823ab4Add doctest

comment:10 Changed 14 months ago by hoanguyen

  • Authors set to Hoa Nguyen
  • Status changed from new to needs_review

comment:11 Changed 14 months ago by git

  • Commit changed from 2823ab427a0d16d346718e6cedcc40baf23dabd9 to c98e706666ffefd1f110e10829015c8e0b4b3bc2

Branch pushed to git repo; I updated commit sha1. New commits:

534e473Removing trailing whitespaces on the left using str.lstrip(" ")
c98e706Modify previous doctest of PowerSeries._latex_()

comment:12 Changed 14 months ago by chapoton

  • Milestone changed from sage-9.2 to sage-9.3
  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

ok, thanks. Looks good

comment:13 Changed 13 months ago by vbraun

  • Branch changed from u/hoanguyen/bug_in_latex_for_power_series_with_greek_variable_names to c98e706666ffefd1f110e10829015c8e0b4b3bc2
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.