This works fine when the variable is of type 
sage.symbolic.expression.Expression
but when I make the polynomial ring PolynomialRing(QQ, a), it breaks. Here 
is the specific code:

a = var( 'a1comma2', latex_name='a_{ %d, %d }' % (1,2))
a; view(a); type(a); 

a1comma2a1,2
<type 'sage.symbolic.expression.Expression'>


vars = PolynomialRing(QQ, a).gens(); vars; type(vars[0]); view(vars[0])

(a1comma2,)
<type
'sage.rings.polynomial.polynomial_rational_flint.Polynomial_rational_fli\
nt'>a1comma2



Adam





On Wednesday, March 28, 2012 1:14:24 AM UTC-6, P Purkayastha wrote:
>
> something like
> a11 = var('a11', latex_name='a_{1,1}')
>
> Then,
> view(a11)
> will show you the latex representation.
>
> On Wednesday, March 28, 2012 7:41:41 AM UTC+8, Adam Sorkin wrote:
>>
>> I need to use the notation of doubly indexed variables, e.g., a_{i,j} in 
>> latex. Currently, the variables belong to QQ( a_{i,j}), the field of 
>> fractions of a polynomial ring. Now because sage will not let me write
>> var( 'a1,1' )
>> to represent the variable a_{1,1}, I am currently coding them in as
>> var( 'a1comma1')
>>
>> However, the output is not so easy to read. I will be satisfied if there 
>> is a straightforward way to change the latex representation of the variable 
>> above, or a simple method already implemented to handle doubly indexed 
>> variables. 
>>
>> Adam
>>
>

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to