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

jospercomp shared this question 8 months ago
Answered

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}

16ff91779b868551ee88286541f0cd23

Best Answer
photo

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

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

Comments (6)

photo
1

How do I put the edges on the table?

photo
1

How do I put the edges on the table?

photo
2

Did you check the examples?


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


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

photo
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?

photo
1

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

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

photo
© 2020 International GeoGebra Institute