Commits (1)
......@@ -278,7 +278,7 @@ class OperationTable(SageObject):
*
+
sage: T._latex_()
'{\\setlength{\\arraycolsep}{2\\ex}\n\\begin{array}{r|*{0}{r}}\n\\multicolumn{1}{c|}{\\ast}\\\\\\hline\n\\end{array}}'
'{\\setlength{\\arraycolsep}{2ex}\n\\begin{array}{r|*{0}{r}}\n\\multicolumn{1}{c|}{\\ast}\\\\\\hline\n\\end{array}}'
If the algebraic structure cannot be listed (like when it is infinite)
then there is no way to create a table. ::
......@@ -673,7 +673,7 @@ class OperationTable(SageObject):
b| b c a
c| c a b
sage: T._latex_()
'{\\setlength{\\arraycolsep}{2\\ex}\n\\begin{array}{r|*{3}{r}}\n\\multicolumn{1}{c|}{\\times}&a&b&c\\\\\\hline\n{}a&a&b&c\\\\\n{}b&b&c&a\\\\\n{}c&c&a&b\\\\\n\\end{array}}'
'{\\setlength{\\arraycolsep}{2ex}\n\\begin{array}{r|*{3}{r}}\n\\multicolumn{1}{c|}{\\times}&a&b&c\\\\\\hline\n{}a&a&b&c\\\\\n{}b&b&c&a\\\\\n{}c&c&a&b\\\\\n\\end{array}}'
TESTS::
......@@ -1000,13 +1000,13 @@ class OperationTable(SageObject):
sage: R=Integers(2)
sage: T=OperationTable(R, operation=operator.mul)
sage: T._latex_()
'{\\setlength{\\arraycolsep}{2\\ex}\n\\begin{array}{r|*{2}{r}}\n\\multicolumn{1}{c|}{\\ast}&a&b\\\\\\hline\n{}a&a&a\\\\\n{}b&a&b\\\\\n\\end{array}}'
'{\\setlength{\\arraycolsep}{2ex}\n\\begin{array}{r|*{2}{r}}\n\\multicolumn{1}{c|}{\\ast}&a&b\\\\\\hline\n{}a&a&a\\\\\n{}b&a&b\\\\\n\\end{array}}'
"""
n = self._n
names = self._names
# Headers
table = ['{\\setlength{\\arraycolsep}{2\\ex}\n']
table = ['{\\setlength{\\arraycolsep}{2ex}\n']
table.append('\\begin{array}{r|*{'+str(n)+'}{r}}\n')
table.append('\\multicolumn{1}{c|}{'+self._latex_symbol+'}')
table += ['&'+names[i] for i in range(n)]
......