#432 wrong TeX output for indexed variables with exponent

None
closed
nobody
Lisp Core (471)
3
2012-12-18
2003-11-02
No

This simple session shows the error:

(C1) tex(expand((1+alpha[1])^2));

$$\alpha^2\left(1\right)+2\,\alpha_{1}+1$$
(D1) FALSE

Instead of \alpha^2\left(1\right), I would have expected
\alpha_{1}^2

Discussion

  • Barton Willis

    Barton Willis - 2003-11-15

    Logged In: YES
    user_id=895922

    The file tex-mexpt.lisp has a possible fix for this bug.

    (C1) load("l:/tex-mexpt.lisp")$
    (C2) tex(expand((1+alpha[1])^2));
    $$\alpha_{1}^2+2\,\alpha_{1}+1$$
    (D2) FALSE

    Here is another problem: Powers of subscripted functions
    don't TeX with the exponent immediately following the
    function

    (C3) f[5](x)^9;
    (D3) f[5](x)^9
    (C4) tex(%);
    $$f_{5}(x)^9$$

    Barton

     
  • Barton Willis

    Barton Willis - 2003-11-15
     
  • Barton Willis

    Barton Willis - 2003-11-15

    Logged In: YES
    user_id=895922

    The file tex-mexpt.lisp has a possible fix for this bug.

    (C1) load("l:/tex-mexpt.lisp")$
    (C2) tex(expand((1+alpha[1])^2));
    $$\alpha_{1}^2+2\,\alpha_{1}+1$$
    (D2) FALSE

    Here is another problem: Powers of subscripted functions
    don't TeX with the exponent immediately following the
    function

    (C3) f[5](x)^9;
    (D3) f[5](x)^9
    (C4) tex(%);
    $$f_{5}(x)^9$$

    Barton

     
  • Barton Willis

    Barton Willis - 2003-11-15
     
  • Barton Willis

    Barton Willis - 2003-11-15

    Logged In: YES
    user_id=895922

    The file tex-mexpt.lisp has a possible fix for this bug.

    (C1) load("l:/tex-mexpt.lisp")$
    (C2) tex(expand((1+alpha[1])^2));
    $$\alpha_{1}^2+2\,\alpha_{1}+1$$
    (D2) FALSE

    Here is another problem: Powers of subscripted functions
    don't TeX with the exponent immediately following the
    function

    (C3) f[5](x)^9;
    (D3) f[5](x)^9
    (C4) tex(%);
    $$f_{5}(x)^9$$

    Barton

     
  • Barton Willis

    Barton Willis - 2003-11-15
     
  • Robert Dodier

    Robert Dodier - 2006-07-10

    Logged In: YES
    user_id=501686

    Example in original report is OK. Here is the 5.9.3 output:

    (%i1) tex(expand((1+alpha[1])^2));
    $$\alpha_{1}^2+2\,\alpha_{1}+1$$

    Example shown in comment below still the same:

    (%i3) tex(f[5](x)^9);
    $$f_{5}(x)^9$$

    I guess that's not quite right, but it seems like a pretty
    minor bug so I've reduced the priority.

     
  • Robert Dodier

    Robert Dodier - 2006-07-10
    • labels: --> Lisp Core
    • priority: 5 --> 3
     
  • Robert Dodier

    Robert Dodier - 2012-12-18
    • status: open --> closed
    • milestone: --> None
     
  • Robert Dodier

    Robert Dodier - 2012-12-18

    Problem mentioned in bug description is long since fixed. Problem mentioned in comments still exists; I've opened a separate report (bug report #2521) for it. Closing this report.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks