5

The code below produces the following output where the elements in the last column are incorrectly placed. Is this easy to fix?

enter image description here

\documentclass{article}

\usepackage{nicematrix}

\ExplSyntaxOn

\NewDocumentCommand\eratosthenes{ m }{
$\AutoNiceMatrix[hvlines, columns-width=auto]{#1-#1}{\cellval{#1}{\arabic{iRow}}{\arabic{jCol}}}$ }

\NewDocumentCommand\cellval{ mmm }{
\int_eval:n{#3 + #1*(#2 - 1)} }

\ExplSyntaxOff

\begin{document}

\eratosthenes{10}

\end{document}

projetmbc
  • 13,315

1 Answers1

3

That bug has been corrected in the latest version of nicematrix (v. 6.20a 2023-06-30).

F. Pantigny
  • 40,250