Handle missing verbatim arguments and empty LaTeX matrices

This commit is contained in:
Andras Schmelczer 2026-10-27 20:05:37 +00:00
commit 3dfaed5041

View file

@ -386,7 +386,7 @@ def fmt_matrix_environment_node(node, l2tobj):
state.new_row() # finish the last row
# now format the contents as array --
max_char_width = max((len(x) for row in state.matrix_rows for x in row))
max_char_width = max((len(x) for row in state.matrix_rows for x in row), default=0)
matrix_contents = "; ".join(
(
" ".join((x.rjust(max_char_width, " ") for x in row))