On Wed, Mar 18, 2009 at 6:28 PM, John H Palmieri <jhpalmier...@gmail.com> wrote:
> This is a very interesting idea, and I think I can do it for ZZ,
> QQbar, etc., but I don't know how to deal with GF(p).  That is, in
> docstrings, you presumably want GF(p) to appear as is, while to
> evaluate latex(GF(p)), indeed to evaluate GF(p), p has to be an actual
> integer.  Any ideas how to use the _latex_ method for GF() to typeset
> 'GF(p)' for p a variable or a string?

Well, it's a bit of a hack, but this works:

sage: latex(GF(2^5, 'a')).replace('2', 'p').replace('5', 'k')
'\\mathbf{F}_{p^{k}}'

Of course, just hardcoding \mathbf{F}_{p^k} also works, and is much simpler :)

Carl

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to