Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1441 closed defect (invalid)

[invalid*3] latex(x1) -> x_1 might cause problems

Reported by: zimmerma Owned by: was
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: calculus Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Consider the following:

sage: var('x_1,x1');
sage: x_1 - x1
x_1 - x1
sage: latex(x_1 - x1)
x_{1} - x_{1}

The automatic rule latex(x1) -> x_1 might thus cause ambiguities if both x1 and x_1 exist as variables.

Change History (6)

comment:1 Changed 15 years ago by was

  • Milestone changed from sage-2.9 to sage-2.9.1

I can see no possible fix for this. Suggest something. I mean, the only option I can think of would be for latex(x1) to be x1, which isn't even latex for a variable (since that's "x times 1").

Invalid?

comment:2 Changed 15 years ago by zimmerma

Here is what Maple does:

> latex(x1);
{\it x1}
> latex(x_1);
{\it x\_1}

This seems a reasonable alternative to me.

comment:3 Changed 15 years ago by rlm

  • Summary changed from latex(x1) -> x_1 might cause problems to [invalid*2] latex(x1) -> x_1 might cause problems

Joel Mohler also votes invalid.

comment:4 Changed 15 years ago by robertwb

The translation x1 -> x_1 far outweight the potential ambiguity in my mind. However, perhaps a variable named "x_1" should actually be latexed as "x\_1"

comment:5 Changed 15 years ago by rlm

  • Resolution set to invalid
  • Status changed from new to closed
  • Summary changed from [invalid*2] latex(x1) -> x_1 might cause problems to [invalid*3] latex(x1) -> x_1 might cause problems

comment:6 Changed 15 years ago by mabshoff

  • Milestone changed from sage-2.9.1 to sage-duplicate/invalid
Note: See TracTickets for help on using tickets.