# How to create the syntax of a LaTeX table given the dimensions of a matrix-shaped list?

jospercomp shared this question 8 months ago

How to create the syntax of a LaTeX table given the dimensions of a matrix-shaped list?

m1={{12, 23}, {34, 45}, {56, 67}, {78, 89}}

***

\begin{array}{|c|c|}

\hline

12 & 23 \\ \hline

34 & 45 \\ \hline

56 & 67 \\ \hline

78 & 89 \\ \hline \end{array}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%

m2={{12, 34, 56, 78}, {23, 45, 67, 89}}

***

\begin{array}{|c|c|c|c|c|}

\hline

12 & 34 & 56 & 78 \\ \hline

23 & 45 & 67 & 89 \\ \hline

\end{array}

TableText({12, 34, 56, 78}, {23, 45, 67, 89}, "c|_");

TableText(l1, l2, l3, "c|_");

2
1

How do I put the edges on the table?

1

How do I put the edges on the table?

2

Did you check the examples?

I've updated this one with a "Copy to Clipboard" button :)

https://www.geogebra.org/m/Eq5T3vV3

1

My table has only 3 rows but the columns vary according to the initial values.

Could I create a string in javascript that contains the syntax of the table so that later a command visualizes it in latex form?

1

TableText({12, 34, 56, 78}, {23, 45, 67, 89}, "c|_");

TableText(l1, l2, l3, "c|_");