I need to tabulate some matrix data of dimensions NxN where N can be 4 to 100. For N>20 (N>35 in landscape) the table must span in several pages. Edit: I forgot to say that the data consists of only real numbers. I would like to have control in producing these numbers wrt their number of digits etc.
I am unsure as to what table package to use, so I am trying to test with some synthetic data. But I have problem creating it, in tabular form.
For example:
\documentclass[a4paper,12pt]{article} \usepackage{lscape} \usepackage{longtable} \usepackage{pgffor} \usepackage{array} \begin{document} \newcommand{\N}{40} % data size % test to see a row is created correctly: % A -> & % N -> \\ \foreach \i in {1,...,\N} { \i=\ifnum\i<\N A \else N \fi } \begin{landscape} \begin{longtable}{*{40}{c|}} \hline % Generate header row \foreach \i in {1,...,\N} { \i \ifnum\i<\N && \else \\ \fi } % <<< line 23 \hline \endfirsthead % % Repeat header on subsequent pages \foreach \i in {1,...,\N} { \i \ifnum\i<\N && \else \\ \fi } \hline \endhead \foreach \i in {1,...,\N} { \foreach \i in {1,...,\N} { 1.2 \ifnum\i<\N && \else \\ \fi } } \end{longtable} \end{landscape} \end{document} But, it complains about:
! Missing \endgroup inserted. <inserted text> \endgroup l.23 } (line 23 is marked in my code above). I created a row at the beggining to check the correct number of '&' and '\'. Isn't the row correct?



lipsumor `kantlipsum?&&each iteration so making 80 columns in a 40 column table.