I am trying to code a command in LaTeX to type the tables used in the computation of the Ruffini-Horner algorithm. You can see in the Wikipedia link above that these are rather simple tables. There is a vertical line at the beginning, after the first column, and there is a horizontal line at the end, before the last row.
I would like to have a command that I can pass the numerical entries of the table and ir draw the rest.
How to do this?
I would like something like \ruffini{...}
and in entries we either enter the list of numbers, perhaps separated by commas. Or maybe even entering the numbers with the separators &
and \\
to format in what position the go in the table. But I wouldn't want to be thinking about the lines in the table. I would like the command to take care of the line.
Best Answer
We can build the table row by row; the syntax is:
Here are the macros:
A variation for the “Italian style” scheme.