Skip to content

Commit 249ce49

Browse files
committed
fix latex for empty skew partitions
1 parent c3028e7 commit 249ce49

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

src/sage/combinat/skew_partition.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,16 @@ def _latex_diagram(self):
267267
&\lr{\ast}&\lr{\ast}\\\cline{2-3}
268268
\end{array}$}
269269
}
270+
271+
TESTS:
272+
273+
Check that :trac:`34760` is fixed::
274+
275+
sage: print(SkewPartition([[],[]])._latex_diagram())
276+
{\emptyset}
277+
270278
"""
271-
if len(self._list) == 0:
279+
if not any(self._list):
272280
return "{\\emptyset}"
273281

274282
char = self.parent().options.latex_diagram_str
@@ -294,8 +302,15 @@ def _latex_young_diagram(self):
294302
&\lr{\phantom{x}}&\lr{\phantom{x}}\\\cline{2-3}
295303
\end{array}$}
296304
}
305+
306+
TESTS:
307+
308+
Check that :trac:`34760` is fixed::
309+
310+
sage: print(SkewPartition([[],[]])._latex_young_diagram())
311+
{\emptyset}
297312
"""
298-
if len(self._list) == 0:
313+
if not any(self._list):
299314
return "{\\emptyset}"
300315

301316
from sage.combinat.output import tex_from_array
@@ -319,8 +334,15 @@ def _latex_marked(self):
319334
\lr{X}&\lr{\phantom{x}}&\lr{\phantom{x}}\\\cline{1-3}
320335
\end{array}$}
321336
}
337+
338+
TESTS:
339+
340+
Check that :trac:`34760` is fixed::
341+
342+
sage: print(SkewPartition([[],[]])._latex_marked())
343+
{\emptyset}
322344
"""
323-
if len(self._list) == 0:
345+
if not any(self._list):
324346
return "{\\emptyset}"
325347

326348
from sage.combinat.output import tex_from_array

0 commit comments

Comments
 (0)