Sage: Ticket #10787: Operation tables: multiline names for elements, latex names for elements
https://trac.sagemath.org/ticket/10787
<p>
In operation tables like Cayley tables, there are two problems right now:
</p>
<ul><li>if an element's name takes more than one line, the output looks bad. This example was reported on <a class="ext-link" href="http://ask.sagemath.org/question/383/badly-formatted-cayley-table"><span class="icon"></span>ask.sagemath.org</a>:
<pre class="wiki">sage: G=SL(2,ZZ)
sage: identity = matrix(ZZ, [[1,0], [0,1]])
sage: G.cayley_table(names='elements',elements=[identity, -identity])
</pre></li><li>when producing LaTeX output, the LaTeX code for the element should be used rather than its <code>_repr_</code>. Then matrices (for example) would work well automatically.
</li></ul>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/10787
Trac 1.1.6jhpalmieriTue, 15 Feb 2011 21:40:13 GMTcc changed
https://trac.sagemath.org/ticket/10787#comment:1
https://trac.sagemath.org/ticket/10787#comment:1
<ul>
<li><strong>cc</strong>
<em>nthiery</em> added; <em>robert.marik</em> removed
</li>
</ul>
TicketrbeezerTue, 15 Feb 2011 22:03:56 GMTcc changed
https://trac.sagemath.org/ticket/10787#comment:2
https://trac.sagemath.org/ticket/10787#comment:2
<ul>
<li><strong>cc</strong>
<em>kcrisman</em> added
</li>
</ul>
<p>
Yes, lets close <a class="closed ticket" href="https://trac.sagemath.org/ticket/10786" title="defect: misformatted cayley tables for matrix groups (closed: duplicate)">#10786</a> and work on this here.
</p>
<p>
John's answer on ask.sagemath.org is a good one, give the elements simple strings as names. Using the "real" elements was meant for things like integers mod n or short permutations, the alternate names were meant for big messes (like matrices). Maybe a documentation upgrade is in order. Or we could test for multiline names (look for \n) and fail gracefully. Getting the textual output to "work" with multiline elements would be a nightmare.
</p>
<p>
So, yes, this is a job for latex (and the <code>_repr_</code> fix suggested. Right now this is also mildly broken in the notebook, since jsMath does not like the array environment (IIRC). I've been waiting for the <code>MathJax</code> upgrade to tackle that as well.
</p>
TicketkcrismanWed, 16 Feb 2011 01:20:58 GMT
https://trac.sagemath.org/ticket/10787#comment:3
https://trac.sagemath.org/ticket/10787#comment:3
<p>
Hilarious. Another reason not to like ask.sagemath.org. Yes, do close <a class="closed ticket" href="https://trac.sagemath.org/ticket/10786" title="defect: misformatted cayley tables for matrix groups (closed: duplicate)">#10786</a> as long as you feel like this one's not too big.
</p>
<p>
Incidentally, +1 on finding a fix for arrays in the notebook!
</p>
TicketrbeezerFri, 20 May 2011 17:49:23 GMT
https://trac.sagemath.org/ticket/10787#comment:4
https://trac.sagemath.org/ticket/10787#comment:4
<p>
See related <a class="needs_review ticket" href="https://trac.sagemath.org/ticket/11362" title="defect: Repair show for Cayley tables as MathJax does not support setlength (needs_review)">#11362</a> which could probably be fixed in the same pass (perhaps once <code>MathJax</code> is added into the notebook).
</p>
TicketjdemeyerTue, 13 Aug 2013 15:35:53 GMTmilestone changed
https://trac.sagemath.org/ticket/10787#comment:5
https://trac.sagemath.org/ticket/10787#comment:5
<ul>
<li><strong>milestone</strong>
changed from <em>sage-5.11</em> to <em>sage-5.12</em>
</li>
</ul>
Ticketvbraun_spamThu, 30 Jan 2014 21:20:52 GMTmilestone changed
https://trac.sagemath.org/ticket/10787#comment:6
https://trac.sagemath.org/ticket/10787#comment:6
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.1</em> to <em>sage-6.2</em>
</li>
</ul>
Ticketvbraun_spamTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/10787#comment:7
https://trac.sagemath.org/ticket/10787#comment:7
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
Ticketvbraun_spamSun, 10 Aug 2014 16:51:03 GMTmilestone changed
https://trac.sagemath.org/ticket/10787#comment:8
https://trac.sagemath.org/ticket/10787#comment:8
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-6.4</em>
</li>
</ul>
Ticket